craft-native 0.0.111 → 0.0.113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -3303,7 +3303,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
3303
3303
  `);
3304
3304
  }
3305
3305
  // package.json
3306
- var version = "0.0.111";
3306
+ var version = "0.0.113";
3307
3307
 
3308
3308
  // bin/cli.ts
3309
3309
  var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
package/dist/index.cjs CHANGED
@@ -310,7 +310,7 @@ function craftBinaryNotFoundMessage(triedPath) {
310
310
  `);
311
311
  }
312
312
  // package.json
313
- var version = "0.0.111";
313
+ var version = "0.0.113";
314
314
 
315
315
  // src/sdk-version.ts
316
316
  var SDK_VERSION = version;
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ function craftBinaryNotFoundMessage(triedPath) {
58
58
  `);
59
59
  }
60
60
  // package.json
61
- var version = "0.0.111";
61
+ var version = "0.0.113";
62
62
 
63
63
  // src/sdk-version.ts
64
64
  var SDK_VERSION = version;
package/dist/types.d.ts CHANGED
@@ -1077,6 +1077,8 @@ export interface CraftContextMenuItem {
1077
1077
  */
1078
1078
  shortcut?: string;
1079
1079
  enabled?: boolean;
1080
+ /** Shows a checkmark: the choice in effect. */
1081
+ checked?: boolean;
1080
1082
  submenu?: CraftContextMenuItem[];
1081
1083
  }
1082
1084
  /** How a context menu closed. `id` is null when it was dismissed. */
@@ -1099,6 +1101,42 @@ export interface CraftNativeUIAPI {
1099
1101
  }) => Promise<CraftContextMenuResult>;
1100
1102
  /** Every context menu's outcome. Returns an unsubscribe function. */
1101
1103
  onContextMenuAction: (callback: (result: CraftContextMenuResult) => void) => () => void;
1104
+ /**
1105
+ * A native source-list sidebar (macOS): the window's content becomes a
1106
+ * split view with the sidebar on the left and the page on the right. One
1107
+ * per window.
1108
+ */
1109
+ createSidebar: (options: {
1110
+ id?: string;
1111
+ sections?: CraftSidebarSection[];
1112
+ selected?: string;
1113
+ }) => CraftSidebar;
1114
+ }
1115
+ export interface CraftSidebarItem {
1116
+ id: string;
1117
+ label: string;
1118
+ /** SF Symbol name, e.g. `'tray'`. */
1119
+ icon?: string;
1120
+ /** A count or short text drawn right-aligned, like Mail's unread counts. */
1121
+ badge?: string;
1122
+ }
1123
+ export interface CraftSidebarSection {
1124
+ id: string;
1125
+ /** The section's heading; omit for none. */
1126
+ header?: string;
1127
+ items: CraftSidebarItem[];
1128
+ }
1129
+ export interface CraftSidebar {
1130
+ readonly id: string;
1131
+ /** Replace every section, keeping the selection by id when it still exists. */
1132
+ setSections: (sections: CraftSidebarSection[]) => CraftSidebar;
1133
+ /** Change one row's label, icon or badge in place; `badge: ''` clears it. */
1134
+ updateItem: (itemId: string, changes: Partial<Omit<CraftSidebarItem, 'id'>>) => CraftSidebar;
1135
+ /** Select a row without reporting it as a pick. */
1136
+ setSelectedItem: (itemId: string) => CraftSidebar;
1137
+ /** The person picked a row. */
1138
+ onSelect: (callback: (itemId: string) => void) => CraftSidebar;
1139
+ destroy: () => void;
1102
1140
  }
1103
1141
  export interface CraftBridgeAPI {
1104
1142
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "craft-native",
3
- "version": "0.0.111",
3
+ "version": "0.0.113",
4
4
  "type": "module",
5
5
  "description": "Build desktop apps with web languages - TypeScript SDK for Craft",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",