@docmentis/udoc-editor 0.8.15 → 0.8.16
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/commands.d.ts.map +1 -1
- package/dist/commands.js +51 -9
- package/dist/commands.js.map +1 -1
- package/dist/components/PageControls.d.ts +13 -6
- package/dist/components/PageControls.d.ts.map +1 -1
- package/dist/components/PageControls.js +42 -33
- package/dist/components/PageControls.js.map +1 -1
- package/dist/components/PageSettingsModal.d.ts +0 -2
- package/dist/components/PageSettingsModal.d.ts.map +1 -1
- package/dist/components/PageSettingsModal.js +54 -56
- package/dist/components/PageSettingsModal.js.map +1 -1
- package/dist/components/{NewSlideModal.d.ts → SlideLayoutModal.d.ts} +15 -11
- package/dist/components/SlideLayoutModal.d.ts.map +1 -0
- package/dist/components/{NewSlideModal.js → SlideLayoutModal.js} +34 -18
- package/dist/components/SlideLayoutModal.js.map +1 -0
- package/dist/docmentis-theme.d.ts +4 -0
- package/dist/docmentis-theme.d.ts.map +1 -0
- package/dist/docmentis-theme.js +6 -0
- package/dist/docmentis-theme.js.map +1 -0
- package/dist/edit-client.d.ts +9 -1
- package/dist/edit-client.d.ts.map +1 -1
- package/dist/edit-client.js +10 -0
- package/dist/edit-client.js.map +1 -1
- package/dist/edit-command.d.ts +3 -1
- package/dist/edit-command.d.ts.map +1 -1
- package/dist/edit-command.js +7 -0
- package/dist/edit-command.js.map +1 -1
- package/dist/edit-mode.d.ts.map +1 -1
- package/dist/edit-mode.js +22 -10
- package/dist/edit-mode.js.map +1 -1
- package/dist/editor.d.ts +7 -6
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +6 -5
- package/dist/editor.js.map +1 -1
- package/dist/i18n/ar.js +10 -10
- package/dist/i18n/ar.js.map +1 -1
- package/dist/i18n/de.js +10 -10
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.js +10 -10
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.js +10 -10
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.js +10 -10
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/ja.js +10 -10
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ko.js +10 -10
- package/dist/i18n/ko.js.map +1 -1
- package/dist/i18n/messages.d.ts +18 -18
- package/dist/i18n/messages.d.ts.map +1 -1
- package/dist/i18n/pt-BR.js +10 -10
- package/dist/i18n/pt-BR.js.map +1 -1
- package/dist/i18n/ru.js +10 -10
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/zh-CN.js +10 -10
- package/dist/i18n/zh-CN.js.map +1 -1
- package/dist/i18n/zh-TW.js +10 -10
- package/dist/i18n/zh-TW.js.map +1 -1
- package/dist/icons.d.ts +24 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +24 -0
- package/dist/icons.js.map +1 -1
- package/dist/image.d.ts +11 -7
- package/dist/image.d.ts.map +1 -1
- package/dist/image.js +44 -7
- package/dist/image.js.map +1 -1
- package/dist/insert.d.ts +24 -12
- package/dist/insert.d.ts.map +1 -1
- package/dist/insert.js +306 -51
- package/dist/insert.js.map +1 -1
- package/dist/line-edit.d.ts +30 -0
- package/dist/line-edit.d.ts.map +1 -0
- package/dist/line-edit.js +87 -0
- package/dist/line-edit.js.map +1 -0
- package/dist/markup.d.ts +25 -5
- package/dist/markup.d.ts.map +1 -1
- package/dist/markup.js +73 -15
- package/dist/markup.js.map +1 -1
- package/dist/opacity.d.ts +19 -0
- package/dist/opacity.d.ts.map +1 -0
- package/dist/opacity.js +45 -0
- package/dist/opacity.js.map +1 -0
- package/dist/page-commands.d.ts +16 -0
- package/dist/page-commands.d.ts.map +1 -0
- package/dist/page-commands.js +122 -0
- package/dist/page-commands.js.map +1 -0
- package/dist/page-controls.d.ts +27 -1
- package/dist/page-controls.d.ts.map +1 -1
- package/dist/page-controls.js +30 -14
- package/dist/page-controls.js.map +1 -1
- package/dist/paint.d.ts +59 -12
- package/dist/paint.d.ts.map +1 -1
- package/dist/paint.js +225 -104
- package/dist/paint.js.map +1 -1
- package/dist/ruler-controls.d.ts +6 -0
- package/dist/ruler-controls.d.ts.map +1 -1
- package/dist/ruler-controls.js +18 -3
- package/dist/ruler-controls.js.map +1 -1
- package/dist/ruler-edits.d.ts +2 -5
- package/dist/ruler-edits.d.ts.map +1 -1
- package/dist/ruler-edits.js +13 -20
- package/dist/ruler-edits.js.map +1 -1
- package/dist/ruler.d.ts +7 -1
- package/dist/ruler.d.ts.map +1 -1
- package/dist/ruler.js +41 -11
- package/dist/ruler.js.map +1 -1
- package/dist/shape-gallery.d.ts +9 -4
- package/dist/shape-gallery.d.ts.map +1 -1
- package/dist/shape-gallery.js +9 -16
- package/dist/shape-gallery.js.map +1 -1
- package/dist/slide-commands.d.ts +38 -0
- package/dist/slide-commands.d.ts.map +1 -0
- package/dist/slide-commands.js +191 -0
- package/dist/slide-commands.js.map +1 -0
- package/dist/slide-shape.d.ts +24 -3
- package/dist/slide-shape.d.ts.map +1 -1
- package/dist/slide-shape.js +65 -10
- package/dist/slide-shape.js.map +1 -1
- package/dist/state.d.ts +12 -5
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +1 -0
- package/dist/state.js.map +1 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +108 -63
- package/dist/styles.js.map +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +99 -40
- package/dist/tabs.js.map +1 -1
- package/dist/text-format.d.ts.map +1 -1
- package/dist/text-format.js +2 -2
- package/dist/text-format.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/handlers.d.ts.map +1 -1
- package/dist/worker/handlers.js +6 -0
- package/dist/worker/handlers.js.map +1 -1
- package/dist/worker/protocol.d.ts +13 -2
- package/dist/worker/protocol.d.ts.map +1 -1
- package/dist/worker/worker-source.js +1 -1
- package/package.json +3 -3
- package/dist/components/NewSlideModal.d.ts.map +0 -1
- package/dist/components/NewSlideModal.js.map +0 -1
- package/dist/new-slide.d.ts +0 -20
- package/dist/new-slide.d.ts.map +0 -1
- package/dist/new-slide.js +0 -90
- package/dist/new-slide.js.map +0 -1
package/dist/styles.js
CHANGED
|
@@ -30,14 +30,14 @@ export const editorStyles = css `
|
|
|
30
30
|
flex-direction: column;
|
|
31
31
|
align-items: center;
|
|
32
32
|
gap: 1px;
|
|
33
|
-
padding:
|
|
33
|
+
padding: 1px;
|
|
34
34
|
font:
|
|
35
35
|
600 11px/1 system-ui,
|
|
36
36
|
sans-serif;
|
|
37
37
|
color: var(--udoc-color-on-surface);
|
|
38
38
|
background: var(--udoc-color-surface-container-high);
|
|
39
39
|
border: 1px solid var(--udoc-color-outline-variant);
|
|
40
|
-
border-radius:
|
|
40
|
+
border-radius: 15px;
|
|
41
41
|
user-select: none;
|
|
42
42
|
}
|
|
43
43
|
.udoc-ui-root .udoc-ui__page-actions--peek {
|
|
@@ -48,19 +48,19 @@ export const editorStyles = css `
|
|
|
48
48
|
display: flex;
|
|
49
49
|
align-items: center;
|
|
50
50
|
justify-content: center;
|
|
51
|
-
width:
|
|
52
|
-
height:
|
|
51
|
+
width: 26px;
|
|
52
|
+
height: 26px;
|
|
53
53
|
padding: 0;
|
|
54
54
|
border: none;
|
|
55
|
-
border-radius:
|
|
55
|
+
border-radius: 50%;
|
|
56
56
|
background: transparent;
|
|
57
57
|
color: var(--udoc-color-on-surface);
|
|
58
58
|
cursor: pointer;
|
|
59
59
|
}
|
|
60
60
|
.udoc-ui-root .udoc-ui__page-actions-btn svg,
|
|
61
61
|
.udoc-ui-root .udoc-ui__page-insert-btn svg {
|
|
62
|
-
width:
|
|
63
|
-
height:
|
|
62
|
+
width: 18px;
|
|
63
|
+
height: 18px;
|
|
64
64
|
}
|
|
65
65
|
.udoc-ui-root .udoc-ui__page-actions-btn:hover:not(:disabled) {
|
|
66
66
|
background-image: linear-gradient(var(--udoc-state-hover) 0 0);
|
|
@@ -187,19 +187,6 @@ export const editorStyles = css `
|
|
|
187
187
|
padding: 14px 16px 4px;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
.udoc-ui-root .udoc-page-modal__section-label {
|
|
191
|
-
font-size: 11px;
|
|
192
|
-
font-weight: 600;
|
|
193
|
-
letter-spacing: 0.04em;
|
|
194
|
-
text-transform: uppercase;
|
|
195
|
-
color: var(--udoc-color-on-surface-variant);
|
|
196
|
-
margin-bottom: 8px;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.udoc-ui-root .udoc-page-modal__section-label:not(:first-child) {
|
|
200
|
-
margin-top: 18px;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
190
|
.udoc-ui-root .udoc-page-modal__select {
|
|
204
191
|
width: 100%;
|
|
205
192
|
height: 32px;
|
|
@@ -253,13 +240,20 @@ export const editorStyles = css `
|
|
|
253
240
|
|
|
254
241
|
.udoc-ui-root .udoc-page-modal__unit {
|
|
255
242
|
flex: 0 0 64px;
|
|
256
|
-
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* A row of labelled controls after the first, the last clear of the footer. */
|
|
246
|
+
.udoc-ui-root .udoc-page-modal__row {
|
|
247
|
+
margin-top: 10px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.udoc-ui-root .udoc-page-modal__row:last-child {
|
|
251
|
+
margin-bottom: 10px;
|
|
257
252
|
}
|
|
258
253
|
|
|
259
254
|
.udoc-ui-root .udoc-page-modal__orient {
|
|
260
255
|
display: flex;
|
|
261
256
|
gap: 8px;
|
|
262
|
-
margin-top: 10px;
|
|
263
257
|
}
|
|
264
258
|
|
|
265
259
|
.udoc-ui-root .udoc-page-modal__orient-btn {
|
|
@@ -283,34 +277,6 @@ export const editorStyles = css `
|
|
|
283
277
|
background-color: var(--udoc-state-selected);
|
|
284
278
|
}
|
|
285
279
|
|
|
286
|
-
.udoc-ui-root .udoc-page-modal__rotate {
|
|
287
|
-
display: flex;
|
|
288
|
-
gap: 8px;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.udoc-ui-root .udoc-page-modal__rotate-btn {
|
|
292
|
-
display: inline-flex;
|
|
293
|
-
align-items: center;
|
|
294
|
-
justify-content: center;
|
|
295
|
-
width: 40px;
|
|
296
|
-
height: 32px;
|
|
297
|
-
border: 1px solid var(--udoc-color-outline-variant);
|
|
298
|
-
border-radius: 6px;
|
|
299
|
-
background: transparent;
|
|
300
|
-
color: var(--udoc-color-on-surface-variant);
|
|
301
|
-
cursor: pointer;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
.udoc-ui-root .udoc-page-modal__rotate-btn:hover {
|
|
305
|
-
background-image: linear-gradient(var(--udoc-state-hover) 0 0);
|
|
306
|
-
color: var(--udoc-color-on-surface);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.udoc-ui-root .udoc-page-modal__rotate-btn svg {
|
|
310
|
-
width: var(--udoc-btn-glyph);
|
|
311
|
-
height: var(--udoc-btn-glyph);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
280
|
.udoc-ui-root .udoc-page-modal__footer {
|
|
315
281
|
display: flex;
|
|
316
282
|
justify-content: flex-end;
|
|
@@ -486,7 +452,7 @@ export const editorStyles = css `
|
|
|
486
452
|
pointer-events: none;
|
|
487
453
|
}
|
|
488
454
|
|
|
489
|
-
/* ---
|
|
455
|
+
/* --- Slide layout picker (SlideLayoutModal) --- */
|
|
490
456
|
|
|
491
457
|
.udoc-ui-root .udoc-slide-picker {
|
|
492
458
|
position: absolute;
|
|
@@ -576,6 +542,11 @@ export const editorStyles = css `
|
|
|
576
542
|
background-image: linear-gradient(var(--udoc-state-hover) 0 0);
|
|
577
543
|
}
|
|
578
544
|
|
|
545
|
+
.udoc-ui-root .udoc-slide-picker__cell--current {
|
|
546
|
+
border-color: var(--udoc-color-primary);
|
|
547
|
+
background-color: var(--udoc-state-selected);
|
|
548
|
+
}
|
|
549
|
+
|
|
579
550
|
.udoc-ui-root .udoc-slide-picker__cell:focus-visible {
|
|
580
551
|
outline: 2px solid var(--udoc-color-primary);
|
|
581
552
|
outline-offset: 1px;
|
|
@@ -920,16 +891,25 @@ export const editorStyles = css `
|
|
|
920
891
|
/* The ruler's controls (ruler-controls.ts), in the layers over its strips:
|
|
921
892
|
each margin's edge, and the indent markers and tab stops of the paragraph a
|
|
922
893
|
caret is in. Each takes its own press, where the layer under them takes
|
|
923
|
-
none; placed along the ruler each frame by left (or top) in CSS px.
|
|
894
|
+
none; placed along the ruler each frame by left (or top) in CSS px. Hovered
|
|
895
|
+
and pressed they tint in the ruler's figures' ink, by the state layers at
|
|
896
|
+
twice their strength: shapes this small don't show them at their own. */
|
|
924
897
|
.udoc-ui-root .udoc-ui__ruler-control {
|
|
925
898
|
position: absolute;
|
|
926
899
|
pointer-events: auto;
|
|
927
900
|
touch-action: none;
|
|
901
|
+
--udoc-ruler-hover: calc(var(--udoc-state-hover-opacity) * 2);
|
|
902
|
+
--udoc-ruler-pressed: calc(var(--udoc-state-pressed-opacity) * 2);
|
|
928
903
|
}
|
|
929
904
|
/* A margin's edge: a strip a few px wide to grab, over the line the band's
|
|
930
905
|
canvas draws at rest — with the fills it bounds, so the two meet without a
|
|
931
|
-
seam.
|
|
932
|
-
|
|
906
|
+
seam. Under the pointer the strip tints and shows a line of its own down its
|
|
907
|
+
middle, and pressed both deepen at once, fading back on release — the line
|
|
908
|
+
moving with a drag, where the canvas's waits for the drop. It never stands
|
|
909
|
+
over the markers, which take a press on their shapes. */
|
|
910
|
+
.udoc-ui-root .udoc-ui__ruler-edge {
|
|
911
|
+
transition: background-color 120ms ease;
|
|
912
|
+
}
|
|
933
913
|
.udoc-ui-root .udoc-ui__ruler-edge--h {
|
|
934
914
|
top: 0;
|
|
935
915
|
bottom: 0;
|
|
@@ -945,11 +925,7 @@ export const editorStyles = css `
|
|
|
945
925
|
.udoc-ui-root .udoc-ui__ruler-edge::after {
|
|
946
926
|
content: "";
|
|
947
927
|
position: absolute;
|
|
948
|
-
|
|
949
|
-
display: none;
|
|
950
|
-
}
|
|
951
|
-
.udoc-ui-root .udoc-ui__ruler-control--dragging::after {
|
|
952
|
-
display: block;
|
|
928
|
+
transition: background-color 120ms ease;
|
|
953
929
|
}
|
|
954
930
|
.udoc-ui-root .udoc-ui__ruler-edge--h::after {
|
|
955
931
|
top: 0;
|
|
@@ -963,6 +939,24 @@ export const editorStyles = css `
|
|
|
963
939
|
top: 3px;
|
|
964
940
|
height: 1px;
|
|
965
941
|
}
|
|
942
|
+
.udoc-ui-root .udoc-ui__ruler-edge:hover {
|
|
943
|
+
background-color: color-mix(in srgb, var(--udoc-color-on-surface-variant) var(--udoc-ruler-hover), transparent);
|
|
944
|
+
}
|
|
945
|
+
.udoc-ui-root .udoc-ui__ruler-edge:hover::after {
|
|
946
|
+
background-color: var(--udoc-color-outline);
|
|
947
|
+
}
|
|
948
|
+
.udoc-ui-root .udoc-ui__ruler-edge.udoc-ui__ruler-control--dragging {
|
|
949
|
+
background-color: color-mix(
|
|
950
|
+
in srgb,
|
|
951
|
+
var(--udoc-color-on-surface-variant) var(--udoc-ruler-pressed),
|
|
952
|
+
transparent
|
|
953
|
+
);
|
|
954
|
+
transition: none;
|
|
955
|
+
}
|
|
956
|
+
.udoc-ui-root .udoc-ui__ruler-edge.udoc-ui__ruler-control--dragging::after {
|
|
957
|
+
background-color: var(--udoc-color-on-surface-variant);
|
|
958
|
+
transition: none;
|
|
959
|
+
}
|
|
966
960
|
/* The dashed line a drag on a ruler control draws across the content pane
|
|
967
961
|
at it, as Word's does — down from the horizontal ruler, across from the
|
|
968
962
|
vertical — in the outline that reads over a page and the canvas alike. */
|
|
@@ -984,6 +978,12 @@ export const editorStyles = css `
|
|
|
984
978
|
display: block;
|
|
985
979
|
overflow: visible;
|
|
986
980
|
}
|
|
981
|
+
/* The marker a pointer is on or a drag carries stands over those it meets,
|
|
982
|
+
or the left indent's box would draw across the hanging indent's base. */
|
|
983
|
+
.udoc-ui-root .udoc-ui__ruler-marker:hover,
|
|
984
|
+
.udoc-ui-root .udoc-ui__ruler-marker.udoc-ui__ruler-control--dragging {
|
|
985
|
+
z-index: 1;
|
|
986
|
+
}
|
|
987
987
|
/* An indent marker: filled as the text area it stands on, outlined. Its box
|
|
988
988
|
runs the ruler's depth, and takes a press only on the shape, so beside the
|
|
989
989
|
hourglass's narrow waist one reaches the margin's edge under it. */
|
|
@@ -997,8 +997,42 @@ export const editorStyles = css `
|
|
|
997
997
|
stroke-width: 1px;
|
|
998
998
|
stroke-linejoin: round;
|
|
999
999
|
pointer-events: visiblePainted;
|
|
1000
|
+
transition:
|
|
1001
|
+
fill 120ms ease,
|
|
1002
|
+
stroke 120ms ease;
|
|
1003
|
+
}
|
|
1004
|
+
/* Under the pointer it tints and its outline takes the figures' ink, and
|
|
1005
|
+
pressed it tints deeper at once, fading back on release — over its own fill,
|
|
1006
|
+
as it hides the ticks under it. Only color changes, so its strokes stay on
|
|
1007
|
+
whole pixels. */
|
|
1008
|
+
.udoc-ui-root .udoc-ui__ruler-marker--indent:hover path {
|
|
1009
|
+
fill: color-mix(
|
|
1010
|
+
in srgb,
|
|
1011
|
+
var(--udoc-color-on-surface-variant) var(--udoc-ruler-hover),
|
|
1012
|
+
var(--udoc-color-surface-container-highest)
|
|
1013
|
+
);
|
|
1014
|
+
stroke: var(--udoc-color-on-surface-variant);
|
|
1015
|
+
}
|
|
1016
|
+
.udoc-ui-root .udoc-ui__ruler-marker--indent.udoc-ui__ruler-control--dragging path {
|
|
1017
|
+
fill: color-mix(
|
|
1018
|
+
in srgb,
|
|
1019
|
+
var(--udoc-color-on-surface-variant) var(--udoc-ruler-pressed),
|
|
1020
|
+
var(--udoc-color-surface-container-highest)
|
|
1021
|
+
);
|
|
1022
|
+
stroke: var(--udoc-color-on-surface-variant);
|
|
1023
|
+
transition: none;
|
|
1024
|
+
}
|
|
1025
|
+
/* A tab stop's mark, in the figures' ink, on a chip that shows only when
|
|
1026
|
+
hovered or pressed: its strokes alone are too thin to tell a state by. The
|
|
1027
|
+
chip takes no press, so hover covers just what a press takes. */
|
|
1028
|
+
.udoc-ui-root .udoc-ui__ruler-marker--tab::before {
|
|
1029
|
+
content: "";
|
|
1030
|
+
position: absolute;
|
|
1031
|
+
inset: -2px;
|
|
1032
|
+
border-radius: 2px;
|
|
1033
|
+
pointer-events: none;
|
|
1034
|
+
transition: background-color 120ms ease;
|
|
1000
1035
|
}
|
|
1001
|
-
/* A tab stop's mark, in the ruler's figures' ink. */
|
|
1002
1036
|
.udoc-ui-root .udoc-ui__ruler-marker--tab path {
|
|
1003
1037
|
fill: none;
|
|
1004
1038
|
stroke: var(--udoc-color-on-surface-variant);
|
|
@@ -1007,10 +1041,21 @@ export const editorStyles = css `
|
|
|
1007
1041
|
.udoc-ui-root .udoc-ui__ruler-marker--tab rect {
|
|
1008
1042
|
fill: var(--udoc-color-on-surface-variant);
|
|
1009
1043
|
}
|
|
1044
|
+
.udoc-ui-root .udoc-ui__ruler-marker--tab:hover::before {
|
|
1045
|
+
background-color: color-mix(in srgb, var(--udoc-color-on-surface-variant) var(--udoc-ruler-hover), transparent);
|
|
1046
|
+
}
|
|
1047
|
+
.udoc-ui-root .udoc-ui__ruler-marker--tab.udoc-ui__ruler-control--dragging::before {
|
|
1048
|
+
background-color: color-mix(
|
|
1049
|
+
in srgb,
|
|
1050
|
+
var(--udoc-color-on-surface-variant) var(--udoc-ruler-pressed),
|
|
1051
|
+
transparent
|
|
1052
|
+
);
|
|
1053
|
+
transition: none;
|
|
1054
|
+
}
|
|
1010
1055
|
/* A control the open document can't move now — the engine gates its edit
|
|
1011
|
-
off, or the selected paragraphs disagree on
|
|
1012
|
-
the guide puts it and takes no press. After the indent's path
|
|
1013
|
-
it outranks at the same specificity. */
|
|
1056
|
+
off, or the selected paragraphs disagree on the tab stops it is one of: it
|
|
1057
|
+
stands where the guide puts it and takes no press. After the indent's path
|
|
1058
|
+
rule, which it outranks at the same specificity. */
|
|
1014
1059
|
.udoc-ui-root .udoc-ui__ruler-control--fixed,
|
|
1015
1060
|
.udoc-ui-root .udoc-ui__ruler-control--fixed path {
|
|
1016
1061
|
pointer-events: none;
|
package/dist/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,mDAAmD;AACnD,EAAE;AACF,uEAAuE;AACvE,+EAA+E;AAC/E,4BAA4B;AAC5B,MAAM,GAAG,GAAG,CAAC,OAA6B,EAAE,GAAG,MAAiB,EAAU,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;AAErH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,mDAAmD;AACnD,EAAE;AACF,uEAAuE;AACvE,+EAA+E;AAC/E,4BAA4B;AAC5B,MAAM,GAAG,GAAG,CAAC,OAA6B,EAAE,GAAG,MAAiB,EAAU,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;AAErH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+hC9B,CAAC"}
|
package/dist/tabs.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { UDocType } from "@docmentis/udoc-ui";
|
|
|
2
2
|
import type { CommandId, ToolbarTab } from "@docmentis/udoc-ui/internal";
|
|
3
3
|
import type { MessageKey } from "./i18n/index.js";
|
|
4
4
|
/** A command edit mode's tabs name: udoc-ui's, or the editor's own. */
|
|
5
|
-
export type EditCommandId = CommandId | "paragraphStyle" | "fontFamily" | "fontSize" | "bold" | "italic" | "underline" | "strikethrough" | "superscript" | "subscript" | "widthScale" | "textFill" | "textHighlight" | "paragraphAlign" | "lineSpacing" | "bulletList" | "numberList" | "shapeFillColor" | "shapeStrokeColor" | "shapeOrder" | "shapeAlign" | "shapeRotate" | "shapeGroup" | "shapeUngroup" | "objectFillColor" | "objectStrokeColor" | "objectOrder" | "objectAlign" | "objectRotate" | "objectGroup" | "objectUngroup" | "tableSelect" | "tableInsertRowAbove" | "tableInsertRowBelow" | "tableInsertColumnLeft" | "tableInsertColumnRight" | "tableDeleteRows" | "tableDeleteColumns" | "tableMerge" | "tableUnmerge" | "ruler" | "createSlide" | "insertImage" | "insertShape" | "insertGalleryShape" | "rotatePageLeft" | "rotatePageRight" | "flipPageHorizontal" | "flipPageVertical" | "cropPage" | "resizePage" | "cropAspect" | "cropReset" | "cropCancel" | "cropApply";
|
|
5
|
+
export type EditCommandId = CommandId | "paragraphStyle" | "fontFamily" | "fontSize" | "bold" | "italic" | "underline" | "strikethrough" | "superscript" | "subscript" | "widthScale" | "textFill" | "textHighlight" | "paragraphAlign" | "lineSpacing" | "bulletList" | "numberList" | "changeShape" | "shapeFillColor" | "shapeStrokeColor" | "shapeOrder" | "shapeAlign" | "shapeRotate" | "shapeGroup" | "shapeUngroup" | "objectFillColor" | "objectStrokeColor" | "objectOpacity" | "objectOrder" | "objectAlign" | "objectRotate" | "objectGroup" | "objectUngroup" | "tableSelect" | "tableInsertRowAbove" | "tableInsertRowBelow" | "tableInsertColumnLeft" | "tableInsertColumnRight" | "tableDeleteRows" | "tableDeleteColumns" | "tableMerge" | "tableUnmerge" | "ruler" | "createSlide" | "deleteSlide" | "changeLayout" | "insertImage" | "insertPageImage" | "insertShape" | "insertGalleryShape" | "insertTextBox" | "pageCreate" | "pageDelete" | "pageRotateLeft" | "pageRotateRight" | "pageResize" | "rotatePageLeft" | "rotatePageRight" | "flipPageHorizontal" | "flipPageVertical" | "cropPage" | "resizePage" | "cropAspect" | "cropReset" | "cropCancel" | "cropApply";
|
|
6
6
|
/** A tab of edit mode's. */
|
|
7
7
|
type EditTab = ToolbarTab<MessageKey>;
|
|
8
8
|
/** Edit mode's tab strip for a document of `docType`. */
|
package/dist/tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../src/tabs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../src/tabs.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAUnD,OAAO,KAAK,EAAE,SAAS,EAAyB,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAYlD,uEAAuE;AACvE,MAAM,MAAM,aAAa,GACnB,SAAS,GACT,gBAAgB,GAChB,YAAY,GACZ,UAAU,GACV,MAAM,GACN,QAAQ,GACR,WAAW,GACX,eAAe,GACf,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,eAAe,GACf,aAAa,GACb,aAAa,GACb,cAAc,GACd,aAAa,GACb,eAAe,GACf,aAAa,GACb,qBAAqB,GACrB,qBAAqB,GACrB,uBAAuB,GACvB,wBAAwB,GACxB,iBAAiB,GACjB,oBAAoB,GACpB,YAAY,GACZ,cAAc,GACd,OAAO,GACP,aAAa,GACb,aAAa,GACb,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,oBAAoB,GACpB,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,GACjB,oBAAoB,GACpB,kBAAkB,GAClB,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,WAAW,CAAC;AAElB,4BAA4B;AAC5B,KAAK,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAoTtC,yDAAyD;AACzD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,OAAO,EAAE,CAerE"}
|
package/dist/tabs.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { allowsEdit, allowsTableEdit, allowsTextEdit, ANNOTATE_TAB, presentTab, viewTab, } from "@docmentis/udoc-ui/internal";
|
|
1
|
+
import { allowsEdit, allowsTableEdit, allowsTextEdit, ANNOTATE_TAB, presentTab, REVIEW_TAB, viewTab, } from "@docmentis/udoc-ui/internal";
|
|
2
|
+
import { ICON_TAB_IMAGE, ICON_TAB_OBJECT, ICON_TAB_PAGE, ICON_TAB_SHAPE, ICON_TAB_SLIDE, ICON_TAB_TABLE, ICON_TAB_TEXT, } from "./icons.js";
|
|
2
3
|
import { RULED } from "./ruler.js";
|
|
3
4
|
/** Whether `caps` is a selection in text: a caret or a range — in a shape's
|
|
4
5
|
* text too, which a selection reports with the shape's own edits, and in a
|
|
@@ -23,9 +24,15 @@ function pageObjects(caps) {
|
|
|
23
24
|
function annotations(caps) {
|
|
24
25
|
return allowsEdit(caps, "deleteAnnotations", "translateAnnotations", "resizeAnnotations", "reorderAnnotations");
|
|
25
26
|
}
|
|
26
|
-
/** Whether `caps` holds an image's pages, picked in the thumbnails
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
/** Whether `caps` holds a PDF's or an image's pages, picked in the thumbnails, or
|
|
28
|
+
* nothing. */
|
|
29
|
+
function pagesOrNothing(caps) {
|
|
30
|
+
return caps.count === 0 || allowsEdit(caps, "rotatePages");
|
|
31
|
+
}
|
|
32
|
+
/** Whether `caps` holds a deck's slides or sections, picked in the thumbnails, or
|
|
33
|
+
* nothing. */
|
|
34
|
+
function slidesOrNothing(caps) {
|
|
35
|
+
return caps.count === 0 || allowsEdit(caps, "deleteSlides", "deleteSlideSections");
|
|
29
36
|
}
|
|
30
37
|
/**
|
|
31
38
|
* The Text tab — the paragraph style picker first, the broadest control and the
|
|
@@ -46,6 +53,7 @@ function imagePages(caps) {
|
|
|
46
53
|
const TEXT_TAB = {
|
|
47
54
|
id: "text",
|
|
48
55
|
label: "ribbon.text",
|
|
56
|
+
icon: ICON_TAB_TEXT,
|
|
49
57
|
commands: [
|
|
50
58
|
"paragraphStyle",
|
|
51
59
|
"fontFamily",
|
|
@@ -66,6 +74,9 @@ const TEXT_TAB = {
|
|
|
66
74
|
],
|
|
67
75
|
opensFor: inText,
|
|
68
76
|
};
|
|
77
|
+
/** The wordprocessing Text tab — {@link TEXT_TAB}, which its strip opens on: a word
|
|
78
|
+
* document is edited as text. */
|
|
79
|
+
const WORDPROCESSING_TEXT_TAB = { ...TEXT_TAB, opensOnEntry: true };
|
|
69
80
|
/** The presentation Text tab — {@link TEXT_TAB} without the controls a deck has
|
|
70
81
|
* no use for: the style picker (a slide's paragraphs inherit by outline level,
|
|
71
82
|
* naming no style) and Scale (`w:w` is docx's, and DrawingML has no horizontal
|
|
@@ -75,16 +86,18 @@ const PRESENTATION_TEXT_TAB = {
|
|
|
75
86
|
commands: TEXT_TAB.commands.filter((id) => id !== "paragraphStyle" && id !== "widthScale"),
|
|
76
87
|
};
|
|
77
88
|
/**
|
|
78
|
-
* The Shape tab — appearance + arrangement for graphics objects.
|
|
79
|
-
* split buttons (color per channel), then a
|
|
80
|
-
* dropdowns — Order (z-order), Align (align /
|
|
81
|
-
* page) and Rotate (quarter-turn rotations +
|
|
82
|
-
* Ungroup. Picked shapes open it.
|
|
89
|
+
* The Shape tab — outline + appearance + arrangement for graphics objects. Change
|
|
90
|
+
* Shape's gallery, then Fill / Line split buttons (color per channel), then a
|
|
91
|
+
* button group of the arrangement dropdowns — Order (z-order), Align (align /
|
|
92
|
+
* distribute to the selection or the page) and Rotate (quarter-turn rotations +
|
|
93
|
+
* flips) — and one of Group and Ungroup. Picked shapes open it.
|
|
83
94
|
*/
|
|
84
95
|
const SHAPE_TAB = {
|
|
85
96
|
id: "shape",
|
|
86
97
|
label: "ribbon.shape",
|
|
98
|
+
icon: ICON_TAB_SHAPE,
|
|
87
99
|
commands: [
|
|
100
|
+
"changeShape",
|
|
88
101
|
"shapeFillColor",
|
|
89
102
|
"shapeStrokeColor",
|
|
90
103
|
"shapeOrder",
|
|
@@ -106,6 +119,7 @@ const SHAPE_TAB = {
|
|
|
106
119
|
const TABLE_TAB = {
|
|
107
120
|
id: "table",
|
|
108
121
|
label: "ribbon.table",
|
|
122
|
+
icon: ICON_TAB_TABLE,
|
|
109
123
|
commands: [
|
|
110
124
|
"tableSelect",
|
|
111
125
|
"tableInsertRowAbove",
|
|
@@ -122,16 +136,18 @@ const TABLE_TAB = {
|
|
|
122
136
|
};
|
|
123
137
|
/**
|
|
124
138
|
* The Object tab — the portable (PDF) counterpart of {@link SHAPE_TAB}: its own
|
|
125
|
-
* Fill
|
|
139
|
+
* Line, Fill, Opacity and arrangement, gated on the object edits, over the page's content
|
|
126
140
|
* objects (paths, text, images) rather than DrawingML shapes. Picked objects
|
|
127
141
|
* open it, as does a caret in one's text.
|
|
128
142
|
*/
|
|
129
143
|
const OBJECT_TAB = {
|
|
130
144
|
id: "object",
|
|
131
145
|
label: "ribbon.object",
|
|
146
|
+
icon: ICON_TAB_OBJECT,
|
|
132
147
|
commands: [
|
|
133
|
-
"objectFillColor",
|
|
134
148
|
"objectStrokeColor",
|
|
149
|
+
"objectFillColor",
|
|
150
|
+
"objectOpacity",
|
|
135
151
|
"objectOrder",
|
|
136
152
|
"objectAlign",
|
|
137
153
|
"objectRotate",
|
|
@@ -145,15 +161,18 @@ const OBJECT_TAB = {
|
|
|
145
161
|
const PORTABLE_ANNOTATE_TAB = { ...ANNOTATE_TAB, opensFor: annotations };
|
|
146
162
|
/**
|
|
147
163
|
* The image Image tab — the current page's Rotate Left / Right, Flip
|
|
148
|
-
* Horizontal / Vertical, Crop and Image Size
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
164
|
+
* Horizontal / Vertical, Crop and Image Size, the turns and flips the pages picked
|
|
165
|
+
* in the thumbnails instead, then what is drawn over the page: a text box and the
|
|
166
|
+
* gallery's shapes. All icons, named by their tooltips. An image's strip opens on
|
|
167
|
+
* it, and pages picked or nothing selected open it. **Contextual** (see {@link ToolbarTab.contextual}): while
|
|
168
|
+
* a page is cropped, crop mode's own controls show in their place — the aspect the
|
|
169
|
+
* box keeps, Reset, Cancel and Apply — and a page that takes no markup leaves out
|
|
170
|
+
* the text box and the shapes.
|
|
153
171
|
*/
|
|
154
172
|
const IMAGE_TAB = {
|
|
155
173
|
id: "image",
|
|
156
174
|
label: "ribbon.image",
|
|
175
|
+
icon: ICON_TAB_IMAGE,
|
|
157
176
|
commands: [
|
|
158
177
|
"rotatePageLeft",
|
|
159
178
|
"rotatePageRight",
|
|
@@ -161,24 +180,64 @@ const IMAGE_TAB = {
|
|
|
161
180
|
"flipPageVertical",
|
|
162
181
|
"cropPage",
|
|
163
182
|
"resizePage",
|
|
183
|
+
"insertTextBox",
|
|
184
|
+
"insertGalleryShape",
|
|
164
185
|
"cropAspect",
|
|
165
186
|
"cropReset",
|
|
166
187
|
"cropCancel",
|
|
167
188
|
"cropApply",
|
|
168
189
|
],
|
|
169
190
|
contextual: true,
|
|
170
|
-
|
|
191
|
+
opensOnEntry: true,
|
|
192
|
+
opensFor: pagesOrNothing,
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* The portable Page tab: the pages' edits — a blank page after the current one,
|
|
196
|
+
* and Delete, the two turns and Resize of the current page, or of those picked
|
|
197
|
+
* in the thumbnails — then what goes on a page as its own objects: a text box,
|
|
198
|
+
* shapes and an image. All icons, named by their tooltips. A PDF's strip opens on
|
|
199
|
+
* it, the tools a PDF is usually edited with, and pages picked or nothing selected
|
|
200
|
+
* open it.
|
|
201
|
+
*/
|
|
202
|
+
const PORTABLE_PAGE_TAB = {
|
|
203
|
+
id: "page",
|
|
204
|
+
label: "ribbon.page",
|
|
205
|
+
icon: ICON_TAB_PAGE,
|
|
206
|
+
commands: [
|
|
207
|
+
"pageCreate",
|
|
208
|
+
"pageDelete",
|
|
209
|
+
"pageRotateLeft",
|
|
210
|
+
"pageRotateRight",
|
|
211
|
+
"pageResize",
|
|
212
|
+
"insertTextBox",
|
|
213
|
+
"insertShape",
|
|
214
|
+
"insertPageImage",
|
|
215
|
+
],
|
|
216
|
+
opensOnEntry: true,
|
|
217
|
+
opensFor: pagesOrNothing,
|
|
171
218
|
};
|
|
172
|
-
/**
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
219
|
+
/**
|
|
220
|
+
* The presentation Slide tab: the slides' edits — New Slide, after the current
|
|
221
|
+
* slide, then Delete Slide and Change Layout, of the current slide or those
|
|
222
|
+
* picked in the thumbnails — then what goes on a slide: a text box and the
|
|
223
|
+
* gallery's shapes, dragged out on it, and a picture. All icons, named by their
|
|
224
|
+
* tooltips. A deck's strip opens on it, and slides or sections picked or nothing
|
|
225
|
+
* selected open it.
|
|
226
|
+
*/
|
|
227
|
+
const PRESENTATION_SLIDE_TAB = {
|
|
228
|
+
id: "slide",
|
|
229
|
+
label: "ribbon.slide",
|
|
230
|
+
icon: ICON_TAB_SLIDE,
|
|
231
|
+
commands: [
|
|
232
|
+
"createSlide",
|
|
233
|
+
"deleteSlide",
|
|
234
|
+
"changeLayout",
|
|
235
|
+
"insertTextBox",
|
|
236
|
+
"insertGalleryShape",
|
|
237
|
+
"insertImage",
|
|
238
|
+
],
|
|
239
|
+
opensOnEntry: true,
|
|
240
|
+
opensFor: slidesOrNothing,
|
|
182
241
|
};
|
|
183
242
|
/** `docType`'s View tab, as edit mode has it: with the views edit mode alone
|
|
184
243
|
* offers, and the ruler among its guides where edit mode draws one — over a
|
|
@@ -188,21 +247,21 @@ function editViewTab(docType) {
|
|
|
188
247
|
}
|
|
189
248
|
/** The strip of a doc type with none of its own: no tabs. */
|
|
190
249
|
const DEFAULT_TABS = [];
|
|
191
|
-
/** The portable (PDF) strip: its own
|
|
250
|
+
/** The portable (PDF) strip: its own Page, then Object (the page's content
|
|
192
251
|
* objects) and Annotate, but no Text tab, then Present, and its View last. */
|
|
193
252
|
const PORTABLE_TABS = [
|
|
194
|
-
|
|
253
|
+
PORTABLE_PAGE_TAB,
|
|
195
254
|
OBJECT_TAB,
|
|
196
255
|
PORTABLE_ANNOTATE_TAB,
|
|
197
256
|
presentTab("portable"),
|
|
198
257
|
editViewTab("portable"),
|
|
199
258
|
];
|
|
200
|
-
/** The presentation strip: its own
|
|
259
|
+
/** The presentation strip: its own Slide, then Text (character formatting),
|
|
201
260
|
* Table and Shape (free-floating graphics), then Present, and its View last.
|
|
202
261
|
* Table goes ahead of Shape as Text does: a block of cells also reports the
|
|
203
262
|
* edits of the frame around them, and the first tab holding for it opens. */
|
|
204
263
|
const PRESENTATION_TABS = [
|
|
205
|
-
|
|
264
|
+
PRESENTATION_SLIDE_TAB,
|
|
206
265
|
PRESENTATION_TEXT_TAB,
|
|
207
266
|
TABLE_TAB,
|
|
208
267
|
SHAPE_TAB,
|
|
@@ -211,17 +270,17 @@ const PRESENTATION_TABS = [
|
|
|
211
270
|
];
|
|
212
271
|
/** The wordprocessing strip: Text and Table, then Shape for the drawings in its
|
|
213
272
|
* flow, and its View last. */
|
|
214
|
-
const WORDPROCESSING_TABS = [
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
* and its View last. */
|
|
218
|
-
const IMAGE_TABS = [
|
|
219
|
-
IMAGE_TAB,
|
|
220
|
-
IMAGE_INSERT_TAB,
|
|
221
|
-
PRESENTATION_TEXT_TAB,
|
|
273
|
+
const WORDPROCESSING_TABS = [
|
|
274
|
+
WORDPROCESSING_TEXT_TAB,
|
|
275
|
+
TABLE_TAB,
|
|
222
276
|
SHAPE_TAB,
|
|
223
|
-
|
|
277
|
+
REVIEW_TAB,
|
|
278
|
+
editViewTab("wordprocessing"),
|
|
224
279
|
];
|
|
280
|
+
/** The image strip: its own Image, then the Text and Shape tabs of the shapes
|
|
281
|
+
* drawn over its pages — a deck's, as they are a slide's shapes — and its View
|
|
282
|
+
* last. */
|
|
283
|
+
const IMAGE_TABS = [IMAGE_TAB, PRESENTATION_TEXT_TAB, SHAPE_TAB, editViewTab("image")];
|
|
225
284
|
/** The spreadsheet strip: its View. */
|
|
226
285
|
const SPREADSHEET_TABS = [editViewTab("spreadsheet")];
|
|
227
286
|
/** Edit mode's tab strip for a document of `docType`. */
|
package/dist/tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../src/tabs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../src/tabs.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,UAAU,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,UAAU,EACV,UAAU,EACV,OAAO,GACV,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACH,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,aAAa,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AA0EnC;;yDAEyD;AACzD,SAAS,MAAM,CAAC,IAA2B;IACvC,OAAO,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAC9C,CAAC;AAED,4EAA4E;AAC5E,SAAS,OAAO,CAAC,IAA2B;IACxC,OAAO,eAAe,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AAC/C,CAAC;AAED;iCACiC;AACjC,SAAS,YAAY,CAAC,IAA2B;IAC7C,OAAO,UAAU,CAAC,IAAI,EAAE,cAA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iD;AACjD,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI;yCAiBb,qBAAqB,EAAE,KAAG,OAAO,CAAC,IAAI,CAAC;oCAS5C,kBAAkB,MAAM,OAAO,KAAG,OAAO,CAAC,IAAI,CAAC;gCAK7C,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;8BAgC9B,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;+BAKrB,SAAS,KAAG,OAAO,CAAC,IAAI,CAAC;yCAOf,qBAAqB,EAAE,KAAG,OAAO,CAAC,IAAI,CAAC;6BAUnD,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;iCAQlB,kBAAkB,KAAG,OAAO,CAAC,IAAI,CAAC;2BAaxC,SAAS,GAAG,IAAI,KAAG,OAAO,CAAC,IAAI,CAAC;iCAU1B,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;oCAOnB,SAAS,KAAG,OAAO,CAAC,IAAI,CAAC;EAsBnE;AAED,oDAAoD;AACpD,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/text-format.js
CHANGED
|
@@ -232,7 +232,7 @@ export function createTextEdits(host, i18n) {
|
|
|
232
232
|
function setCharacterProperties(properties) {
|
|
233
233
|
if (!textDocType())
|
|
234
234
|
return Promise.resolve();
|
|
235
|
-
return commit(() => client.executeOnSelection({ kind: "setCharacterProperties", properties }));
|
|
235
|
+
return commit(() => client.executeOnSelection({ kind: "setCharacterProperties", properties: { props: properties } }));
|
|
236
236
|
}
|
|
237
237
|
/** Toggle a character style (bold / italic / underline / strikethrough): set
|
|
238
238
|
* the explicit value, so turning a style *off* overrides an inherited one. */
|
|
@@ -283,7 +283,7 @@ export function createTextEdits(host, i18n) {
|
|
|
283
283
|
function setParagraphProperties(properties) {
|
|
284
284
|
if (!textDocType())
|
|
285
285
|
return Promise.resolve();
|
|
286
|
-
return commit(() => client.executeOnSelection({ kind: "setParagraphProperties", properties }));
|
|
286
|
+
return commit(() => client.executeOnSelection({ kind: "setParagraphProperties", properties: { props: properties } }));
|
|
287
287
|
}
|
|
288
288
|
/** Step the touched paragraphs' indent by `delta` levels — the Align & Indent
|
|
289
289
|
* menu's two steps. Relative, so the engine (not the toolbar) decides what a
|