@a3s-lab/office 0.37.0 → 0.37.2

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 (59) hide show
  1. package/README.md +282 -1544
  2. package/dist/0~3557.js +2 -1
  3. package/dist/0~3635.js +4 -1
  4. package/dist/0~9073.js +9 -4
  5. package/dist/0~controlled-editor-composition.js +54 -0
  6. package/dist/0~document-editor.js +60 -10
  7. package/dist/0~markdown-editor.js +62 -21
  8. package/dist/0~presentation-editor.js +83 -21
  9. package/dist/0~spreadsheet-editor.js +17010 -13958
  10. package/dist/{3266.js → 5416.js} +1139 -15
  11. package/dist/9333.js +1 -1
  12. package/dist/core.d.ts +1 -0
  13. package/dist/core.js +112 -26
  14. package/dist/index.js +1 -1
  15. package/dist/internal/features/work/editors/controlled-editor-composition.d.ts +20 -0
  16. package/dist/internal/features/work/editors/office-shortcuts.d.ts +1 -0
  17. package/dist/internal/features/work/editors/spreadsheet-auto-filter-command.d.ts +3 -0
  18. package/dist/internal/features/work/editors/spreadsheet-auto-filter-condition-dialog-model.d.ts +27 -0
  19. package/dist/internal/features/work/editors/spreadsheet-auto-filter-condition-dialog.d.ts +17 -0
  20. package/dist/internal/features/work/editors/spreadsheet-auto-filter-menu.d.ts +10 -0
  21. package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +16 -4
  22. package/dist/internal/features/work/editors/spreadsheet-cell-range.d.ts +1 -0
  23. package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +9 -0
  24. package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +13 -1
  25. package/dist/internal/features/work/editors/spreadsheet-current-region.d.ts +12 -0
  26. package/dist/internal/features/work/editors/spreadsheet-editor-support.d.ts +1 -0
  27. package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +5 -1
  28. package/dist/internal/features/work/editors/spreadsheet-sort-appearance.d.ts +45 -0
  29. package/dist/internal/features/work/editors/spreadsheet-sort-collation.d.ts +8 -0
  30. package/dist/internal/features/work/editors/spreadsheet-sort-command.d.ts +3 -0
  31. package/dist/internal/features/work/editors/spreadsheet-sort-custom-list-editor.d.ts +8 -0
  32. package/dist/internal/features/work/editors/spreadsheet-sort-custom-list-store.d.ts +13 -0
  33. package/dist/internal/features/work/editors/spreadsheet-sort-custom-list.d.ts +26 -0
  34. package/dist/internal/features/work/editors/spreadsheet-sort-dialog.d.ts +9 -0
  35. package/dist/internal/features/work/editors/spreadsheet-sort-matrix.d.ts +4 -0
  36. package/dist/internal/features/work/editors/spreadsheet-sort-options-dialog.d.ts +7 -0
  37. package/dist/internal/features/work/editors/spreadsheet-sort-order-controls.d.ts +16 -0
  38. package/dist/internal/features/work/editors/spreadsheet-sort-range-dialog.d.ts +7 -0
  39. package/dist/internal/features/work/editors/spreadsheet-sort.d.ts +138 -0
  40. package/dist/internal/features/work/editors/use-document-review-conflicts.d.ts +3 -1
  41. package/dist/internal/features/work/editors/use-spreadsheet-auto-filter.d.ts +12 -3
  42. package/dist/internal/features/work/editors/use-spreadsheet-sort.d.ts +26 -0
  43. package/dist/internal/features/work/editors/work-office-chrome.d.ts +3 -0
  44. package/dist/internal/features/work/work-spreadsheet-auto-filter.d.ts +14 -0
  45. package/dist/internal/features/work/work-spreadsheet-dynamic-filter.d.ts +7 -0
  46. package/dist/internal/features/work/work-spreadsheet-filter-contract.d.ts +3 -0
  47. package/dist/internal/features/work/work-spreadsheet-wildcard.d.ts +7 -0
  48. package/dist/internal/features/work/work-types.d.ts +31 -7
  49. package/dist/internal/features/work/work-xlsx-interop.d.ts +2 -1
  50. package/dist/internal/features/work/work-xlsx-table-filters.d.ts +3 -1
  51. package/dist/office-kernel.wasm +0 -0
  52. package/dist/styles.css +544 -20
  53. package/dist/vue.d.ts +3 -1
  54. package/dist/vue.js +2 -0
  55. package/dist/web-component.d.ts +3 -1
  56. package/dist/web-component.js +9 -0
  57. package/dist/work-spreadsheet-package-scan.worker.js +2 -1
  58. package/docs/latest/en/browser-editor-architecture.md +144 -0
  59. package/package.json +22 -1
package/dist/styles.css CHANGED
@@ -5629,58 +5629,106 @@ html[data-ds-resizing="horizontal"], html[data-ds-resizing="horizontal"] * {
5629
5629
 
5630
5630
  .work-office-file-popover {
5631
5631
  z-index: 80;
5632
- border: 1px solid var(--a3s-line);
5633
- background: var(--a3s-panel);
5634
- border-radius: 10px;
5635
- width: 224px;
5636
- padding: 6px;
5632
+ border: 1px solid var(--a3s-overlay-border, var(--a3s-line));
5633
+ background: var(--a3s-overlay-surface, var(--a3s-panel));
5634
+ width: min(280px, 100vw - 16px);
5635
+ max-height: calc(100dvh - 16px);
5636
+ box-shadow: var(--a3s-shadow-soft, 0 16px 42px #121a2b33);
5637
+ overscroll-behavior: contain;
5638
+ backdrop-filter: blur(18px);
5639
+ border-radius: 12px;
5640
+ gap: 2px;
5641
+ padding: 8px;
5637
5642
  display: grid;
5638
5643
  position: absolute;
5639
5644
  top: 34px;
5640
5645
  left: 0;
5641
- box-shadow: 0 14px 36px #121a2b2e;
5646
+ overflow: auto;
5642
5647
  }
5643
5648
 
5644
5649
  .work-office-file-popover > button {
5645
5650
  width: 100%;
5646
- height: 36px;
5651
+ min-height: 40px;
5647
5652
  color: var(--a3s-ink);
5648
5653
  font: inherit;
5649
5654
  text-align: left;
5650
5655
  cursor: pointer;
5651
5656
  background: none;
5652
5657
  border: 0;
5653
- border-radius: 7px;
5654
- grid-template-columns: 24px minmax(0, 1fr) auto;
5658
+ border-radius: 8px;
5659
+ grid-template-columns: 28px minmax(0, 1fr) auto;
5655
5660
  align-items: center;
5656
- gap: 8px;
5657
- padding: 0 9px;
5658
- font-size: 11px;
5661
+ gap: 10px;
5662
+ padding: 6px 10px;
5663
+ font-size: 12px;
5664
+ line-height: 1.35;
5659
5665
  display: grid;
5660
5666
  }
5661
5667
 
5662
5668
  .work-office-file-popover > button:hover:not(:disabled), .work-office-file-popover > button:focus-visible {
5663
- background: var(--a3s-panel-soft);
5664
- outline: 0;
5669
+ background: color-mix(in srgb,
5670
+ var(--work-office-accent, var(--a3s-blue)) 8%,
5671
+ var(--a3s-panel));
5672
+ }
5673
+
5674
+ .work-office-file-popover > button:focus-visible {
5675
+ outline: 2px solid
5676
+ color-mix(in srgb,
5677
+ var(--work-office-accent, var(--a3s-blue)) 52%,
5678
+ var(--a3s-line));
5679
+ outline-offset: -2px;
5665
5680
  }
5666
5681
 
5667
5682
  .work-office-file-popover > button:disabled {
5668
- cursor: default;
5669
- opacity: .42;
5683
+ color: var(--a3s-faint);
5684
+ cursor: not-allowed;
5685
+ opacity: 1;
5670
5686
  }
5671
5687
 
5672
5688
  .work-office-file-action-icon {
5673
- width: 24px;
5674
- height: 24px;
5689
+ background: color-mix(in srgb,
5690
+ var(--work-office-accent, var(--a3s-blue)) 8%,
5691
+ transparent);
5692
+ width: 28px;
5693
+ height: 28px;
5675
5694
  color: var(--work-office-accent, var(--a3s-blue));
5676
- border-radius: 6px;
5695
+ border-radius: 7px;
5677
5696
  place-items: center;
5678
5697
  display: grid;
5679
5698
  }
5680
5699
 
5700
+ .work-office-file-action-icon > svg {
5701
+ width: 16px;
5702
+ height: 16px;
5703
+ }
5704
+
5705
+ .work-office-file-action-label {
5706
+ overflow-wrap: anywhere;
5707
+ min-width: 0;
5708
+ }
5709
+
5710
+ .work-office-file-popover > button:disabled .work-office-file-action-icon {
5711
+ background: color-mix(in srgb, var(--a3s-faint) 8%, transparent);
5712
+ color: var(--a3s-faint);
5713
+ }
5714
+
5715
+ .work-office-file-popover > button.danger:not(:disabled) {
5716
+ color: var(--a3s-red);
5717
+ }
5718
+
5719
+ .work-office-file-popover > button.danger:not(:disabled) .work-office-file-action-icon {
5720
+ background: color-mix(in srgb, var(--a3s-red) 9%, transparent);
5721
+ color: currentColor;
5722
+ }
5723
+
5724
+ .work-office-file-popover > button.danger:hover:not(:disabled), .work-office-file-popover > button.danger:focus-visible {
5725
+ background: color-mix(in srgb, var(--a3s-red) 8%, var(--a3s-panel));
5726
+ }
5727
+
5681
5728
  .work-office-file-popover kbd {
5682
5729
  color: var(--a3s-faint);
5683
5730
  font: inherit;
5731
+ white-space: nowrap;
5684
5732
  font-size: 9px;
5685
5733
  }
5686
5734
 
@@ -5688,7 +5736,14 @@ html[data-ds-resizing="horizontal"], html[data-ds-resizing="horizontal"] * {
5688
5736
  background: var(--a3s-line);
5689
5737
  border: 0;
5690
5738
  height: 1px;
5691
- margin: 5px 7px;
5739
+ margin: 6px 8px;
5740
+ }
5741
+
5742
+ @media (width <= 640px) {
5743
+ .work-office-file-popover > button {
5744
+ min-height: 44px;
5745
+ padding-block: 8px;
5746
+ }
5692
5747
  }
5693
5748
 
5694
5749
  .work-office-ribbon-panel {
@@ -6286,6 +6341,24 @@ button.work-office-collaboration-participant:hover .work-office-collaboration-lo
6286
6341
  }
6287
6342
 
6288
6343
  @media (forced-colors: active) {
6344
+ .work-office-file-popover {
6345
+ backdrop-filter: none;
6346
+ background: canvas;
6347
+ border-color: canvastext;
6348
+ }
6349
+
6350
+ .work-office-file-action-icon {
6351
+ background: none;
6352
+ }
6353
+
6354
+ .work-office-file-popover > button:focus-visible {
6355
+ outline-color: highlight;
6356
+ }
6357
+
6358
+ .work-office-file-popover > button.danger:not(:disabled) {
6359
+ color: linktext;
6360
+ }
6361
+
6289
6362
  .work-office-collaboration-avatar, .work-office-collaboration-overflow {
6290
6363
  color: highlighttext;
6291
6364
  background: highlight;
@@ -17898,6 +17971,457 @@ sub [data-office-character-position-half-points], sup [data-office-character-pos
17898
17971
  }
17899
17972
  }
17900
17973
 
17974
+ .work-spreadsheet-auto-filter-dialog {
17975
+ --work-office-control-accent: var(--work-spreadsheet-accent, #159469);
17976
+ width: min(560px, 100%);
17977
+ }
17978
+
17979
+ .work-spreadsheet-auto-filter-form {
17980
+ gap: 16px;
17981
+ display: grid;
17982
+ }
17983
+
17984
+ .work-spreadsheet-auto-filter-values {
17985
+ grid-template-columns: repeat(2, minmax(0, 1fr));
17986
+ gap: 12px;
17987
+ display: grid;
17988
+ }
17989
+
17990
+ .work-spreadsheet-auto-filter-values > :only-child {
17991
+ grid-column: 1 / -1;
17992
+ }
17993
+
17994
+ .work-spreadsheet-auto-filter-add-condition, .work-spreadsheet-auto-filter-remove-condition {
17995
+ justify-self: start;
17996
+ }
17997
+
17998
+ .work-spreadsheet-auto-filter-compound {
17999
+ border-top: 1px solid var(--work-office-border, #d9dedb);
18000
+ gap: 12px;
18001
+ padding-top: 4px;
18002
+ display: grid;
18003
+ }
18004
+
18005
+ .work-spreadsheet-auto-filter-conjunction {
18006
+ border: 0;
18007
+ flex-wrap: wrap;
18008
+ gap: 8px 20px;
18009
+ margin: 0;
18010
+ padding: 12px 0 0;
18011
+ display: flex;
18012
+ }
18013
+
18014
+ .work-spreadsheet-auto-filter-conjunction legend {
18015
+ width: 100%;
18016
+ color: var(--work-office-text-muted, #5b655f);
18017
+ font-size: 12px;
18018
+ font-weight: 600;
18019
+ }
18020
+
18021
+ .work-spreadsheet-auto-filter-conjunction label {
18022
+ align-items: center;
18023
+ gap: 7px;
18024
+ display: inline-flex;
18025
+ }
18026
+
18027
+ .work-spreadsheet-auto-filter-second-condition {
18028
+ grid-template-columns: repeat(2, minmax(0, 1fr));
18029
+ gap: 12px;
18030
+ display: grid;
18031
+ }
18032
+
18033
+ .work-spreadsheet-auto-filter-clear {
18034
+ margin-right: auto;
18035
+ }
18036
+
18037
+ @media (width <= 520px) {
18038
+ .work-spreadsheet-auto-filter-values, .work-spreadsheet-auto-filter-second-condition {
18039
+ grid-template-columns: minmax(0, 1fr);
18040
+ }
18041
+
18042
+ .work-spreadsheet-auto-filter-values > :only-child {
18043
+ grid-column: auto;
18044
+ }
18045
+ }
18046
+
18047
+ .work-spreadsheet-sort-options-dialog {
18048
+ inline-size: min(420px, 100vw - 32px);
18049
+ }
18050
+
18051
+ .work-spreadsheet-sort-options-form {
18052
+ gap: 16px;
18053
+ display: grid;
18054
+ }
18055
+
18056
+ .work-spreadsheet-sort-options {
18057
+ border: 0;
18058
+ gap: 8px;
18059
+ margin: 0;
18060
+ padding: 0;
18061
+ display: grid;
18062
+ }
18063
+
18064
+ .work-spreadsheet-sort-options legend {
18065
+ color: var(--a3s-muted);
18066
+ margin-block-end: 8px;
18067
+ font-size: 12px;
18068
+ font-weight: 700;
18069
+ }
18070
+
18071
+ .work-spreadsheet-sort-options > label {
18072
+ border: 1px solid var(--a3s-line);
18073
+ cursor: pointer;
18074
+ border-radius: 8px;
18075
+ grid-template-columns: auto minmax(0, 1fr);
18076
+ align-items: start;
18077
+ gap: 10px;
18078
+ padding: 10px 12px;
18079
+ display: grid;
18080
+ }
18081
+
18082
+ .work-spreadsheet-sort-options > label:has(input:checked) {
18083
+ border-color: var(--work-spreadsheet-accent, #159469);
18084
+ background: color-mix(in srgb,
18085
+ var(--work-spreadsheet-accent, #159469) 10%,
18086
+ var(--a3s-panel));
18087
+ }
18088
+
18089
+ .work-spreadsheet-sort-options input {
18090
+ accent-color: var(--work-spreadsheet-accent, #159469);
18091
+ margin-block-start: 3px;
18092
+ }
18093
+
18094
+ .work-spreadsheet-sort-options label > span {
18095
+ gap: 3px;
18096
+ display: grid;
18097
+ }
18098
+
18099
+ .work-spreadsheet-sort-options small {
18100
+ color: var(--a3s-muted);
18101
+ line-height: 1.4;
18102
+ }
18103
+
18104
+ .work-spreadsheet-sort-dialog {
18105
+ --work-office-control-accent: var(--work-spreadsheet-accent, #159469);
18106
+ width: min(820px, 100%);
18107
+ }
18108
+
18109
+ .work-spreadsheet-sort-dialog form {
18110
+ gap: 14px;
18111
+ display: grid;
18112
+ }
18113
+
18114
+ .work-spreadsheet-sort-toolbar {
18115
+ justify-content: space-between;
18116
+ align-items: center;
18117
+ gap: 10px;
18118
+ display: flex;
18119
+ }
18120
+
18121
+ .work-spreadsheet-sort-toolbar .ds-button {
18122
+ gap: 6px;
18123
+ }
18124
+
18125
+ .work-spreadsheet-sort-toolbar .work-office-checkbox {
18126
+ min-height: 34px;
18127
+ padding: 6px 9px;
18128
+ }
18129
+
18130
+ .work-spreadsheet-sort-levels {
18131
+ gap: 9px;
18132
+ max-height: min(430px, 52vh);
18133
+ padding: 1px 3px 1px 1px;
18134
+ display: grid;
18135
+ overflow: auto;
18136
+ }
18137
+
18138
+ .work-spreadsheet-sort-level {
18139
+ border: 1px solid var(--a3s-line);
18140
+ background: var(--a3s-panel-soft);
18141
+ border-radius: 8px;
18142
+ grid-template-columns: minmax(140px, .7fr) minmax(370px, 1.8fr) auto;
18143
+ align-items: end;
18144
+ gap: 9px;
18145
+ min-width: 0;
18146
+ padding: 10px;
18147
+ display: grid;
18148
+ }
18149
+
18150
+ .work-spreadsheet-sort-level legend {
18151
+ color: var(--work-spreadsheet-accent, #159469);
18152
+ padding: 0 5px;
18153
+ font-size: 10px;
18154
+ font-weight: 700;
18155
+ }
18156
+
18157
+ .work-spreadsheet-sort-level > label, .work-spreadsheet-sort-order-controls > label {
18158
+ gap: 4px;
18159
+ min-width: 0;
18160
+ display: grid;
18161
+ }
18162
+
18163
+ .work-spreadsheet-sort-level > label > span, .work-spreadsheet-sort-order-controls > label > span {
18164
+ color: var(--a3s-muted);
18165
+ font-size: 9px;
18166
+ }
18167
+
18168
+ .work-spreadsheet-sort-order-controls {
18169
+ grid-template-columns: minmax(110px, .75fr) minmax(170px, 1.25fr);
18170
+ align-items: end;
18171
+ gap: 9px;
18172
+ min-width: 0;
18173
+ display: grid;
18174
+ }
18175
+
18176
+ .work-spreadsheet-sort-order-controls[data-appearance="true"] {
18177
+ grid-template-columns: minmax(105px, .75fr) minmax(155px, 1.25fr) minmax(92px, .65fr);
18178
+ }
18179
+
18180
+ .work-spreadsheet-sort-appearance-preview {
18181
+ min-width: 0;
18182
+ color: var(--a3s-muted);
18183
+ grid-column: 1 / -1;
18184
+ align-items: center;
18185
+ gap: 6px;
18186
+ font-size: 9px;
18187
+ line-height: 1.4;
18188
+ display: flex;
18189
+ }
18190
+
18191
+ .work-spreadsheet-sort-appearance-preview > span:last-child {
18192
+ text-overflow: ellipsis;
18193
+ white-space: nowrap;
18194
+ overflow: hidden;
18195
+ }
18196
+
18197
+ .work-spreadsheet-sort-color-swatch {
18198
+ box-sizing: border-box;
18199
+ border: 1px solid var(--a3s-line-strong);
18200
+ border-radius: 3px;
18201
+ flex: 0 0 14px;
18202
+ width: 14px;
18203
+ height: 14px;
18204
+ display: inline-block;
18205
+ }
18206
+
18207
+ .work-spreadsheet-sort-color-swatch[data-empty="true"] {
18208
+ background: linear-gradient(135deg,
18209
+ transparent 43%,
18210
+ var(--a3s-danger, #b42318) 44%,
18211
+ var(--a3s-danger, #b42318) 56%,
18212
+ transparent 57%),
18213
+ var(--a3s-panel);
18214
+ }
18215
+
18216
+ .work-spreadsheet-sort-level select {
18217
+ box-sizing: border-box;
18218
+ border: 1px solid var(--a3s-line-strong);
18219
+ background: var(--a3s-panel);
18220
+ width: 100%;
18221
+ min-width: 0;
18222
+ height: 32px;
18223
+ color: var(--a3s-ink);
18224
+ border-radius: 5px;
18225
+ padding: 0 8px;
18226
+ font-size: 11px;
18227
+ }
18228
+
18229
+ .work-spreadsheet-sort-level-actions {
18230
+ gap: 4px;
18231
+ display: flex;
18232
+ }
18233
+
18234
+ .work-spreadsheet-sort-level-actions .ds-button {
18235
+ width: 32px;
18236
+ min-width: 32px;
18237
+ height: 32px;
18238
+ padding: 0;
18239
+ }
18240
+
18241
+ .work-spreadsheet-sort-custom-list-editor, .work-spreadsheet-sort-custom-list-preview {
18242
+ grid-column: 1 / -1;
18243
+ min-width: 0;
18244
+ padding-top: 1px;
18245
+ }
18246
+
18247
+ .work-spreadsheet-sort-custom-list-editor {
18248
+ gap: 6px;
18249
+ display: grid;
18250
+ }
18251
+
18252
+ .work-spreadsheet-sort-custom-list-editor > label {
18253
+ gap: 4px;
18254
+ display: grid;
18255
+ }
18256
+
18257
+ .work-spreadsheet-sort-custom-list-editor > label > span, .work-spreadsheet-sort-custom-list-editor > p {
18258
+ color: var(--a3s-muted);
18259
+ margin: 0;
18260
+ font-size: 9px;
18261
+ line-height: 1.45;
18262
+ }
18263
+
18264
+ .work-spreadsheet-sort-custom-list-editor textarea {
18265
+ box-sizing: border-box;
18266
+ resize: vertical;
18267
+ border: 1px solid var(--a3s-line-strong);
18268
+ background: var(--a3s-panel);
18269
+ width: 100%;
18270
+ min-height: 88px;
18271
+ color: var(--a3s-ink);
18272
+ font: inherit;
18273
+ border-radius: 5px;
18274
+ padding: 7px 8px;
18275
+ font-size: 11px;
18276
+ line-height: 1.45;
18277
+ }
18278
+
18279
+ .work-spreadsheet-sort-custom-list-editor textarea:focus-visible {
18280
+ border-color: var(--work-spreadsheet-accent, #159469);
18281
+ outline: 2px solid
18282
+ color-mix(in srgb, var(--work-spreadsheet-accent, #159469) 24%, transparent);
18283
+ outline-offset: 1px;
18284
+ }
18285
+
18286
+ .work-spreadsheet-sort-custom-list-editor > .work-spreadsheet-sort-custom-list-error {
18287
+ color: var(--a3s-danger, #b42318);
18288
+ }
18289
+
18290
+ .work-spreadsheet-sort-custom-list-actions, .work-spreadsheet-sort-custom-list-preview {
18291
+ align-items: center;
18292
+ gap: 7px;
18293
+ display: flex;
18294
+ }
18295
+
18296
+ .work-spreadsheet-sort-custom-list-actions {
18297
+ justify-content: flex-end;
18298
+ }
18299
+
18300
+ .work-spreadsheet-sort-custom-list-preview code {
18301
+ min-width: 0;
18302
+ color: var(--work-spreadsheet-accent, #159469);
18303
+ text-overflow: ellipsis;
18304
+ white-space: nowrap;
18305
+ flex: 1;
18306
+ font-size: 10px;
18307
+ overflow: hidden;
18308
+ }
18309
+
18310
+ .work-spreadsheet-sort-note {
18311
+ color: var(--a3s-muted);
18312
+ margin: 0;
18313
+ font-size: 10px;
18314
+ line-height: 1.45;
18315
+ }
18316
+
18317
+ .work-spreadsheet-sort-range-dialog {
18318
+ --work-office-control-accent: var(--work-spreadsheet-accent, #159469);
18319
+ width: min(500px, 100%);
18320
+ }
18321
+
18322
+ .work-spreadsheet-sort-range-options {
18323
+ border: 0;
18324
+ gap: 9px;
18325
+ margin: 0;
18326
+ padding: 0;
18327
+ display: grid;
18328
+ }
18329
+
18330
+ .work-spreadsheet-sort-range-options legend {
18331
+ color: var(--a3s-muted);
18332
+ margin-bottom: 8px;
18333
+ font-size: 10px;
18334
+ font-weight: 650;
18335
+ }
18336
+
18337
+ .work-spreadsheet-sort-range-options > label {
18338
+ border: 1px solid var(--a3s-line);
18339
+ background: var(--a3s-panel-soft);
18340
+ cursor: pointer;
18341
+ border-radius: 8px;
18342
+ grid-template-columns: auto minmax(0, 1fr);
18343
+ align-items: start;
18344
+ gap: 10px;
18345
+ padding: 11px;
18346
+ display: grid;
18347
+ }
18348
+
18349
+ .work-spreadsheet-sort-range-options > label:has(input:checked) {
18350
+ border-color: var(--work-spreadsheet-accent, #159469);
18351
+ box-shadow: 0 0 0 1px
18352
+ color-mix(in srgb, var(--work-spreadsheet-accent, #159469) 22%, transparent);
18353
+ }
18354
+
18355
+ .work-spreadsheet-sort-range-options > label:has(input:disabled) {
18356
+ cursor: not-allowed;
18357
+ opacity: .55;
18358
+ }
18359
+
18360
+ .work-spreadsheet-sort-range-options input {
18361
+ accent-color: var(--work-spreadsheet-accent, #159469);
18362
+ margin: 2px 0 0;
18363
+ }
18364
+
18365
+ .work-spreadsheet-sort-range-options label > span {
18366
+ gap: 3px;
18367
+ min-width: 0;
18368
+ display: grid;
18369
+ }
18370
+
18371
+ .work-spreadsheet-sort-range-options strong {
18372
+ color: var(--a3s-ink);
18373
+ font-size: 11px;
18374
+ }
18375
+
18376
+ .work-spreadsheet-sort-range-options small {
18377
+ color: var(--a3s-muted);
18378
+ font-size: 10px;
18379
+ line-height: 1.45;
18380
+ }
18381
+
18382
+ .work-spreadsheet-sort-range-options code {
18383
+ width: fit-content;
18384
+ max-width: 100%;
18385
+ color: var(--work-spreadsheet-accent, #159469);
18386
+ text-overflow: ellipsis;
18387
+ white-space: nowrap;
18388
+ font-size: 10px;
18389
+ overflow: hidden;
18390
+ }
18391
+
18392
+ @media (width <= 700px) {
18393
+ .work-spreadsheet-sort-toolbar {
18394
+ flex-direction: column;
18395
+ align-items: stretch;
18396
+ }
18397
+
18398
+ .work-spreadsheet-sort-level {
18399
+ grid-template-columns: minmax(0, 1fr);
18400
+ }
18401
+
18402
+ .work-spreadsheet-sort-order-controls, .work-spreadsheet-sort-order-controls[data-appearance="true"] {
18403
+ grid-template-columns: repeat(2, minmax(0, 1fr));
18404
+ }
18405
+
18406
+ .work-spreadsheet-sort-order-controls[data-appearance="true"] > label:last-of-type {
18407
+ grid-column: 1 / -1;
18408
+ }
18409
+
18410
+ .work-spreadsheet-sort-level-actions {
18411
+ justify-content: flex-end;
18412
+ }
18413
+ }
18414
+
18415
+ @media (width <= 430px) {
18416
+ .work-spreadsheet-sort-order-controls, .work-spreadsheet-sort-order-controls[data-appearance="true"] {
18417
+ grid-template-columns: minmax(0, 1fr);
18418
+ }
18419
+
18420
+ .work-spreadsheet-sort-order-controls[data-appearance="true"] > label:last-of-type {
18421
+ grid-column: auto;
18422
+ }
18423
+ }
18424
+
17901
18425
  .work-spreadsheet-hyperlink-dialog {
17902
18426
  --work-office-control-accent: var(--work-spreadsheet-accent, #159469);
17903
18427
  width: min(610px, 100%);
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, PdfPageOrganizationExport, PresentationContent, SpreadsheetContent } from './core';
3
+ import type { DocumentContent, DocumentReviewConflictEvent, EditorAgentRequest, GetDocumentSelectionMenuItems, GetMarkdownSelectionMenuItems, MarkdownContent, OfficeCollaborationPresence, OfficeCollaborationSession, PdfCollaborationContent, PdfPageOrganizationExport, PresentationContent, SpreadsheetContent, SpreadsheetSortCustomListStore } 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<{
@@ -165,6 +165,7 @@ export declare const SpreadsheetEditor: import("vue").DefineComponent<import("vu
165
165
  type: BooleanConstructor;
166
166
  };
167
167
  saveStatus: StringConstructor;
168
+ sortCustomListStore: PropType<SpreadsheetSortCustomListStore>;
168
169
  theme: {
169
170
  readonly default: "system";
170
171
  readonly type: PropType<OfficeTheme>;
@@ -192,6 +193,7 @@ export declare const SpreadsheetEditor: import("vue").DefineComponent<import("vu
192
193
  type: BooleanConstructor;
193
194
  };
194
195
  saveStatus: StringConstructor;
196
+ sortCustomListStore: PropType<SpreadsheetSortCustomListStore>;
195
197
  theme: {
196
198
  readonly default: "system";
197
199
  readonly type: PropType<OfficeTheme>;
package/dist/vue.js CHANGED
@@ -152,6 +152,7 @@ const SpreadsheetEditor = defineComponent({
152
152
  type: Boolean
153
153
  },
154
154
  saveStatus: String,
155
+ sortCustomListStore: Object,
155
156
  theme: themeProp
156
157
  },
157
158
  emits: {
@@ -173,6 +174,7 @@ const SpreadsheetEditor = defineComponent({
173
174
  },
174
175
  preview: props.preview,
175
176
  saveStatus: props.saveStatus,
177
+ sortCustomListStore: props.sortCustomListStore,
176
178
  theme: props.theme
177
179
  }));
178
180
  }
@@ -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, PdfPageOrganizationExport, PresentationContent, SpreadsheetContent } from './core';
3
+ import type { DocumentContent, EditorAgentRequest, GetDocumentSelectionMenuItems, GetMarkdownSelectionMenuItems, MarkdownContent, OfficeCollaborationPresence, OfficeCollaborationSession, PdfCollaborationContent, PdfPageOrganizationExport, PresentationContent, SpreadsheetContent, SpreadsheetSortCustomListStore } 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: {
@@ -68,6 +68,8 @@ export declare class A3SSpreadsheetEditorElement extends A3SContentEditorElement
68
68
  get collaboration(): OfficeCollaborationSession | undefined;
69
69
  set collaboration(value: OfficeCollaborationSession | undefined);
70
70
  set kernelWasmUrl(value: string | undefined);
71
+ get sortCustomListStore(): SpreadsheetSortCustomListStore | undefined;
72
+ set sortCustomListStore(value: SpreadsheetSortCustomListStore | undefined);
71
73
  protected editorNode(): ReactNode;
72
74
  }
73
75
  export declare class A3SPresentationEditorElement extends A3SContentEditorElement<PresentationContent> {
@@ -223,6 +223,7 @@ class A3SMarkdownEditorElement extends A3SContentEditorElement {
223
223
  }
224
224
  class A3SSpreadsheetEditorElement extends A3SContentEditorElement {
225
225
  #collaboration;
226
+ #sortCustomListStore;
226
227
  static get observedAttributes() {
227
228
  return [
228
229
  'kernel-wasm-url',
@@ -245,6 +246,13 @@ class A3SSpreadsheetEditorElement extends A3SContentEditorElement {
245
246
  if (void 0 === value) this.removeAttribute('kernel-wasm-url');
246
247
  else this.setAttribute('kernel-wasm-url', value);
247
248
  }
249
+ get sortCustomListStore() {
250
+ return this.#sortCustomListStore;
251
+ }
252
+ set sortCustomListStore(value) {
253
+ this.#sortCustomListStore = value;
254
+ this.requestRender();
255
+ }
248
256
  editorNode() {
249
257
  if (!this.content) return missingContent('spreadsheet', this.theme);
250
258
  return /*#__PURE__*/ createElement(SpreadsheetEditor, {
@@ -257,6 +265,7 @@ class A3SSpreadsheetEditorElement extends A3SContentEditorElement {
257
265
  onChange: (content)=>this.changeContent(content),
258
266
  preview: this.preview,
259
267
  saveStatus: this.saveStatus,
268
+ sortCustomListStore: this.sortCustomListStore,
260
269
  theme: this.theme
261
270
  });
262
271
  }