Author SHA1 Message Date
dependabot[bot] ff188f5a6c Bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `github/codeql-action/init` from 3.37.9 to 4.39.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/6f5948dfacef28e207b48d0905cf90c03365536d...33d7b85da1a04171e211befe2c739303b9a4c066)

Updates `github/codeql-action/analyze` from 3.37.9 to 4.39.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/6f5948dfacef28e207b48d0905cf90c03365536d...33d7b85da1a04171e211befe2c739303b9a4c066)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.39.3
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.39.3
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-11-13 07:44:21 +00:00
15 changed files with 271 additions and 324 deletions

No files matched your search

+2 -2
View File
@@ -88,7 +88,7 @@ jobs:
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Initialize CodeQL
uses: github/codeql-action/init@6f5948dfacef28e207b48d0905cf90c03365536d # v3
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v3
with:
languages: c-cpp
build-mode: manual
@@ -99,4 +99,4 @@ jobs:
run: make build
- name: Analyze
uses: github/codeql-action/analyze@6f5948dfacef28e207b48d0905cf90c03365536d # v3
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v3
-1
View File
@@ -2,7 +2,6 @@
## [Unreleased]
- Build the editor and embedded grid against Kryon's public widget modules.
- Other Kryon apps embed Workbook's own grid with `workbook/grid` and
`workbook/engine`: real cells and formulas, sheet tabs, column widths and
count or money formats. The editor paints with the same grid squares. It
+2 -9
View File
@@ -1,7 +1,7 @@
# workbook
Native spreadsheet editor written in [Ziran](https://git.waozi.xyz/ziranlang/ziran)
with [Kryon](https://git.waozi.xyz/kryonlabs/kryon). Open a document from your file
Native spreadsheet editor written in [Ziran](https://github.com/ziranlang/ziran)
with [Kryon](https://github.com/kryonlabs/kryon). Open a document from your file
manager, drop it onto Workbook, or pass its path directly:
workbook /path/to/file.gnumeric
@@ -97,7 +97,6 @@ A run that hangs is killed after `FUZZ_TIMEOUT` seconds (20 by default).
Ctrl+Y redo (also Ctrl+Shift+Z)
wheel scroll rows
Ctrl+S save
Chart button create a linked formula chart from a selected label/value range
Formula cells show their calculated value in the grid and their source in the
formula bar. The toolbar provides save and row/column insertion and deletion,
@@ -121,12 +120,6 @@ fill, and row or column insertion and deletion, each with the formula
references it moved. Undoing a change selects the cells it touched again and
shows their sheet. Up to the last 100 changes can be undone.
Select a two-column label/value range, then use **Chart** in the toolbar or
**Sheet → Create formula chart from selection**. Workbook adds a new sheet whose
labels and values link to the selected cells, plus a live text bar chart. This
portable chart works in ordinary `.gnumeric` documents and updates when its
source values change.
## profiles
`workbook` is the generic profile. `geld` is a link to the same program; it
+125 -194
View File
@@ -1,63 +1,65 @@
Menu :: #import "kryon/menu";
ContextMenu :: #import "kryon/context_menu";
TabBar :: #import "kryon/tab_bar";
TextField :: #import "kryon/text_field";
Box :: #import "kryon/box";
Text :: #import "kryon/text";
Button :: #import "kryon/button";
#import "kryon/system_clipboard"
#if !#defined(KRYON_HOSTED_UI) {
#import "kryon/key_input"
}
#if !#defined(KRYON_HOSTED_UI) {
#import "kryon/tree_input"
}
// Workbook desktop editor: a toolbar, sheet tabs, a formula bar, and the
// cell grid of the spreadsheet engine.
#import "kryon/geometry"
#import "kryon/session"
#import "kryon/drawing_props"
#import "kryon/control_props"
#import "kryon/text_input"
#import "kryon/input_protocol"
#import "kryon/app_protocol"
#if #defined(KRYON_HOSTED_UI) {
#import "geometry"
#import "session"
#import "drawing_props"
#import "box_props"
#import "box_widget"
#import "button_props"
#import "button_widget"
#import "control_props"
#import "text_props"
#import "text_widget"
#import "text_input"
#import "text_input_props"
#import "text_field_widget"
#import "tab_bar_props"
#import "tab_bar_widget"
#import "context_menu_widget"
#import "menu_props"
#import "kryon/input_protocol"
#import "kryon/app_protocol"
} else {
using UI :: #import "Widgets";
}
#if #defined(KRYON_HOSTED_UI) {
Engine :: #import "portable_engine";
#import "kryon/app_context"
Theme :: #import "kryon/app_theme";
} else {
Engine :: #import "engine";
Desktop :: #import "kryon/desktop_runtime";
Desktop :: #import "kryon/Desktop";
Picker :: #import "kryon/file_picker";
}
Json :: #import "std/json_scan";
Json :: #import "json_scan";
// The grid's metrics, colors and cell squares, shared with embedded grids.
Grid :: #import "grid";
#if !#defined(KRYON_HOSTED_UI) {
SystemStyle :: #import "kryon/SystemTheme";
SystemThemeLinux :: #import "kryon/SystemThemeLinux";
SystemStyle :: #import "css/SystemStyle";
SystemThemeLinux :: #import "SystemThemeLinux";
}
#import "std/byte_text_linux"
#import "kryon/font_metrics"
#import "std/text_buffer"
#import "byte_text_linux"
#import "font_metrics"
#import "text_buffer"
#import "std/vec"
#import "std/number_text"
SaveIcon :: #import "mingcute/mingcute_regular_save_2";
RowAddIcon :: #import "mingcute/mingcute_extra_table_row_add";
RowRemoveIcon :: #import "mingcute/mingcute_extra_table_row_remove";
ColumnAddIcon :: #import "mingcute/mingcute_extra_table_column_add";
ColumnRemoveIcon :: #import "mingcute/mingcute_extra_table_column_remove";
LeftIcon :: #import "mingcute/mingcute_regular_arrow_left";
RightIcon :: #import "mingcute/mingcute_regular_arrow_right";
UpIcon :: #import "mingcute/mingcute_regular_arrow_up";
DownIcon :: #import "mingcute/mingcute_regular_arrow_down";
SaveIcon :: #import "mingcute_regular_save_2";
RowAddIcon :: #import "mingcute_extra_table_row_add";
RowRemoveIcon :: #import "mingcute_extra_table_row_remove";
ColumnAddIcon :: #import "mingcute_extra_table_column_add";
ColumnRemoveIcon :: #import "mingcute_extra_table_column_remove";
LeftIcon :: #import "mingcute_regular_arrow_left";
RightIcon :: #import "mingcute_regular_arrow_right";
UpIcon :: #import "mingcute_regular_arrow_up";
DownIcon :: #import "mingcute_regular_arrow_down";
using ButtonEmphasis;
using ButtonTone;
using ControlSize;
using TabBar.TabBarPlacement;
using Text.Wrap;
using TabBarPlacement;
using TextWrap;
#scope_file
@@ -104,7 +106,7 @@ grid_menu_x: float32 = 0.0;
grid_menu_y: float32 = 0.0;
grid_menu_row: bool = false;
clipboard_text: [8192]u8;
menu_state: Menu.MenuState;
menu_state: MenuState;
menus_block_input: bool;
menu_key: s32;
menu_modifiers: s32;
@@ -322,7 +324,7 @@ Frame :: (session: Session, viewport: Rectangle) -> s32 {
}
name: string = SystemThemeLinux.SystemThemeName()
if theme_installed && name == TextUntilNul(theme_name[:]) { return }
unused SystemStyle.SystemPaletteInstall(SystemThemeLinux.SystemPaletteRead())
SystemStyle.StyleInstallSystem(SystemThemeLinux.SystemPaletteRead())
SetText(theme_name[:], name)
theme_installed = true
}
@@ -1095,11 +1097,11 @@ PutEditText :: (state: *EditTextState) {
// The window's own color: the theme's canvas behind every widget.
DrawBackground :: (session: Session, viewport: Rectangle) {
background: Box.Props
background: BoxProps
background.key = cast(u64)7
background.bounds = viewport
background.fill = EditorColor("canvas")
Box.Draw(session, background)
Box(session, background)
}
DrawToolbar :: (session: Session, viewport: Rectangle) {
@@ -1125,13 +1127,6 @@ DrawToolbar :: (session: Session, viewport: Rectangle) {
Engine.WorkbookDeleteColumn(workbook, sheet_index, selected_column)
Changed()
}
chart: Button.Props
chart.id = 1010
chart.label = "Chart"
chart.size = cast(ControlSize)ControlSizeSmall
chart.bounds = Rectangle.{x, layout_origin.y + 28.0, 58.0, 28.0}
x += 60.0
if Button.Draw(session, chart) != 0 { CreateFormulaChart() }
// Touch screens have no arrow keys or wheel. Keep every cell reachable
// while the grid still supports selecting and filling ranges by dragging.
if viewport.width < 600.0 {
@@ -1148,84 +1143,22 @@ DrawToolbar :: (session: Session, viewport: Rectangle) {
}
}
// Make a portable visual chart sheet from a selected label/value range. The
// chart cells retain formulas back to the source sheet, so edits recalculate
// it without a duplicated data table or a plugin-specific chart object.
CreateFormulaChart :: () {
if edit_focused { CommitCell(); EndEdit() }
first_row: s32 = Min(selected_row, range_row)
last_row: s32 = Max(selected_row, range_row)
first_column: s32 = Min(selected_column, range_column)
last_column: s32 = Max(selected_column, range_column)
if last_column <= first_column {
SetText(status[:], "Select label and value columns to create a chart")
return
}
count: s32 = Min(24, last_row - first_row + 1)
if count <= 0 { return }
RecordChange()
name: [64]u8
SetText(name[:], "Chart ")
digits: [16]u8
AppendText(name[:], FormatInteger(cast(s64)Engine.WorkbookSheetCount(workbook) + 1, digits[:]))
// The native engine returns the new sheet; the portable one, 1 or 0.
added: bool
#if #defined(KRYON_HOSTED_UI) {
added = Engine.WorkbookAddSheet(workbook, Engine.CText(TextUntilNul(name[:]))) != 0
} else {
added = Engine.WorkbookAddSheet(workbook, Engine.CText(TextUntilNul(name[:]))) != null
}
if !added {
SetText(status[:], "Could not add a chart sheet")
return
}
chart_sheet: s32 = Engine.WorkbookSheetCount(workbook) - 1
Engine.WorkbookSetCell(workbook, chart_sheet, 0, 0, Engine.CText("Formula chart"))
Engine.WorkbookSetCell(workbook, chart_sheet, 1, 0, Engine.CText("Label"))
Engine.WorkbookSetCell(workbook, chart_sheet, 1, 1, Engine.CText("Value"))
Engine.WorkbookSetCell(workbook, chart_sheet, 1, 2, Engine.CText("Visual bar"))
for offset: 0..count - 1 {
row: s32 = offset + 2
label: [320]u8
SetText(label[:], "=")
EditorSheetPrefix(sheet_index, label[:])
AppendCellName(label[:], first_row + offset, first_column)
Engine.WorkbookSetCell(workbook, chart_sheet, row, 0, Engine.CText(TextUntilNul(label[:])))
value: [320]u8
SetText(value[:], "=")
EditorSheetPrefix(sheet_index, value[:])
AppendCellName(value[:], first_row + offset, first_column + 1)
Engine.WorkbookSetCell(workbook, chart_sheet, row, 1, Engine.CText(TextUntilNul(value[:])))
visual: [256]u8
SetText(visual[:], "=REPT(\"■\",ROUND(MAX(0,B")
AppendText(visual[:], FormatInteger(cast(s64)row + 1, digits[:]))
AppendText(visual[:], ")/MAX(1,MAX($B$3:$B$")
AppendText(visual[:], FormatInteger(cast(s64)count + 2, digits[:]))
AppendText(visual[:], "))*30,0))")
Engine.WorkbookSetCell(workbook, chart_sheet, row, 2, Engine.CText(TextUntilNul(visual[:])))
}
sheet_index = chart_sheet
scroll_row = 0
scroll_column = 0
Changed()
}
// Saving is automatic, so the window says nothing about it unless it fails.
DrawStatus :: (session: Session, viewport: Rectangle) {
if status[0] == 0 { return }
label: Text.Props
label: TextProps
label.key = cast(u64)5
label.text = TextUntilNul(status[:])
label.size = Text.Text14
label.font = Text14
label.bounds = Rectangle.{viewport.x + 180.0, viewport.y + viewport.height - 24.0,
viewport.width - 184.0, 20.0}
Text.Draw(session, label)
Text(session, label)
}
ToolbarIcon :: (session: Session, id: s32, shape: string, x: *float32,
primary: bool) -> bool {
button: Button.Props
button: ButtonProps
button.id = id
button.icon_shape = shape
button.icon_only = true
@@ -1236,7 +1169,7 @@ ToolbarIcon :: (session: Session, id: s32, shape: string, x: *float32,
}
button.bounds = Rectangle.{x.*, layout_origin.y + 28.0, 28.0, 28.0}
x.* = x.* + 30.0
return Button.Draw(session, button) != 0
return Button(session, button) != 0
}
Changed :: () {
@@ -1261,27 +1194,27 @@ DrawSheetTabs :: (session: Session, viewport: Rectangle) {
if count < 1 { return }
// Sixteen tabs fill the bar; a workbook can hold more sheets than that.
if count > 16 { count = 16 }
tabs: [16]TabBar.Tab
tabs: [16]Tab
index: s32 = 0
while index < count {
tabs[index].key = cast(u64)(1100 + index)
tabs[index].label = EditorString(Engine.WorkbookSheetName(workbook, index))
index += 1
}
strip: Box.Props
strip: BoxProps
strip.key = cast(u64)1098
strip.bounds = Rectangle.{viewport.x, viewport.y + viewport.height - TabsBottom, viewport.width, TabsBottom}
strip.fill = HeaderBackground()
strip.border = GridLineColor()
Box.Draw(session, strip)
bar: TabBar.Props
Box(session, strip)
bar: TabBarProps
bar.key = cast(u64)1099
bar.placement = cast(TabBar.TabBarPlacement)TabBarBottom
bar.placement = cast(TabBarPlacement)TabBarBottom
bar.selected_index = sheet_index
bar.bounds = SheetTabsBounds(viewport)
bar.min_tab_width = 72
bar.max_tab_width = 104
result: TabBar.Result = TabBar.Draw(session, bar, tabs[0:count])
result: TabBarResult = TabBar(session, bar, tabs[0:count])
if result.selected_index != sheet_index && result.selected_index >= 0 {
sheet_index = result.selected_index
scroll_row = 0
@@ -1293,14 +1226,14 @@ DrawSheetTabs :: (session: Session, viewport: Rectangle) {
DrawFormulaBar :: (session: Session, viewport: Rectangle, key: s32,
control: bool, typed: []u8, typed_length: s32) {
label: Text.Props
label: TextProps
label.key = cast(u64)3
label.text = "fx"
label.size = Text.Text16
label.font = Text16
label.disabled = true
label.bounds = Rectangle.{viewport.x + 8.0, viewport.y + 61.0, 24.0, 20.0}
Text.Draw(session, label)
result: TextField.Result = RunFormulaField(session, viewport, key, control,
Text(session, label)
result: TextFieldResult = RunFormulaField(session, viewport, key, control,
typed, typed_length)
edit_claim = false
// Typing or moving the cursor ends a pick: the next one inserts anew.
@@ -1420,8 +1353,8 @@ WritePick :: (start: s32, end: s32, new_step: bool) {
// The field's props view the edit buffer and composition state, so they
// live only for the widget call; the caller then updates that storage.
RunFormulaField :: (session: Session, viewport: Rectangle, key: s32,
control: bool, typed: []u8, typed_length: s32) -> TextField.Result {
field: TextField.Props
control: bool, typed: []u8, typed_length: s32) -> TextFieldResult {
field: TextFieldProps
field.key = cast(u64)4
field.bounds = Rectangle.{viewport.x + 40.0, viewport.y + 58.0, viewport.width - 42.0, 26.0}
field.value = TextUntilNul(edit[:])
@@ -1451,7 +1384,7 @@ RunFormulaField :: (session: Session, viewport: Rectangle, key: s32,
field.input.commit = key == KeyEnter
field.input.escape = key == KeyEscape
}
return TextField.Draw(session, field)
return TextField(session, field)
}
// The grid shows the used cells and reaches the selection, a fill being
@@ -1592,11 +1525,11 @@ DrawGrid :: (session: Session, viewport: Rectangle) {
y: float32 = RowY(table, row)
if RowHidden(row) {
GridSquare(session, 1000 + shown, Rectangle.{table.x, y, table.width, Grid.GridHiddenRowHeight}, HeaderBackground(), "")
strip: Box.Props
strip: BoxProps
strip.key = cast(u64)(500000 + shown)
strip.bounds = Rectangle.{table.x, y + 2.0, table.width, 1.0}
strip.fill = GridLineColor()
Box.Draw(session, strip)
Box(session, strip)
shown += 1
continue
}
@@ -1632,12 +1565,12 @@ DrawGrid :: (session: Session, viewport: Rectangle) {
CellOutline(session, 400000, table, first_row, first_column, last_row, last_column, AccentColor(), 2)
handle: Rectangle = FillHandleBounds(table)
if handle.width > 0.0 {
mark: Box.Props
mark: BoxProps
mark.key = cast(u64)400008
mark.bounds = Rectangle.{handle.x + 2.0, handle.y + 2.0, 7.0, 7.0}
mark.fill = AccentColor()
mark.border = CellBackground()
Box.Draw(session, mark)
Box(session, mark)
}
}
if drag_mode == DragFill && fill_axis != 0 {
@@ -1866,28 +1799,28 @@ DrawCellEditor :: (session: Session, table: Rectangle) {
if width < Grid.GridColumnWidth { width = Grid.GridColumnWidth }
limit: float32 = ColumnX(table, scroll_column + visible_columns) - x
if width > limit { width = limit }
box: Box.Props
box: BoxProps
box.key = cast(u64)400500
box.bounds = Rectangle.{x, y, width, Grid.GridRowHeight}
box.fill = CellBackground()
box.border = AccentColor()
Box.Draw(session, box)
label: Text.Props
Box(session, box)
label: TextProps
label.key = cast(u64)400501
label.text = text
label.size = Text.Text14
label.wrap = cast(Text.Wrap)TextWrapNone
label.font = Text14
label.wrap = cast(TextWrap)TextWrapNone
label.bounds = Rectangle.{x + 4.0, y + 3.0, width - 8.0, Grid.GridRowHeight - 4.0}
Text.Draw(session, label)
Text(session, label)
cursor: s32 = Min(edit_cursor, cast(s32)text.count)
caret_x: float32 = x + 4.0 + cast(float32)EditorGlyphWidth(text[0:cursor])
if caret_x < x + width - 2.0 {
caret: Box.Props
caret: BoxProps
caret.key = cast(u64)400502
caret.bounds = Rectangle.{caret_x, y + 5.0, 1.0, Grid.GridRowHeight - 10.0}
caret.fill = AccentColor()
caret.border = AccentColor()
Box.Draw(session, caret)
Box(session, caret)
}
}
@@ -1908,12 +1841,12 @@ CellOutline :: (session: Session, key: s32, table: Rectangle, first_row: s32, fi
height = MinFloat(height, grid_bottom - y)
for line: 0..thickness - 1 {
inset: float32 = cast(float32)line
outline: Box.Props
outline: BoxProps
outline.key = cast(u64)(key + line)
outline.bounds = Rectangle.{x + inset, y + inset, width - inset * 2.0, height - inset * 2.0}
outline.fill = Color.{0, 0, 0, 0}
outline.border = color
Box.Draw(session, outline)
Box(session, outline)
}
}
@@ -1932,7 +1865,7 @@ ReferenceColor :: (index: s32) -> Color {
// Every command acts on the row or cell selected by the right-click.
DrawGridMenu :: (session: Session, escape: bool) {
if !grid_menu_open { return }
items: [10]ContextMenu.ContextMenuItem
items: [10]ContextMenuItem
items[0].id = 1
items[0].label = "Cut"
items[1].id = 2
@@ -1961,13 +1894,13 @@ DrawGridMenu :: (session: Session, escape: bool) {
items[3].id = 11; items[3].label = "Hide rows"
count = 4
}
props: ContextMenu.Props
props: ContextMenuProps
props.key = cast(u64)1200
props.open = true
props.x = grid_menu_x
props.y = grid_menu_y
props.escape = escape
result: ContextMenu.ContextMenuResult = ContextMenu.Draw(session, props, items[0:count])
result: ContextMenuResult = ContextMenu(session, props, items[0:count])
if !result.open { grid_menu_open = false }
GridCommand(result.activated_id)
}
@@ -2217,46 +2150,45 @@ MinFloat :: (a: float32, b: float32) -> float32 { return ifx a < b then a else b
// Menus use the same commands as the keyboard and grid's context menu.
DrawMenus :: (session: Session, viewport: Rectangle) {
file: [4]Menu.MenuItem
file: [4]MenuItem
file_count: s32 = 3
file[0] = Menu.MenuItem.{.id = 101, .label = "Open…", .accelerator = "Ctrl+O"}
file[1] = Menu.MenuItem.{.id = 102, .label = "Save", .accelerator = "Ctrl+S"}
file[2] = Menu.MenuItem.{.id = 103, .label = "Save As…", .accelerator = "Ctrl+Shift+S"}
file[0] = MenuItem.{.id = 101, .label = "Open…", .accelerator = "Ctrl+O"}
file[1] = MenuItem.{.id = 102, .label = "Save", .accelerator = "Ctrl+S"}
file[2] = MenuItem.{.id = 103, .label = "Save As…", .accelerator = "Ctrl+Shift+S"}
#if #defined(KRYON_HOSTED_UI) {
if AppSupports("app.bundle.export.v1") {
file_count = 4
file[3] = Menu.MenuItem.{.id = 104, .label = "Download Workbook.zx…"}
file[3] = MenuItem.{.id = 104, .label = "Download Workbook.zx…"}
}
}
edit_items: [9]Menu.MenuItem
edit_items[0] = Menu.MenuItem.{.id = 201, .label = "Undo", .accelerator = "Ctrl+Z", .disabled = undo_count == 0 && edit_undo_count == 0}
edit_items[1] = Menu.MenuItem.{.id = 202, .label = "Redo", .accelerator = "Ctrl+Y", .disabled = redo_count == 0 && edit_redo_count == 0}
edit_items[2].kind = Menu.MenuItemKind.MenuSeparator
edit_items[3] = Menu.MenuItem.{.id = 1, .label = "Cut", .accelerator = "Ctrl+X"}
edit_items[4] = Menu.MenuItem.{.id = 2, .label = "Copy", .accelerator = "Ctrl+C"}
edit_items[5] = Menu.MenuItem.{.id = 3, .label = "Paste", .accelerator = "Ctrl+V", .disabled = !EditorClipboardHasText()}
edit_items[6] = Menu.MenuItem.{.id = 4, .label = "Clear contents", .accelerator = "Delete"}
edit_items[7].kind = Menu.MenuItemKind.MenuSeparator
edit_items[8] = Menu.MenuItem.{.id = 203, .label = "Select all", .accelerator = "Ctrl+A"}
view: [1]Menu.MenuItem
view[0] = Menu.MenuItem.{.id = 301, .label = "Go to first cell", .accelerator = "Ctrl+Home"}
insert: [3]Menu.MenuItem
insert[0] = Menu.MenuItem.{.id = 6, .label = "Row above"}
insert[1] = Menu.MenuItem.{.id = 10, .label = "Row below"}
insert[2] = Menu.MenuItem.{.id = 8, .label = "Column before"}
sheet: [5]Menu.MenuItem
sheet[0] = Menu.MenuItem.{.id = 401, .label = "Add sheet"}
sheet[1] = Menu.MenuItem.{.id = 402, .label = "Previous sheet", .disabled = sheet_index == 0}
sheet[2] = Menu.MenuItem.{.id = 403, .label = "Next sheet", .disabled = sheet_index + 1 >= Engine.WorkbookSheetCount(workbook)}
sheet[3] = Menu.MenuItem.{.id = 404, .label = "Recalculate"}
sheet[4] = Menu.MenuItem.{.id = 405, .label = "Create formula chart from selection"}
groups: [5]Menu.MenuGroup
groups[0] = Menu.MenuGroup.{"File", file[:file_count]}
groups[1] = Menu.MenuGroup.{"Edit", edit_items[:]}
groups[2] = Menu.MenuGroup.{"View", view[:]}
groups[3] = Menu.MenuGroup.{"Insert", insert[:]}
groups[4] = Menu.MenuGroup.{"Sheet", sheet[:]}
props: Menu.Props
edit_items: [9]MenuItem
edit_items[0] = MenuItem.{.id = 201, .label = "Undo", .accelerator = "Ctrl+Z", .disabled = undo_count == 0 && edit_undo_count == 0}
edit_items[1] = MenuItem.{.id = 202, .label = "Redo", .accelerator = "Ctrl+Y", .disabled = redo_count == 0 && edit_redo_count == 0}
edit_items[2].kind = MenuItemKind.MenuSeparator
edit_items[3] = MenuItem.{.id = 1, .label = "Cut", .accelerator = "Ctrl+X"}
edit_items[4] = MenuItem.{.id = 2, .label = "Copy", .accelerator = "Ctrl+C"}
edit_items[5] = MenuItem.{.id = 3, .label = "Paste", .accelerator = "Ctrl+V", .disabled = !EditorClipboardHasText()}
edit_items[6] = MenuItem.{.id = 4, .label = "Clear contents", .accelerator = "Delete"}
edit_items[7].kind = MenuItemKind.MenuSeparator
edit_items[8] = MenuItem.{.id = 203, .label = "Select all", .accelerator = "Ctrl+A"}
view: [1]MenuItem
view[0] = MenuItem.{.id = 301, .label = "Go to first cell", .accelerator = "Ctrl+Home"}
insert: [3]MenuItem
insert[0] = MenuItem.{.id = 6, .label = "Row above"}
insert[1] = MenuItem.{.id = 10, .label = "Row below"}
insert[2] = MenuItem.{.id = 8, .label = "Column before"}
sheet: [4]MenuItem
sheet[0] = MenuItem.{.id = 401, .label = "Add sheet"}
sheet[1] = MenuItem.{.id = 402, .label = "Previous sheet", .disabled = sheet_index == 0}
sheet[2] = MenuItem.{.id = 403, .label = "Next sheet", .disabled = sheet_index + 1 >= Engine.WorkbookSheetCount(workbook)}
sheet[3] = MenuItem.{.id = 404, .label = "Recalculate"}
groups: [5]MenuGroup
groups[0] = MenuGroup.{"File", file[:file_count]}
groups[1] = MenuGroup.{"Edit", edit_items[:]}
groups[2] = MenuGroup.{"View", view[:]}
groups[3] = MenuGroup.{"Insert", insert[:]}
groups[4] = MenuGroup.{"Sheet", sheet[:]}
props: MenuProps
props.key = cast(u64)1300
props.bounds = Rectangle.{viewport.x, viewport.y, viewport.width, 26.0}
key := menu_key
@@ -2297,7 +2229,6 @@ DrawMenus :: (session: Session, viewport: Rectangle) {
SelectCell(0, 0)
}
if id == 404 { Changed() }
if id == 405 { CreateFormulaChart() }
if id > 0 && id < 11 { GridCommand(id) }
}
@@ -2415,7 +2346,7 @@ DrawMenus :: (session: Session, viewport: Rectangle) {
if mode == APP_IDENTIFY { AppIdentity("workbook", 1); AppDescribe("Workbook", RowAddIcon.Shape); return APP_PROTOCOL }
if mode == APP_FRAME {
if !AppSupports("spreadsheet.v1") {
Text.Draw(AppSession(), Text.Props.{.bounds = AppBounds(), .text = "Update Werkzeug to open Workbook.", .size = Text.Text16})
Text(AppSession(), TextProps.{.bounds = AppBounds(), .text = "Update Werkzeug to open Workbook.", .font = Text16})
return 0
}
ReadInput()
@@ -2440,42 +2371,42 @@ DrawMenus :: (session: Session, viewport: Rectangle) {
EditorColor :: (name: string) -> Color { return Grid.GridColor(name) }
EditorMenu :: (session: Session, props: Menu.Props, groups: []Menu.MenuGroup, state: *Menu.MenuState) -> Menu.MenuResult {
EditorMenu :: (session: Session, props: MenuProps, groups: []MenuGroup, state: *MenuState) -> MenuResult {
#if #defined(KRYON_HOSTED_UI) {
if !state.initialized { Menu.MenuStateInit(state) }
result: Menu.MenuResult
if !state.initialized { MenuStateInit(state) }
result: MenuResult
x := props.bounds.x + 2.0
for index: 0..groups.count - 1 {
button: Button.Props
button: ButtonProps
button.key = cast(u64)(1310 + index)
button.label = groups[index].label
button.bounds = Rectangle.{x, props.bounds.y, 58.0, 26.0}
button.size = ControlSize.ControlSizeSmall
if Button.Draw(session, button) != 0 { state.open_index = ifx state.open_index == index then -1 else cast(s32)index }
if Button(session, button) != 0 { state.open_index = ifx state.open_index == index then -1 else cast(s32)index }
if state.open_index == index { grid_menu_x = x }
x += 58.0
}
if state.open_index >= 0 && state.open_index < groups.count {
items: [16]ContextMenu.ContextMenuItem
items: [16]ContextMenuItem
commands := groups[state.open_index].items
for index: 0..commands.count - 1 {
items[index].id = commands[index].id
items[index].label = commands[index].label
items[index].disabled = commands[index].disabled
items[index].separator = commands[index].kind == Menu.MenuItemKind.MenuSeparator
items[index].separator = commands[index].kind == MenuItemKind.MenuSeparator
}
menu: ContextMenu.Props
menu: ContextMenuProps
menu.key = cast(u64)(1350 + state.open_index)
menu.open = true; menu.x = grid_menu_x; menu.y = props.bounds.y + 26.0
menu.escape = props.input.escape
drawn := ContextMenu.Draw(session, menu, items[:commands.count])
drawn := ContextMenu(session, menu, items[:commands.count])
if !drawn.open { state.open_index = -1 }
result.activated_id = drawn.activated_id
}
result.open_index = state.open_index
return result
} else {
return Menu.Draw(session, props, groups, state)
return Menu(session, props, groups, state)
}
}
@@ -2497,7 +2428,7 @@ EditorGlyphWidth :: (text: string) -> s32 {
BuilderPrint(*bytes, "}")
return Engine.Number(AppService("input.v1", BuilderFinish(bytes)), "width")
} else {
return GlyphWidth(text, Text.Text14, "")
return GlyphWidth(text, Text14, "")
}
}
+1 -1
View File
@@ -29511,7 +29511,7 @@ WorkbookRowHidden :: (wb: *Workbook, index: s32, row: s32) -> s32 {
WorkbookSetRowsHidden :: (wb: *Workbook, index: s32, first: s32, last: s32, hidden: s32) -> s32 {
if wb == null || index < 0 || index >= wb.sheet_count ||
first < 0 || first > last || first >= WB_MAX_ROWS || last >= WB_MAX_ROWS {
first < 0 || first > last || first >= WB_MAX_ROWS || last >= WB_MAX_ROWS {
return 0
}
if wb.native != null {
+5 -5
View File
@@ -211,10 +211,10 @@ NativeSubtotalVisit :: (
position: *NativeEvalPosition,
value: *void,
closure: *void
) -> *void {
) -> *void {
collector: *NativeSubtotalCollector = cast(*NativeSubtotalCollector)closure
if collector.ignore_hidden && position != collector.base_position && position.sheet != null &&
native_row_hidden(position.sheet, position.eval.row) != 0 {
native_row_hidden(position.sheet, position.eval.row) != 0 {
return null
}
kind: s32 = ifx value == null then 10 else native_value_type(value)
@@ -241,7 +241,7 @@ NativeSubtotalVisit :: (
collector.values = cast(*float64)native_realloc(
cast(*void)collector.values,
cast(usize)collector.capacity * size_of(float64)
)
)
}
collector.values[collector.count] = number
collector.count += 1
@@ -323,7 +323,7 @@ NativeSubtotal :: (eval_info: *NativeFunctionEvalInfo, argc: s32, argv: **void)
remaining = cast(**void)native_realloc(
cast(*void)remaining,
cast(usize)remaining_capacity * size_of(*void)
)
)
}
remaining[remaining_count] = argv[argument]
remaining_count += 1
@@ -338,7 +338,7 @@ NativeSubtotal :: (eval_info: *NativeFunctionEvalInfo, argc: s32, argv: **void)
remaining,
0,
24
)
)
native_g_free(cast(*void)remaining)
if error != null { return error }
result: float64 = 0
+24 -25
View File
@@ -2,21 +2,21 @@
// and cell squares, and a read-only view of a workbook with column letters,
// row numbers, the cells of one sheet and its sheet tabs. The Workbook editor
// paints its own grid with the same squares and colors.
Box :: #import "kryon/box";
Styles :: #import "kryon/style";
TabBar :: #import "kryon/tab_bar";
Text :: #import "kryon/text";
TextAlign :: #import "kryon/text_align";
#import "kryon/drawing_props"
#import "kryon/geometry"
#import "kryon/session"
#if !#defined(KRYON_HOSTED_UI) {
#import "kryon/tree_input"
}
#if #defined(KRYON_HOSTED_UI) {
#import "geometry"
#import "session"
#import "drawing_props"
#import "box_props"
#import "box_widget"
#import "text_props"
#import "text_align"
#import "text_widget"
#import "tab_bar_props"
#import "tab_bar_widget"
Engine :: #import "portable_engine";
Theme :: #import "kryon/app_theme";
} else {
using UI :: #import "kryon/Widgets";
Engine :: #import "engine";
#import "std/c_string"
}
@@ -88,7 +88,6 @@ GridColor :: (name: string) -> Color {
}
return Theme.AppThemeColor(name, Color.{245, 245, 245, 255})
} else {
if name == "border-soft" { return StyleTokenColor("border") }
return StyleTokenColor(name)
}
}
@@ -105,22 +104,22 @@ GridSquare :: (session: Session, key: u64, bounds: Rectangle, right: float32, bo
if bounds.x + bounds.width > right { bounds.width = right - bounds.x }
if bounds.y + bounds.height > bottom { bounds.height = bottom - bounds.y }
if bounds.width <= 0.0 || bounds.height <= 0.0 { return }
box: Box.Props
box: BoxProps
box.key = key
box.bounds = bounds
box.fill = fill
box.border = GridLineColor()
Box.Draw(session, box)
Box(session, box)
if text.count == 0 { return }
label: Text.Props
label: TextProps
label.key = key + 1
label.text = text
label.size = Text.Text14
label.wrap = Text.Wrap.TextWrapNone
if align_end { label.align = TextAlign.TextAlign.TextAlignEnd }
label.font = Text14
label.wrap = TextWrap.TextWrapNone
if align_end { label.align = TextAlign.TextAlignEnd }
label.bounds = Rectangle.{bounds.x + 4.0, bounds.y + 3.0,
bounds.width - 8.0, bounds.height - 4.0}
Text.Draw(session, label)
Text(session, label)
}
// Column letters: A to Z, then AA to ZZ.
@@ -410,26 +409,26 @@ GridDraw :: (session: Session, bounds: Rectangle, book: *Engine.Workbook, view:
if sheets < 2 { return }
count := ifx sheets > 16 then 16 else sheets
tabs: [16]TabBar.Tab
tabs: [16]Tab
for index: 0..count - 1 {
tabs[index].key = view.key + cast(u64)(90000 + index)
tabs[index].label = GridSheetName(book, index)
}
strip: Box.Props
strip: BoxProps
strip.key = view.key + 89998
strip.bounds = Rectangle.{bounds.x, bottom, bounds.width, GridTabsHeight}
strip.fill = GridHeaderBackground()
strip.border = GridLineColor()
Box.Draw(session, strip)
bar: TabBar.Props
Box(session, strip)
bar: TabBarProps
bar.key = view.key + 89999
bar.placement = TabBar.TabBarPlacement.TabBarBottom
bar.placement = TabBarPlacement.TabBarBottom
bar.selected_index = view.sheet
width := 140.0 * cast(float32)count
bar.bounds = Rectangle.{bounds.x, bottom, ifx width < bounds.width then width else bounds.width, GridTabsHeight}
bar.min_tab_width = 96
bar.max_tab_width = 160
result := TabBar.Draw(session, bar, tabs[0:count])
result := TabBar(session, bar, tabs[0:count])
if result.selected_index != view.sheet && result.selected_index >= 0 {
view.sheet = result.selected_index
view.scroll_row = 0
+11 -11
View File
@@ -891,20 +891,20 @@ quad_agm_internal :: (res: *Quad, method: s32, x: *Quad) {
qrp.l = 0
if method == {
case AGM_ARCSIN;
quad_ihypot(*dpk[0], x)
gp = one
qnum = x.*
quad_ihypot(*dpk[0], x)
gp = one
qnum = x.*
case AGM_ARCCOS;
dpk[0] = x.*
gp = one
quad_ihypot(*qnum, x)
dpk[0] = x.*
gp = one
quad_ihypot(*qnum, x)
case AGM_ARCTAN;
dpk[0] = one
QuadHypot(*gp, x, *one)
qnum = x.*
dpk[0] = one
QuadHypot(*gp, x, *one)
qnum = x.*
case;
QuadInit(res, NotANumber())
return
QuadInit(res, NotANumber())
return
}
{
n = 1
+3 -4
View File
@@ -32,10 +32,9 @@ TabWidth :: 104;
Background :: 0xF8FAFC;
// The fixture theme below is #f8fafc with ink #1e2530, base white, and a
// #3070e0 accent. Kryon's public system palette uses the base for surfaces
// and mixes 18% accent into the canvas for the selected cell.
HeaderFill :: 0xFFFFFF;
SelectedFill :: 0xD4E1F7;
// #3070e0 accent; the app derives its header and selection from those.
HeaderFill :: 0xEDEFF2;
SelectedFill :: 0xCCDCF6;
White :: 0xFFFFFF;
TwoSheets :: #string END
+1 -1
View File
@@ -92,7 +92,7 @@ DropDocument :: (path: string) {
for byte: path {
encoded: [3]u8
if (byte >= 65 && byte <= 90) || (byte >= 97 && byte <= 122) ||
(byte >= 48 && byte <= 57) || byte == 47 || byte == 45 || byte == 46 || byte == 95 || byte == 126 {
(byte >= 48 && byte <= 57) || byte == 47 || byte == 45 || byte == 46 || byte == 95 || byte == 126 {
encoded[0] = byte
AppendText(uri[:], TextView(encoded[0:1]))
} else {
-1
View File
@@ -3,7 +3,6 @@
#load "test_support.zi";
using Grid :: #import "grid";
Engine :: #import "engine";
#import "kryon/geometry"
#program_export
main :: () -> s32 {
+6 -6
View File
@@ -16,7 +16,7 @@ screenshot_channels: s32 = 0;
BigEndian :: (bytes: []u8, at: s32) -> u32 {
return (cast(u32)bytes[at] << 24) | (cast(u32)bytes[at + 1] << 16) |
(cast(u32)bytes[at + 2] << 8) | cast(u32)bytes[at + 3]
(cast(u32)bytes[at + 2] << 8) | cast(u32)bytes[at + 3]
}
// Loads and decodes a captured frame. Returns false with the reason in
@@ -81,7 +81,7 @@ ReadScreenshot :: (path: string, failure: []u8) -> bool {
if color == 6 { screenshot_channels = 4 }
stride: s32 = screenshot_width * screenshot_channels
if screenshot_width <= 0 || screenshot_height <= 0 ||
stride * screenshot_height > ScreenshotPixelLimit {
stride * screenshot_height > ScreenshotPixelLimit {
SetText(failure, "the capture has unsupported dimensions")
return false
}
@@ -160,8 +160,8 @@ Distance :: (a: s32, b: s32) -> s32 {
PixelAt :: (x: s32, y: s32) -> u32 {
offset: s32 = (y * screenshot_width + x) * screenshot_channels
return (cast(u32)screenshot_pixels[offset] << 16) |
(cast(u32)screenshot_pixels[offset + 1] << 8) |
cast(u32)screenshot_pixels[offset + 2]
(cast(u32)screenshot_pixels[offset + 1] << 8) |
cast(u32)screenshot_pixels[offset + 2]
}
// How many pixels in a rectangle are dark enough to be text.
@@ -173,8 +173,8 @@ DarkPixels :: (left: s32, top: s32, width: s32, height: s32) -> s32 {
while x < left + width {
offset: s32 = (y * screenshot_width + x) * screenshot_channels
sum: s32 = cast(s32)screenshot_pixels[offset] +
cast(s32)screenshot_pixels[offset + 1] +
cast(s32)screenshot_pixels[offset + 2]
cast(s32)screenshot_pixels[offset + 1] +
cast(s32)screenshot_pixels[offset + 2]
if sum < 330 { count += 1 }
x += 1
}
+4 -4
View File
@@ -19,9 +19,9 @@ RequiredFile :: (index: s32) -> string {
// A file that names a retired format or code in another language.
ForbiddenFile :: (name: string) -> bool {
return EndsWith(name, ".kry") || EndsWith(name, ".krb") || EndsWith(name, ".kir") ||
EndsWith(name, ".c") || EndsWith(name, ".h") || EndsWith(name, ".go") ||
EndsWith(name, ".py") || EndsWith(name, ".sh") || EndsWith(name, ".bash") ||
EndsWith(name, ".js") || EndsWith(name, ".mjs") || EndsWith(name, ".ts")
EndsWith(name, ".c") || EndsWith(name, ".h") || EndsWith(name, ".go") ||
EndsWith(name, ".py") || EndsWith(name, ".sh") || EndsWith(name, ".bash") ||
EndsWith(name, ".js") || EndsWith(name, ".mjs") || EndsWith(name, ".ts")
}
// Reports every forbidden file under path and returns how many it found.
@@ -76,7 +76,7 @@ CheckPackageUrls :: () -> s32 {
value: s32 = equals + 1
while value < cast(s32)rest.count && rest[value] == 32 { value += 1 }
if equals < cast(s32)rest.count &&
!StartsWith(rest[value:cast(s32)rest.count], "\"https://") {
!StartsWith(rest[value:cast(s32)rest.count], "\"https://") {
WriteText(2, "package URL must be public HTTPS: ")
WriteText(2, line)
WriteText(2, "\n")
+79 -52
View File
@@ -10,14 +10,6 @@
"source": true,
"url": "https://github.com/libsndfile/libsamplerate.git"
},
{
"commit": "9cc6872f75447c3a24c16764f9829d0f58751cb0",
"dependencies": {},
"id": "p1007dc6cf1299f68",
"name": "mingcute",
"ref": "9cc6872f75447c3a24c16764f9829d0f58751cb0",
"url": "https://git.waozi.xyz/kryonlabs/mingcute.git"
},
{
"commit": "829a65d769d935c4852f8159e964312c0957260a",
"dependencies": {},
@@ -27,15 +19,6 @@
"source": true,
"url": "https://github.com/libsdl-org/SDL.git"
},
{
"commit": "ec6ed304767e10c125ab2820f3b01d6fd773e147",
"dependencies": {"image_codec": "p69c0e968ae5735d9", "libwebp": "p3b3c785a0e17e605"},
"dependency_refs": {"image_codec": "360553150917f352e49e1beb78917370792ccaef", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339"},
"id": "p2af20e0c835b1c63",
"name": "webp",
"ref": "ec6ed304767e10c125ab2820f3b01d6fd773e147",
"url": "https://github.com/ziranlang/webp.git"
},
{
"commit": "1844042d1ca751e62e61df7617dba19c98588339",
"dependencies": {},
@@ -46,13 +29,22 @@
"url": "https://github.com/webmproject/libwebp.git"
},
{
"commit": "f5f186bb13569ef13338f81366ff63fb9b9282f6",
"dependencies": {"av1": "p5d7d12505a42f7b3", "dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db"},
"dependency_refs": {"av1": "bd278217e2bac754d868b3d6502eac4257658d4b", "dav1d": "54706fc6bc0cdecab7e9593974a4039cc038fca7", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199"},
"id": "p3ed49c5d0912e411",
"name": "avif",
"ref": "f5f186bb13569ef13338f81366ff63fb9b9282f6",
"url": "https://github.com/ziranlang/avif.git"
"commit": "af027a528c6e42b44b68fdaa90b13a7c1136d161",
"dependencies": {"audio": "pd258d453b63edc1f", "avif": "p872d871f84f2284f", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db", "libwebp": "p3b3c785a0e17e605", "raylib": "pcc7aa76725f2fb2f", "sdl3": "p16cd0434af3dff7b", "webp": "pa068bd09450b2a80"},
"dependency_refs": {"audio": "f5eed1e6c817997d51508f9c3c7b948a0bb4ad0b", "avif": "f84c162594e518cb306bfd0ce41783ad55b6c730", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "02145a00a1f0df2a111da04a75f3fef260883897"},
"id": "p3cf597cf815203c0",
"name": "kryon",
"ref": "af027a528c6e42b44b68fdaa90b13a7c1136d161",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "60692b80dce3b32e2de1057c39a4793b500419b6",
"dependencies": {"kryon": "p5d654550c4218378"},
"dependency_refs": {"kryon": "master"},
"id": "p533f113d2c39777d",
"name": "Css",
"ref": "60692b80dce3b32e2de1057c39a4793b500419b6",
"url": "https://github.com/kryonlabs/css.git"
},
{
"commit": "1aadfad932c98c069a1204261b1856f81f3bc199",
@@ -64,13 +56,13 @@
"url": "https://github.com/AOMediaCodec/libavif.git"
},
{
"commit": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2",
"dependencies": {"libopus": "pe1fe9bbe80bf1d6d", "libsamplerate": "p0dd67588478f9a3e"},
"dependency_refs": {"libopus": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6", "libsamplerate": "c96f5e3de9c4488f4e6c97f59f5245f22fda22f7"},
"id": "p59deb49c7f103127",
"name": "audio",
"ref": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2",
"url": "https://github.com/ziranlang/audio.git"
"commit": "b9aed7589e9af2935a9cd9cb260e72944c195762",
"dependencies": {"audio": "pd258d453b63edc1f", "avif": "pfcfd889420218f37", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db", "libwebp": "p3b3c785a0e17e605", "raylib": "pcc7aa76725f2fb2f", "sdl3": "p16cd0434af3dff7b", "webp": "pa068bd09450b2a80"},
"dependency_refs": {"audio": "f5eed1e6c817997d51508f9c3c7b948a0bb4ad0b", "avif": "2f349f8c4a46c7476c6c02b87ec570e66d3a8f34", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "02145a00a1f0df2a111da04a75f3fef260883897"},
"id": "p5d654550c4218378",
"name": "kryon",
"ref": "master",
"url": "https://github.com/kryonlabs/kryon.git"
},
{
"commit": "bd278217e2bac754d868b3d6502eac4257658d4b",
@@ -98,6 +90,24 @@
"source": true,
"url": "https://aomedia.googlesource.com/aom"
},
{
"commit": "f84c162594e518cb306bfd0ce41783ad55b6c730",
"dependencies": {"av1": "p5d7d12505a42f7b3", "dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db"},
"dependency_refs": {"av1": "bd278217e2bac754d868b3d6502eac4257658d4b", "dav1d": "54706fc6bc0cdecab7e9593974a4039cc038fca7", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199"},
"id": "p872d871f84f2284f",
"name": "avif",
"ref": "f84c162594e518cb306bfd0ce41783ad55b6c730",
"url": "https://github.com/ziranlang/avif.git"
},
{
"commit": "02145a00a1f0df2a111da04a75f3fef260883897",
"dependencies": {"image_codec": "p69c0e968ae5735d9", "libwebp": "p3b3c785a0e17e605"},
"dependency_refs": {"image_codec": "360553150917f352e49e1beb78917370792ccaef", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339"},
"id": "pa068bd09450b2a80",
"name": "webp",
"ref": "02145a00a1f0df2a111da04a75f3fef260883897",
"url": "https://github.com/ziranlang/webp.git"
},
{
"commit": "54706fc6bc0cdecab7e9593974a4039cc038fca7",
"dependencies": {},
@@ -107,6 +117,32 @@
"source": true,
"url": "https://github.com/videolan/dav1d.git"
},
{
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"dependencies": {},
"id": "pcc7aa76725f2fb2f",
"name": "raylib",
"ref": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
"source": true,
"url": "https://github.com/raysan5/raylib.git"
},
{
"commit": "f5eed1e6c817997d51508f9c3c7b948a0bb4ad0b",
"dependencies": {"libopus": "pe1fe9bbe80bf1d6d", "libsamplerate": "p0dd67588478f9a3e"},
"dependency_refs": {"libopus": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6", "libsamplerate": "c96f5e3de9c4488f4e6c97f59f5245f22fda22f7"},
"id": "pd258d453b63edc1f",
"name": "audio",
"ref": "f5eed1e6c817997d51508f9c3c7b948a0bb4ad0b",
"url": "https://github.com/ziranlang/audio.git"
},
{
"commit": "9cc6872f75447c3a24c16764f9829d0f58751cb0",
"dependencies": {},
"id": "pe1027b9d16704793",
"name": "mingcute",
"ref": "master",
"url": "https://github.com/kryonlabs/mingcute.git"
},
{
"commit": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6",
"dependencies": {},
@@ -117,32 +153,23 @@
"url": "https://github.com/xiph/opus.git"
},
{
"commit": "df8bbbbd665bd0632cd8687a145addc0b745eb87",
"dependencies": {"kryon": "pf2998052488e4ccd"},
"dependency_refs": {"kryon": "c7286549f7741c48730cc983f14aed233cb47c37"},
"id": "pe4b26b511a625915",
"name": "Css",
"ref": "df8bbbbd665bd0632cd8687a145addc0b745eb87",
"url": "https://git.waozi.xyz/kryonlabs/css.git"
},
{
"commit": "c7286549f7741c48730cc983f14aed233cb47c37",
"dependencies": {"audio": "p59deb49c7f103127", "avif": "p3ed49c5d0912e411", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db", "libwebp": "p3b3c785a0e17e605", "sdl3": "p16cd0434af3dff7b", "webp": "p2af20e0c835b1c63"},
"dependency_refs": {"audio": "1b2f35b7b39df6fb9af7a52324b4b7cf18e98df2", "avif": "f5f186bb13569ef13338f81366ff63fb9b9282f6", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "ec6ed304767e10c125ab2820f3b01d6fd773e147"},
"id": "pf2998052488e4ccd",
"name": "kryon",
"ref": "c7286549f7741c48730cc983f14aed233cb47c37",
"url": "https://git.waozi.xyz/kryonlabs/kryon.git"
"commit": "2f349f8c4a46c7476c6c02b87ec570e66d3a8f34",
"dependencies": {"av1": "p5d7d12505a42f7b3", "dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db"},
"dependency_refs": {"av1": "bd278217e2bac754d868b3d6502eac4257658d4b", "dav1d": "54706fc6bc0cdecab7e9593974a4039cc038fca7", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199"},
"id": "pfcfd889420218f37",
"name": "avif",
"ref": "2f349f8c4a46c7476c6c02b87ec570e66d3a8f34",
"url": "https://github.com/ziranlang/avif.git"
}
],
"root": {
"dependencies": {"css": "pe4b26b511a625915", "kryon": "pf2998052488e4ccd", "mingcute": "p1007dc6cf1299f68"},
"dependency_refs": {"css": "df8bbbbd665bd0632cd8687a145addc0b745eb87", "kryon": "c7286549f7741c48730cc983f14aed233cb47c37", "mingcute": "9cc6872f75447c3a24c16764f9829d0f58751cb0"},
"dependencies": {"css": "p533f113d2c39777d", "kryon": "p3cf597cf815203c0", "mingcute": "pe1027b9d16704793"},
"dependency_refs": {"css": "60692b80dce3b32e2de1057c39a4793b500419b6", "kryon": "af027a528c6e42b44b68fdaa90b13a7c1136d161", "mingcute": "master"},
"name": "workbook"
},
"toolchain": {
"commit": "5db3d3c39425d5dfe4bfe4a84e6f6e2e5a810ad0",
"ref": "5db3d3c39425d5dfe4bfe4a84e6f6e2e5a810ad0",
"url": "https://git.waozi.xyz/ziranlang/ziran.git"
"commit": "9524616df1a1b6e63a3789b3aea055714a526c88",
"ref": "master",
"url": "https://github.com/ziranlang/ziran.git"
}
}
+8 -8
View File
@@ -6,20 +6,20 @@ module_roots = ["src", "tests"]
bridge_modules = ["app"]
[toolchain]
git = "https://git.waozi.xyz/ziranlang/ziran.git"
ref = "5db3d3c39425d5dfe4bfe4a84e6f6e2e5a810ad0"
git = "https://github.com/ziranlang/ziran.git"
ref = "master"
[dependencies.kryon]
git = "https://git.waozi.xyz/kryonlabs/kryon.git"
ref = "c7286549f7741c48730cc983f14aed233cb47c37"
git = "https://github.com/kryonlabs/kryon.git"
ref = "af027a528c6e42b44b68fdaa90b13a7c1136d161"
[dependencies.mingcute]
git = "https://git.waozi.xyz/kryonlabs/mingcute.git"
ref = "9cc6872f75447c3a24c16764f9829d0f58751cb0"
git = "https://github.com/kryonlabs/mingcute.git"
ref = "master"
[dependencies.css]
git = "https://git.waozi.xyz/kryonlabs/css.git"
ref = "df8bbbbd665bd0632cd8687a145addc0b745eb87"
git = "https://github.com/kryonlabs/css.git"
ref = "60692b80dce3b32e2de1057c39a4793b500419b6"
[install]
bin = "workbook"