@a3s-lab/office 0.32.0 → 0.34.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/README.md +62 -8
- package/dist/0~3539.js +2 -2
- package/dist/0~3557.js +1 -1
- package/dist/0~3635.js +1 -1
- package/dist/0~5809.js +123 -0
- package/dist/0~7048.js +1 -2
- package/dist/{0~7614.js → 0~7828.js} +376 -5
- package/dist/{0~6090.js → 0~8136.js} +71 -2
- package/dist/{0~4595.js → 0~9073.js} +3 -72
- package/dist/0~9445.js +1 -1
- package/dist/0~document-editor.js +2 -2
- package/dist/0~markdown-editor.js +2 -2
- package/dist/0~pdf-page-organization-engine.js +187 -0
- package/dist/0~pdf-viewer.js +1018 -30
- package/dist/0~presentation-editor.js +580 -68
- package/dist/0~spreadsheet-editor.js +2 -2
- package/dist/0~work-pptx-export.js +50 -14
- package/dist/0~work-pptx-import.js +21 -9
- package/dist/4121.js +122 -1
- package/dist/4560.js +33 -0
- package/dist/core.d.ts +1 -0
- package/dist/internal/features/work/editors/pdf-editor-extensions.d.ts +11 -0
- package/dist/internal/features/work/editors/pdf-page-organization-engine.d.ts +2 -0
- package/dist/internal/features/work/editors/pdf-page-organization-plan.d.ts +10 -0
- package/dist/internal/features/work/editors/pdf-page-organization-types.d.ts +68 -0
- package/dist/internal/features/work/editors/pdf-page-organization-worker-client.d.ts +2 -0
- package/dist/internal/features/work/editors/pdf-page-organization-worker-protocol.d.ts +13 -0
- package/dist/internal/features/work/editors/pdf-page-organization.d.ts +3 -0
- package/dist/internal/features/work/editors/pdf-page-organization.worker.d.ts +1 -0
- package/dist/internal/features/work/editors/pdf-page-organizer-dialog.d.ts +17 -0
- package/dist/internal/features/work/editors/pdf-thumbnail-rail.d.ts +4 -0
- package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/pdf-viewer.d.ts +3 -1
- package/dist/internal/features/work/editors/presentation-animation-panel.d.ts +11 -0
- package/dist/internal/features/work/editors/presentation-command-types.d.ts +16 -1
- package/dist/internal/features/work/editors/presentation-presenter-view.d.ts +2 -1
- package/dist/internal/features/work/editors/presentation-slide-canvas.d.ts +11 -3
- package/dist/internal/features/work/editors/use-pdf-page-organization.d.ts +38 -0
- package/dist/internal/features/work/editors/use-presentation-animation-commands.d.ts +15 -0
- package/dist/internal/features/work/work-pptx-animation.d.ts +13 -0
- package/dist/internal/features/work/work-pptx-groups.d.ts +4 -0
- package/dist/internal/features/work/work-presentation-animation-constraints.d.ts +4 -0
- package/dist/internal/features/work/work-presentation-animation.d.ts +20 -0
- package/dist/internal/features/work/work-presentation-clipboard.d.ts +10 -3
- package/dist/internal/features/work/work-types.d.ts +17 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/pdf-page-organization.worker.js +19667 -0
- package/dist/pdf-page-organization.worker.js.LICENSE.txt +14 -0
- package/dist/react.d.ts +1 -0
- package/dist/styles.css +438 -0
- package/dist/vue.d.ts +3 -1
- package/dist/vue.js +2 -0
- package/dist/web-component.d.ts +3 -1
- package/dist/web-component.js +9 -0
- package/docs/latest/en/browser-editor-architecture.md +29 -6
- package/package.json +8 -1
- package/dist/0~work-presentation-transition.js +0 -38
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
package/dist/react.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { DocumentEditorProps as InternalDocumentEditorProps } from './inter
|
|
|
3
3
|
import type { MarkdownEditorProps as InternalMarkdownEditorProps } from './internal/features/work/editors/markdown-editor';
|
|
4
4
|
import type { PdfViewerProps as InternalPdfViewerProps } from './internal/features/work/editors/pdf-viewer';
|
|
5
5
|
export { PDF_EVIDENCE_COORDINATE_BASIS, type PdfEvidenceBounds, type PdfEvidenceOverlay, type PdfEvidencePage, type PdfEvidenceRegion, type PdfEvidenceRegionLocation, } from './internal/features/work/editors/pdf-evidence-contract';
|
|
6
|
+
export type { PdfPageOrganizationExport } from './internal/features/work/editors/use-pdf-page-organization';
|
|
6
7
|
import type { PresentationEditorProps as InternalPresentationEditorProps } from './internal/features/work/editors/presentation-editor';
|
|
7
8
|
import type { SpreadsheetEditorProps as InternalSpreadsheetEditorProps } from './internal/features/work/editors/spreadsheet-editor';
|
|
8
9
|
import type { WorkOfficeFileAction } from './internal/features/work/editors/work-office-chrome';
|
package/dist/styles.css
CHANGED
|
@@ -20175,6 +20175,129 @@ sub [data-office-character-position-half-points], sup [data-office-character-pos
|
|
|
20175
20175
|
}
|
|
20176
20176
|
}
|
|
20177
20177
|
|
|
20178
|
+
.work-presentation-animation-options, .work-presentation-animation-timing {
|
|
20179
|
+
border: 0;
|
|
20180
|
+
align-items: center;
|
|
20181
|
+
gap: 6px;
|
|
20182
|
+
min-width: 0;
|
|
20183
|
+
margin: 0;
|
|
20184
|
+
padding: 0;
|
|
20185
|
+
display: flex;
|
|
20186
|
+
}
|
|
20187
|
+
|
|
20188
|
+
.work-presentation-animation-options .work-office-field, .work-presentation-animation-timing .work-office-field {
|
|
20189
|
+
flex: none;
|
|
20190
|
+
}
|
|
20191
|
+
|
|
20192
|
+
.work-presentation-animation-options .work-office-field.effect {
|
|
20193
|
+
width: 88px;
|
|
20194
|
+
}
|
|
20195
|
+
|
|
20196
|
+
.work-presentation-animation-options .work-office-field.trigger {
|
|
20197
|
+
width: 120px;
|
|
20198
|
+
}
|
|
20199
|
+
|
|
20200
|
+
.work-presentation-animation-options .work-office-field.direction {
|
|
20201
|
+
width: 82px;
|
|
20202
|
+
}
|
|
20203
|
+
|
|
20204
|
+
.work-presentation-animation-timing .work-office-field.seconds {
|
|
20205
|
+
width: 64px;
|
|
20206
|
+
}
|
|
20207
|
+
|
|
20208
|
+
.work-presentation-player .work-slide-element[data-slide-animation-state="pending"] {
|
|
20209
|
+
visibility: hidden;
|
|
20210
|
+
opacity: 0;
|
|
20211
|
+
}
|
|
20212
|
+
|
|
20213
|
+
.work-presentation-player .work-slide-element[data-slide-animation-state="playing"] {
|
|
20214
|
+
animation-delay: var(--work-slide-animation-delay, 0s);
|
|
20215
|
+
animation-duration: var(--work-slide-animation-duration, .5s);
|
|
20216
|
+
animation-timing-function: cubic-bezier(.16, 1, .3, 1);
|
|
20217
|
+
animation-fill-mode: both;
|
|
20218
|
+
}
|
|
20219
|
+
|
|
20220
|
+
.work-presentation-player .work-slide-element[data-slide-animation-state="finished"] {
|
|
20221
|
+
visibility: visible;
|
|
20222
|
+
opacity: var(--work-slide-element-opacity, 1);
|
|
20223
|
+
translate: 0;
|
|
20224
|
+
scale: 1;
|
|
20225
|
+
}
|
|
20226
|
+
|
|
20227
|
+
.work-presentation-player .work-slide-element[data-slide-animation-effect="appear"][data-slide-animation-state="playing"] {
|
|
20228
|
+
animation-name: work-slide-animation-appear;
|
|
20229
|
+
animation-timing-function: step-start;
|
|
20230
|
+
}
|
|
20231
|
+
|
|
20232
|
+
.work-presentation-player .work-slide-element[data-slide-animation-effect="fade"][data-slide-animation-state="playing"] {
|
|
20233
|
+
animation-name: work-slide-animation-fade;
|
|
20234
|
+
}
|
|
20235
|
+
|
|
20236
|
+
.work-presentation-player .work-slide-element[data-slide-animation-effect="fly-in"][data-slide-animation-state="playing"] {
|
|
20237
|
+
animation-name: work-slide-animation-fly-in;
|
|
20238
|
+
}
|
|
20239
|
+
|
|
20240
|
+
.work-presentation-player .work-slide-element[data-slide-animation-effect="zoom"][data-slide-animation-state="playing"] {
|
|
20241
|
+
animation-name: work-slide-animation-zoom;
|
|
20242
|
+
}
|
|
20243
|
+
|
|
20244
|
+
@keyframes work-slide-animation-appear {
|
|
20245
|
+
from {
|
|
20246
|
+
visibility: hidden;
|
|
20247
|
+
opacity: 0;
|
|
20248
|
+
}
|
|
20249
|
+
|
|
20250
|
+
to {
|
|
20251
|
+
visibility: visible;
|
|
20252
|
+
opacity: var(--work-slide-element-opacity, 1);
|
|
20253
|
+
}
|
|
20254
|
+
}
|
|
20255
|
+
|
|
20256
|
+
@keyframes work-slide-animation-fade {
|
|
20257
|
+
from {
|
|
20258
|
+
opacity: 0;
|
|
20259
|
+
}
|
|
20260
|
+
|
|
20261
|
+
to {
|
|
20262
|
+
opacity: var(--work-slide-element-opacity, 1);
|
|
20263
|
+
}
|
|
20264
|
+
}
|
|
20265
|
+
|
|
20266
|
+
@keyframes work-slide-animation-fly-in {
|
|
20267
|
+
from {
|
|
20268
|
+
opacity: 0;
|
|
20269
|
+
translate: var(--work-slide-animation-translate-x, -18%)
|
|
20270
|
+
var(--work-slide-animation-translate-y, 0);
|
|
20271
|
+
}
|
|
20272
|
+
|
|
20273
|
+
to {
|
|
20274
|
+
opacity: var(--work-slide-element-opacity, 1);
|
|
20275
|
+
translate: 0;
|
|
20276
|
+
}
|
|
20277
|
+
}
|
|
20278
|
+
|
|
20279
|
+
@keyframes work-slide-animation-zoom {
|
|
20280
|
+
from {
|
|
20281
|
+
opacity: 0;
|
|
20282
|
+
scale: .72;
|
|
20283
|
+
}
|
|
20284
|
+
|
|
20285
|
+
to {
|
|
20286
|
+
opacity: var(--work-slide-element-opacity, 1);
|
|
20287
|
+
scale: 1;
|
|
20288
|
+
}
|
|
20289
|
+
}
|
|
20290
|
+
|
|
20291
|
+
@media (prefers-reduced-motion: reduce) {
|
|
20292
|
+
.work-presentation-player .work-slide-element[data-slide-animation-state="playing"] {
|
|
20293
|
+
visibility: visible;
|
|
20294
|
+
opacity: var(--work-slide-element-opacity, 1);
|
|
20295
|
+
animation: none;
|
|
20296
|
+
translate: 0;
|
|
20297
|
+
scale: 1;
|
|
20298
|
+
}
|
|
20299
|
+
}
|
|
20300
|
+
|
|
20178
20301
|
.work-presentation-comments-panel {
|
|
20179
20302
|
border-bottom: 1px solid var(--a3s-line);
|
|
20180
20303
|
background: var(--a3s-panel);
|
|
@@ -22700,6 +22823,321 @@ sub [data-office-character-position-half-points], sup [data-office-character-pos
|
|
|
22700
22823
|
}
|
|
22701
22824
|
}
|
|
22702
22825
|
|
|
22826
|
+
.work-pdf-page-organization {
|
|
22827
|
+
border-right: 1px solid var(--a3s-line);
|
|
22828
|
+
padding-right: 5px;
|
|
22829
|
+
}
|
|
22830
|
+
|
|
22831
|
+
.work-pdf-page-organizer-trigger.ds-button {
|
|
22832
|
+
border-color: #0000;
|
|
22833
|
+
gap: 5px;
|
|
22834
|
+
height: 28px;
|
|
22835
|
+
min-height: 28px;
|
|
22836
|
+
padding-inline: 8px;
|
|
22837
|
+
font-size: 10px;
|
|
22838
|
+
}
|
|
22839
|
+
|
|
22840
|
+
.work-pdf-page-organizer-dialog {
|
|
22841
|
+
width: min(980px, 100%);
|
|
22842
|
+
}
|
|
22843
|
+
|
|
22844
|
+
.work-pdf-page-organizer-dialog .ds-dialog-body {
|
|
22845
|
+
gap: 12px;
|
|
22846
|
+
min-height: 0;
|
|
22847
|
+
display: grid;
|
|
22848
|
+
}
|
|
22849
|
+
|
|
22850
|
+
.work-pdf-page-organizer-actions {
|
|
22851
|
+
grid-template-columns: repeat(9, minmax(72px, 1fr));
|
|
22852
|
+
gap: 5px;
|
|
22853
|
+
display: grid;
|
|
22854
|
+
}
|
|
22855
|
+
|
|
22856
|
+
.work-pdf-page-organizer-actions .ds-button {
|
|
22857
|
+
white-space: nowrap;
|
|
22858
|
+
gap: 5px;
|
|
22859
|
+
min-width: 0;
|
|
22860
|
+
min-height: 36px;
|
|
22861
|
+
padding-inline: 7px;
|
|
22862
|
+
font-size: 10px;
|
|
22863
|
+
}
|
|
22864
|
+
|
|
22865
|
+
.work-pdf-page-organizer-selection {
|
|
22866
|
+
min-height: 28px;
|
|
22867
|
+
color: var(--a3s-muted);
|
|
22868
|
+
align-items: center;
|
|
22869
|
+
gap: 8px;
|
|
22870
|
+
font-size: 11px;
|
|
22871
|
+
display: flex;
|
|
22872
|
+
}
|
|
22873
|
+
|
|
22874
|
+
.work-pdf-page-organizer-selection output {
|
|
22875
|
+
font-variant-numeric: tabular-nums;
|
|
22876
|
+
margin-right: auto;
|
|
22877
|
+
font-weight: 650;
|
|
22878
|
+
}
|
|
22879
|
+
|
|
22880
|
+
.work-pdf-page-organizer-selection button {
|
|
22881
|
+
border: 1px solid var(--a3s-line);
|
|
22882
|
+
background: var(--a3s-panel);
|
|
22883
|
+
min-height: 28px;
|
|
22884
|
+
color: var(--a3s-muted);
|
|
22885
|
+
font: inherit;
|
|
22886
|
+
cursor: pointer;
|
|
22887
|
+
border-radius: 6px;
|
|
22888
|
+
padding: 0 9px;
|
|
22889
|
+
}
|
|
22890
|
+
|
|
22891
|
+
.work-pdf-page-organizer-selection button:hover:not(:disabled), .work-pdf-page-organizer-selection button:focus-visible {
|
|
22892
|
+
border-color: var(--a3s-line-strong);
|
|
22893
|
+
background: var(--a3s-panel-soft);
|
|
22894
|
+
color: var(--a3s-ink);
|
|
22895
|
+
outline: 0;
|
|
22896
|
+
}
|
|
22897
|
+
|
|
22898
|
+
.work-pdf-page-organizer-viewport {
|
|
22899
|
+
border: 1px solid var(--a3s-line);
|
|
22900
|
+
background: linear-gradient(var(--a3s-panel-soft), var(--a3s-panel-soft)) padding-box,
|
|
22901
|
+
var(--a3s-panel-soft);
|
|
22902
|
+
overscroll-behavior: contain;
|
|
22903
|
+
scrollbar-gutter: stable;
|
|
22904
|
+
border-radius: 10px;
|
|
22905
|
+
height: min(51vh, 552px);
|
|
22906
|
+
min-height: 260px;
|
|
22907
|
+
overflow: auto;
|
|
22908
|
+
}
|
|
22909
|
+
|
|
22910
|
+
.work-pdf-page-organizer-list {
|
|
22911
|
+
gap: 12px;
|
|
22912
|
+
padding: 12px;
|
|
22913
|
+
display: grid;
|
|
22914
|
+
}
|
|
22915
|
+
|
|
22916
|
+
.work-pdf-page-organizer-list > span[aria-hidden="true"] {
|
|
22917
|
+
display: block;
|
|
22918
|
+
}
|
|
22919
|
+
|
|
22920
|
+
.work-pdf-page-organizer-list > button {
|
|
22921
|
+
border: 1px solid var(--a3s-line);
|
|
22922
|
+
background: var(--a3s-panel);
|
|
22923
|
+
width: 100%;
|
|
22924
|
+
height: 172px;
|
|
22925
|
+
color: var(--a3s-ink);
|
|
22926
|
+
text-align: left;
|
|
22927
|
+
cursor: grab;
|
|
22928
|
+
border-radius: 9px;
|
|
22929
|
+
outline: 0;
|
|
22930
|
+
grid-template-columns: 72px minmax(0, 1fr);
|
|
22931
|
+
align-items: center;
|
|
22932
|
+
gap: 14px;
|
|
22933
|
+
padding: 12px 16px;
|
|
22934
|
+
transition: border-color .12s, background-color .12s, box-shadow .12s;
|
|
22935
|
+
display: grid;
|
|
22936
|
+
}
|
|
22937
|
+
|
|
22938
|
+
.work-pdf-page-organizer-list > button:hover:not(:disabled) {
|
|
22939
|
+
border-color: var(--a3s-line-strong);
|
|
22940
|
+
background: color-mix(in srgb, var(--work-pdf-accent) 3%, var(--a3s-panel));
|
|
22941
|
+
}
|
|
22942
|
+
|
|
22943
|
+
.work-pdf-page-organizer-list > button:focus-visible {
|
|
22944
|
+
border-color: var(--work-pdf-accent);
|
|
22945
|
+
box-shadow: 0 0 0 2px
|
|
22946
|
+
color-mix(in srgb, var(--work-pdf-accent) 18%, transparent);
|
|
22947
|
+
}
|
|
22948
|
+
|
|
22949
|
+
.work-pdf-page-organizer-list > button.selected {
|
|
22950
|
+
border-color: color-mix(in srgb, var(--work-pdf-accent) 70%, var(--a3s-line));
|
|
22951
|
+
background: color-mix(in srgb, var(--work-pdf-accent) 8%, var(--a3s-panel));
|
|
22952
|
+
}
|
|
22953
|
+
|
|
22954
|
+
.work-pdf-page-organizer-list > button:active:not(:disabled) {
|
|
22955
|
+
cursor: grabbing;
|
|
22956
|
+
}
|
|
22957
|
+
|
|
22958
|
+
.work-pdf-page-organizer-number {
|
|
22959
|
+
color: var(--a3s-ink);
|
|
22960
|
+
font-variant-numeric: tabular-nums;
|
|
22961
|
+
justify-items: center;
|
|
22962
|
+
gap: 5px;
|
|
22963
|
+
font-size: 18px;
|
|
22964
|
+
font-weight: 700;
|
|
22965
|
+
display: grid;
|
|
22966
|
+
}
|
|
22967
|
+
|
|
22968
|
+
.work-pdf-page-organizer-number small {
|
|
22969
|
+
background: color-mix(in srgb, var(--work-pdf-accent) 10%, var(--a3s-panel));
|
|
22970
|
+
color: var(--work-pdf-accent);
|
|
22971
|
+
border-radius: 999px;
|
|
22972
|
+
padding: 2px 6px;
|
|
22973
|
+
font-size: 9px;
|
|
22974
|
+
font-weight: 650;
|
|
22975
|
+
}
|
|
22976
|
+
|
|
22977
|
+
.work-pdf-page-organizer-preview {
|
|
22978
|
+
border: 1px solid var(--a3s-line);
|
|
22979
|
+
background: #e7e9ee;
|
|
22980
|
+
border-radius: 4px;
|
|
22981
|
+
justify-self: center;
|
|
22982
|
+
place-items: center;
|
|
22983
|
+
width: min(100%, 560px);
|
|
22984
|
+
height: 146px;
|
|
22985
|
+
display: grid;
|
|
22986
|
+
overflow: hidden;
|
|
22987
|
+
}
|
|
22988
|
+
|
|
22989
|
+
.work-pdf-page-organizer-preview img {
|
|
22990
|
+
object-fit: contain;
|
|
22991
|
+
max-width: 100%;
|
|
22992
|
+
max-height: 100%;
|
|
22993
|
+
display: block;
|
|
22994
|
+
}
|
|
22995
|
+
|
|
22996
|
+
.work-pdf-page-organizer-preview[data-state="loading"]:after {
|
|
22997
|
+
content: "";
|
|
22998
|
+
background: linear-gradient(90deg, #ffffff47, #ffffffc2, #ffffff47);
|
|
22999
|
+
border-radius: 999px;
|
|
23000
|
+
width: 48%;
|
|
23001
|
+
height: 8px;
|
|
23002
|
+
animation: 1.1s ease-in-out infinite work-pdf-organizer-loading;
|
|
23003
|
+
}
|
|
23004
|
+
|
|
23005
|
+
.work-pdf-page-organizer-preview[data-state="error"]:after {
|
|
23006
|
+
color: #676d78;
|
|
23007
|
+
content: "无法生成缩略图";
|
|
23008
|
+
font-size: 10px;
|
|
23009
|
+
}
|
|
23010
|
+
|
|
23011
|
+
.work-pdf-page-organizer-error, .work-pdf-page-organizer-diagnostics, .work-pdf-page-organizer-boundary {
|
|
23012
|
+
border: 1px solid var(--a3s-line);
|
|
23013
|
+
border-radius: 8px;
|
|
23014
|
+
margin: 0;
|
|
23015
|
+
padding: 10px 12px;
|
|
23016
|
+
font-size: 11px;
|
|
23017
|
+
line-height: 1.5;
|
|
23018
|
+
}
|
|
23019
|
+
|
|
23020
|
+
.work-pdf-page-organizer-error {
|
|
23021
|
+
border-color: color-mix(in srgb, var(--a3s-red) 38%, var(--a3s-line));
|
|
23022
|
+
background: color-mix(in srgb, var(--a3s-red) 5%, var(--a3s-panel));
|
|
23023
|
+
color: var(--a3s-red);
|
|
23024
|
+
align-items: flex-start;
|
|
23025
|
+
gap: 12px;
|
|
23026
|
+
display: flex;
|
|
23027
|
+
}
|
|
23028
|
+
|
|
23029
|
+
.work-pdf-page-organizer-error > div {
|
|
23030
|
+
flex: 1;
|
|
23031
|
+
min-width: 0;
|
|
23032
|
+
}
|
|
23033
|
+
|
|
23034
|
+
.work-pdf-page-organizer-error p {
|
|
23035
|
+
overflow-wrap: anywhere;
|
|
23036
|
+
margin: 2px 0 4px;
|
|
23037
|
+
}
|
|
23038
|
+
|
|
23039
|
+
.work-pdf-page-organizer-error code {
|
|
23040
|
+
font-size: 9px;
|
|
23041
|
+
}
|
|
23042
|
+
|
|
23043
|
+
.work-pdf-page-organizer-error > button {
|
|
23044
|
+
color: currentColor;
|
|
23045
|
+
cursor: pointer;
|
|
23046
|
+
background: none;
|
|
23047
|
+
border: 0;
|
|
23048
|
+
border-radius: 6px;
|
|
23049
|
+
width: 30px;
|
|
23050
|
+
height: 30px;
|
|
23051
|
+
padding: 0;
|
|
23052
|
+
font-size: 18px;
|
|
23053
|
+
}
|
|
23054
|
+
|
|
23055
|
+
.work-pdf-page-organizer-diagnostics {
|
|
23056
|
+
border-color: color-mix(in srgb, #b7791f 35%, var(--a3s-line));
|
|
23057
|
+
color: #8b5e16;
|
|
23058
|
+
padding-left: 28px;
|
|
23059
|
+
}
|
|
23060
|
+
|
|
23061
|
+
.work-pdf-page-organizer-boundary {
|
|
23062
|
+
background: var(--a3s-panel-soft);
|
|
23063
|
+
color: var(--a3s-muted);
|
|
23064
|
+
}
|
|
23065
|
+
|
|
23066
|
+
@keyframes work-pdf-organizer-loading {
|
|
23067
|
+
0%, 100% {
|
|
23068
|
+
opacity: .45;
|
|
23069
|
+
transform: translateX(-12%);
|
|
23070
|
+
}
|
|
23071
|
+
|
|
23072
|
+
50% {
|
|
23073
|
+
opacity: 1;
|
|
23074
|
+
transform: translateX(12%);
|
|
23075
|
+
}
|
|
23076
|
+
}
|
|
23077
|
+
|
|
23078
|
+
@media (width <= 980px) {
|
|
23079
|
+
.work-pdf-page-organization {
|
|
23080
|
+
display: none;
|
|
23081
|
+
}
|
|
23082
|
+
|
|
23083
|
+
.work-pdf-page-organizer-actions {
|
|
23084
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
23085
|
+
}
|
|
23086
|
+
}
|
|
23087
|
+
|
|
23088
|
+
@media (width <= 560px) {
|
|
23089
|
+
.work-pdf-page-organizer-dialog .ds-dialog-body {
|
|
23090
|
+
gap: 9px;
|
|
23091
|
+
}
|
|
23092
|
+
|
|
23093
|
+
.work-pdf-page-organizer-actions {
|
|
23094
|
+
overscroll-behavior: contain;
|
|
23095
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
23096
|
+
max-height: 188px;
|
|
23097
|
+
overflow-y: auto;
|
|
23098
|
+
}
|
|
23099
|
+
|
|
23100
|
+
.work-pdf-page-organizer-actions .ds-button {
|
|
23101
|
+
min-height: 44px;
|
|
23102
|
+
}
|
|
23103
|
+
|
|
23104
|
+
.work-pdf-page-organizer-selection button {
|
|
23105
|
+
min-width: 44px;
|
|
23106
|
+
min-height: 36px;
|
|
23107
|
+
}
|
|
23108
|
+
|
|
23109
|
+
.work-pdf-page-organizer-viewport {
|
|
23110
|
+
height: min(38vh, 420px);
|
|
23111
|
+
min-height: 220px;
|
|
23112
|
+
}
|
|
23113
|
+
|
|
23114
|
+
.work-pdf-page-organizer-list {
|
|
23115
|
+
padding-inline: 8px;
|
|
23116
|
+
}
|
|
23117
|
+
|
|
23118
|
+
.work-pdf-page-organizer-list > button {
|
|
23119
|
+
grid-template-columns: 48px minmax(0, 1fr);
|
|
23120
|
+
padding-inline: 10px;
|
|
23121
|
+
}
|
|
23122
|
+
|
|
23123
|
+
.work-pdf-page-organizer-number {
|
|
23124
|
+
font-size: 15px;
|
|
23125
|
+
}
|
|
23126
|
+
}
|
|
23127
|
+
|
|
23128
|
+
@media (forced-colors: active) {
|
|
23129
|
+
.work-pdf-page-organizer-list > button.selected {
|
|
23130
|
+
outline: 2px solid highlight;
|
|
23131
|
+
}
|
|
23132
|
+
}
|
|
23133
|
+
|
|
23134
|
+
@media (prefers-reduced-motion: reduce) {
|
|
23135
|
+
.work-pdf-page-organizer-list > button, .work-pdf-page-organizer-preview[data-state="loading"]:after {
|
|
23136
|
+
transition: none;
|
|
23137
|
+
animation: none;
|
|
23138
|
+
}
|
|
23139
|
+
}
|
|
23140
|
+
|
|
22703
23141
|
.work-pdf-export-surface {
|
|
22704
23142
|
z-index: -1000;
|
|
22705
23143
|
color: #20232b;
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Extensions } from '@tiptap/core';
|
|
2
2
|
import { type PropType } from 'vue';
|
|
3
|
-
import type { DocumentContent, DocumentReviewConflictEvent, EditorAgentRequest, GetDocumentSelectionMenuItems, GetMarkdownSelectionMenuItems, MarkdownContent, OfficeCollaborationPresence, OfficeCollaborationSession, PdfCollaborationContent, PresentationContent, SpreadsheetContent } from './core';
|
|
3
|
+
import type { DocumentContent, DocumentReviewConflictEvent, EditorAgentRequest, GetDocumentSelectionMenuItems, GetMarkdownSelectionMenuItems, MarkdownContent, OfficeCollaborationPresence, OfficeCollaborationSession, PdfCollaborationContent, PdfPageOrganizationExport, PresentationContent, SpreadsheetContent } from './core';
|
|
4
4
|
import type { OfficeTheme } from './office-surface';
|
|
5
5
|
import { type DocumentLayoutFont, type OfficeFileAction, type PdfEvidenceOverlay, type PdfEvidenceRegion } from './react';
|
|
6
6
|
export declare const DocumentEditor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -274,6 +274,7 @@ export declare const PdfViewer: import("vue").DefineComponent<import("vue").Extr
|
|
|
274
274
|
type: PropType<() => Promise<Blob>>;
|
|
275
275
|
};
|
|
276
276
|
onSave: PropType<(pdf: Blob) => Promise<boolean>>;
|
|
277
|
+
onPageExport: PropType<(files: readonly PdfPageOrganizationExport[]) => boolean | Promise<boolean>>;
|
|
277
278
|
saveLabel: StringConstructor;
|
|
278
279
|
selectedEvidenceRegionId: StringConstructor;
|
|
279
280
|
sourceKey: StringConstructor;
|
|
@@ -302,6 +303,7 @@ export declare const PdfViewer: import("vue").DefineComponent<import("vue").Extr
|
|
|
302
303
|
type: PropType<() => Promise<Blob>>;
|
|
303
304
|
};
|
|
304
305
|
onSave: PropType<(pdf: Blob) => Promise<boolean>>;
|
|
306
|
+
onPageExport: PropType<(files: readonly PdfPageOrganizationExport[]) => boolean | Promise<boolean>>;
|
|
305
307
|
saveLabel: StringConstructor;
|
|
306
308
|
selectedEvidenceRegionId: StringConstructor;
|
|
307
309
|
sourceKey: StringConstructor;
|
package/dist/vue.js
CHANGED
|
@@ -232,6 +232,7 @@ const PdfViewer = defineComponent({
|
|
|
232
232
|
type: Function
|
|
233
233
|
},
|
|
234
234
|
onSave: Function,
|
|
235
|
+
onPageExport: Function,
|
|
235
236
|
saveLabel: String,
|
|
236
237
|
selectedEvidenceRegionId: String,
|
|
237
238
|
sourceKey: String,
|
|
@@ -257,6 +258,7 @@ const PdfViewer = defineComponent({
|
|
|
257
258
|
onCollaborationChange: (content)=>emit('collaborationChange', content),
|
|
258
259
|
onEvidenceRegionSelect: (region)=>emit('evidenceRegionSelect', region),
|
|
259
260
|
onPageChange: (pageNumber)=>emit('pageChange', pageNumber),
|
|
261
|
+
onPageExport: props.onPageExport,
|
|
260
262
|
onSave: props.onSave,
|
|
261
263
|
saveLabel: props.saveLabel,
|
|
262
264
|
selectedEvidenceRegionId: props.selectedEvidenceRegionId,
|
package/dist/web-component.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Extensions } from '@tiptap/core';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
|
-
import type { DocumentContent, EditorAgentRequest, GetDocumentSelectionMenuItems, GetMarkdownSelectionMenuItems, MarkdownContent, OfficeCollaborationPresence, OfficeCollaborationSession, PdfCollaborationContent, PresentationContent, SpreadsheetContent } from './core';
|
|
3
|
+
import type { DocumentContent, EditorAgentRequest, GetDocumentSelectionMenuItems, GetMarkdownSelectionMenuItems, MarkdownContent, OfficeCollaborationPresence, OfficeCollaborationSession, PdfCollaborationContent, PdfPageOrganizationExport, PresentationContent, SpreadsheetContent } from './core';
|
|
4
4
|
import type { OfficeTheme } from './office-surface';
|
|
5
5
|
import { type DocumentLayoutFont, type OfficeFileAction, type PdfEvidenceOverlay } from './react';
|
|
6
6
|
declare const HTMLElementBase: {
|
|
@@ -92,6 +92,8 @@ export declare class A3SPdfViewerElement extends A3SOfficeElement {
|
|
|
92
92
|
set onCollaborationChange(value: ((content: PdfCollaborationContent) => void) | undefined);
|
|
93
93
|
get onSave(): ((pdf: Blob) => Promise<boolean>) | undefined;
|
|
94
94
|
set onSave(value: ((pdf: Blob) => Promise<boolean>) | undefined);
|
|
95
|
+
get onPageExport(): ((files: readonly PdfPageOrganizationExport[]) => boolean | Promise<boolean>) | undefined;
|
|
96
|
+
set onPageExport(value: ((files: readonly PdfPageOrganizationExport[]) => boolean | Promise<boolean>) | undefined);
|
|
95
97
|
get selectedEvidenceRegionId(): string | undefined;
|
|
96
98
|
set selectedEvidenceRegionId(value: string | undefined);
|
|
97
99
|
get theme(): OfficeTheme;
|
package/dist/web-component.js
CHANGED
|
@@ -308,6 +308,7 @@ class A3SPdfViewerElement extends A3SOfficeElement {
|
|
|
308
308
|
#loadSource;
|
|
309
309
|
#onCollaborationChange;
|
|
310
310
|
#onSave;
|
|
311
|
+
#onPageExport;
|
|
311
312
|
static get observedAttributes() {
|
|
312
313
|
return [
|
|
313
314
|
'file-name',
|
|
@@ -354,6 +355,13 @@ class A3SPdfViewerElement extends A3SOfficeElement {
|
|
|
354
355
|
this.#onSave = value;
|
|
355
356
|
this.requestRender();
|
|
356
357
|
}
|
|
358
|
+
get onPageExport() {
|
|
359
|
+
return this.#onPageExport;
|
|
360
|
+
}
|
|
361
|
+
set onPageExport(value) {
|
|
362
|
+
this.#onPageExport = value;
|
|
363
|
+
this.requestRender();
|
|
364
|
+
}
|
|
357
365
|
get selectedEvidenceRegionId() {
|
|
358
366
|
return this.getAttribute('selected-evidence-region-id') ?? void 0;
|
|
359
367
|
}
|
|
@@ -387,6 +395,7 @@ class A3SPdfViewerElement extends A3SOfficeElement {
|
|
|
387
395
|
},
|
|
388
396
|
onEvidenceRegionSelect: (region)=>dispatchDetail(this, 'evidence-select', region),
|
|
389
397
|
onPageChange: (pageNumber)=>dispatchDetail(this, 'page-change', pageNumber),
|
|
398
|
+
onPageExport: this.onPageExport,
|
|
390
399
|
onSave: this.onSave,
|
|
391
400
|
saveLabel: this.getAttribute('save-label') ?? void 0,
|
|
392
401
|
selectedEvidenceRegionId: this.selectedEvidenceRegionId,
|
|
@@ -1556,13 +1556,36 @@ pages: EmbedPDF already mounts only six to seven pages behind its Shadow DOM
|
|
|
1556
1556
|
boundary, while CSS containment cannot cancel PDFium tasks or release bitmap
|
|
1557
1557
|
memory.
|
|
1558
1558
|
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1559
|
+
The first PDF-workbench slice adds a second lazy Worker boundary for page
|
|
1560
|
+
organization. The UI sends bounded source bytes plus a typed insert, delete,
|
|
1561
|
+
rotate, reorder, merge, extract, or split plan to `pdf-lib`; it never moves a
|
|
1562
|
+
`PDFDocument` or page object across threads. A source mutation transfers one
|
|
1563
|
+
result byte array back, replaces the viewer's complete Blob, reopens it in
|
|
1564
|
+
PDFium, and records the before/after Blob pair as one Undo entry. Exports return
|
|
1565
|
+
typed files without changing the source or history. The toolbar consumes
|
|
1566
|
+
PDFium annotation/form history before this page history, so one user intent
|
|
1567
|
+
never spans both stacks. Primary sources are capped at 256 MiB, merge inputs at
|
|
1568
|
+
128 MiB, and each result at 4,096 pages.
|
|
1569
|
+
|
|
1570
|
+
The rewrite boundary is fail closed. Malformed, encrypted, or signed sources
|
|
1571
|
+
cannot be mutated. Delete, reorder, and merge additionally reject forms,
|
|
1572
|
+
outlines, and tagged structure because their catalog references cannot yet be
|
|
1573
|
+
rewritten safely. Extract and split can copy page ranges while returning an
|
|
1574
|
+
explicit diagnostic for omitted document-level objects. Collaboration and
|
|
1575
|
+
evidence-overlay sessions hide page organization because both attach stable
|
|
1576
|
+
records to immutable source-page identities. `onPageExport` is the typed host
|
|
1577
|
+
port for derived files; `onSave` remains the only persistence port for the
|
|
1578
|
+
mutated source.
|
|
1562
1579
|
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1580
|
+
Existing PDF password handling remains in the PDF document lifecycle rather
|
|
1581
|
+
than the removed toolbar. Form-authoring controls, redaction review,
|
|
1582
|
+
document-level catalog rewriting, and broader compatibility fixtures remain
|
|
1583
|
+
part of this stage.
|
|
1584
|
+
|
|
1585
|
+
Exit criteria: annotations, form changes, and page mutations survive PDFium and
|
|
1586
|
+
independent-parser reopen; destructive redaction requires an explicit review
|
|
1587
|
+
step; large documents render a bounded page window rather than the complete
|
|
1588
|
+
file.
|
|
1566
1589
|
|
|
1567
1590
|
### Stage 6: loss-preserving Office persistence
|
|
1568
1591
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a3s-lab/office",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Open-source collaborative browser editors for documents, Markdown, spreadsheets, presentations, and PDFs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"office",
|
|
@@ -114,6 +114,8 @@
|
|
|
114
114
|
"playground:visual:spreadsheet-rich-text": "playwright test visual-tests/spreadsheet-rich-text.functional.spec.ts --config playwright.config.ts",
|
|
115
115
|
"playground:visual:spreadsheet-underline": "playwright test visual-tests/spreadsheet-underline.functional.spec.ts --config playwright.config.ts",
|
|
116
116
|
"playground:visual:spreadsheet-table": "playwright test visual-tests/spreadsheet-table.functional.spec.ts --config playwright.config.ts",
|
|
117
|
+
"playground:visual:presentation-animation": "playwright test visual-tests/presentation-animation.functional.spec.ts --config playwright.config.ts",
|
|
118
|
+
"playground:visual:pdf-page-organization": "playwright test visual-tests/pdf-page-organization.functional.spec.ts --config playwright.config.ts",
|
|
117
119
|
"playground:visual:update": "playwright test --config playwright.config.ts --update-snapshots",
|
|
118
120
|
"performance:fixtures": "bun .a3s-test/performance/generate-fixtures.ts",
|
|
119
121
|
"performance:large-document-edits": "bun .a3s-test/performance/generate-fixtures.ts --documents-only && bun .a3s-test/performance/benchmark-document-edit.ts http://127.0.0.1:4175/ 3",
|
|
@@ -130,6 +132,10 @@
|
|
|
130
132
|
"test:e2e:large-documents:check": "a3s-test check tests/e2e/word-large-document-windowing.acl --json",
|
|
131
133
|
"test:e2e:large-pdf": "bun .a3s-test/performance/generate-fixtures.ts --pdf-only && a3s-test run tests/e2e/pdf-large-windowing.acl --json",
|
|
132
134
|
"test:e2e:large-pdf:check": "a3s-test check tests/e2e/pdf-large-windowing.acl --json",
|
|
135
|
+
"test:e2e:pdf-page-organization": "bun run test:e2e:fixtures && A3S_TEST_SUITE=tests/e2e/pdf-page-organization.acl bash scripts/run-a3s-test-web-gate.sh",
|
|
136
|
+
"test:e2e:pdf-page-organization:check": "a3s-test check tests/e2e/pdf-page-organization.acl --json",
|
|
137
|
+
"test:e2e:presentation-animation": "A3S_TEST_SUITE=tests/e2e/presentation-animation.acl bash scripts/run-a3s-test-web-gate.sh",
|
|
138
|
+
"test:e2e:presentation-animation:check": "a3s-test check tests/e2e/presentation-animation.acl --json",
|
|
133
139
|
"test:e2e:large-presentation": "bun .a3s-test/performance/generate-fixtures.ts --presentations-only && a3s-test run tests/e2e/presentation-large-windowing.acl --json",
|
|
134
140
|
"test:e2e:large-presentation:check": "a3s-test check tests/e2e/presentation-large-windowing.acl --json",
|
|
135
141
|
"test:e2e:initial-focus": "a3s-test run tests/e2e/office-editor-initial-focus.acl --json",
|
|
@@ -284,6 +290,7 @@
|
|
|
284
290
|
"jszip": "^3.10.1",
|
|
285
291
|
"lucide-react": "^0.544.0",
|
|
286
292
|
"mammoth": "^1.12.0",
|
|
293
|
+
"pdf-lib": "1.17.1",
|
|
287
294
|
"pptxgenjs": "^4.0.1",
|
|
288
295
|
"xlsx": "^0.18.5",
|
|
289
296
|
"y-protocols": "1.0.7",
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
const CARDINAL_DIRECTIONS = new Set([
|
|
2
|
-
'left',
|
|
3
|
-
'right',
|
|
4
|
-
'up',
|
|
5
|
-
'down'
|
|
6
|
-
]);
|
|
7
|
-
const SPLIT_DIRECTIONS = new Set([
|
|
8
|
-
'in',
|
|
9
|
-
'out'
|
|
10
|
-
]);
|
|
11
|
-
function createWorkSlideTransition(type, previous) {
|
|
12
|
-
const common = {
|
|
13
|
-
type,
|
|
14
|
-
speed: previous?.speed ?? 'medium',
|
|
15
|
-
advanceOnClick: previous?.advanceOnClick ?? true,
|
|
16
|
-
advanceAfterMs: previous?.advanceAfterMs
|
|
17
|
-
};
|
|
18
|
-
if ('push' === type || 'wipe' === type) return {
|
|
19
|
-
...common,
|
|
20
|
-
direction: previous?.direction && CARDINAL_DIRECTIONS.has(previous.direction) ? previous.direction : 'left'
|
|
21
|
-
};
|
|
22
|
-
if ('split' === type) return {
|
|
23
|
-
...common,
|
|
24
|
-
direction: previous?.direction && SPLIT_DIRECTIONS.has(previous.direction) ? previous.direction : 'out',
|
|
25
|
-
orientation: previous?.orientation ?? 'horizontal'
|
|
26
|
-
};
|
|
27
|
-
return common;
|
|
28
|
-
}
|
|
29
|
-
function slideTransitionDurationMilliseconds(transition) {
|
|
30
|
-
if (transition?.speed === 'fast') return 500;
|
|
31
|
-
if (transition?.speed === 'slow') return 2000;
|
|
32
|
-
return 1000;
|
|
33
|
-
}
|
|
34
|
-
function workSlideTransitionsEqual(left, right) {
|
|
35
|
-
if (!left || !right) return left === right;
|
|
36
|
-
return left.type === right.type && left.speed === right.speed && left.direction === right.direction && left.orientation === right.orientation && left.advanceOnClick === right.advanceOnClick && left.advanceAfterMs === right.advanceAfterMs;
|
|
37
|
-
}
|
|
38
|
-
export { createWorkSlideTransition, slideTransitionDurationMilliseconds, workSlideTransitionsEqual };
|