@wildwinter/app-shell 0.38.0 → 0.40.0
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/LICENSES.md +62 -0
- package/README.md +8 -0
- package/dist/about.css +17 -38
- package/dist/about.css.map +1 -1
- package/dist/anchored.css +9 -9
- package/dist/anchored.css.map +1 -1
- package/dist/app-store.cjs +15 -0
- package/dist/app-store.cjs.map +1 -1
- package/dist/app-store.d.cts +25 -1
- package/dist/app-store.d.ts +25 -1
- package/dist/app-store.js +14 -1
- package/dist/app-store.js.map +1 -1
- package/dist/chunk-2ECJUTSX.js +97 -0
- package/dist/chunk-2ECJUTSX.js.map +1 -0
- package/dist/chunk-DS4XXAZS.js +56 -0
- package/dist/chunk-DS4XXAZS.js.map +1 -0
- package/dist/chunk-EHR2KBZC.js +82 -0
- package/dist/chunk-EHR2KBZC.js.map +1 -0
- package/dist/chunk-IU7EY6BI.js +26 -0
- package/dist/chunk-IU7EY6BI.js.map +1 -0
- package/dist/chunk-OPZPFOPS.js +66 -0
- package/dist/chunk-OPZPFOPS.js.map +1 -0
- package/dist/chunk-P4G4ERG6.js +60 -0
- package/dist/chunk-P4G4ERG6.js.map +1 -0
- package/dist/chunk-P6WLAEKZ.js +71 -0
- package/dist/chunk-P6WLAEKZ.js.map +1 -0
- package/dist/chunk-R3NXPHRZ.js +534 -0
- package/dist/chunk-R3NXPHRZ.js.map +1 -0
- package/dist/chunk-SDOKZTAR.js +87 -0
- package/dist/chunk-SDOKZTAR.js.map +1 -0
- package/dist/chunk-SEWJLUOD.js +70 -0
- package/dist/chunk-SEWJLUOD.js.map +1 -0
- package/dist/chunk-UG2P777F.js +587 -0
- package/dist/chunk-UG2P777F.js.map +1 -0
- package/dist/chunk-YRFJLJUH.js +55 -0
- package/dist/chunk-YRFJLJUH.js.map +1 -0
- package/dist/chunk-YWMSQFXX.js +146 -0
- package/dist/chunk-YWMSQFXX.js.map +1 -0
- package/dist/comments.css +16 -14
- package/dist/comments.css.map +1 -1
- package/dist/confirm.css +2 -55
- package/dist/confirm.css.map +1 -1
- package/dist/context-menu.cjs +250 -0
- package/dist/context-menu.cjs.map +1 -0
- package/dist/context-menu.css +64 -0
- package/dist/context-menu.css.map +1 -0
- package/dist/context-menu.d.cts +25 -0
- package/dist/context-menu.d.ts +25 -0
- package/dist/context-menu.js +5 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/controls.css +214 -0
- package/dist/controls.css.map +1 -0
- package/dist/dialog.cjs +222 -0
- package/dist/dialog.cjs.map +1 -0
- package/dist/dialog.css +56 -0
- package/dist/dialog.css.map +1 -0
- package/dist/dialog.d.cts +28 -0
- package/dist/dialog.d.ts +28 -0
- package/dist/dialog.js +5 -0
- package/dist/dialog.js.map +1 -0
- package/dist/floating.cjs +83 -0
- package/dist/floating.cjs.map +1 -0
- package/dist/floating.d.cts +25 -0
- package/dist/floating.d.ts +25 -0
- package/dist/floating.js +4 -0
- package/dist/floating.js.map +1 -0
- package/dist/identity.css +15 -50
- package/dist/identity.css.map +1 -1
- package/dist/index.cjs +1553 -260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +385 -152
- package/dist/index.d.ts +385 -152
- package/dist/index.js +264 -823
- package/dist/index.js.map +1 -1
- package/dist/job.css +24 -1
- package/dist/job.css.map +1 -1
- package/dist/keys.cjs +155 -0
- package/dist/keys.cjs.map +1 -0
- package/dist/keys.css +41 -0
- package/dist/keys.css.map +1 -0
- package/dist/keys.d.cts +57 -0
- package/dist/keys.d.ts +57 -0
- package/dist/keys.js +3 -0
- package/dist/keys.js.map +1 -0
- package/dist/link-status.cjs +430 -0
- package/dist/link-status.cjs.map +1 -0
- package/dist/link-status.css +76 -0
- package/dist/link-status.css.map +1 -0
- package/dist/link-status.d.cts +53 -0
- package/dist/link-status.d.ts +53 -0
- package/dist/link-status.js +5 -0
- package/dist/link-status.js.map +1 -0
- package/dist/menu.cjs +62 -1
- package/dist/menu.cjs.map +1 -1
- package/dist/menu.d.cts +88 -1
- package/dist/menu.d.ts +88 -1
- package/dist/menu.js +1 -1
- package/dist/notes-editor.css +9 -52
- package/dist/notes-editor.css.map +1 -1
- package/dist/pane-shell.css +23 -5
- package/dist/pane-shell.css.map +1 -1
- package/dist/problems.cjs +61 -0
- package/dist/problems.cjs.map +1 -0
- package/dist/problems.d.cts +57 -0
- package/dist/problems.d.ts +57 -0
- package/dist/problems.js +3 -0
- package/dist/problems.js.map +1 -0
- package/dist/property-list-D3VZCJzi.d.cts +162 -0
- package/dist/property-list-D3VZCJzi.d.ts +162 -0
- package/dist/property-list.cjs +784 -0
- package/dist/property-list.cjs.map +1 -0
- package/dist/property-list.d.cts +1 -0
- package/dist/property-list.d.ts +1 -0
- package/dist/property-list.js +4 -0
- package/dist/property-list.js.map +1 -0
- package/dist/save.css +1 -1
- package/dist/save.css.map +1 -1
- package/dist/settings.css +62 -18
- package/dist/settings.css.map +1 -1
- package/dist/stale.css +4 -1
- package/dist/stale.css.map +1 -1
- package/dist/stepper.css +47 -3
- package/dist/stepper.css.map +1 -1
- package/dist/toast.css +5 -5
- package/dist/toast.css.map +1 -1
- package/dist/tokens.css +20 -0
- package/dist/tokens.css.map +1 -1
- package/dist/tool-window.cjs +63 -0
- package/dist/tool-window.cjs.map +1 -1
- package/dist/tool-window.css +8 -4
- package/dist/tool-window.css.map +1 -1
- package/dist/tool-window.d.cts +67 -1
- package/dist/tool-window.d.ts +67 -1
- package/dist/tool-window.js +63 -1
- package/dist/tool-window.js.map +1 -1
- package/dist/tooltip.css +3 -3
- package/dist/tooltip.css.map +1 -1
- package/dist/updater-view.cjs +283 -0
- package/dist/updater-view.cjs.map +1 -0
- package/dist/updater-view.d.cts +23 -0
- package/dist/updater-view.d.ts +23 -0
- package/dist/updater-view.js +6 -0
- package/dist/updater-view.js.map +1 -0
- package/dist/updater.cjs +12 -16
- package/dist/updater.cjs.map +1 -1
- package/dist/updater.css +44 -0
- package/dist/updater.css.map +1 -0
- package/dist/updater.js +12 -16
- package/dist/updater.js.map +1 -1
- package/dist/util.cjs +78 -0
- package/dist/util.cjs.map +1 -0
- package/dist/util.d.cts +37 -0
- package/dist/util.d.ts +37 -0
- package/dist/util.js +3 -0
- package/dist/util.js.map +1 -0
- package/dist/vc.css +4 -3
- package/dist/vc.css.map +1 -1
- package/dist/welcome.cjs +215 -0
- package/dist/welcome.cjs.map +1 -0
- package/dist/welcome.css +112 -0
- package/dist/welcome.css.map +1 -0
- package/dist/welcome.d.cts +55 -0
- package/dist/welcome.d.ts +55 -0
- package/dist/welcome.js +4 -0
- package/dist/welcome.js.map +1 -0
- package/package.json +72 -2
- package/dist/chunk-QDPFU4WX.js +0 -43
- package/dist/chunk-QDPFU4WX.js.map +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* src/link-status.css */
|
|
2
|
+
.linkstatus {
|
|
3
|
+
position: fixed;
|
|
4
|
+
right: 14.5px;
|
|
5
|
+
bottom: 5px;
|
|
6
|
+
z-index: 40;
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 6.5px;
|
|
10
|
+
}
|
|
11
|
+
.linkstatus[hidden] {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
.linkstatus-word {
|
|
15
|
+
font: 11px var(--font-ui);
|
|
16
|
+
color: var(--muted);
|
|
17
|
+
user-select: none;
|
|
18
|
+
}
|
|
19
|
+
.linkstatus-url {
|
|
20
|
+
font: 11.5px var(--font-mono);
|
|
21
|
+
color: var(--muted);
|
|
22
|
+
background: var(--surface);
|
|
23
|
+
border: 1px solid var(--line);
|
|
24
|
+
border-radius: var(--radius-sm);
|
|
25
|
+
padding: 2px 7px;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
transition: color var(--dur-quick) var(--ease-standard), border-color var(--dur-quick) var(--ease-standard);
|
|
28
|
+
}
|
|
29
|
+
.linkstatus-url:hover {
|
|
30
|
+
border-color: var(--accent);
|
|
31
|
+
color: var(--accent);
|
|
32
|
+
}
|
|
33
|
+
.linkstatus-url.copied {
|
|
34
|
+
color: var(--accent);
|
|
35
|
+
border-color: var(--accent);
|
|
36
|
+
}
|
|
37
|
+
.linkstatus-url[hidden] {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
.linkstatus-toggle {
|
|
41
|
+
flex: none;
|
|
42
|
+
width: 22.5px;
|
|
43
|
+
height: 22.5px;
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
padding: 0;
|
|
48
|
+
border: 1px solid var(--line);
|
|
49
|
+
border-radius: var(--radius-sm);
|
|
50
|
+
background: var(--surface);
|
|
51
|
+
color: var(--muted);
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
transition: color var(--dur-quick) var(--ease-standard), border-color var(--dur-quick) var(--ease-standard);
|
|
54
|
+
}
|
|
55
|
+
.linkstatus-toggle:hover {
|
|
56
|
+
border-color: var(--accent);
|
|
57
|
+
}
|
|
58
|
+
.linkstatus-toggle svg {
|
|
59
|
+
display: block;
|
|
60
|
+
}
|
|
61
|
+
.linkstatus-toggle.listening {
|
|
62
|
+
color: var(--warn);
|
|
63
|
+
border-color: var(--warn);
|
|
64
|
+
background: color-mix(in oklab, var(--warn) 12%, var(--surface));
|
|
65
|
+
}
|
|
66
|
+
.linkstatus-toggle.live {
|
|
67
|
+
color: var(--ok);
|
|
68
|
+
border-color: var(--ok);
|
|
69
|
+
background: color-mix(in oklab, var(--ok) 14%, var(--surface));
|
|
70
|
+
}
|
|
71
|
+
.linkstatus-toggle.stale {
|
|
72
|
+
color: var(--danger);
|
|
73
|
+
border-color: var(--danger);
|
|
74
|
+
background: color-mix(in oklab, var(--danger) 12%, var(--surface));
|
|
75
|
+
}
|
|
76
|
+
/*# sourceMappingURL=link-status.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/link-status.css"],"sourcesContent":["/* ---------------------------------------------------------------------------\n The live-link status chip (link-status.ts): the bottom-right plug, its\n four states, and the copiable address. Consumes the host palette\n (--surface / --ink / --muted / --line / --accent / --warn / --ok /\n --danger / --font-ui / --font-mono) over the shared tokens.\n --------------------------------------------------------------------------- */\n\n.linkstatus { position: fixed; right: 14.5px; bottom: 5px; z-index: 40; display: inline-flex; align-items: center; gap: 6.5px; }\n.linkstatus[hidden] { display: none; }\n.linkstatus-word { font: 11px var(--font-ui); color: var(--muted); user-select: none; }\n\n.linkstatus-url {\n font: 11.5px var(--font-mono); color: var(--muted); background: var(--surface);\n border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 7px; cursor: pointer;\n transition: color var(--dur-quick) var(--ease-standard), border-color var(--dur-quick) var(--ease-standard);\n}\n.linkstatus-url:hover { border-color: var(--accent); color: var(--accent); }\n/* Lit for a moment after a copy (copyWithFeedback). */\n.linkstatus-url.copied { color: var(--accent); border-color: var(--accent); }\n.linkstatus-url[hidden] { display: none; }\n\n.linkstatus-toggle {\n flex: none; width: 22.5px; height: 22.5px; display: inline-flex; align-items: center; justify-content: center;\n padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);\n color: var(--muted); cursor: pointer;\n transition: color var(--dur-quick) var(--ease-standard), border-color var(--dur-quick) var(--ease-standard);\n}\n.linkstatus-toggle:hover { border-color: var(--accent); }\n.linkstatus-toggle svg { display: block; }\n/* The four states. */\n.linkstatus-toggle.listening { color: var(--warn); border-color: var(--warn); background: color-mix(in oklab, var(--warn) 12%, var(--surface)); }\n.linkstatus-toggle.live { color: var(--ok); border-color: var(--ok); background: color-mix(in oklab, var(--ok) 14%, var(--surface)); }\n.linkstatus-toggle.stale { color: var(--danger); border-color: var(--danger); background: color-mix(in oklab, var(--danger) 12%, var(--surface)); }\n"],"mappings":";AAOA,CAAC;AAAa,YAAU;AAAO,SAAO;AAAQ,UAAQ;AAAK,WAAS;AAAI,WAAS;AAAa,eAAa;AAAQ,OAAK;AAAO;AAC/H,CADC,UACU,CAAC;AAAU,WAAS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AAI,UAAU,GAAG,EAAE,IAAI;AAAa;","names":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
type LinkStatus = {
|
|
2
|
+
state: "off";
|
|
3
|
+
} | {
|
|
4
|
+
state: "error";
|
|
5
|
+
message: string;
|
|
6
|
+
} | {
|
|
7
|
+
state: "listening";
|
|
8
|
+
port: number;
|
|
9
|
+
address?: string;
|
|
10
|
+
} | {
|
|
11
|
+
state: "connected";
|
|
12
|
+
port: number;
|
|
13
|
+
address?: string;
|
|
14
|
+
/** What connected, if it said. */
|
|
15
|
+
project?: string;
|
|
16
|
+
/** Whether the game's build matches the editor's. */
|
|
17
|
+
build?: "match" | "stale" | "unknown";
|
|
18
|
+
/** One extra sentence for the tip (Storyletter names the live boxes). */
|
|
19
|
+
note?: string;
|
|
20
|
+
};
|
|
21
|
+
/** The chip's colour class for a state: the four. */
|
|
22
|
+
type LinkStatusClass = "off" | "listening" | "live" | "stale";
|
|
23
|
+
interface LinkStatusOptions {
|
|
24
|
+
/** A word beside the chip ("Live link"), so a bottom-corner plug is not a
|
|
25
|
+
* mystery. Omitted draws none. */
|
|
26
|
+
label?: string;
|
|
27
|
+
/** Start when off or failed, stop otherwise. A returned status is applied;
|
|
28
|
+
* a status pushed later through `apply` works as well. */
|
|
29
|
+
onToggle: (current: LinkStatus) => LinkStatus | void | Promise<LinkStatus | void>;
|
|
30
|
+
/** Runs after the address is copied. The copy itself is the chip's. */
|
|
31
|
+
onCopy?: (address: string) => void;
|
|
32
|
+
/** Controls before the address (Patterpad's flow picker). */
|
|
33
|
+
lead?: HTMLElement[];
|
|
34
|
+
}
|
|
35
|
+
interface LinkStatusChip {
|
|
36
|
+
el: HTMLElement;
|
|
37
|
+
apply(status: LinkStatus): void;
|
|
38
|
+
status(): LinkStatus;
|
|
39
|
+
/** Show / hide the control (shown when a project is open). */
|
|
40
|
+
setVisible(on: boolean): void;
|
|
41
|
+
/** Toggle the link (a menu item routes here). */
|
|
42
|
+
toggle(): void;
|
|
43
|
+
}
|
|
44
|
+
declare function linkStatusClass(s: LinkStatus): LinkStatusClass;
|
|
45
|
+
/** The tooltip, spelling the state out. One wording for the family. */
|
|
46
|
+
declare function linkStatusTip(s: LinkStatus): string;
|
|
47
|
+
/** The address a game connects to. */
|
|
48
|
+
declare function linkAddress(s: LinkStatus): string | undefined;
|
|
49
|
+
/** Mount the chip into `host` (document.body in both apps: it is fixed to the
|
|
50
|
+
* window's corner). Hidden until `setVisible(true)`. */
|
|
51
|
+
declare function mountLinkStatus(host: HTMLElement, opts: LinkStatusOptions): LinkStatusChip;
|
|
52
|
+
|
|
53
|
+
export { type LinkStatus, type LinkStatusChip, type LinkStatusClass, type LinkStatusOptions, linkAddress, linkStatusClass, linkStatusTip, mountLinkStatus };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
type LinkStatus = {
|
|
2
|
+
state: "off";
|
|
3
|
+
} | {
|
|
4
|
+
state: "error";
|
|
5
|
+
message: string;
|
|
6
|
+
} | {
|
|
7
|
+
state: "listening";
|
|
8
|
+
port: number;
|
|
9
|
+
address?: string;
|
|
10
|
+
} | {
|
|
11
|
+
state: "connected";
|
|
12
|
+
port: number;
|
|
13
|
+
address?: string;
|
|
14
|
+
/** What connected, if it said. */
|
|
15
|
+
project?: string;
|
|
16
|
+
/** Whether the game's build matches the editor's. */
|
|
17
|
+
build?: "match" | "stale" | "unknown";
|
|
18
|
+
/** One extra sentence for the tip (Storyletter names the live boxes). */
|
|
19
|
+
note?: string;
|
|
20
|
+
};
|
|
21
|
+
/** The chip's colour class for a state: the four. */
|
|
22
|
+
type LinkStatusClass = "off" | "listening" | "live" | "stale";
|
|
23
|
+
interface LinkStatusOptions {
|
|
24
|
+
/** A word beside the chip ("Live link"), so a bottom-corner plug is not a
|
|
25
|
+
* mystery. Omitted draws none. */
|
|
26
|
+
label?: string;
|
|
27
|
+
/** Start when off or failed, stop otherwise. A returned status is applied;
|
|
28
|
+
* a status pushed later through `apply` works as well. */
|
|
29
|
+
onToggle: (current: LinkStatus) => LinkStatus | void | Promise<LinkStatus | void>;
|
|
30
|
+
/** Runs after the address is copied. The copy itself is the chip's. */
|
|
31
|
+
onCopy?: (address: string) => void;
|
|
32
|
+
/** Controls before the address (Patterpad's flow picker). */
|
|
33
|
+
lead?: HTMLElement[];
|
|
34
|
+
}
|
|
35
|
+
interface LinkStatusChip {
|
|
36
|
+
el: HTMLElement;
|
|
37
|
+
apply(status: LinkStatus): void;
|
|
38
|
+
status(): LinkStatus;
|
|
39
|
+
/** Show / hide the control (shown when a project is open). */
|
|
40
|
+
setVisible(on: boolean): void;
|
|
41
|
+
/** Toggle the link (a menu item routes here). */
|
|
42
|
+
toggle(): void;
|
|
43
|
+
}
|
|
44
|
+
declare function linkStatusClass(s: LinkStatus): LinkStatusClass;
|
|
45
|
+
/** The tooltip, spelling the state out. One wording for the family. */
|
|
46
|
+
declare function linkStatusTip(s: LinkStatus): string;
|
|
47
|
+
/** The address a game connects to. */
|
|
48
|
+
declare function linkAddress(s: LinkStatus): string | undefined;
|
|
49
|
+
/** Mount the chip into `host` (document.body in both apps: it is fixed to the
|
|
50
|
+
* window's corner). Hidden until `setVisible(true)`. */
|
|
51
|
+
declare function mountLinkStatus(host: HTMLElement, opts: LinkStatusOptions): LinkStatusChip;
|
|
52
|
+
|
|
53
|
+
export { type LinkStatus, type LinkStatusChip, type LinkStatusClass, type LinkStatusOptions, linkAddress, linkStatusClass, linkStatusTip, mountLinkStatus };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"link-status.js"}
|
package/dist/menu.cjs
CHANGED
|
@@ -5,7 +5,8 @@ var EDIT_MENU = {
|
|
|
5
5
|
undo: { label: "Undo", accelerator: "CmdOrCtrl+Z" },
|
|
6
6
|
redo: { label: "Redo", accelerator: "Shift+CmdOrCtrl+Z" },
|
|
7
7
|
duplicate: { label: "Duplicate", accelerator: "CmdOrCtrl+D" },
|
|
8
|
-
find: { label: "Find\u2026", accelerator: "CmdOrCtrl+F" }
|
|
8
|
+
find: { label: "Find\u2026", accelerator: "CmdOrCtrl+F" },
|
|
9
|
+
replace: { label: "Replace\u2026", acceleratorMac: "Cmd+Alt+F", acceleratorOther: "Ctrl+H" }
|
|
9
10
|
};
|
|
10
11
|
var GO_MENU = {
|
|
11
12
|
back: { label: "Back", acceleratorMac: "Ctrl+Cmd+Left", acceleratorOther: "Alt+Left" },
|
|
@@ -39,12 +40,72 @@ function namedMenuItems(naming) {
|
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
42
|
}
|
|
43
|
+
var FILE_MENU = {
|
|
44
|
+
newProject: { label: "New Project\u2026", accelerator: "CmdOrCtrl+N" },
|
|
45
|
+
openProject: { label: "Open Project\u2026", accelerator: "CmdOrCtrl+O" },
|
|
46
|
+
openRecent: { label: "Open Recent" },
|
|
47
|
+
noRecents: { label: "No Recent Projects" },
|
|
48
|
+
clearRecents: { label: "Clear Recents" },
|
|
49
|
+
closeProject: { label: "Close Project" },
|
|
50
|
+
save: { label: "Save", accelerator: "CmdOrCtrl+S" },
|
|
51
|
+
saveAs: { label: "Save As\u2026", accelerator: "Shift+CmdOrCtrl+S" },
|
|
52
|
+
projectSettings: { label: "Project Settings\u2026", accelerator: "CmdOrCtrl+," }
|
|
53
|
+
};
|
|
54
|
+
var PLAY_MENU = {
|
|
55
|
+
liveLink: { label: "Live Link" }
|
|
56
|
+
};
|
|
57
|
+
var REVIEW_MENU = {
|
|
58
|
+
reviewFeedback: { label: "Review Feedback", accelerator: "CmdOrCtrl+Shift+R" },
|
|
59
|
+
nextFeedback: { label: "Next Feedback", accelerator: "F8" },
|
|
60
|
+
previousFeedback: { label: "Previous Feedback", accelerator: "Shift+F8" },
|
|
61
|
+
coverageTest: { label: "Coverage Test\u2026", accelerator: "Shift+CmdOrCtrl+C" },
|
|
62
|
+
findPropertyUsage: { label: "Find Property Usage\u2026" },
|
|
63
|
+
showResolvedComments: { label: "Show Resolved Comments" }
|
|
64
|
+
};
|
|
65
|
+
var PUBLISH_MENU = {
|
|
66
|
+
playableHtml: { label: "Publish Playable HTML\u2026" },
|
|
67
|
+
bundle: { label: "Publish Bundle", accelerator: "Shift+CmdOrCtrl+B" },
|
|
68
|
+
autoRebuild: { label: "Auto Rebuild" }
|
|
69
|
+
};
|
|
70
|
+
var VIEW_MENU = {
|
|
71
|
+
projectOverview: { label: "Project Overview" },
|
|
72
|
+
upALevel: { label: "Up a Level", accelerator: "CmdOrCtrl+[" },
|
|
73
|
+
colourTheme: { label: "Colour Theme" }
|
|
74
|
+
};
|
|
75
|
+
function tildePath(path, home) {
|
|
76
|
+
if (path === home) return "~";
|
|
77
|
+
const sep = home.includes("\\") ? "\\" : "/";
|
|
78
|
+
return path.startsWith(home + sep) ? `~${path.slice(home.length)}` : path;
|
|
79
|
+
}
|
|
80
|
+
function recentsSubmenu(recents, opts) {
|
|
81
|
+
const isMac = (opts.platform ?? process.platform) === "darwin";
|
|
82
|
+
if (recents.length === 0) return [{ label: FILE_MENU.noRecents.label, enabled: false }];
|
|
83
|
+
const items = recents.map((r) => {
|
|
84
|
+
const shown = tildePath(r.path, opts.home);
|
|
85
|
+
const name = r.name ?? r.path.split(/[\\/]/).filter(Boolean).pop() ?? r.path;
|
|
86
|
+
return {
|
|
87
|
+
label: isMac ? name : `${name} (${shown})`,
|
|
88
|
+
sublabel: shown,
|
|
89
|
+
toolTip: r.path,
|
|
90
|
+
click: () => opts.onOpen(r.path)
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
if (opts.onClear) items.push({ type: "separator" }, { label: FILE_MENU.clearRecents.label, click: opts.onClear });
|
|
94
|
+
return items;
|
|
95
|
+
}
|
|
42
96
|
|
|
43
97
|
exports.APP_MENU = APP_MENU;
|
|
44
98
|
exports.EDIT_MENU = EDIT_MENU;
|
|
99
|
+
exports.FILE_MENU = FILE_MENU;
|
|
45
100
|
exports.GO_MENU = GO_MENU;
|
|
46
101
|
exports.HELP_MENU = HELP_MENU;
|
|
47
102
|
exports.PANE_MENU = PANE_MENU;
|
|
103
|
+
exports.PLAY_MENU = PLAY_MENU;
|
|
104
|
+
exports.PUBLISH_MENU = PUBLISH_MENU;
|
|
105
|
+
exports.REVIEW_MENU = REVIEW_MENU;
|
|
106
|
+
exports.VIEW_MENU = VIEW_MENU;
|
|
48
107
|
exports.namedMenuItems = namedMenuItems;
|
|
108
|
+
exports.recentsSubmenu = recentsSubmenu;
|
|
109
|
+
exports.tildePath = tildePath;
|
|
49
110
|
//# sourceMappingURL=menu.cjs.map
|
|
50
111
|
//# sourceMappingURL=menu.cjs.map
|
package/dist/menu.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/menu.ts"],"names":[],"mappings":";;;AA2BO,IAAM,SAAA,GAKT;AAAA,EACF,IAAA,EAAM,EAAE,KAAA,EAAO,MAAA,EAAQ,aAAa,aAAA,EAAc;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,MAAA,EAAQ,aAAa,mBAAA,EAAoB;AAAA,EACxD,SAAA,EAAW,EAAE,KAAA,EAAO,WAAA,EAAa,aAAa,aAAA,EAAc;AAAA,EAC5D,IAAA,EAAM,EAAE,KAAA,EAAO,YAAA,EAAS,aAAa,aAAA;AACvC;AASO,IAAM,OAAA,GAGT;AAAA,EACF,MAAM,EAAE,KAAA,EAAO,QAAQ,cAAA,EAAgB,eAAA,EAAiB,kBAAkB,UAAA,EAAW;AAAA,EACrF,SAAS,EAAE,KAAA,EAAO,WAAW,cAAA,EAAgB,gBAAA,EAAkB,kBAAkB,WAAA;AACnF;AAGO,IAAM,SAAA,GAIT;AAAA,EACF,OAAA,EAAS,EAAE,KAAA,EAAO,gBAAA,EAAkB,aAAa,aAAA,EAAc;AAAA,EAC/D,aAAA,EAAe,EAAE,KAAA,EAAO,gBAAA,EAAkB,aAAa,aAAA,EAAc;AAAA,EACrE,SAAA,EAAW,EAAE,KAAA,EAAO,YAAA;AACtB;AAkBO,IAAM,SAAA,GAET;AAAA,EACF,eAAA,EAAiB,EAAE,KAAA,EAAO,yBAAA;AAC5B;AAGO,IAAM,QAAA,GAET;AAAA;AAAA,EAEF,QAAA,EAAU,EAAE,KAAA,EAAO,wBAAA;AACrB;AA+BO,SAAS,eAAe,MAAA,EAI7B;AACA,EAAA,MAAM,KAAA,GAAQ,OAAO,SAAA,IAAa,QAAA;AAClC,EAAA,OAAO;AAAA,IACL,KAAA,EAAO,EAAE,KAAA,EAAO,CAAA,MAAA,EAAS,OAAO,OAAO,CAAA,CAAA,EAAI,OAAO,IAAA,EAAK;AAAA,IACvD,IAAA,EAAM;AAAA,MACJ,KAAA,EAAO,CAAA,EAAG,MAAA,CAAO,OAAO,CAAA,cAAA,CAAA;AAAA,MACxB,GAAI,OAAO,OAAA,GAAU,EAAE,KAAK,MAAA,CAAO,OAAA,KAAY,EAAC;AAAA,MAChD,KAAA,EAAO,OAAO,OAAA,KAAY;AAAA,KAC5B;AAAA,IACA,SAAA,EAAW;AAAA,MACT,KAAA,EAAO,GAAG,KAAK,CAAA,mBAAA,CAAA;AAAA,MACf,GAAI,OAAO,YAAA,GAAe,EAAE,KAAK,MAAA,CAAO,YAAA,KAAiB,EAAC;AAAA,MAC1D,KAAA,EAAO,OAAO,YAAA,KAAiB;AAAA;AACjC,GACF;AACF","file":"menu.cjs","sourcesContent":["// ---------------------------------------------------------------------------\n// Shell-owned menu naming: the labels + accelerators for the pane-frame menu\n// items, single-sourced so every app in the family names them identically\n// (and a rename here flows to all of them). Pure data - no electron, no DOM -\n// so a main-process menu builder can import it. Each app builds its own\n// MenuItem from these and wires the click to its shell controller.\n// ---------------------------------------------------------------------------\n\nexport interface MenuLabel {\n label: string;\n /** Electron accelerator string, when the item has one. */\n accelerator?: string;\n}\n\n/**\n * The Edit menu items the family shares.\n *\n * Undo and Redo are here and the MECHANISM is not, which is the whole finding\n * about undo: Patterpad's is ProseMirror's document history, Storyletter's is a\n * replay of file bytes, and those have nothing in common but this. See\n * `design/shared-shell.md`.\n *\n * The rule both apps discovered separately, and the reason these are spelled\n * out rather than left as Electron's `role: \"undo\"`: the native role runs a DOM\n * text-field undo, which knows nothing about either app's model and will\n * silently undo the wrong thing.\n */\nexport const EDIT_MENU: {\n undo: MenuLabel;\n redo: MenuLabel;\n duplicate: MenuLabel;\n find: MenuLabel;\n} = {\n undo: { label: \"Undo\", accelerator: \"CmdOrCtrl+Z\" },\n redo: { label: \"Redo\", accelerator: \"Shift+CmdOrCtrl+Z\" },\n duplicate: { label: \"Duplicate\", accelerator: \"CmdOrCtrl+D\" },\n find: { label: \"Find…\", accelerator: \"CmdOrCtrl+F\" },\n};\n\n/**\n * Back / Forward: navigation HISTORY, the other axis from Up a Level's\n * hierarchy. One string cannot serve both platforms - the mac pair is Xcode's\n * (Cmd+[ is already Up a Level in this family, so the browser pair is taken),\n * and the Alt pair is what every Windows browser and Explorer trained - so the\n * menu builder picks by platform.\n */\nexport const GO_MENU: {\n back: { label: string; acceleratorMac: string; acceleratorOther: string };\n forward: { label: string; acceleratorMac: string; acceleratorOther: string };\n} = {\n back: { label: \"Back\", acceleratorMac: \"Ctrl+Cmd+Left\", acceleratorOther: \"Alt+Left\" },\n forward: { label: \"Forward\", acceleratorMac: \"Ctrl+Cmd+Right\", acceleratorOther: \"Alt+Right\" },\n};\n\n/** The pane-frame menu items (a View menu, conventionally). */\nexport const PANE_MENU: {\n showNav: MenuLabel;\n showInspector: MenuLabel;\n resetView: MenuLabel;\n} = {\n showNav: { label: \"Show Navigator\", accelerator: \"CmdOrCtrl+1\" },\n showInspector: { label: \"Show Inspector\", accelerator: \"CmdOrCtrl+2\" },\n resetView: { label: \"Reset View\" },\n};\n\n/**\n * The Help menu items the family shares, and the one platform rule that goes\n * with them.\n *\n * Lifted from Patterpad, which is the only app that has ever had these: a\n * second app writing its own updater or About is pure waste (`design/\n * shared-shell.md`), and a suite is recognised by finding Check for Updates\n * where you left it. Storyletter will grow both; until it does, these labels\n * are the agreement rather than a description of two implementations.\n *\n * PLACEMENT, which differs by platform and is easy to get wrong:\n * - macOS keeps About in the APP menu (the one named after the product), and\n * Help carries documentation + Check for Updates only.\n * - Windows and Linux have no app menu, so About goes at the foot of Help,\n * after a separator. That is the conventional home there.\n */\nexport const HELP_MENU: {\n checkForUpdates: MenuLabel;\n} = {\n checkForUpdates: { label: \"Check for Updates\\u2026\" },\n};\n\n/** The app-menu items the family shares (macOS; the identity item also belongs in File elsewhere). */\nexport const APP_MENU: {\n userInfo: MenuLabel;\n} = {\n /** Name + optional email, used to sign edits and comments. One label across the suite. */\n userInfo: { label: \"User Information\\u2026\" },\n};\n\n/** What an app must tell the shell to build its named menu items. */\nexport interface MenuNaming {\n /** The product, as it appears in menus: \"Patterpad\", \"Storyletter\". */\n appName: string;\n /** The product's own documentation URL. Omit while an app has no docs yet and\n * the item is rendered disabled rather than opening a broken link. */\n docsUrl?: string;\n /** The suite's documentation home, shared by every app in the family. */\n suiteDocsUrl?: string;\n /** The suite, as it appears in \"<suite> Documentation Home\". Defaults to \"Patter\". */\n suiteName?: string;\n}\n\n/** A named menu item: the label, plus the URL it opens (absent = nothing wired yet). */\nexport interface NamedMenuItem extends MenuLabel {\n url?: string;\n /** False when the app has not supplied a URL, so the builder can render it\n * disabled instead of opening nothing. A placeholder, honestly labelled. */\n ready: boolean;\n}\n\n/**\n * The menu labels that carry a product or suite name, so no app spells its own\n * About or Documentation item differently from the rest of the family.\n *\n * An app with no documentation site yet still gets the ITEM, marked\n * `ready: false`, so the menu has its family shape from day one and wiring the\n * URL later is a one-line change rather than a menu redesign.\n */\nexport function namedMenuItems(naming: MenuNaming): {\n about: NamedMenuItem;\n docs: NamedMenuItem;\n suiteDocs: NamedMenuItem;\n} {\n const suite = naming.suiteName ?? \"Patter\";\n return {\n about: { label: `About ${naming.appName}`, ready: true },\n docs: {\n label: `${naming.appName} Documentation`,\n ...(naming.docsUrl ? { url: naming.docsUrl } : {}),\n ready: naming.docsUrl !== undefined,\n },\n suiteDocs: {\n label: `${suite} Documentation Home`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CAAA,CAAA,GAAK,IAAA;AACvE;AA+BO,SAAS,cAAA,CAAe,SAA0B,IAAA,EAAgD;AACvG,EAAA,MAAM,KAAA,GAAA,CAAS,IAAA,CAAK,QAAA,IAAY,OAAA,CAAQ,QAAA,MAAc,QAAA;AACtD,EAAA,IAAI,OAAA,CAAQ,MAAA,KAAW,CAAA,EAAG,OAAO,CAAC,EAAE,KAAA,EAAO,SAAA,CAAU,SAAA,CAAU,KAAA,EAAO,OAAA,EAAS,KAAA,EAAO,CAAA;AACtF,EAAA,MAAM,KAAA,GAA2B,OAAA,CAAQ,GAAA,CAAI,CAAC,CAAA,KAAM;AAClD,IAAA,MAAM,KAAA,GAAQ,SAAA,CAAU,CAAA,CAAE,IAAA,EAAM,KAAK,IAAI,CAAA;AACzC,IAAA,MAAM,IAAA,GAAO,CAAA,CAAE,IAAA,IAAQ,CAAA,CAAE,IAAA,CAAK,KAAA,CAAM,OAAO,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA,CAAE,GAAA,MAAS,CAAA,CAAE,IAAA;AACxE,IAAA,OAAO;AAAA,MACL,OAAO,KAAA,GAAQ,IAAA,GAAO,CAAA,EAAG,IAAI,MAAM,KAAK,CAAA,CAAA,CAAA;AAAA,MACxC,QAAA,EAAU,KAAA;AAAA,MACV,SAAS,CAAA,CAAE,IAAA;AAAA,MACX,KAAA,EAAO,MAAM,IAAA,CAAK,MAAA,CAAO,EAAE,IAAI;AAAA,KACjC;AAAA,EACF,CAAC,CAAA;AACD,EAAA,IAAI,KAAK,OAAA,EAAS,KAAA,CAAM,IAAA,CAAK,EAAE,MAAM,WAAA,EAAY,EAAG,EAAE,KAAA,EAAO,UAAU,YAAA,CAAa,KAAA,EAAO,KAAA,EAAO,IAAA,CAAK,SAAS,CAAA;AAChH,EAAA,OAAO,KAAA;AACT","file":"menu.cjs","sourcesContent":["// ---------------------------------------------------------------------------\n// Shell-owned menu naming: the labels + accelerators for the pane-frame menu\n// items, single-sourced so every app in the family names them identically\n// (and a rename here flows to all of them). Pure data - no electron, no DOM -\n// so a main-process menu builder can import it. Each app builds its own\n// MenuItem from these and wires the click to its shell controller.\n// ---------------------------------------------------------------------------\n\nimport type { RecentProject } from \"./app-store.js\";\n\nexport interface MenuLabel {\n label: string;\n /** Electron accelerator string, when the item has one. */\n accelerator?: string;\n}\n\n/**\n * The Edit menu items the family shares.\n *\n * Undo and Redo are here and the MECHANISM is not, which is the whole finding\n * about undo: Patterpad's is ProseMirror's document history, Storyletter's is a\n * replay of file bytes, and those have nothing in common but this. See\n * `design/shared-shell.md`.\n *\n * The rule both apps discovered separately, and the reason these are spelled\n * out rather than left as Electron's `role: \"undo\"`: the native role runs a DOM\n * text-field undo, which knows nothing about either app's model and will\n * silently undo the wrong thing.\n */\nexport const EDIT_MENU: {\n undo: MenuLabel;\n redo: MenuLabel;\n duplicate: MenuLabel;\n find: MenuLabel;\n /** Replace is Find's second tab, on the platform's key for it. */\n replace: { label: string; acceleratorMac: string; acceleratorOther: string };\n} = {\n undo: { label: \"Undo\", accelerator: \"CmdOrCtrl+Z\" },\n redo: { label: \"Redo\", accelerator: \"Shift+CmdOrCtrl+Z\" },\n duplicate: { label: \"Duplicate\", accelerator: \"CmdOrCtrl+D\" },\n find: { label: \"Find…\", accelerator: \"CmdOrCtrl+F\" },\n replace: { label: \"Replace…\", acceleratorMac: \"Cmd+Alt+F\", acceleratorOther: \"Ctrl+H\" },\n};\n\n/**\n * Back / Forward: navigation HISTORY, the other axis from Up a Level's\n * hierarchy. One string cannot serve both platforms - the mac pair is Xcode's\n * (Cmd+[ is already Up a Level in this family, so the browser pair is taken),\n * and the Alt pair is what every Windows browser and Explorer trained - so the\n * menu builder picks by platform.\n */\nexport const GO_MENU: {\n back: { label: string; acceleratorMac: string; acceleratorOther: string };\n forward: { label: string; acceleratorMac: string; acceleratorOther: string };\n} = {\n back: { label: \"Back\", acceleratorMac: \"Ctrl+Cmd+Left\", acceleratorOther: \"Alt+Left\" },\n forward: { label: \"Forward\", acceleratorMac: \"Ctrl+Cmd+Right\", acceleratorOther: \"Alt+Right\" },\n};\n\n/** The pane-frame menu items (a View menu, conventionally). */\nexport const PANE_MENU: {\n showNav: MenuLabel;\n showInspector: MenuLabel;\n resetView: MenuLabel;\n} = {\n showNav: { label: \"Show Navigator\", accelerator: \"CmdOrCtrl+1\" },\n showInspector: { label: \"Show Inspector\", accelerator: \"CmdOrCtrl+2\" },\n resetView: { label: \"Reset View\" },\n};\n\n/**\n * The Help menu items the family shares, and the one platform rule that goes\n * with them.\n *\n * Lifted from Patterpad, which is the only app that has ever had these: a\n * second app writing its own updater or About is pure waste (`design/\n * shared-shell.md`), and a suite is recognised by finding Check for Updates\n * where you left it. Storyletter will grow both; until it does, these labels\n * are the agreement rather than a description of two implementations.\n *\n * PLACEMENT, which differs by platform and is easy to get wrong:\n * - macOS keeps About in the APP menu (the one named after the product), and\n * Help carries documentation + Check for Updates only.\n * - Windows and Linux have no app menu, so About goes at the foot of Help,\n * after a separator. That is the conventional home there.\n */\nexport const HELP_MENU: {\n checkForUpdates: MenuLabel;\n} = {\n checkForUpdates: { label: \"Check for Updates\\u2026\" },\n};\n\n/** The app-menu items the family shares (macOS; the identity item also belongs in File elsewhere). */\nexport const APP_MENU: {\n userInfo: MenuLabel;\n} = {\n /** Name + optional email, used to sign edits and comments. One label across the suite. */\n userInfo: { label: \"User Information\\u2026\" },\n};\n\n/** What an app must tell the shell to build its named menu items. */\nexport interface MenuNaming {\n /** The product, as it appears in menus: \"Patterpad\", \"Storyletter\". */\n appName: string;\n /** The product's own documentation URL. Omit while an app has no docs yet and\n * the item is rendered disabled rather than opening a broken link. */\n docsUrl?: string;\n /** The suite's documentation home, shared by every app in the family. */\n suiteDocsUrl?: string;\n /** The suite, as it appears in \"<suite> Documentation Home\". Defaults to \"Patter\". */\n suiteName?: string;\n}\n\n/** A named menu item: the label, plus the URL it opens (absent = nothing wired yet). */\nexport interface NamedMenuItem extends MenuLabel {\n url?: string;\n /** False when the app has not supplied a URL, so the builder can render it\n * disabled instead of opening nothing. A placeholder, honestly labelled. */\n ready: boolean;\n}\n\n/**\n * The menu labels that carry a product or suite name, so no app spells its own\n * About or Documentation item differently from the rest of the family.\n *\n * An app with no documentation site yet still gets the ITEM, marked\n * `ready: false`, so the menu has its family shape from day one and wiring the\n * URL later is a one-line change rather than a menu redesign.\n */\nexport function namedMenuItems(naming: MenuNaming): {\n about: NamedMenuItem;\n docs: NamedMenuItem;\n suiteDocs: NamedMenuItem;\n} {\n const suite = naming.suiteName ?? \"Patter\";\n return {\n about: { label: `About ${naming.appName}`, ready: true },\n docs: {\n label: `${naming.appName} Documentation`,\n ...(naming.docsUrl ? { url: naming.docsUrl } : {}),\n ready: naming.docsUrl !== undefined,\n },\n suiteDocs: {\n label: `${suite} Documentation Home`,\n ...(naming.suiteDocsUrl ? { url: naming.suiteDocsUrl } : {}),\n ready: naming.suiteDocsUrl !== undefined,\n },\n };\n}\n\n// --- the rest of the spine (ui-review-2026-09, finding 12) -----------------------\n// Each app used roughly half of what is above and hand-typed the other half,\n// and the copies had already drifted (Review Feedback's accelerator spelled\n// two ways; \"No Recent Projects\" vs \"No recent projects\"). Labels are Title\n// Case, as the platform's menus are; an item that opens something ends in the\n// command ellipsis.\n\n/** The File menu items the family shares. */\nexport const FILE_MENU: {\n newProject: MenuLabel;\n openProject: MenuLabel;\n openRecent: MenuLabel;\n /** The empty Open Recent submenu's one disabled item. */\n noRecents: MenuLabel;\n clearRecents: MenuLabel;\n closeProject: MenuLabel;\n save: MenuLabel;\n saveAs: MenuLabel;\n projectSettings: MenuLabel;\n} = {\n newProject: { label: \"New Project…\", accelerator: \"CmdOrCtrl+N\" },\n openProject: { label: \"Open Project…\", accelerator: \"CmdOrCtrl+O\" },\n openRecent: { label: \"Open Recent\" },\n noRecents: { label: \"No Recent Projects\" },\n clearRecents: { label: \"Clear Recents\" },\n closeProject: { label: \"Close Project\" },\n save: { label: \"Save\", accelerator: \"CmdOrCtrl+S\" },\n saveAs: { label: \"Save As…\", accelerator: \"Shift+CmdOrCtrl+S\" },\n projectSettings: { label: \"Project Settings…\", accelerator: \"CmdOrCtrl+,\" },\n};\n\n/**\n * The Play menu's shared item. The play SURFACE itself (Patterpad's \"Play\n * Scene\" on Cmd+P, Storyletter's \"The Board\" on Cmd+T) is app-named and\n * app-keyed on purpose: the two are not the same act, so the family reserves\n * neither key.\n */\nexport const PLAY_MENU: {\n liveLink: MenuLabel;\n} = {\n liveLink: { label: \"Live Link\" },\n};\n\n/** The Review menu: examining what you have built rather than building or\n * playing it. Review Feedback's accelerator is spelled ONCE, here. */\nexport const REVIEW_MENU: {\n reviewFeedback: MenuLabel;\n nextFeedback: MenuLabel;\n previousFeedback: MenuLabel;\n coverageTest: MenuLabel;\n findPropertyUsage: MenuLabel;\n showResolvedComments: MenuLabel;\n} = {\n reviewFeedback: { label: \"Review Feedback\", accelerator: \"CmdOrCtrl+Shift+R\" },\n nextFeedback: { label: \"Next Feedback\", accelerator: \"F8\" },\n previousFeedback: { label: \"Previous Feedback\", accelerator: \"Shift+F8\" },\n coverageTest: { label: \"Coverage Test…\", accelerator: \"Shift+CmdOrCtrl+C\" },\n findPropertyUsage: { label: \"Find Property Usage…\" },\n showResolvedComments: { label: \"Show Resolved Comments\" },\n};\n\n/** The Publish menu: everything that turns the project into something you\n * hand to others (\"Publish\", never \"Export\"). */\nexport const PUBLISH_MENU: {\n playableHtml: MenuLabel;\n bundle: MenuLabel;\n autoRebuild: MenuLabel;\n} = {\n playableHtml: { label: \"Publish Playable HTML…\" },\n bundle: { label: \"Publish Bundle\", accelerator: \"Shift+CmdOrCtrl+B\" },\n autoRebuild: { label: \"Auto Rebuild\" },\n};\n\n/** The View menu items beyond the pane toggles (PANE_MENU) and history\n * (GO_MENU). Cmd+[ is family-reserved for Up a Level, which is why Back\n * takes Xcode's pair on the mac. */\nexport const VIEW_MENU: {\n projectOverview: MenuLabel;\n upALevel: MenuLabel;\n colourTheme: MenuLabel;\n} = {\n projectOverview: { label: \"Project Overview\" },\n upALevel: { label: \"Up a Level\", accelerator: \"CmdOrCtrl+[\" },\n colourTheme: { label: \"Colour Theme\" },\n};\n\n/** A path with the home directory as `~`, so a recents entry stays readable\n * at menu width. `home` is `app.getPath(\"home\")`; this file stays\n * electron-free. */\nexport function tildePath(path: string, home: string): string {\n if (path === home) return \"~\";\n const sep = home.includes(\"\\\\\") ? \"\\\\\" : \"/\";\n return path.startsWith(home + sep) ? `~${path.slice(home.length)}` : path;\n}\n\n/** As much of Electron's MenuItemConstructorOptions as a recents entry needs;\n * structurally assignable to it. */\nexport interface RecentsMenuItem {\n label?: string;\n sublabel?: string;\n toolTip?: string;\n enabled?: boolean;\n type?: \"separator\";\n click?: () => void;\n}\n\nexport interface RecentsSubmenuOptions {\n onOpen: (path: string) => void;\n /** Offered after a separator when there is anything to clear. */\n onClear?: () => void;\n /** `app.getPath(\"home\")`, for the `~` abbreviation. */\n home: string;\n /** Defaults to process.platform; a seam for the tests. */\n platform?: string;\n}\n\n/**\n * The Open Recent submenu: the fifteen lines both apps had.\n *\n * Shows WHERE each recent lives. macOS renders `sublabel` as a dimmed second\n * line and `toolTip` on hover; native menus elsewhere render neither, so\n * there the path is folded into the label itself. Empty, it is the one\n * disabled \"No Recent Projects\" item.\n */\nexport function recentsSubmenu(recents: RecentProject[], opts: RecentsSubmenuOptions): RecentsMenuItem[] {\n const isMac = (opts.platform ?? process.platform) === \"darwin\";\n if (recents.length === 0) return [{ label: FILE_MENU.noRecents.label, enabled: false }];\n const items: RecentsMenuItem[] = recents.map((r) => {\n const shown = tildePath(r.path, opts.home);\n const name = r.name ?? r.path.split(/[\\\\/]/).filter(Boolean).pop() ?? r.path;\n return {\n label: isMac ? name : `${name} (${shown})`,\n sublabel: shown,\n toolTip: r.path,\n click: () => opts.onOpen(r.path),\n };\n });\n if (opts.onClear) items.push({ type: \"separator\" }, { label: FILE_MENU.clearRecents.label, click: opts.onClear });\n return items;\n}\n"]}
|
package/dist/menu.d.cts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { RecentProject } from './app-store.cjs';
|
|
2
|
+
|
|
1
3
|
interface MenuLabel {
|
|
2
4
|
label: string;
|
|
3
5
|
/** Electron accelerator string, when the item has one. */
|
|
@@ -21,6 +23,12 @@ declare const EDIT_MENU: {
|
|
|
21
23
|
redo: MenuLabel;
|
|
22
24
|
duplicate: MenuLabel;
|
|
23
25
|
find: MenuLabel;
|
|
26
|
+
/** Replace is Find's second tab, on the platform's key for it. */
|
|
27
|
+
replace: {
|
|
28
|
+
label: string;
|
|
29
|
+
acceleratorMac: string;
|
|
30
|
+
acceleratorOther: string;
|
|
31
|
+
};
|
|
24
32
|
};
|
|
25
33
|
/**
|
|
26
34
|
* Back / Forward: navigation HISTORY, the other axis from Up a Level's
|
|
@@ -102,5 +110,84 @@ declare function namedMenuItems(naming: MenuNaming): {
|
|
|
102
110
|
docs: NamedMenuItem;
|
|
103
111
|
suiteDocs: NamedMenuItem;
|
|
104
112
|
};
|
|
113
|
+
/** The File menu items the family shares. */
|
|
114
|
+
declare const FILE_MENU: {
|
|
115
|
+
newProject: MenuLabel;
|
|
116
|
+
openProject: MenuLabel;
|
|
117
|
+
openRecent: MenuLabel;
|
|
118
|
+
/** The empty Open Recent submenu's one disabled item. */
|
|
119
|
+
noRecents: MenuLabel;
|
|
120
|
+
clearRecents: MenuLabel;
|
|
121
|
+
closeProject: MenuLabel;
|
|
122
|
+
save: MenuLabel;
|
|
123
|
+
saveAs: MenuLabel;
|
|
124
|
+
projectSettings: MenuLabel;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* The Play menu's shared item. The play SURFACE itself (Patterpad's "Play
|
|
128
|
+
* Scene" on Cmd+P, Storyletter's "The Board" on Cmd+T) is app-named and
|
|
129
|
+
* app-keyed on purpose: the two are not the same act, so the family reserves
|
|
130
|
+
* neither key.
|
|
131
|
+
*/
|
|
132
|
+
declare const PLAY_MENU: {
|
|
133
|
+
liveLink: MenuLabel;
|
|
134
|
+
};
|
|
135
|
+
/** The Review menu: examining what you have built rather than building or
|
|
136
|
+
* playing it. Review Feedback's accelerator is spelled ONCE, here. */
|
|
137
|
+
declare const REVIEW_MENU: {
|
|
138
|
+
reviewFeedback: MenuLabel;
|
|
139
|
+
nextFeedback: MenuLabel;
|
|
140
|
+
previousFeedback: MenuLabel;
|
|
141
|
+
coverageTest: MenuLabel;
|
|
142
|
+
findPropertyUsage: MenuLabel;
|
|
143
|
+
showResolvedComments: MenuLabel;
|
|
144
|
+
};
|
|
145
|
+
/** The Publish menu: everything that turns the project into something you
|
|
146
|
+
* hand to others ("Publish", never "Export"). */
|
|
147
|
+
declare const PUBLISH_MENU: {
|
|
148
|
+
playableHtml: MenuLabel;
|
|
149
|
+
bundle: MenuLabel;
|
|
150
|
+
autoRebuild: MenuLabel;
|
|
151
|
+
};
|
|
152
|
+
/** The View menu items beyond the pane toggles (PANE_MENU) and history
|
|
153
|
+
* (GO_MENU). Cmd+[ is family-reserved for Up a Level, which is why Back
|
|
154
|
+
* takes Xcode's pair on the mac. */
|
|
155
|
+
declare const VIEW_MENU: {
|
|
156
|
+
projectOverview: MenuLabel;
|
|
157
|
+
upALevel: MenuLabel;
|
|
158
|
+
colourTheme: MenuLabel;
|
|
159
|
+
};
|
|
160
|
+
/** A path with the home directory as `~`, so a recents entry stays readable
|
|
161
|
+
* at menu width. `home` is `app.getPath("home")`; this file stays
|
|
162
|
+
* electron-free. */
|
|
163
|
+
declare function tildePath(path: string, home: string): string;
|
|
164
|
+
/** As much of Electron's MenuItemConstructorOptions as a recents entry needs;
|
|
165
|
+
* structurally assignable to it. */
|
|
166
|
+
interface RecentsMenuItem {
|
|
167
|
+
label?: string;
|
|
168
|
+
sublabel?: string;
|
|
169
|
+
toolTip?: string;
|
|
170
|
+
enabled?: boolean;
|
|
171
|
+
type?: "separator";
|
|
172
|
+
click?: () => void;
|
|
173
|
+
}
|
|
174
|
+
interface RecentsSubmenuOptions {
|
|
175
|
+
onOpen: (path: string) => void;
|
|
176
|
+
/** Offered after a separator when there is anything to clear. */
|
|
177
|
+
onClear?: () => void;
|
|
178
|
+
/** `app.getPath("home")`, for the `~` abbreviation. */
|
|
179
|
+
home: string;
|
|
180
|
+
/** Defaults to process.platform; a seam for the tests. */
|
|
181
|
+
platform?: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* The Open Recent submenu: the fifteen lines both apps had.
|
|
185
|
+
*
|
|
186
|
+
* Shows WHERE each recent lives. macOS renders `sublabel` as a dimmed second
|
|
187
|
+
* line and `toolTip` on hover; native menus elsewhere render neither, so
|
|
188
|
+
* there the path is folded into the label itself. Empty, it is the one
|
|
189
|
+
* disabled "No Recent Projects" item.
|
|
190
|
+
*/
|
|
191
|
+
declare function recentsSubmenu(recents: RecentProject[], opts: RecentsSubmenuOptions): RecentsMenuItem[];
|
|
105
192
|
|
|
106
|
-
export { APP_MENU, EDIT_MENU, GO_MENU, HELP_MENU, type MenuLabel, type MenuNaming, type NamedMenuItem, PANE_MENU, namedMenuItems };
|
|
193
|
+
export { APP_MENU, EDIT_MENU, FILE_MENU, GO_MENU, HELP_MENU, type MenuLabel, type MenuNaming, type NamedMenuItem, PANE_MENU, PLAY_MENU, PUBLISH_MENU, REVIEW_MENU, type RecentsMenuItem, type RecentsSubmenuOptions, VIEW_MENU, namedMenuItems, recentsSubmenu, tildePath };
|
package/dist/menu.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { RecentProject } from './app-store.js';
|
|
2
|
+
|
|
1
3
|
interface MenuLabel {
|
|
2
4
|
label: string;
|
|
3
5
|
/** Electron accelerator string, when the item has one. */
|
|
@@ -21,6 +23,12 @@ declare const EDIT_MENU: {
|
|
|
21
23
|
redo: MenuLabel;
|
|
22
24
|
duplicate: MenuLabel;
|
|
23
25
|
find: MenuLabel;
|
|
26
|
+
/** Replace is Find's second tab, on the platform's key for it. */
|
|
27
|
+
replace: {
|
|
28
|
+
label: string;
|
|
29
|
+
acceleratorMac: string;
|
|
30
|
+
acceleratorOther: string;
|
|
31
|
+
};
|
|
24
32
|
};
|
|
25
33
|
/**
|
|
26
34
|
* Back / Forward: navigation HISTORY, the other axis from Up a Level's
|
|
@@ -102,5 +110,84 @@ declare function namedMenuItems(naming: MenuNaming): {
|
|
|
102
110
|
docs: NamedMenuItem;
|
|
103
111
|
suiteDocs: NamedMenuItem;
|
|
104
112
|
};
|
|
113
|
+
/** The File menu items the family shares. */
|
|
114
|
+
declare const FILE_MENU: {
|
|
115
|
+
newProject: MenuLabel;
|
|
116
|
+
openProject: MenuLabel;
|
|
117
|
+
openRecent: MenuLabel;
|
|
118
|
+
/** The empty Open Recent submenu's one disabled item. */
|
|
119
|
+
noRecents: MenuLabel;
|
|
120
|
+
clearRecents: MenuLabel;
|
|
121
|
+
closeProject: MenuLabel;
|
|
122
|
+
save: MenuLabel;
|
|
123
|
+
saveAs: MenuLabel;
|
|
124
|
+
projectSettings: MenuLabel;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* The Play menu's shared item. The play SURFACE itself (Patterpad's "Play
|
|
128
|
+
* Scene" on Cmd+P, Storyletter's "The Board" on Cmd+T) is app-named and
|
|
129
|
+
* app-keyed on purpose: the two are not the same act, so the family reserves
|
|
130
|
+
* neither key.
|
|
131
|
+
*/
|
|
132
|
+
declare const PLAY_MENU: {
|
|
133
|
+
liveLink: MenuLabel;
|
|
134
|
+
};
|
|
135
|
+
/** The Review menu: examining what you have built rather than building or
|
|
136
|
+
* playing it. Review Feedback's accelerator is spelled ONCE, here. */
|
|
137
|
+
declare const REVIEW_MENU: {
|
|
138
|
+
reviewFeedback: MenuLabel;
|
|
139
|
+
nextFeedback: MenuLabel;
|
|
140
|
+
previousFeedback: MenuLabel;
|
|
141
|
+
coverageTest: MenuLabel;
|
|
142
|
+
findPropertyUsage: MenuLabel;
|
|
143
|
+
showResolvedComments: MenuLabel;
|
|
144
|
+
};
|
|
145
|
+
/** The Publish menu: everything that turns the project into something you
|
|
146
|
+
* hand to others ("Publish", never "Export"). */
|
|
147
|
+
declare const PUBLISH_MENU: {
|
|
148
|
+
playableHtml: MenuLabel;
|
|
149
|
+
bundle: MenuLabel;
|
|
150
|
+
autoRebuild: MenuLabel;
|
|
151
|
+
};
|
|
152
|
+
/** The View menu items beyond the pane toggles (PANE_MENU) and history
|
|
153
|
+
* (GO_MENU). Cmd+[ is family-reserved for Up a Level, which is why Back
|
|
154
|
+
* takes Xcode's pair on the mac. */
|
|
155
|
+
declare const VIEW_MENU: {
|
|
156
|
+
projectOverview: MenuLabel;
|
|
157
|
+
upALevel: MenuLabel;
|
|
158
|
+
colourTheme: MenuLabel;
|
|
159
|
+
};
|
|
160
|
+
/** A path with the home directory as `~`, so a recents entry stays readable
|
|
161
|
+
* at menu width. `home` is `app.getPath("home")`; this file stays
|
|
162
|
+
* electron-free. */
|
|
163
|
+
declare function tildePath(path: string, home: string): string;
|
|
164
|
+
/** As much of Electron's MenuItemConstructorOptions as a recents entry needs;
|
|
165
|
+
* structurally assignable to it. */
|
|
166
|
+
interface RecentsMenuItem {
|
|
167
|
+
label?: string;
|
|
168
|
+
sublabel?: string;
|
|
169
|
+
toolTip?: string;
|
|
170
|
+
enabled?: boolean;
|
|
171
|
+
type?: "separator";
|
|
172
|
+
click?: () => void;
|
|
173
|
+
}
|
|
174
|
+
interface RecentsSubmenuOptions {
|
|
175
|
+
onOpen: (path: string) => void;
|
|
176
|
+
/** Offered after a separator when there is anything to clear. */
|
|
177
|
+
onClear?: () => void;
|
|
178
|
+
/** `app.getPath("home")`, for the `~` abbreviation. */
|
|
179
|
+
home: string;
|
|
180
|
+
/** Defaults to process.platform; a seam for the tests. */
|
|
181
|
+
platform?: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* The Open Recent submenu: the fifteen lines both apps had.
|
|
185
|
+
*
|
|
186
|
+
* Shows WHERE each recent lives. macOS renders `sublabel` as a dimmed second
|
|
187
|
+
* line and `toolTip` on hover; native menus elsewhere render neither, so
|
|
188
|
+
* there the path is folded into the label itself. Empty, it is the one
|
|
189
|
+
* disabled "No Recent Projects" item.
|
|
190
|
+
*/
|
|
191
|
+
declare function recentsSubmenu(recents: RecentProject[], opts: RecentsSubmenuOptions): RecentsMenuItem[];
|
|
105
192
|
|
|
106
|
-
export { APP_MENU, EDIT_MENU, GO_MENU, HELP_MENU, type MenuLabel, type MenuNaming, type NamedMenuItem, PANE_MENU, namedMenuItems };
|
|
193
|
+
export { APP_MENU, EDIT_MENU, FILE_MENU, GO_MENU, HELP_MENU, type MenuLabel, type MenuNaming, type NamedMenuItem, PANE_MENU, PLAY_MENU, PUBLISH_MENU, REVIEW_MENU, type RecentsMenuItem, type RecentsSubmenuOptions, VIEW_MENU, namedMenuItems, recentsSubmenu, tildePath };
|
package/dist/menu.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { APP_MENU, EDIT_MENU, GO_MENU, HELP_MENU, PANE_MENU, namedMenuItems } from './chunk-
|
|
1
|
+
export { APP_MENU, EDIT_MENU, FILE_MENU, GO_MENU, HELP_MENU, PANE_MENU, PLAY_MENU, PUBLISH_MENU, REVIEW_MENU, VIEW_MENU, namedMenuItems, recentsSubmenu, tildePath } from './chunk-2ECJUTSX.js';
|
|
2
2
|
//# sourceMappingURL=menu.js.map
|
|
3
3
|
//# sourceMappingURL=menu.js.map
|
package/dist/notes-editor.css
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
/* src/notes-editor.css */
|
|
2
2
|
.shell-notes {
|
|
3
|
-
width:
|
|
4
|
-
border: 1px solid var(--line);
|
|
5
|
-
border-radius: var(--radius-md);
|
|
6
|
-
background: var(--surface);
|
|
7
|
-
color: var(--ink);
|
|
8
|
-
padding: 16px 18px;
|
|
9
|
-
box-shadow: var(--shadow-2, var(--shadow-1));
|
|
10
|
-
}
|
|
11
|
-
.shell-notes::backdrop {
|
|
12
|
-
background: rgba(0, 0, 0, 0.28);
|
|
13
|
-
}
|
|
14
|
-
.shell-notes-title {
|
|
15
|
-
font: 600 0.95rem/1.3 var(--font-ui);
|
|
16
|
-
margin-bottom: 10px;
|
|
3
|
+
--dialog-width: 560px;
|
|
17
4
|
}
|
|
18
5
|
.shell-notes-body {
|
|
19
6
|
display: flex;
|
|
@@ -23,30 +10,19 @@
|
|
|
23
10
|
overflow-y: auto;
|
|
24
11
|
}
|
|
25
12
|
.shell-notes-caption {
|
|
26
|
-
font:
|
|
13
|
+
font: 600 12.5px/1.2 var(--font-ui);
|
|
27
14
|
color: var(--muted);
|
|
28
|
-
text-transform: uppercase;
|
|
29
|
-
letter-spacing: 0.04em;
|
|
30
15
|
}
|
|
31
16
|
.shell-notes-class {
|
|
32
17
|
display: flex;
|
|
33
18
|
flex-direction: column;
|
|
34
19
|
gap: 4px;
|
|
35
20
|
}
|
|
36
|
-
.shell-notes-text {
|
|
21
|
+
textarea.shell-notes-text {
|
|
37
22
|
width: 100%;
|
|
38
23
|
box-sizing: border-box;
|
|
39
24
|
resize: vertical;
|
|
40
|
-
|
|
41
|
-
border-radius: var(--radius-sm);
|
|
42
|
-
background: var(--card);
|
|
43
|
-
color: var(--ink);
|
|
44
|
-
font: 0.85rem/1.45 var(--font-read, var(--font-ui));
|
|
45
|
-
padding: 6px 8px;
|
|
46
|
-
}
|
|
47
|
-
.shell-notes-text:focus {
|
|
48
|
-
outline: none;
|
|
49
|
-
border-color: var(--accent);
|
|
25
|
+
font: 13.5px/1.45 var(--font-read, var(--font-ui));
|
|
50
26
|
}
|
|
51
27
|
.shell-notes-inherited {
|
|
52
28
|
display: flex;
|
|
@@ -61,15 +37,15 @@
|
|
|
61
37
|
gap: 2px;
|
|
62
38
|
}
|
|
63
39
|
.shell-notes-level-label {
|
|
64
|
-
font:
|
|
40
|
+
font: 11.5px/1 var(--font-ui);
|
|
65
41
|
color: var(--muted);
|
|
66
42
|
}
|
|
67
43
|
.shell-notes-line {
|
|
68
|
-
font:
|
|
44
|
+
font: 13px/1.4 var(--font-read, var(--font-ui));
|
|
69
45
|
color: var(--muted);
|
|
70
46
|
}
|
|
71
47
|
.shell-notes-cls {
|
|
72
|
-
font:
|
|
48
|
+
font: 11px/1 var(--font-ui);
|
|
73
49
|
color: var(--muted);
|
|
74
50
|
border: 1px solid var(--line-soft);
|
|
75
51
|
border-radius: var(--radius-pill);
|
|
@@ -77,31 +53,12 @@
|
|
|
77
53
|
margin-right: 6px;
|
|
78
54
|
}
|
|
79
55
|
.shell-notes-hint {
|
|
80
|
-
font:
|
|
56
|
+
font: 11.5px/1 var(--font-ui);
|
|
81
57
|
color: var(--muted);
|
|
82
58
|
margin: 0;
|
|
83
59
|
}
|
|
84
60
|
.shell-notes-add {
|
|
85
|
-
font:
|
|
61
|
+
font: 12.5px/1 var(--font-ui);
|
|
86
62
|
align-self: flex-start;
|
|
87
63
|
}
|
|
88
|
-
.shell-notes-actions {
|
|
89
|
-
display: flex;
|
|
90
|
-
justify-content: flex-end;
|
|
91
|
-
margin-top: 12px;
|
|
92
|
-
}
|
|
93
|
-
.shell-notes-btn {
|
|
94
|
-
font: 0.8rem/1 var(--font-ui);
|
|
95
|
-
padding: 6px 14px;
|
|
96
|
-
border-radius: var(--radius-sm);
|
|
97
|
-
border: 1px solid var(--line);
|
|
98
|
-
background: var(--card);
|
|
99
|
-
color: var(--ink);
|
|
100
|
-
cursor: pointer;
|
|
101
|
-
}
|
|
102
|
-
.shell-notes-btn.primary {
|
|
103
|
-
background: var(--accent);
|
|
104
|
-
border-color: var(--accent);
|
|
105
|
-
color: var(--on-accent, #fff);
|
|
106
|
-
}
|
|
107
64
|
/*# sourceMappingURL=notes-editor.css.map */
|