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