craft-native 0.0.111 → 0.0.112
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 +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +38 -0
- package/package.json +1 -1
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.
|
|
3306
|
+
var version = "0.0.112";
|
|
3307
3307
|
|
|
3308
3308
|
// bin/cli.ts
|
|
3309
3309
|
var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
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
|
/**
|