@wildwinter/app-shell 0.14.0 → 0.16.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/dist/anchored.css +54 -0
- package/dist/anchored.css.map +1 -1
- package/dist/chunk-YLINCOQD.js +39 -0
- package/dist/chunk-YLINCOQD.js.map +1 -0
- package/dist/comments.css +25 -0
- package/dist/comments.css.map +1 -1
- package/dist/index.cjs +109 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -3
- package/dist/index.d.ts +61 -3
- package/dist/index.js +108 -17
- package/dist/index.js.map +1 -1
- package/dist/menu.cjs +26 -0
- package/dist/menu.cjs.map +1 -1
- package/dist/menu.d.cts +56 -1
- package/dist/menu.d.ts +56 -1
- package/dist/menu.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-R6RO5TXB.js +0 -16
- package/dist/chunk-R6RO5TXB.js.map +0 -1
package/dist/menu.cjs
CHANGED
|
@@ -12,8 +12,34 @@ var PANE_MENU = {
|
|
|
12
12
|
showInspector: { label: "Show Inspector", accelerator: "CmdOrCtrl+2" },
|
|
13
13
|
resetView: { label: "Reset View" }
|
|
14
14
|
};
|
|
15
|
+
var HELP_MENU = {
|
|
16
|
+
checkForUpdates: { label: "Check for Updates\u2026" }
|
|
17
|
+
};
|
|
18
|
+
var APP_MENU = {
|
|
19
|
+
/** Name + optional email, used to sign edits and comments. One label across the suite. */
|
|
20
|
+
userInfo: { label: "User Information\u2026" }
|
|
21
|
+
};
|
|
22
|
+
function namedMenuItems(naming) {
|
|
23
|
+
const suite = naming.suiteName ?? "Patter";
|
|
24
|
+
return {
|
|
25
|
+
about: { label: `About ${naming.appName}`, ready: true },
|
|
26
|
+
docs: {
|
|
27
|
+
label: `${naming.appName} Documentation`,
|
|
28
|
+
...naming.docsUrl ? { url: naming.docsUrl } : {},
|
|
29
|
+
ready: naming.docsUrl !== void 0
|
|
30
|
+
},
|
|
31
|
+
suiteDocs: {
|
|
32
|
+
label: `${suite} Documentation Home`,
|
|
33
|
+
...naming.suiteDocsUrl ? { url: naming.suiteDocsUrl } : {},
|
|
34
|
+
ready: naming.suiteDocsUrl !== void 0
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
15
38
|
|
|
39
|
+
exports.APP_MENU = APP_MENU;
|
|
16
40
|
exports.EDIT_MENU = EDIT_MENU;
|
|
41
|
+
exports.HELP_MENU = HELP_MENU;
|
|
17
42
|
exports.PANE_MENU = PANE_MENU;
|
|
43
|
+
exports.namedMenuItems = namedMenuItems;
|
|
18
44
|
//# sourceMappingURL=menu.cjs.map
|
|
19
45
|
//# 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;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","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/** 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"]}
|
|
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;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/** 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"]}
|
package/dist/menu.d.cts
CHANGED
|
@@ -28,5 +28,60 @@ declare const PANE_MENU: {
|
|
|
28
28
|
showInspector: MenuLabel;
|
|
29
29
|
resetView: MenuLabel;
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* The Help menu items the family shares, and the one platform rule that goes
|
|
33
|
+
* with them.
|
|
34
|
+
*
|
|
35
|
+
* Lifted from Patterpad, which is the only app that has ever had these: a
|
|
36
|
+
* second app writing its own updater or About is pure waste (`design/
|
|
37
|
+
* shared-shell.md`), and a suite is recognised by finding Check for Updates
|
|
38
|
+
* where you left it. Storyletter will grow both; until it does, these labels
|
|
39
|
+
* are the agreement rather than a description of two implementations.
|
|
40
|
+
*
|
|
41
|
+
* PLACEMENT, which differs by platform and is easy to get wrong:
|
|
42
|
+
* - macOS keeps About in the APP menu (the one named after the product), and
|
|
43
|
+
* Help carries documentation + Check for Updates only.
|
|
44
|
+
* - Windows and Linux have no app menu, so About goes at the foot of Help,
|
|
45
|
+
* after a separator. That is the conventional home there.
|
|
46
|
+
*/
|
|
47
|
+
declare const HELP_MENU: {
|
|
48
|
+
checkForUpdates: MenuLabel;
|
|
49
|
+
};
|
|
50
|
+
/** The app-menu items the family shares (macOS; the identity item also belongs in File elsewhere). */
|
|
51
|
+
declare const APP_MENU: {
|
|
52
|
+
userInfo: MenuLabel;
|
|
53
|
+
};
|
|
54
|
+
/** What an app must tell the shell to build its named menu items. */
|
|
55
|
+
interface MenuNaming {
|
|
56
|
+
/** The product, as it appears in menus: "Patterpad", "Storyletter". */
|
|
57
|
+
appName: string;
|
|
58
|
+
/** The product's own documentation URL. Omit while an app has no docs yet and
|
|
59
|
+
* the item is rendered disabled rather than opening a broken link. */
|
|
60
|
+
docsUrl?: string;
|
|
61
|
+
/** The suite's documentation home, shared by every app in the family. */
|
|
62
|
+
suiteDocsUrl?: string;
|
|
63
|
+
/** The suite, as it appears in "<suite> Documentation Home". Defaults to "Patter". */
|
|
64
|
+
suiteName?: string;
|
|
65
|
+
}
|
|
66
|
+
/** A named menu item: the label, plus the URL it opens (absent = nothing wired yet). */
|
|
67
|
+
interface NamedMenuItem extends MenuLabel {
|
|
68
|
+
url?: string;
|
|
69
|
+
/** False when the app has not supplied a URL, so the builder can render it
|
|
70
|
+
* disabled instead of opening nothing. A placeholder, honestly labelled. */
|
|
71
|
+
ready: boolean;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The menu labels that carry a product or suite name, so no app spells its own
|
|
75
|
+
* About or Documentation item differently from the rest of the family.
|
|
76
|
+
*
|
|
77
|
+
* An app with no documentation site yet still gets the ITEM, marked
|
|
78
|
+
* `ready: false`, so the menu has its family shape from day one and wiring the
|
|
79
|
+
* URL later is a one-line change rather than a menu redesign.
|
|
80
|
+
*/
|
|
81
|
+
declare function namedMenuItems(naming: MenuNaming): {
|
|
82
|
+
about: NamedMenuItem;
|
|
83
|
+
docs: NamedMenuItem;
|
|
84
|
+
suiteDocs: NamedMenuItem;
|
|
85
|
+
};
|
|
31
86
|
|
|
32
|
-
export { EDIT_MENU, type MenuLabel, PANE_MENU };
|
|
87
|
+
export { APP_MENU, EDIT_MENU, HELP_MENU, type MenuLabel, type MenuNaming, type NamedMenuItem, PANE_MENU, namedMenuItems };
|
package/dist/menu.d.ts
CHANGED
|
@@ -28,5 +28,60 @@ declare const PANE_MENU: {
|
|
|
28
28
|
showInspector: MenuLabel;
|
|
29
29
|
resetView: MenuLabel;
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* The Help menu items the family shares, and the one platform rule that goes
|
|
33
|
+
* with them.
|
|
34
|
+
*
|
|
35
|
+
* Lifted from Patterpad, which is the only app that has ever had these: a
|
|
36
|
+
* second app writing its own updater or About is pure waste (`design/
|
|
37
|
+
* shared-shell.md`), and a suite is recognised by finding Check for Updates
|
|
38
|
+
* where you left it. Storyletter will grow both; until it does, these labels
|
|
39
|
+
* are the agreement rather than a description of two implementations.
|
|
40
|
+
*
|
|
41
|
+
* PLACEMENT, which differs by platform and is easy to get wrong:
|
|
42
|
+
* - macOS keeps About in the APP menu (the one named after the product), and
|
|
43
|
+
* Help carries documentation + Check for Updates only.
|
|
44
|
+
* - Windows and Linux have no app menu, so About goes at the foot of Help,
|
|
45
|
+
* after a separator. That is the conventional home there.
|
|
46
|
+
*/
|
|
47
|
+
declare const HELP_MENU: {
|
|
48
|
+
checkForUpdates: MenuLabel;
|
|
49
|
+
};
|
|
50
|
+
/** The app-menu items the family shares (macOS; the identity item also belongs in File elsewhere). */
|
|
51
|
+
declare const APP_MENU: {
|
|
52
|
+
userInfo: MenuLabel;
|
|
53
|
+
};
|
|
54
|
+
/** What an app must tell the shell to build its named menu items. */
|
|
55
|
+
interface MenuNaming {
|
|
56
|
+
/** The product, as it appears in menus: "Patterpad", "Storyletter". */
|
|
57
|
+
appName: string;
|
|
58
|
+
/** The product's own documentation URL. Omit while an app has no docs yet and
|
|
59
|
+
* the item is rendered disabled rather than opening a broken link. */
|
|
60
|
+
docsUrl?: string;
|
|
61
|
+
/** The suite's documentation home, shared by every app in the family. */
|
|
62
|
+
suiteDocsUrl?: string;
|
|
63
|
+
/** The suite, as it appears in "<suite> Documentation Home". Defaults to "Patter". */
|
|
64
|
+
suiteName?: string;
|
|
65
|
+
}
|
|
66
|
+
/** A named menu item: the label, plus the URL it opens (absent = nothing wired yet). */
|
|
67
|
+
interface NamedMenuItem extends MenuLabel {
|
|
68
|
+
url?: string;
|
|
69
|
+
/** False when the app has not supplied a URL, so the builder can render it
|
|
70
|
+
* disabled instead of opening nothing. A placeholder, honestly labelled. */
|
|
71
|
+
ready: boolean;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The menu labels that carry a product or suite name, so no app spells its own
|
|
75
|
+
* About or Documentation item differently from the rest of the family.
|
|
76
|
+
*
|
|
77
|
+
* An app with no documentation site yet still gets the ITEM, marked
|
|
78
|
+
* `ready: false`, so the menu has its family shape from day one and wiring the
|
|
79
|
+
* URL later is a one-line change rather than a menu redesign.
|
|
80
|
+
*/
|
|
81
|
+
declare function namedMenuItems(naming: MenuNaming): {
|
|
82
|
+
about: NamedMenuItem;
|
|
83
|
+
docs: NamedMenuItem;
|
|
84
|
+
suiteDocs: NamedMenuItem;
|
|
85
|
+
};
|
|
31
86
|
|
|
32
|
-
export { EDIT_MENU, type MenuLabel, PANE_MENU };
|
|
87
|
+
export { APP_MENU, EDIT_MENU, HELP_MENU, type MenuLabel, type MenuNaming, type NamedMenuItem, PANE_MENU, namedMenuItems };
|
package/dist/menu.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildwinter/app-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "The shared shell for the editor family (Patterpad, Storylet Studio): the app-agnostic design-token grammar, the per-entity colour hash, and the vanilla-TS DOM primitive. Two palettes, one grammar - each app supplies its own palette/fonts over these tokens.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/dist/chunk-R6RO5TXB.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/menu.ts
|
|
2
|
-
var EDIT_MENU = {
|
|
3
|
-
undo: { label: "Undo", accelerator: "CmdOrCtrl+Z" },
|
|
4
|
-
redo: { label: "Redo", accelerator: "Shift+CmdOrCtrl+Z" },
|
|
5
|
-
duplicate: { label: "Duplicate", accelerator: "CmdOrCtrl+D" },
|
|
6
|
-
find: { label: "Find\u2026", accelerator: "CmdOrCtrl+F" }
|
|
7
|
-
};
|
|
8
|
-
var PANE_MENU = {
|
|
9
|
-
showNav: { label: "Show Navigator", accelerator: "CmdOrCtrl+1" },
|
|
10
|
-
showInspector: { label: "Show Inspector", accelerator: "CmdOrCtrl+2" },
|
|
11
|
-
resetView: { label: "Reset View" }
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { EDIT_MENU, PANE_MENU };
|
|
15
|
-
//# sourceMappingURL=chunk-R6RO5TXB.js.map
|
|
16
|
-
//# sourceMappingURL=chunk-R6RO5TXB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;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","file":"chunk-R6RO5TXB.js","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/** 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"]}
|