@embedpdf/viewer-chrome 3.0.0-next.14 → 3.0.0-next.15

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.
Files changed (155) hide show
  1. package/README.md +175 -132
  2. package/dist/annotation-fonts-BqoLZ4Mp.js +80 -0
  3. package/dist/annotation-fonts-BqoLZ4Mp.js.map +1 -0
  4. package/dist/annotation-fonts-Dt0IQXhz.cjs +91 -0
  5. package/dist/annotation-fonts-Dt0IQXhz.cjs.map +1 -0
  6. package/dist/annotation-style--rPIZsuP.js +879 -0
  7. package/dist/annotation-style--rPIZsuP.js.map +1 -0
  8. package/dist/annotation-style-Bzvvp8-N.cjs +879 -0
  9. package/dist/annotation-style-Bzvvp8-N.cjs.map +1 -0
  10. package/dist/ar-D9XKAmDx.js +567 -0
  11. package/dist/ar-D9XKAmDx.js.map +1 -0
  12. package/dist/ar-DnEj5vbP.cjs +567 -0
  13. package/dist/ar-DnEj5vbP.cjs.map +1 -0
  14. package/dist/chrome.cjs +378 -242
  15. package/dist/chrome.cjs.map +1 -1
  16. package/dist/chrome.d.cts +5 -35
  17. package/dist/chrome.d.ts +5 -35
  18. package/dist/chrome.js +377 -239
  19. package/dist/chrome.js.map +1 -1
  20. package/dist/commands-BmgxhJ8B.js +953 -0
  21. package/dist/commands-BmgxhJ8B.js.map +1 -0
  22. package/dist/commands-CYt4SFUX.cjs +1060 -0
  23. package/dist/commands-CYt4SFUX.cjs.map +1 -0
  24. package/dist/commands.cjs +12 -649
  25. package/dist/commands.d.cts +28 -3
  26. package/dist/commands.d.ts +28 -3
  27. package/dist/commands.js +2 -647
  28. package/dist/comments-panel-MUVgLCBI.js +514 -0
  29. package/dist/comments-panel-MUVgLCBI.js.map +1 -0
  30. package/dist/comments-panel-pEcQg4Vs.cjs +514 -0
  31. package/dist/comments-panel-pEcQg4Vs.cjs.map +1 -0
  32. package/dist/de-Bdr4aWzm.js +566 -0
  33. package/dist/de-Bdr4aWzm.js.map +1 -0
  34. package/dist/de-Dv6zvbnd.cjs +566 -0
  35. package/dist/de-Dv6zvbnd.cjs.map +1 -0
  36. package/dist/dialog-B5GBisKv.js +55 -0
  37. package/dist/dialog-B5GBisKv.js.map +1 -0
  38. package/dist/dialog-t8F13BL_.cjs +60 -0
  39. package/dist/dialog-t8F13BL_.cjs.map +1 -0
  40. package/dist/{es-BXLlBo2b.cjs → es-BP09DR9w.cjs} +274 -29
  41. package/dist/es-BP09DR9w.cjs.map +1 -0
  42. package/dist/{es-CLgTsFDS.js → es-BSXz5tBv.js} +274 -29
  43. package/dist/es-BSXz5tBv.js.map +1 -0
  44. package/dist/form-design-panel-B5MXTZ96.cjs +418 -0
  45. package/dist/form-design-panel-B5MXTZ96.cjs.map +1 -0
  46. package/dist/form-design-panel-vWWU9uB-.js +418 -0
  47. package/dist/form-design-panel-vWWU9uB-.js.map +1 -0
  48. package/dist/fr-BBQQn7tJ.cjs +566 -0
  49. package/dist/fr-BBQQn7tJ.cjs.map +1 -0
  50. package/dist/fr-Ckn3K9v1.js +566 -0
  51. package/dist/fr-Ckn3K9v1.js.map +1 -0
  52. package/dist/he-DRsG7bH7.cjs +567 -0
  53. package/dist/he-DRsG7bH7.cjs.map +1 -0
  54. package/dist/he-wdGU5PkU.js +567 -0
  55. package/dist/he-wdGU5PkU.js.map +1 -0
  56. package/dist/icons-BrK5iVL8.js +856 -0
  57. package/dist/icons-BrK5iVL8.js.map +1 -0
  58. package/dist/icons-x0Tc05bs.cjs +1010 -0
  59. package/dist/icons-x0Tc05bs.cjs.map +1 -0
  60. package/dist/index.cjs +3091 -5456
  61. package/dist/index.cjs.map +1 -1
  62. package/dist/index.d.cts +632 -144
  63. package/dist/index.d.ts +632 -144
  64. package/dist/index.js +3060 -5367
  65. package/dist/index.js.map +1 -1
  66. package/dist/it-BuP4o0xQ.cjs +566 -0
  67. package/dist/it-BuP4o0xQ.cjs.map +1 -0
  68. package/dist/it-Us-VmvIu.js +566 -0
  69. package/dist/it-Us-VmvIu.js.map +1 -0
  70. package/dist/ja-Cizj0-5O.js +566 -0
  71. package/dist/ja-Cizj0-5O.js.map +1 -0
  72. package/dist/ja-DovEd6ts.cjs +566 -0
  73. package/dist/ja-DovEd6ts.cjs.map +1 -0
  74. package/dist/ko-B-qJEol2.cjs +566 -0
  75. package/dist/ko-B-qJEol2.cjs.map +1 -0
  76. package/dist/ko-DlrXliE1.js +566 -0
  77. package/dist/ko-DlrXliE1.js.map +1 -0
  78. package/dist/labels-BiM9wp9K.cjs +21 -0
  79. package/dist/labels-BiM9wp9K.cjs.map +1 -0
  80. package/dist/labels-C6_i87Oj.js +16 -0
  81. package/dist/labels-C6_i87Oj.js.map +1 -0
  82. package/dist/link-editor-CSjqPnj1.cjs +125 -0
  83. package/dist/link-editor-CSjqPnj1.cjs.map +1 -0
  84. package/dist/link-editor-SxM1nnJU.js +125 -0
  85. package/dist/link-editor-SxM1nnJU.js.map +1 -0
  86. package/dist/measurement-Bs61XWbJ.js +325 -0
  87. package/dist/measurement-Bs61XWbJ.js.map +1 -0
  88. package/dist/measurement-CcCsHPOX.cjs +326 -0
  89. package/dist/measurement-CcCsHPOX.cjs.map +1 -0
  90. package/dist/nl-0aF7M_0h.js +566 -0
  91. package/dist/nl-0aF7M_0h.js.map +1 -0
  92. package/dist/nl-D3KZDDiJ.cjs +566 -0
  93. package/dist/nl-D3KZDDiJ.cjs.map +1 -0
  94. package/dist/pl-BW--AaCI.js +566 -0
  95. package/dist/pl-BW--AaCI.js.map +1 -0
  96. package/dist/pl-DSFhAUqx.cjs +566 -0
  97. package/dist/pl-DSFhAUqx.cjs.map +1 -0
  98. package/dist/pt-C5S-8MC5.cjs +566 -0
  99. package/dist/pt-C5S-8MC5.cjs.map +1 -0
  100. package/dist/pt-DIhpU5pT.js +566 -0
  101. package/dist/pt-DIhpU5pT.js.map +1 -0
  102. package/dist/redact-confirm-B6j36TPw.js +83 -0
  103. package/dist/redact-confirm-B6j36TPw.js.map +1 -0
  104. package/dist/redact-confirm-CX_SY2ZN.cjs +83 -0
  105. package/dist/redact-confirm-CX_SY2ZN.cjs.map +1 -0
  106. package/dist/redaction-panel-BmoIl-Ll.cjs +96 -0
  107. package/dist/redaction-panel-BmoIl-Ll.cjs.map +1 -0
  108. package/dist/redaction-panel-IJDshSJI.js +96 -0
  109. package/dist/redaction-panel-IJDshSJI.js.map +1 -0
  110. package/dist/search-panel-HfIhJm1M.js +249 -0
  111. package/dist/search-panel-HfIhJm1M.js.map +1 -0
  112. package/dist/search-panel-s9IoiOtv.cjs +249 -0
  113. package/dist/search-panel-s9IoiOtv.cjs.map +1 -0
  114. package/dist/sheet-BDsa_Sup.cjs +442 -0
  115. package/dist/sheet-BDsa_Sup.cjs.map +1 -0
  116. package/dist/sheet-R6XDgyEf.js +365 -0
  117. package/dist/sheet-R6XDgyEf.js.map +1 -0
  118. package/dist/sign-dialog-CgnR7akj.cjs +155 -0
  119. package/dist/sign-dialog-CgnR7akj.cjs.map +1 -0
  120. package/dist/sign-dialog-GDqCoQhA.js +155 -0
  121. package/dist/sign-dialog-GDqCoQhA.js.map +1 -0
  122. package/dist/signature-inspector-DyO313Qf.cjs +166 -0
  123. package/dist/signature-inspector-DyO313Qf.cjs.map +1 -0
  124. package/dist/signature-inspector-okFz8do6.js +166 -0
  125. package/dist/signature-inspector-okFz8do6.js.map +1 -0
  126. package/dist/signature-maker-BhCmYyHD.js +393 -0
  127. package/dist/signature-maker-BhCmYyHD.js.map +1 -0
  128. package/dist/signature-maker-BoYa8vgA.cjs +393 -0
  129. package/dist/signature-maker-BoYa8vgA.cjs.map +1 -0
  130. package/dist/signatures-panel-B56PC6d9.cjs +300 -0
  131. package/dist/signatures-panel-B56PC6d9.cjs.map +1 -0
  132. package/dist/signatures-panel-CgnFfhFm.js +300 -0
  133. package/dist/signatures-panel-CgnFfhFm.js.map +1 -0
  134. package/dist/stamp-store-BHvRs-Do.cjs +147 -0
  135. package/dist/stamp-store-BHvRs-Do.cjs.map +1 -0
  136. package/dist/stamp-store-WuF-L3Jj.js +112 -0
  137. package/dist/stamp-store-WuF-L3Jj.js.map +1 -0
  138. package/dist/stamps-panel-B9NYGayn.cjs +231 -0
  139. package/dist/stamps-panel-B9NYGayn.cjs.map +1 -0
  140. package/dist/stamps-panel-CDO0FPyK.js +231 -0
  141. package/dist/stamps-panel-CDO0FPyK.js.map +1 -0
  142. package/dist/toolbar-CJu2wKTU.cjs +1659 -0
  143. package/dist/toolbar-CJu2wKTU.cjs.map +1 -0
  144. package/dist/toolbar-z9od3tKl.js +1564 -0
  145. package/dist/toolbar-z9od3tKl.js.map +1 -0
  146. package/dist/zh-cn-3tmMeHqv.cjs +566 -0
  147. package/dist/zh-cn-3tmMeHqv.cjs.map +1 -0
  148. package/dist/zh-cn-CxkUUBct.js +566 -0
  149. package/dist/zh-cn-CxkUUBct.js.map +1 -0
  150. package/package.json +6 -4
  151. package/src/styles.css +153 -89
  152. package/dist/commands.cjs.map +0 -1
  153. package/dist/commands.js.map +0 -1
  154. package/dist/es-BXLlBo2b.cjs.map +0 -1
  155. package/dist/es-CLgTsFDS.js.map +0 -1
package/dist/chrome.js CHANGED
@@ -1,258 +1,396 @@
1
- import { custom, defineChrome, group, item } from "@embedpdf/react/toolbar";
1
+ import { createLayout } from "@embedpdf/core-ui";
2
2
  //#region src/config/chrome.ts
3
3
  /**
4
- * The chrome — structure only. No breakpoints, no show/hide lists, no locale
5
- * overrides, no dividers/spacers, no hand-written overflow menus. What fits is
6
- * measured and solved at runtime (@embedpdf/core-ui); the overflow menu is
7
- * derived. Compare to the v2 snippet's 1,950-line ui-schema.ts.
4
+ * The default layout: every bar, menu and panel the viewer ships, as plain
5
+ * data. Structure only: no breakpoints, no show/hide lists, no locale
6
+ * overrides, no dividers or spacers, no hand-written overflow menus. What fits
7
+ * is measured and solved at runtime (@embedpdf/core-ui); the "More" menu is
8
+ * derived, and so are the mode tabs (the `modes` group lists one per bar with
9
+ * a `mode`).
8
10
  *
9
- * `importance` (1 sheds first … 5 pinned) is the only responsive knob.
11
+ * `importance` (1 makes room first … 5 never leaves the bar) is the only
12
+ * responsive knob. The bar, group and menu ids are API: they don't change
13
+ * between minor versions.
10
14
  */
11
- const style = group("style", { importance: 4 }, [item("panel:annotation-style")]);
12
- const history = group("history", { importance: 3 }, ["history:undo", "history:redo"]);
13
- const mainBar = {
14
- id: "main",
15
- sections: {
16
- start: [
17
- group("document", { importance: 5 }, [item("document:menu")]),
18
- group("workspace", { importance: 4 }, [item("panel:sidebar", { importance: 5 }), item("page:settings")]),
19
- group("zoom", { importance: 4 }, [custom("zoom-controls", {
20
- variants: ["inline", "button"],
21
- terminal: "zoom:menu"
22
- })]),
23
- group("tools", { importance: 2 }, ["pan:toggle", "pointer:toggle"])
24
- ],
25
- center: [group("modes", {
26
- role: "tabs",
27
- shed: true,
28
- collapse: "select",
29
- importance: 4,
30
- labelKey: "commands.mode.group",
31
- items: [
32
- item("mode:view", {
33
- variants: ["label"],
34
- importance: 1
35
- }),
36
- item("mode:annotate", {
37
- variants: ["label"],
38
- importance: 1
39
- }),
40
- item("mode:shapes", {
41
- variants: ["label"],
42
- importance: 1
43
- }),
44
- item("mode:insert", {
45
- variants: ["label"],
46
- importance: 1
47
- }),
48
- item("mode:form", {
49
- variants: ["label"],
50
- importance: 1
51
- }),
52
- item("mode:redact", {
53
- variants: ["label"],
54
- importance: 1
55
- }),
56
- item("mode:measure", {
57
- variants: ["label"],
58
- importance: 1
59
- })
60
- ]
61
- })],
62
- end: [group("panels", { importance: 5 }, ["panel:search", "panel:comment"])]
63
- }
64
- };
65
- const annotateBar = {
66
- id: "annotate",
67
- sections: { center: [
68
- group("comment", { importance: 4 }, ["annotation:add-note", "annotation:add-link"]),
69
- group("markup", { importance: 4 }, [
70
- "annotation:add-highlight",
71
- "annotation:add-strikeout",
72
- "annotation:add-underline",
73
- "annotation:add-squiggly"
74
- ]),
75
- group("draw", { importance: 3 }, ["annotation:add-ink", "annotation:add-ink-highlight"]),
76
- group("text", { importance: 2 }, [
77
- "annotation:add-text",
78
- "annotation:add-insert-text",
79
- "annotation:add-replace-text",
80
- "annotation:add-callout"
81
- ]),
82
- style,
83
- history
84
- ] }
85
- };
86
- const shapesBar = {
87
- id: "shapes",
88
- sections: { center: [
89
- group("shapes", { importance: 4 }, [
90
- "annotation:add-rectangle",
91
- "annotation:add-circle",
92
- "annotation:add-line",
93
- "annotation:add-arrow"
94
- ]),
95
- group("polygons", { importance: 2 }, ["annotation:add-polygon", "annotation:add-polyline"]),
96
- style,
97
- history
98
- ] }
15
+ const style = {
16
+ id: "style",
17
+ items: ["panel:style"],
18
+ importance: 4,
19
+ dependent: true
99
20
  };
100
- const insertBar = {
101
- id: "insert",
102
- sections: { center: [
103
- group("stamps", { importance: 4 }, [
104
- "insert:add-stamp",
105
- custom("quick-stamps", {
106
- terminal: "insert:add-stamp",
107
- importance: 3
108
- }),
109
- "insert:add-attachment",
110
- "insert:add-signature",
111
- "insert:add-image"
112
- ]),
113
- style,
114
- history
115
- ] }
21
+ const history = {
22
+ id: "history",
23
+ items: ["history:undo", "history:redo"],
24
+ importance: 3,
25
+ dependent: true
116
26
  };
117
- const formBar = {
118
- id: "form",
119
- sections: { center: [
120
- group("fields", { importance: 4 }, [
121
- "form:add-textfield",
122
- "form:add-checkbox",
123
- "form:add-radio"
124
- ]),
125
- group("choice-fields", { importance: 2 }, ["form:add-select", "form:add-listbox"]),
126
- group("signature-fields", { importance: 2 }, ["form:add-signature"]),
127
- history
128
- ] }
129
- };
130
- const measureBar = {
131
- id: "measure",
132
- sections: { center: [
133
- group("measure", { importance: 5 }, [
134
- "measurement:distance",
135
- "measurement:perimeter",
136
- "measurement:area",
137
- "measurement:calibrate"
138
- ]),
139
- group("scale", { importance: 4 }, [custom("measurement-scale", {
140
- variants: ["inline"],
141
- terminal: "panel:measurement"
142
- })]),
143
- style
144
- ] }
145
- };
146
- const redactBar = {
147
- id: "redact",
148
- sections: { center: [
149
- group("redact", { importance: 4 }, ["redaction:redact", "panel:redaction"]),
150
- style,
151
- history
152
- ] }
153
- };
154
- const documentMenu = {
155
- id: "document",
156
- sections: [{ items: ["document:download", "document:print"] }, { items: ["document:fullscreen"] }]
157
- };
158
- const zoomMenu = {
159
- id: "zoom",
160
- sections: [
161
- {
162
- labelKey: "commands.zoom.level",
163
- items: [
164
- "zoom:50",
165
- "zoom:100",
166
- "zoom:150",
167
- "zoom:200",
168
- "zoom:400"
27
+ const DEFAULT_LAYOUT = {
28
+ bars: {
29
+ main: {
30
+ place: "top",
31
+ start: [
32
+ {
33
+ id: "document",
34
+ items: ["menu:document"],
35
+ importance: 5
36
+ },
37
+ {
38
+ id: "view",
39
+ items: [{
40
+ command: "panel:thumbnails",
41
+ importance: 5
42
+ }, "menu:view"],
43
+ importance: 4
44
+ },
45
+ {
46
+ id: "zoom",
47
+ items: [{
48
+ custom: "zoom",
49
+ command: "menu:zoom",
50
+ variants: ["inline", "button"]
51
+ }],
52
+ importance: 4
53
+ },
54
+ {
55
+ id: "tools",
56
+ items: ["tool:pan", "tool:pointer"],
57
+ importance: 2
58
+ }
59
+ ],
60
+ center: [{
61
+ id: "modes",
62
+ items: [],
63
+ shed: true,
64
+ collapse: "select",
65
+ importance: 4,
66
+ titleKey: "commands.mode.group"
67
+ }],
68
+ end: [{
69
+ id: "panels",
70
+ items: [
71
+ {
72
+ custom: "view-only",
73
+ variants: ["label", "icon"]
74
+ },
75
+ "panel:search",
76
+ "panel:comments"
77
+ ],
78
+ importance: 5
79
+ }]
80
+ },
81
+ annotate: {
82
+ place: { with: "main" },
83
+ mode: "annotate",
84
+ titleKey: "commands.mode.annotate",
85
+ center: [
86
+ {
87
+ id: "comment",
88
+ items: ["tool:note", "tool:link"],
89
+ importance: 4
90
+ },
91
+ {
92
+ id: "markup",
93
+ items: [
94
+ "tool:highlight",
95
+ "tool:strikeout",
96
+ "tool:underline",
97
+ "tool:squiggly"
98
+ ],
99
+ importance: 4
100
+ },
101
+ {
102
+ id: "draw",
103
+ items: ["tool:ink", "tool:ink-highlight"],
104
+ importance: 3
105
+ },
106
+ {
107
+ id: "text",
108
+ items: [
109
+ "tool:free-text",
110
+ "tool:insert-text",
111
+ "tool:replace-text",
112
+ "tool:callout"
113
+ ],
114
+ importance: 2
115
+ },
116
+ style,
117
+ history
169
118
  ]
170
119
  },
171
- { items: ["zoom:in", "zoom:out"] },
172
- { items: [
173
- "zoom:fit-page",
174
- "zoom:fit-width",
175
- "zoom:automatic"
176
- ] }
177
- ]
178
- };
179
- const pageSettingsMenu = {
180
- id: "page-settings",
181
- sections: [
182
- {
183
- labelKey: "commands.spread.group",
184
- items: [
185
- "spread:none",
186
- "spread:odd",
187
- "spread:even"
120
+ shapes: {
121
+ place: { with: "main" },
122
+ mode: "shapes",
123
+ titleKey: "commands.mode.shapes",
124
+ center: [
125
+ {
126
+ id: "shapes",
127
+ items: [
128
+ "tool:square",
129
+ "tool:circle",
130
+ "tool:line",
131
+ "tool:arrow"
132
+ ],
133
+ importance: 4
134
+ },
135
+ {
136
+ id: "polygons",
137
+ items: ["tool:polygon", "tool:polyline"],
138
+ importance: 2
139
+ },
140
+ style,
141
+ history
188
142
  ]
189
143
  },
190
- {
191
- labelKey: "commands.scroll.group",
192
- items: ["scroll:vertical", "scroll:horizontal"]
144
+ insert: {
145
+ place: { with: "main" },
146
+ mode: "insert",
147
+ titleKey: "commands.mode.insert",
148
+ center: [
149
+ {
150
+ id: "stamps",
151
+ items: [
152
+ "tool:stamp",
153
+ {
154
+ custom: "quick-stamps",
155
+ command: "tool:stamp",
156
+ importance: 3
157
+ },
158
+ "tool:attachment",
159
+ "tool:signature",
160
+ "tool:image"
161
+ ],
162
+ importance: 4
163
+ },
164
+ style,
165
+ history
166
+ ]
193
167
  },
194
- {
195
- labelKey: "commands.rotate.group",
196
- items: ["rotate:clockwise", "rotate:counter-clockwise"]
168
+ form: {
169
+ place: { with: "main" },
170
+ mode: "form",
171
+ titleKey: "commands.mode.form",
172
+ center: [
173
+ {
174
+ id: "design",
175
+ items: ["form:design"],
176
+ importance: 5
177
+ },
178
+ {
179
+ id: "fields",
180
+ items: [
181
+ "tool:text-field",
182
+ "tool:checkbox",
183
+ "tool:radio"
184
+ ],
185
+ importance: 4
186
+ },
187
+ {
188
+ id: "choices",
189
+ items: ["tool:combo-box", "tool:list-box"],
190
+ importance: 2
191
+ },
192
+ {
193
+ id: "buttons",
194
+ items: ["tool:button"],
195
+ importance: 2
196
+ },
197
+ {
198
+ id: "signatures",
199
+ items: ["tool:signature-field"],
200
+ importance: 2
201
+ },
202
+ style,
203
+ history
204
+ ]
197
205
  },
198
- { items: ["document:fullscreen"] }
199
- ]
200
- };
201
- const annotationStrip = {
202
- id: "annotation-strip",
203
- sections: { center: [group("annotation-actions", { importance: 4 }, [
204
- "annotation:comment",
205
- "annotation:style",
206
- "annotation:stamp-from-selection",
207
- "annotation:link",
208
- "annotation:goto-link",
209
- "annotation:remove-link",
210
- "annotation:group",
211
- "annotation:ungroup"
212
- ]), group("annotation-danger", { importance: 5 }, ["annotation:delete"])] }
213
- };
214
- const selectionStrip = {
215
- id: "selection-strip",
216
- sections: { center: [group("selection-actions", { importance: 4 }, ["selection:copy"])] }
217
- };
218
- /**
219
- * The DEFAULT chrome — exported as a VALUE, which is the whole customization
220
- * model: consumers pass nothing and track this, transform it, or write their
221
- * own. It is never merged with anything.
222
- */
223
- const defaultChrome = defineChrome({
224
- bars: { main: mainBar },
225
- modeBars: {
226
- "mode:annotate": annotateBar,
227
- "mode:shapes": shapesBar,
228
- "mode:insert": insertBar,
229
- "mode:form": formBar,
230
- "mode:redact": redactBar,
231
- "mode:measure": measureBar
206
+ redact: {
207
+ place: { with: "main" },
208
+ mode: "redact",
209
+ titleKey: "commands.mode.redact",
210
+ center: [
211
+ {
212
+ id: "redact",
213
+ items: ["tool:redact", "panel:redaction"],
214
+ importance: 4
215
+ },
216
+ style,
217
+ history
218
+ ]
219
+ },
220
+ measure: {
221
+ place: { with: "main" },
222
+ mode: "measure",
223
+ titleKey: "commands.mode.measure",
224
+ center: [
225
+ {
226
+ id: "measure",
227
+ items: [
228
+ "tool:distance",
229
+ "tool:perimeter",
230
+ "tool:area",
231
+ "measurement:calibrate"
232
+ ],
233
+ importance: 5
234
+ },
235
+ {
236
+ id: "scale",
237
+ items: [{
238
+ custom: "measurement-scale",
239
+ command: "panel:measurement",
240
+ variants: ["inline"]
241
+ }],
242
+ importance: 4
243
+ },
244
+ style
245
+ ]
246
+ },
247
+ pager: {
248
+ place: { float: "bottom" },
249
+ center: [{
250
+ id: "pages",
251
+ items: [{ custom: "page-number" }]
252
+ }]
253
+ },
254
+ selection: {
255
+ place: { at: "selection" },
256
+ center: [{
257
+ id: "selection",
258
+ items: [
259
+ "selection:copy",
260
+ "selection:highlight",
261
+ "selection:underline",
262
+ "selection:strikeout"
263
+ ],
264
+ importance: 4
265
+ }]
266
+ },
267
+ annotation: {
268
+ place: { at: "annotation" },
269
+ center: [{
270
+ id: "actions",
271
+ items: [
272
+ "annotation:comment",
273
+ "annotation:style",
274
+ "annotation:stamp-from-selection",
275
+ "annotation:link",
276
+ "annotation:goto-link",
277
+ "annotation:remove-link",
278
+ "annotation:group",
279
+ "annotation:ungroup"
280
+ ],
281
+ importance: 4
282
+ }, {
283
+ id: "danger",
284
+ items: ["annotation:delete"],
285
+ importance: 5
286
+ }]
287
+ }
232
288
  },
233
289
  menus: {
234
- document: documentMenu,
235
- zoom: zoomMenu,
236
- "page-settings": pageSettingsMenu
290
+ document: [[
291
+ "document:open",
292
+ "document:download",
293
+ "document:print"
294
+ ], ["view:fullscreen"]],
295
+ view: [
296
+ {
297
+ titleKey: "commands.spread.group",
298
+ items: [
299
+ "view:single-page",
300
+ "view:two-pages",
301
+ "view:cover-page"
302
+ ]
303
+ },
304
+ {
305
+ titleKey: "commands.scroll.group",
306
+ items: ["view:scroll-vertical", "view:scroll-horizontal"]
307
+ },
308
+ {
309
+ titleKey: "commands.rotate.group",
310
+ items: ["view:rotate-clockwise", "view:rotate-counterclockwise"]
311
+ },
312
+ ["view:fullscreen"]
313
+ ],
314
+ zoom: [
315
+ {
316
+ titleKey: "commands.zoom.level",
317
+ items: [
318
+ "zoom:50",
319
+ "zoom:100",
320
+ "zoom:150",
321
+ "zoom:200",
322
+ "zoom:400"
323
+ ]
324
+ },
325
+ ["zoom:in", "zoom:out"],
326
+ [
327
+ "zoom:fit-page",
328
+ "zoom:fit-width",
329
+ "zoom:automatic"
330
+ ]
331
+ ]
237
332
  },
238
- strips: {
239
- annotation: annotationStrip,
240
- selection: selectionStrip
333
+ panels: {
334
+ thumbnails: {
335
+ side: "start",
336
+ titleKey: "panels.thumbnails",
337
+ icon: "sidebar"
338
+ },
339
+ outline: {
340
+ side: "start",
341
+ titleKey: "panels.outline",
342
+ icon: "listTree"
343
+ },
344
+ attachments: {
345
+ side: "start",
346
+ titleKey: "panels.attachments",
347
+ icon: "paperclip"
348
+ },
349
+ search: {
350
+ side: "end",
351
+ titleKey: "panels.search",
352
+ icon: "search"
353
+ },
354
+ comments: {
355
+ side: "end",
356
+ titleKey: "panels.comments",
357
+ icon: "comment"
358
+ },
359
+ style: {
360
+ side: "end",
361
+ titleKey: "panels.style",
362
+ icon: "palette"
363
+ },
364
+ stamps: {
365
+ side: "end",
366
+ titleKey: "panels.stamps",
367
+ icon: "rubberStamp"
368
+ },
369
+ signatures: {
370
+ side: "end",
371
+ titleKey: "panels.signatures",
372
+ icon: "signature"
373
+ },
374
+ redaction: {
375
+ side: "end",
376
+ titleKey: "panels.redaction",
377
+ icon: "redactionSidebar"
378
+ },
379
+ measurement: {
380
+ side: "end",
381
+ titleKey: "panels.measurement",
382
+ icon: "updateScale"
383
+ },
384
+ "form-design": {
385
+ side: "end",
386
+ titleKey: "panels.formDesign",
387
+ icon: "formDesign"
388
+ }
241
389
  }
242
- });
243
- /** Menu lookup by id (arbitrary string). */
244
- function getMenu(schema, id) {
245
- return schema.menus?.[id];
246
- }
247
- /** Secondary band lookup by mode-surface id. */
248
- function getModeBar(schema, id) {
249
- return schema.modeBars?.[id];
250
- }
251
- /** Contextual strip lookup by context id ('annotation', …). */
252
- function getStrip(schema, id) {
253
- return schema.strips?.[id];
254
- }
390
+ };
391
+ /** The default layout, which the `layout` function gets. */
392
+ const defaultLayout = createLayout(DEFAULT_LAYOUT);
255
393
  //#endregion
256
- export { defaultChrome, getMenu, getModeBar, getStrip };
394
+ export { DEFAULT_LAYOUT, defaultLayout };
257
395
 
258
396
  //# sourceMappingURL=chrome.js.map