Build on Kryon 0.4.0 and Ziran 0.6.0
Kryon 0.4.0 removed the Widgets and Desktop modules, so the editor, grid and tests import Kryon's public widget modules (kryon/box, kryon/text, kryon/text_field, kryon/tab_bar, kryon/menu, kryon/desktop_runtime, ...) and call their qualified Draw and Props names. Sources are formatted with Ziran 0.6.0. Pins: Kryon f123e8ba (v0.4.0), Ziran d17c7aa1 (v0.6.0) and CSS 3799bb09, the same Kryon CSS, Plot, Game2D, Entity, Apps and Auth pin, so Werkzeug resolves Workbook against one Kryon copy. Local tests: ziran lock and make test (no local overrides) through build-queue: service, grid, source audit, structure, conversion, Gnumeric, the private-Xvfb desktop test and 30 Gnumeric parity fixtures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f4ea2205ce
commit
c700d51d96
13 files changed
+241
-239
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
## [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
|
||||
|
||||
+123
-125
@@ -1,65 +1,63 @@
|
||||
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.
|
||||
#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";
|
||||
}
|
||||
#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) {
|
||||
Engine :: #import "portable_engine";
|
||||
#import "kryon/app_context"
|
||||
Theme :: #import "kryon/app_theme";
|
||||
} else {
|
||||
Engine :: #import "engine";
|
||||
Desktop :: #import "kryon/Desktop";
|
||||
Desktop :: #import "kryon/desktop_runtime";
|
||||
Picker :: #import "kryon/file_picker";
|
||||
}
|
||||
Json :: #import "json_scan";
|
||||
Json :: #import "std/json_scan";
|
||||
// The grid's metrics, colors and cell squares, shared with embedded grids.
|
||||
Grid :: #import "grid";
|
||||
#if !#defined(KRYON_HOSTED_UI) {
|
||||
SystemStyle :: #import "css/SystemStyle";
|
||||
SystemThemeLinux :: #import "SystemThemeLinux";
|
||||
SystemStyle :: #import "kryon/SystemTheme";
|
||||
SystemThemeLinux :: #import "kryon/SystemThemeLinux";
|
||||
}
|
||||
#import "byte_text_linux"
|
||||
#import "font_metrics"
|
||||
#import "text_buffer"
|
||||
#import "std/byte_text_linux"
|
||||
#import "kryon/font_metrics"
|
||||
#import "std/text_buffer"
|
||||
#import "std/vec"
|
||||
#import "std/number_text"
|
||||
|
||||
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";
|
||||
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";
|
||||
|
||||
using ButtonEmphasis;
|
||||
using ButtonTone;
|
||||
using ControlSize;
|
||||
using TabBarPlacement;
|
||||
using TextWrap;
|
||||
using TabBar.TabBarPlacement;
|
||||
using Text.Wrap;
|
||||
|
||||
#scope_file
|
||||
|
||||
@@ -106,7 +104,7 @@ grid_menu_x: float32 = 0.0;
|
||||
grid_menu_y: float32 = 0.0;
|
||||
grid_menu_row: bool = false;
|
||||
clipboard_text: [8192]u8;
|
||||
menu_state: MenuState;
|
||||
menu_state: Menu.MenuState;
|
||||
menus_block_input: bool;
|
||||
menu_key: s32;
|
||||
menu_modifiers: s32;
|
||||
@@ -324,7 +322,7 @@ Frame :: (session: Session, viewport: Rectangle) -> s32 {
|
||||
}
|
||||
name: string = SystemThemeLinux.SystemThemeName()
|
||||
if theme_installed && name == TextUntilNul(theme_name[:]) { return }
|
||||
SystemStyle.StyleInstallSystem(SystemThemeLinux.SystemPaletteRead())
|
||||
unused SystemStyle.SystemPaletteInstall(SystemThemeLinux.SystemPaletteRead())
|
||||
SetText(theme_name[:], name)
|
||||
theme_installed = true
|
||||
}
|
||||
@@ -1097,11 +1095,11 @@ PutEditText :: (state: *EditTextState) {
|
||||
|
||||
// The window's own color: the theme's canvas behind every widget.
|
||||
DrawBackground :: (session: Session, viewport: Rectangle) {
|
||||
background: BoxProps
|
||||
background: Box.Props
|
||||
background.key = cast(u64)7
|
||||
background.bounds = viewport
|
||||
background.fill = EditorColor("canvas")
|
||||
Box(session, background)
|
||||
Box.Draw(session, background)
|
||||
}
|
||||
|
||||
DrawToolbar :: (session: Session, viewport: Rectangle) {
|
||||
@@ -1146,19 +1144,19 @@ DrawToolbar :: (session: Session, viewport: Rectangle) {
|
||||
// Saving is automatic, so the window says nothing about it unless it fails.
|
||||
DrawStatus :: (session: Session, viewport: Rectangle) {
|
||||
if status[0] == 0 { return }
|
||||
label: TextProps
|
||||
label: Text.Props
|
||||
label.key = cast(u64)5
|
||||
label.text = TextUntilNul(status[:])
|
||||
label.font = Text14
|
||||
label.size = Text.Text14
|
||||
label.bounds = Rectangle.{viewport.x + 180.0, viewport.y + viewport.height - 24.0,
|
||||
viewport.width - 184.0, 20.0}
|
||||
Text(session, label)
|
||||
Text.Draw(session, label)
|
||||
}
|
||||
|
||||
|
||||
ToolbarIcon :: (session: Session, id: s32, shape: string, x: *float32,
|
||||
primary: bool) -> bool {
|
||||
button: ButtonProps
|
||||
button: Button.Props
|
||||
button.id = id
|
||||
button.icon_shape = shape
|
||||
button.icon_only = true
|
||||
@@ -1169,7 +1167,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(session, button) != 0
|
||||
return Button.Draw(session, button) != 0
|
||||
}
|
||||
|
||||
Changed :: () {
|
||||
@@ -1194,27 +1192,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]Tab
|
||||
tabs: [16]TabBar.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: BoxProps
|
||||
strip: Box.Props
|
||||
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(session, strip)
|
||||
bar: TabBarProps
|
||||
Box.Draw(session, strip)
|
||||
bar: TabBar.Props
|
||||
bar.key = cast(u64)1099
|
||||
bar.placement = cast(TabBarPlacement)TabBarBottom
|
||||
bar.placement = cast(TabBar.TabBarPlacement)TabBarBottom
|
||||
bar.selected_index = sheet_index
|
||||
bar.bounds = SheetTabsBounds(viewport)
|
||||
bar.min_tab_width = 72
|
||||
bar.max_tab_width = 104
|
||||
result: TabBarResult = TabBar(session, bar, tabs[0:count])
|
||||
result: TabBar.Result = TabBar.Draw(session, bar, tabs[0:count])
|
||||
if result.selected_index != sheet_index && result.selected_index >= 0 {
|
||||
sheet_index = result.selected_index
|
||||
scroll_row = 0
|
||||
@@ -1226,14 +1224,14 @@ DrawSheetTabs :: (session: Session, viewport: Rectangle) {
|
||||
|
||||
DrawFormulaBar :: (session: Session, viewport: Rectangle, key: s32,
|
||||
control: bool, typed: []u8, typed_length: s32) {
|
||||
label: TextProps
|
||||
label: Text.Props
|
||||
label.key = cast(u64)3
|
||||
label.text = "fx"
|
||||
label.font = Text16
|
||||
label.size = Text.Text16
|
||||
label.disabled = true
|
||||
label.bounds = Rectangle.{viewport.x + 8.0, viewport.y + 61.0, 24.0, 20.0}
|
||||
Text(session, label)
|
||||
result: TextFieldResult = RunFormulaField(session, viewport, key, control,
|
||||
Text.Draw(session, label)
|
||||
result: TextField.Result = RunFormulaField(session, viewport, key, control,
|
||||
typed, typed_length)
|
||||
edit_claim = false
|
||||
// Typing or moving the cursor ends a pick: the next one inserts anew.
|
||||
@@ -1353,8 +1351,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) -> TextFieldResult {
|
||||
field: TextFieldProps
|
||||
control: bool, typed: []u8, typed_length: s32) -> TextField.Result {
|
||||
field: TextField.Props
|
||||
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[:])
|
||||
@@ -1384,7 +1382,7 @@ RunFormulaField :: (session: Session, viewport: Rectangle, key: s32,
|
||||
field.input.commit = key == KeyEnter
|
||||
field.input.escape = key == KeyEscape
|
||||
}
|
||||
return TextField(session, field)
|
||||
return TextField.Draw(session, field)
|
||||
}
|
||||
|
||||
// The grid shows the used cells and reaches the selection, a fill being
|
||||
@@ -1525,11 +1523,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: BoxProps
|
||||
strip: Box.Props
|
||||
strip.key = cast(u64)(500000 + shown)
|
||||
strip.bounds = Rectangle.{table.x, y + 2.0, table.width, 1.0}
|
||||
strip.fill = GridLineColor()
|
||||
Box(session, strip)
|
||||
Box.Draw(session, strip)
|
||||
shown += 1
|
||||
continue
|
||||
}
|
||||
@@ -1565,12 +1563,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: BoxProps
|
||||
mark: Box.Props
|
||||
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(session, mark)
|
||||
Box.Draw(session, mark)
|
||||
}
|
||||
}
|
||||
if drag_mode == DragFill && fill_axis != 0 {
|
||||
@@ -1799,28 +1797,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: BoxProps
|
||||
box: Box.Props
|
||||
box.key = cast(u64)400500
|
||||
box.bounds = Rectangle.{x, y, width, Grid.GridRowHeight}
|
||||
box.fill = CellBackground()
|
||||
box.border = AccentColor()
|
||||
Box(session, box)
|
||||
label: TextProps
|
||||
Box.Draw(session, box)
|
||||
label: Text.Props
|
||||
label.key = cast(u64)400501
|
||||
label.text = text
|
||||
label.font = Text14
|
||||
label.wrap = cast(TextWrap)TextWrapNone
|
||||
label.size = Text.Text14
|
||||
label.wrap = cast(Text.Wrap)TextWrapNone
|
||||
label.bounds = Rectangle.{x + 4.0, y + 3.0, width - 8.0, Grid.GridRowHeight - 4.0}
|
||||
Text(session, label)
|
||||
Text.Draw(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: BoxProps
|
||||
caret: Box.Props
|
||||
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(session, caret)
|
||||
Box.Draw(session, caret)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1841,12 +1839,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: BoxProps
|
||||
outline: Box.Props
|
||||
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(session, outline)
|
||||
Box.Draw(session, outline)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1865,7 +1863,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]ContextMenuItem
|
||||
items: [10]ContextMenu.ContextMenuItem
|
||||
items[0].id = 1
|
||||
items[0].label = "Cut"
|
||||
items[1].id = 2
|
||||
@@ -1894,13 +1892,13 @@ DrawGridMenu :: (session: Session, escape: bool) {
|
||||
items[3].id = 11; items[3].label = "Hide rows"
|
||||
count = 4
|
||||
}
|
||||
props: ContextMenuProps
|
||||
props: ContextMenu.Props
|
||||
props.key = cast(u64)1200
|
||||
props.open = true
|
||||
props.x = grid_menu_x
|
||||
props.y = grid_menu_y
|
||||
props.escape = escape
|
||||
result: ContextMenuResult = ContextMenu(session, props, items[0:count])
|
||||
result: ContextMenu.ContextMenuResult = ContextMenu.Draw(session, props, items[0:count])
|
||||
if !result.open { grid_menu_open = false }
|
||||
GridCommand(result.activated_id)
|
||||
}
|
||||
@@ -2150,45 +2148,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]MenuItem
|
||||
file: [4]Menu.MenuItem
|
||||
file_count: s32 = 3
|
||||
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"}
|
||||
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"}
|
||||
#if #defined(KRYON_HOSTED_UI) {
|
||||
if AppSupports("app.bundle.export.v1") {
|
||||
file_count = 4
|
||||
file[3] = MenuItem.{.id = 104, .label = "Download Workbook.zx…"}
|
||||
file[3] = Menu.MenuItem.{.id = 104, .label = "Download Workbook.zx…"}
|
||||
}
|
||||
}
|
||||
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
|
||||
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: [4]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"}
|
||||
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
|
||||
props.key = cast(u64)1300
|
||||
props.bounds = Rectangle.{viewport.x, viewport.y, viewport.width, 26.0}
|
||||
key := menu_key
|
||||
@@ -2346,7 +2344,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(AppSession(), TextProps.{.bounds = AppBounds(), .text = "Update Werkzeug to open Workbook.", .font = Text16})
|
||||
Text.Draw(AppSession(), Text.Props.{.bounds = AppBounds(), .text = "Update Werkzeug to open Workbook.", .size = Text.Text16})
|
||||
return 0
|
||||
}
|
||||
ReadInput()
|
||||
@@ -2371,42 +2369,42 @@ DrawMenus :: (session: Session, viewport: Rectangle) {
|
||||
|
||||
EditorColor :: (name: string) -> Color { return Grid.GridColor(name) }
|
||||
|
||||
EditorMenu :: (session: Session, props: MenuProps, groups: []MenuGroup, state: *MenuState) -> MenuResult {
|
||||
EditorMenu :: (session: Session, props: Menu.Props, groups: []Menu.MenuGroup, state: *Menu.MenuState) -> Menu.MenuResult {
|
||||
#if #defined(KRYON_HOSTED_UI) {
|
||||
if !state.initialized { MenuStateInit(state) }
|
||||
result: MenuResult
|
||||
if !state.initialized { Menu.MenuStateInit(state) }
|
||||
result: Menu.MenuResult
|
||||
x := props.bounds.x + 2.0
|
||||
for index: 0..groups.count - 1 {
|
||||
button: ButtonProps
|
||||
button: Button.Props
|
||||
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(session, button) != 0 { state.open_index = ifx state.open_index == index then -1 else cast(s32)index }
|
||||
if Button.Draw(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]ContextMenuItem
|
||||
items: [16]ContextMenu.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 == MenuItemKind.MenuSeparator
|
||||
items[index].separator = commands[index].kind == Menu.MenuItemKind.MenuSeparator
|
||||
}
|
||||
menu: ContextMenuProps
|
||||
menu: ContextMenu.Props
|
||||
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(session, menu, items[:commands.count])
|
||||
drawn := ContextMenu.Draw(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(session, props, groups, state)
|
||||
return Menu.Draw(session, props, groups, state)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2428,7 +2426,7 @@ EditorGlyphWidth :: (text: string) -> s32 {
|
||||
BuilderPrint(*bytes, "}")
|
||||
return Engine.Number(AppService("input.v1", BuilderFinish(bytes)), "width")
|
||||
} else {
|
||||
return GlyphWidth(text, Text14, "")
|
||||
return GlyphWidth(text, Text.Text14, "")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
@@ -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
|
||||
|
||||
+25
-24
@@ -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,6 +88,7 @@ GridColor :: (name: string) -> Color {
|
||||
}
|
||||
return Theme.AppThemeColor(name, Color.{245, 245, 245, 255})
|
||||
} else {
|
||||
if name == "border-soft" { return StyleTokenColor("border") }
|
||||
return StyleTokenColor(name)
|
||||
}
|
||||
}
|
||||
@@ -104,22 +105,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: BoxProps
|
||||
box: Box.Props
|
||||
box.key = key
|
||||
box.bounds = bounds
|
||||
box.fill = fill
|
||||
box.border = GridLineColor()
|
||||
Box(session, box)
|
||||
Box.Draw(session, box)
|
||||
if text.count == 0 { return }
|
||||
label: TextProps
|
||||
label: Text.Props
|
||||
label.key = key + 1
|
||||
label.text = text
|
||||
label.font = Text14
|
||||
label.wrap = TextWrap.TextWrapNone
|
||||
if align_end { label.align = TextAlign.TextAlignEnd }
|
||||
label.size = Text.Text14
|
||||
label.wrap = Text.Wrap.TextWrapNone
|
||||
if align_end { label.align = TextAlign.TextAlign.TextAlignEnd }
|
||||
label.bounds = Rectangle.{bounds.x + 4.0, bounds.y + 3.0,
|
||||
bounds.width - 8.0, bounds.height - 4.0}
|
||||
Text(session, label)
|
||||
Text.Draw(session, label)
|
||||
}
|
||||
|
||||
// Column letters: A to Z, then AA to ZZ.
|
||||
@@ -409,26 +410,26 @@ GridDraw :: (session: Session, bounds: Rectangle, book: *Engine.Workbook, view:
|
||||
|
||||
if sheets < 2 { return }
|
||||
count := ifx sheets > 16 then 16 else sheets
|
||||
tabs: [16]Tab
|
||||
tabs: [16]TabBar.Tab
|
||||
for index: 0..count - 1 {
|
||||
tabs[index].key = view.key + cast(u64)(90000 + index)
|
||||
tabs[index].label = GridSheetName(book, index)
|
||||
}
|
||||
strip: BoxProps
|
||||
strip: Box.Props
|
||||
strip.key = view.key + 89998
|
||||
strip.bounds = Rectangle.{bounds.x, bottom, bounds.width, GridTabsHeight}
|
||||
strip.fill = GridHeaderBackground()
|
||||
strip.border = GridLineColor()
|
||||
Box(session, strip)
|
||||
bar: TabBarProps
|
||||
Box.Draw(session, strip)
|
||||
bar: TabBar.Props
|
||||
bar.key = view.key + 89999
|
||||
bar.placement = TabBarPlacement.TabBarBottom
|
||||
bar.placement = TabBar.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(session, bar, tabs[0:count])
|
||||
result := TabBar.Draw(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
@@ -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
|
||||
|
||||
@@ -32,9 +32,10 @@ TabWidth :: 104;
|
||||
|
||||
Background :: 0xF8FAFC;
|
||||
// The fixture theme below is #f8fafc with ink #1e2530, base white, and a
|
||||
// #3070e0 accent; the app derives its header and selection from those.
|
||||
HeaderFill :: 0xEDEFF2;
|
||||
SelectedFill :: 0xCCDCF6;
|
||||
// #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;
|
||||
White :: 0xFFFFFF;
|
||||
|
||||
TwoSheets :: #string END
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#load "test_support.zi";
|
||||
using Grid :: #import "grid";
|
||||
Engine :: #import "engine";
|
||||
#import "kryon/geometry"
|
||||
|
||||
#program_export
|
||||
main :: () -> s32 {
|
||||
|
||||
+6
-6
@@ -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
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
|
||||
+56
-56
@@ -19,6 +19,24 @@
|
||||
"source": true,
|
||||
"url": "https://github.com/libsdl-org/SDL.git"
|
||||
},
|
||||
{
|
||||
"commit": "f26a552247e2cd367fd33def6860d903cac6ab8a",
|
||||
"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": "p274c2dd6d03a7c0c",
|
||||
"name": "avif",
|
||||
"ref": "f26a552247e2cd367fd33def6860d903cac6ab8a",
|
||||
"url": "https://github.com/ziranlang/avif.git"
|
||||
},
|
||||
{
|
||||
"commit": "f123e8ba3e3a9d77e059004564f0189558d4f652",
|
||||
"dependencies": {"audio": "pb46a53117b2530ce", "avif": "p274c2dd6d03a7c0c", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa", "libavif": "p57c0272208aae8db", "libwebp": "p3b3c785a0e17e605", "raylib": "pcc7aa76725f2fb2f", "sdl3": "p16cd0434af3dff7b", "webp": "pa068bd09450b2a80"},
|
||||
"dependency_refs": {"audio": "ce5837f80e8ce6cb8d2d9f77915095d764da3485", "avif": "f26a552247e2cd367fd33def6860d903cac6ab8a", "image_codec": "360553150917f352e49e1beb78917370792ccaef", "libaom": "b141d9c45db236335351c8a4b2a14b3ade27c937", "libavif": "1aadfad932c98c069a1204261b1856f81f3bc199", "libwebp": "1844042d1ca751e62e61df7617dba19c98588339", "raylib": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e", "sdl3": "829a65d769d935c4852f8159e964312c0957260a", "webp": "02145a00a1f0df2a111da04a75f3fef260883897"},
|
||||
"id": "p36832c0dd22d83b7",
|
||||
"name": "kryon",
|
||||
"ref": "f123e8ba3e3a9d77e059004564f0189558d4f652",
|
||||
"url": "https://github.com/kryonlabs/kryon.git"
|
||||
},
|
||||
{
|
||||
"commit": "1844042d1ca751e62e61df7617dba19c98588339",
|
||||
"dependencies": {},
|
||||
@@ -28,24 +46,6 @@
|
||||
"source": true,
|
||||
"url": "https://github.com/webmproject/libwebp.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",
|
||||
"dependencies": {},
|
||||
@@ -55,15 +55,6 @@
|
||||
"source": true,
|
||||
"url": "https://github.com/AOMediaCodec/libavif.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",
|
||||
"dependencies": {"dav1d": "pb24767b9eb34d961", "image_codec": "p69c0e968ae5735d9", "libaom": "p74ab3cb6eb3b86fa"},
|
||||
@@ -90,15 +81,6 @@
|
||||
"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"},
|
||||
@@ -117,6 +99,33 @@
|
||||
"source": true,
|
||||
"url": "https://github.com/videolan/dav1d.git"
|
||||
},
|
||||
{
|
||||
"commit": "ce5837f80e8ce6cb8d2d9f77915095d764da3485",
|
||||
"dependencies": {"dr_libs": "pb7c2dd1c09da0c1c", "libopus": "pe1fe9bbe80bf1d6d", "libsamplerate": "p0dd67588478f9a3e", "stb": "pe4a63e2d6e0424e7"},
|
||||
"dependency_refs": {"dr_libs": "f12e197fd462e4c22873fbd70d11b1d2f2c1dc3c", "libopus": "ddbe48383984d56acd9e1ab6a090c54ca6b735a6", "libsamplerate": "c96f5e3de9c4488f4e6c97f59f5245f22fda22f7", "stb": "9600522de53973336fa033a289858a4354cbb04c"},
|
||||
"id": "pb46a53117b2530ce",
|
||||
"name": "audio",
|
||||
"ref": "ce5837f80e8ce6cb8d2d9f77915095d764da3485",
|
||||
"url": "https://github.com/ziranlang/audio.git"
|
||||
},
|
||||
{
|
||||
"commit": "f12e197fd462e4c22873fbd70d11b1d2f2c1dc3c",
|
||||
"dependencies": {},
|
||||
"id": "pb7c2dd1c09da0c1c",
|
||||
"name": "dr_libs",
|
||||
"ref": "f12e197fd462e4c22873fbd70d11b1d2f2c1dc3c",
|
||||
"source": true,
|
||||
"url": "https://github.com/mackron/dr_libs.git"
|
||||
},
|
||||
{
|
||||
"commit": "3799bb09332fe1fbb32991e3f83f61bad825d4e6",
|
||||
"dependencies": {"kryon": "p36832c0dd22d83b7"},
|
||||
"dependency_refs": {"kryon": "f123e8ba3e3a9d77e059004564f0189558d4f652"},
|
||||
"id": "pcbb24d157d2c58bf",
|
||||
"name": "Css",
|
||||
"ref": "3799bb09332fe1fbb32991e3f83f61bad825d4e6",
|
||||
"url": "https://github.com/kryonlabs/css.git"
|
||||
},
|
||||
{
|
||||
"commit": "fafa2cea97d0cb379d832086ba45a989fa6f9c8e",
|
||||
"dependencies": {},
|
||||
@@ -126,15 +135,6 @@
|
||||
"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": {},
|
||||
@@ -153,23 +153,23 @@
|
||||
"url": "https://github.com/xiph/opus.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"
|
||||
"commit": "9600522de53973336fa033a289858a4354cbb04c",
|
||||
"dependencies": {},
|
||||
"id": "pe4a63e2d6e0424e7",
|
||||
"name": "stb",
|
||||
"ref": "9600522de53973336fa033a289858a4354cbb04c",
|
||||
"source": true,
|
||||
"url": "https://github.com/nothings/stb.git"
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"dependencies": {"css": "p533f113d2c39777d", "kryon": "p3cf597cf815203c0", "mingcute": "pe1027b9d16704793"},
|
||||
"dependency_refs": {"css": "60692b80dce3b32e2de1057c39a4793b500419b6", "kryon": "af027a528c6e42b44b68fdaa90b13a7c1136d161", "mingcute": "master"},
|
||||
"dependencies": {"css": "pcbb24d157d2c58bf", "kryon": "p36832c0dd22d83b7", "mingcute": "pe1027b9d16704793"},
|
||||
"dependency_refs": {"css": "3799bb09332fe1fbb32991e3f83f61bad825d4e6", "kryon": "f123e8ba3e3a9d77e059004564f0189558d4f652", "mingcute": "master"},
|
||||
"name": "workbook"
|
||||
},
|
||||
"toolchain": {
|
||||
"commit": "9524616df1a1b6e63a3789b3aea055714a526c88",
|
||||
"ref": "master",
|
||||
"commit": "d17c7aa1e093066ef03f307a45f6966dd9b29d4b",
|
||||
"ref": "d17c7aa1e093066ef03f307a45f6966dd9b29d4b",
|
||||
"url": "https://github.com/ziranlang/ziran.git"
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -7,11 +7,11 @@ bridge_modules = ["app"]
|
||||
|
||||
[toolchain]
|
||||
git = "https://github.com/ziranlang/ziran.git"
|
||||
ref = "master"
|
||||
ref = "d17c7aa1e093066ef03f307a45f6966dd9b29d4b"
|
||||
|
||||
[dependencies.kryon]
|
||||
git = "https://github.com/kryonlabs/kryon.git"
|
||||
ref = "af027a528c6e42b44b68fdaa90b13a7c1136d161"
|
||||
ref = "f123e8ba3e3a9d77e059004564f0189558d4f652"
|
||||
|
||||
[dependencies.mingcute]
|
||||
git = "https://github.com/kryonlabs/mingcute.git"
|
||||
@@ -19,7 +19,7 @@ ref = "master"
|
||||
|
||||
[dependencies.css]
|
||||
git = "https://github.com/kryonlabs/css.git"
|
||||
ref = "60692b80dce3b32e2de1057c39a4793b500419b6"
|
||||
ref = "3799bb09332fe1fbb32991e3f83f61bad825d4e6"
|
||||
|
||||
[install]
|
||||
bin = "workbook"
|
||||
|
||||
Reference in new issue
Block a user