ooxml-ui 1.18.2 → 1.19.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.
Files changed (75) hide show
  1. package/README.md +54 -0
  2. package/dist/building-block-styles.d.ts +5 -0
  3. package/dist/building-block-styles.d.ts.map +1 -0
  4. package/dist/chunk-6Y7KR2I3.js +299 -0
  5. package/dist/{chunk-EVL7GFC7.js → chunk-KH2ZG3N6.js} +2 -2
  6. package/dist/{chunk-MSXUCINT.js → chunk-QEIGB73C.js} +1 -1
  7. package/dist/docx/building-blocks.d.ts +31 -0
  8. package/dist/docx/component.d.ts +1 -1
  9. package/dist/docx/editor-core.d.ts +3 -0
  10. package/dist/docx/element-api.d.ts +8 -0
  11. package/dist/docx/index.d.ts +1 -0
  12. package/dist/docx/styles/index.d.ts +0 -4
  13. package/dist/docx.js +154 -38
  14. package/dist/index.js +3 -3
  15. package/dist/pptx/chunk-NDAE3JFO.cjs +1014 -0
  16. package/dist/pptx/{chunk-AUCJIB3M.mjs → chunk-NLUVYOKN.mjs} +113 -381
  17. package/dist/pptx/{chunk-S2Y3VUNC.cjs → chunk-OQQQ2GBW.cjs} +134 -402
  18. package/dist/pptx/chunk-UTFFX4M7.mjs +989 -0
  19. package/dist/pptx/dom/index.cjs +205 -205
  20. package/dist/pptx/dom/index.mjs +3 -3
  21. package/dist/pptx/index.cjs +2888 -2880
  22. package/dist/pptx/index.mjs +2 -2
  23. package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
  24. package/dist/pptx/theme/index.cjs +24 -16
  25. package/dist/pptx/theme/index.d.ts +1 -0
  26. package/dist/pptx/theme/index.d.ts.map +1 -1
  27. package/dist/pptx/theme/index.mjs +1 -1
  28. package/dist/pptx/theme/office-css.d.ts +6 -0
  29. package/dist/pptx/theme/office-css.d.ts.map +1 -0
  30. package/dist/pptx/web-components/chart-format-pane-styles.d.ts +1 -1
  31. package/dist/pptx/web-components/chart-format-pane-styles.d.ts.map +1 -1
  32. package/dist/pptx/web-components/control-styles.d.ts.map +1 -1
  33. package/dist/pptx/web-components/index.d.ts.map +1 -1
  34. package/dist/pptx/web-components/mobile-bar-styles.d.ts +2 -2
  35. package/dist/pptx/web-components/mobile-bar-styles.d.ts.map +1 -1
  36. package/dist/pptx/web-components/mobile-insert-styles.d.ts +1 -1
  37. package/dist/pptx/web-components/mobile-insert-styles.d.ts.map +1 -1
  38. package/dist/pptx/web-components/notes-toolbar-styles.d.ts +1 -1
  39. package/dist/pptx/web-components/notes-toolbar-styles.d.ts.map +1 -1
  40. package/dist/pptx/web-components/office-token-bridge.d.ts.map +1 -1
  41. package/dist/pptx/web-components/subtitle-settings-styles.d.ts +1 -1
  42. package/dist/pptx/web-components/subtitle-settings-styles.d.ts.map +1 -1
  43. package/dist/pptx/web-components/theme-editor-styles.d.ts +1 -1
  44. package/dist/pptx/web-components/theme-editor-styles.d.ts.map +1 -1
  45. package/dist/teams.js +2 -2
  46. package/dist/theme-bridge.d.ts +28 -0
  47. package/dist/theme-bridge.d.ts.map +1 -0
  48. package/dist/theme.d.ts +10 -3
  49. package/dist/theme.d.ts.map +1 -0
  50. package/dist/theme.js +1 -1
  51. package/dist/visio/building-blocks.d.ts +37 -0
  52. package/dist/visio/controller.d.ts +6 -0
  53. package/dist/visio/index.d.ts +1 -0
  54. package/dist/visio/styles/theme.d.ts +1 -1
  55. package/dist/visio/styles.d.ts +1 -1
  56. package/dist/visio/viewer-element.d.ts +2 -0
  57. package/dist/visio.js +7446 -7321
  58. package/dist/xlsx/building-blocks.d.ts +55 -0
  59. package/dist/xlsx/component.d.ts +3 -1
  60. package/dist/xlsx/dialogs/styles.d.ts +1 -1
  61. package/dist/xlsx/editor-core.d.ts +1 -0
  62. package/dist/xlsx/element-api.d.ts +6 -0
  63. package/dist/xlsx/formula-bar/styles.d.ts +1 -1
  64. package/dist/xlsx/grid/page-break-layer.d.ts +1 -1
  65. package/dist/xlsx/grid/styles.d.ts +1 -1
  66. package/dist/xlsx/index.d.ts +1 -0
  67. package/dist/xlsx/page-views/page-layout-css.d.ts +1 -1
  68. package/dist/xlsx/sheet-tabs/styles.d.ts +1 -1
  69. package/dist/xlsx/surface-shell.d.ts +3 -0
  70. package/dist/xlsx/theme/styles.d.ts +1 -4
  71. package/dist/xlsx.js +412 -268
  72. package/package.json +4 -4
  73. package/dist/chunk-7E3HU7RL.js +0 -123
  74. package/dist/pptx/chunk-BDXQX6RA.cjs +0 -373
  75. package/dist/pptx/chunk-ZAOD6O2D.mjs +0 -357
@@ -28,7 +28,7 @@ import { safeDataImageSrc, escapeHtml } from './chunk-IEAO7N4E.mjs';
28
28
  import { stopCaptureStream, segmentFrameCount, planVideoSegments, pickSupportedMimeType, fpsToFrameIntervalMs, WEBM_MIME_CANDIDATES } from './chunk-XAOEDYA5.mjs';
29
29
  import { upsert, triggerChangePatch, showDirectionPicker, setTriggerShapeId, setTrigger, setTimingCurve, setSequence, setRepeatMode, setRepeatCount, setDuration, setDirection, setDelay, setAnimationExit, setAnimationEntrance, setAnimationEmphasis, reorderAnimationUp, reorderAnimationTo, reorderAnimationDown, removeElementAnimation, removeAnimation, hasAnimation, effectiveDirection, directionValuesForPreset, directionValuesFor, buildAnimationTimelineBars, applyAnimationPreset, animationFor, TRIGGER_VALUES, TRIGGER_OPTIONS, TIMING_CURVE_VALUES, SEQUENCE_VALUES, REPEAT_MODE_VALUES, EXIT_PRESET_VALUES, ENTRANCE_PRESET_VALUES, EMPHASIS_PRESET_VALUES, DIRECTION_VALUES, DIRECTIONAL_PRESETS, ANIMATION_DIRECTION_LABEL_KEYS } from './chunk-PMURSMHH.mjs';
30
30
  import { isAnimationCatalogPresetId, animationPresetLabelKey, animationEffectLabelKey, animationEffectLabel, animationCatalogPresetSlug, animationCatalogPresetLabelKey, ANIMATION_PRESET_VALUES } from './chunk-T7FRLIDM.mjs';
31
- import { vermilionRadius, vermilionLightTheme, vermilionLightColors, vermilionDarkTheme, vermilionDarkColors, themeToCssVars, resolveThemeCatalogEntry, lightThemeColors, lightTheme, defaultThemeColors, defaultRadius, defaultCssVars, activeGalleryThemePreset, THEME_CATALOG, GALLERY_THEME_PRESETS } from './chunk-ZAOD6O2D.mjs';
31
+ import { withOfficeThemeCss, vermilionRadius, vermilionLightTheme, vermilionLightColors, vermilionDarkTheme, vermilionDarkColors, themeToCssVars, resolveThemeCatalogEntry, pptxThemeValue, lightThemeColors, lightTheme, defaultThemeColors, defaultRadius, defaultCssVars, activeGalleryThemePreset, THEME_CATALOG, GALLERY_THEME_PRESETS, TOUCH, tok, installOfficeUiTheme, OFFICE_TOKENS, installOfficeUiThemeFor, LEGACY_OFFICE_THEME_TOKENS, legacyThemeBridge } from './chunk-UTFFX4M7.mjs';
32
32
  import { walkAndPatchElements, resolveTextFillBlipUrls, resolveTableStyleImageUrls, resolveTableCellImageUrls, resolveMediaElementSource, createPresentationLoadResources, collectTextFillBlipPaths, collectTableStyleImagePaths, collectTableCellImagePaths, collectMediaElements, collectImagePaths, collectAnimationSoundPaths, buildInitialGuides, applyTextFillBlipPatches, applyTableStyleImagePatches, applyTableCellImagePatches, applyImagePathPatches } from './chunk-AEQGGKRZ.mjs';
33
33
  import { translationsEn } from './chunk-ZNXKAINY.mjs';
34
34
  import { updateTextSegmentStyle } from './chunk-PEDGPFLR.mjs';
@@ -2712,6 +2712,7 @@ __export(pptx_exports, {
2712
2712
  polygonRegionBounds: () => polygonRegionBounds,
2713
2713
  powerPointAccelDecelProgress: () => powerPointAccelDecelProgress,
2714
2714
  pptxOptionsLabels: () => pptxOptionsLabels,
2715
+ pptxThemeValue: () => pptxThemeValue,
2715
2716
  prefersReducedMotion: () => prefersReducedMotion,
2716
2717
  prepareElementForInsertion: () => prepareElementForInsertion,
2717
2718
  prepareElementUpdateBatch: () => prepareElementUpdateBatch,
@@ -3562,6 +3563,7 @@ __export(pptx_exports, {
3562
3563
  withInlineListDecorationDefaults: () => withInlineListDecorationDefaults,
3563
3564
  withManualLayouts: () => withManualLayouts,
3564
3565
  withNodeAtPath: () => withNodeAtPath,
3566
+ withOfficeThemeCss: () => withOfficeThemeCss,
3565
3567
  withRecordEntry: () => withRecordEntry,
3566
3568
  withSlideSizeOrientation: () => withSlideSizeOrientation,
3567
3569
  withSlidesPerPage: () => withSlidesPerPage,
@@ -3586,6 +3588,8 @@ __export(pptx_exports, {
3586
3588
  var sheetsByDocument = /* @__PURE__ */ new WeakMap();
3587
3589
  function attachControlStyles(root, css) {
3588
3590
  const doc = root.host.ownerDocument;
3591
+ installOfficeUiThemeFor(root.host);
3592
+ css = withOfficeThemeCss(css, ":host");
3589
3593
  const Sheet = doc.defaultView?.CSSStyleSheet;
3590
3594
  if (Sheet && "adoptedStyleSheets" in root && "replaceSync" in Sheet.prototype) {
3591
3595
  try {
@@ -3745,49 +3749,49 @@ var CONTROL_TOKENS = {
3745
3749
  // Distance the knob travels when on; defaults to the free space in the track.
3746
3750
  "--pptx-switch-knob-travel": "calc(var(--pptx-switch-width, 32px) - var(--pptx-switch-knob-size, 12px) - 2 * var(--pptx-switch-knob-offset, 2px))"
3747
3751
  };
3748
- function tok(name) {
3752
+ function tok2(name) {
3749
3753
  return `var(${name}, ${CONTROL_TOKENS[name]})`;
3750
3754
  }
3751
- var FOCUS_RING = `outline: ${tok("--pptx-focus-ring-width")} solid ${tok("--pptx-focus-ring-color")};
3752
- outline-offset: ${tok("--pptx-focus-ring-offset")};`;
3755
+ var FOCUS_RING = `outline: ${tok2("--pptx-focus-ring-width")} solid ${tok2("--pptx-focus-ring-color")};
3756
+ outline-offset: ${tok2("--pptx-focus-ring-offset")};`;
3753
3757
 
3754
3758
  // src/pptx/web-components/host-styles.ts
3755
3759
  var HOST_STYLES = `
3756
3760
  pptx-ui-search {
3757
- border: 1px solid ${tok("--pptx-field-border")};
3758
- border-radius: ${tok("--pptx-field-radius")};
3759
- padding-inline: ${tok("--pptx-space-3")};
3761
+ border: 1px solid ${tok2("--pptx-field-border")};
3762
+ border-radius: ${tok2("--pptx-field-radius")};
3763
+ padding-inline: ${tok2("--pptx-space-3")};
3760
3764
  }
3761
3765
  pptx-ui-search[variant="titlebar"] {
3762
3766
  border-color: var(--pptx-border, #374151);
3763
3767
  border-radius: 6px;
3764
3768
  padding-inline: 14px;
3765
3769
  }
3766
- pptx-ui-search:focus-within { border-color: ${tok("--pptx-field-border-focus")}; }
3770
+ pptx-ui-search:focus-within { border-color: ${tok2("--pptx-field-border-focus")}; }
3767
3771
  pptx-ui-checkbox {
3768
- border: 1px solid ${tok("--pptx-checkbox-border")};
3769
- border-radius: ${tok("--pptx-checkbox-radius")};
3772
+ border: 1px solid ${tok2("--pptx-checkbox-border")};
3773
+ border-radius: ${tok2("--pptx-checkbox-radius")};
3770
3774
  }
3771
- pptx-ui-checkbox[checked] { border-color: ${tok("--pptx-checkbox-accent")}; }
3775
+ pptx-ui-checkbox[checked] { border-color: ${tok2("--pptx-checkbox-accent")}; }
3772
3776
  :where([data-pptx-editor-chrome], [data-pptx-dialog], [role="dialog"]) :is(input[type="checkbox"], input[type="radio"]) {
3773
- accent-color: ${tok("--pptx-checkbox-accent")};
3777
+ accent-color: ${tok2("--pptx-checkbox-accent")};
3774
3778
  }
3775
3779
  :where([data-pptx-editor-chrome], [data-pptx-dialog], [role="dialog"]) input[type="checkbox"] {
3776
- width: ${tok("--pptx-checkbox-size")};
3777
- height: ${tok("--pptx-checkbox-size")};
3780
+ width: ${tok2("--pptx-checkbox-size")};
3781
+ height: ${tok2("--pptx-checkbox-size")};
3778
3782
  }
3779
3783
  @media (pointer: coarse), (max-width: 767px) {
3780
3784
  :where([data-pptx-editor-chrome], [data-pptx-dialog], [role="dialog"]) input[type="checkbox"] {
3781
- width: ${tok("--pptx-checkbox-size-touch")};
3782
- height: ${tok("--pptx-checkbox-size-touch")};
3785
+ width: ${tok2("--pptx-checkbox-size-touch")};
3786
+ height: ${tok2("--pptx-checkbox-size-touch")};
3783
3787
  }
3784
3788
  }
3785
3789
  :where([data-pptx-editor-chrome], [data-pptx-dialog], [role="dialog"]) :is(input[type="checkbox"], input[type="radio"], select):focus-visible {
3786
3790
  ${FOCUS_RING}
3787
3791
  }
3788
3792
  :where([data-pptx-editor-chrome], [data-pptx-dialog], [role="dialog"]) select {
3789
- border-radius: ${tok("--pptx-field-radius")};
3790
- border-color: ${tok("--pptx-field-border")};
3793
+ border-radius: ${tok2("--pptx-field-radius")};
3794
+ border-color: ${tok2("--pptx-field-border")};
3791
3795
  }
3792
3796
  pptx-ui-context-menu { position: fixed; display: block; z-index: 9000; }
3793
3797
  pptx-ui-context-menu[hidden] { display: none; }
@@ -37497,7 +37501,7 @@ function conflictingMorphNames(a, b) {
37497
37501
  }
37498
37502
  function mediaIdentity(el) {
37499
37503
  const props = el;
37500
- return props.imagePath ?? props.imageData ?? void 0;
37504
+ return props.imagePath ?? props.imageData ?? props.svgPath ?? props.svgData ?? void 0;
37501
37505
  }
37502
37506
  function centreDistance(a, b) {
37503
37507
  const dx = a.x - b.x;
@@ -37549,6 +37553,11 @@ function proximityAccepts(a, b) {
37549
37553
  if (a.type !== b.type || differentText(a, b) || conflictingMorphNames(a, b)) {
37550
37554
  return false;
37551
37555
  }
37556
+ if (a.type === "picture" || a.type === "image") {
37557
+ const fromMedia = mediaIdentity(a);
37558
+ const toMedia = mediaIdentity(b);
37559
+ if (fromMedia && toMedia && fromMedia !== toMedia) return false;
37560
+ }
37552
37561
  const ratio = (p, q) => Math.max(p, q, 1) / Math.max(Math.min(p, q), 1);
37553
37562
  if (ratio(a.width, b.width) > PROXIMITY_SIZE_RATIO_LIMIT || ratio(a.height, b.height) > PROXIMITY_SIZE_RATIO_LIMIT) {
37554
37563
  return false;
@@ -76728,7 +76737,7 @@ nav {
76728
76737
  box-sizing: border-box; display: flex; align-items: stretch; justify-content: space-around; width: 100%;
76729
76738
  padding-bottom: max(env(safe-area-inset-bottom), 0px); border-top: 1px solid var(--pptx-border, #33334d);
76730
76739
  background: color-mix(in srgb, var(--pptx-secondary, #1e1e2e) 70%, transparent);
76731
- color: var(--pptx-muted-foreground, #a5a5b5); font: 500 10px/1.2 system-ui, sans-serif;
76740
+ color: var(--pptx-muted-foreground, #a5a5b5); font: 500 10px/1.2 var(--pptx-font,var(--office-font,system-ui,sans-serif));
76732
76741
  }
76733
76742
  button {
76734
76743
  position: relative; box-sizing: border-box; display: flex; flex: 1; flex-direction: column;
@@ -76764,7 +76773,7 @@ var MOBILE_TOOLBAR_STYLES = `
76764
76773
  position: relative; z-index: 20; box-sizing: border-box; display: flex; align-items: center; gap: 4px;
76765
76774
  min-height: 52px; padding: max(env(safe-area-inset-top), 0px) 8px 4px; border-bottom: 1px solid var(--pptx-border, #33334d);
76766
76775
  background: color-mix(in srgb, var(--pptx-secondary, #1e1e2e) 50%, transparent);
76767
- color: var(--pptx-card-foreground, #e2e8f0); font: 12px/1.2 system-ui, sans-serif;
76776
+ color: var(--pptx-card-foreground, #e2e8f0); font: 12px/1.2 var(--pptx-font,var(--office-font,system-ui,sans-serif));
76768
76777
  }
76769
76778
  .spacer { flex: 1; }
76770
76779
  button {
@@ -77230,7 +77239,7 @@ function createTablePicker(doc, pick) {
77230
77239
 
77231
77240
  // src/pptx/web-components/mobile-insert-styles.ts
77232
77241
  var MOBILE_INSERT_STYLES = `
77233
- :host { display: block; min-width: 0; color: var(--pptx-foreground, #e2e8f0); font: 13px/1.3 system-ui, sans-serif; }
77242
+ :host { display: block; min-width: 0; color: var(--pptx-foreground, #e2e8f0); font: 13px/1.3 var(--pptx-font,var(--office-font,system-ui,sans-serif)); }
77234
77243
  :host([hidden]), [hidden] { display: none !important; }
77235
77244
  * { box-sizing: border-box; }
77236
77245
  svg { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@@ -77872,7 +77881,7 @@ var NOTES_TOOLBAR_STYLES = `
77872
77881
  [hidden] { display: none !important; }
77873
77882
  .bar {
77874
77883
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
77875
- font: 12px/1.2 system-ui, sans-serif; color: var(--pptx-foreground, inherit);
77884
+ font: 12px/1.2 var(--pptx-font,var(--office-font,system-ui,sans-serif)); color: var(--pptx-foreground, inherit);
77876
77885
  }
77877
77886
  .group {
77878
77887
  display: inline-flex; align-items: center; flex-wrap: wrap;
@@ -77901,7 +77910,7 @@ svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; s
77901
77910
  .popover label { display: grid; gap: 2px; font-size: 10px; color: var(--pptx-muted-foreground, #a5a5b5); }
77902
77911
  .popover input {
77903
77912
  box-sizing: border-box; width: 100%; min-height: 28px; padding: 4px 8px; border: 1px solid var(--pptx-border, #33334d);
77904
- border-radius: 4px; background: var(--pptx-background, #11111b); color: var(--pptx-foreground, #e2e8f0); font: 12px system-ui, sans-serif;
77913
+ border-radius: 4px; background: var(--pptx-background, #11111b); color: var(--pptx-foreground, #e2e8f0); font: 12px var(--pptx-font,var(--office-font,system-ui,sans-serif));
77905
77914
  }
77906
77915
  .popover input:focus-visible { outline: 2px solid var(--pptx-ring, #6366f1); outline-offset: -1px; }
77907
77916
  .actions { display: flex; justify-content: flex-end; gap: 8px; }
@@ -78327,300 +78336,14 @@ function present(value) {
78327
78336
  return value === "" || Boolean(value);
78328
78337
  }
78329
78338
 
78330
- // src/tokens.ts
78331
- var OFFICE_TOKENS = {
78332
- // Colour: semantic
78333
- "--office-foreground": "#1f2937",
78334
- "--office-muted-foreground": "#6b7280",
78335
- "--office-background": "#ffffff",
78336
- "--office-surface": "#f3f4f6",
78337
- "--office-selected": "#e5e7eb",
78338
- "--office-border": "#d1d5db",
78339
- "--office-accent": "#2563eb",
78340
- "--office-accent-foreground": "#ffffff",
78341
- "--office-ring": "#2563eb",
78342
- "--office-danger": "#b91c1c",
78343
- "--office-danger-foreground": "#ffffff",
78344
- "--office-warning": "#d97706",
78345
- "--office-warning-foreground": "#ffffff",
78346
- "--office-info": "#3b82f6",
78347
- "--office-popover": "var(--office-background, #ffffff)",
78348
- "--office-popover-foreground": "var(--office-foreground, #1f2937)",
78349
- "--office-overlay": "rgb(0 0 0 / 40%)",
78350
- "--office-notice-background": "#fef3c7",
78351
- "--office-notice-foreground": "#78350f",
78352
- "--office-notice-border": "rgb(180 83 9 / 30%)",
78353
- "--office-notice-accent": "#d97706",
78354
- "--office-keytip-background": "#ffffff",
78355
- "--office-keytip-foreground": "#1f1f1f",
78356
- "--office-keytip-border": "#8a8886",
78357
- "--office-highlight": "#dc2626",
78358
- "--office-paper": "#ffffff",
78359
- "--office-accent-hover": "color-mix(in srgb, var(--office-accent, #2563eb) 85%, #000)",
78360
- // Typography
78361
- "--office-font": 'system-ui, -apple-system, "Segoe UI", sans-serif',
78362
- "--office-font-size-3xs": "9px",
78363
- "--office-font-size-2xs": "10px",
78364
- "--office-font-size-xs": "11px",
78365
- "--office-font-size-sm": "12px",
78366
- "--office-font-size": "13px",
78367
- "--office-font-size-md": "14px",
78368
- "--office-font-size-lg": "15px",
78369
- "--office-font-size-xl": "18px",
78370
- /** Smallest text size that keeps mobile browsers from zooming a focused field. */
78371
- "--office-font-size-touch": "16px",
78372
- "--office-font-weight-medium": "500",
78373
- "--office-font-weight-bold": "600",
78374
- "--office-line-height": "1.4",
78375
- "--office-line-height-tight": "1.2",
78376
- "--office-icon-stroke": "1.5",
78377
- // Space
78378
- "--office-space-px": "1px",
78379
- "--office-space-0": "2px",
78380
- "--office-space-1": "4px",
78381
- "--office-space-1-5": "6px",
78382
- "--office-space-2": "8px",
78383
- "--office-space-2-5": "10px",
78384
- "--office-space-3": "12px",
78385
- "--office-space-3-5": "14px",
78386
- "--office-space-4": "16px",
78387
- "--office-space-5": "20px",
78388
- "--office-space-6": "24px",
78389
- // Shape
78390
- "--office-border-width": "1px",
78391
- "--office-border-width-thick": "2px",
78392
- "--office-radius-xs": "2px",
78393
- "--office-radius-sm": "3px",
78394
- "--office-radius": "4px",
78395
- "--office-radius-md": "6px",
78396
- "--office-radius-lg": "8px",
78397
- "--office-radius-full": "999px",
78398
- // Focus
78399
- "--office-focus-width": "2px",
78400
- "--office-focus-offset": "2px",
78401
- // Sizes
78402
- "--office-target-size": "28px",
78403
- "--office-target-size-touch": "44px",
78404
- /** Minimum pointer target on touch layouts. */
78405
- "--office-touch-target": "36px",
78406
- "--office-control-height": "24px",
78407
- "--office-control-height-md": "28px",
78408
- "--office-control-height-lg": "32px",
78409
- "--office-input-height": "26px",
78410
- "--office-control-height-xs": "22px",
78411
- "--office-icon-size-xs": "10px",
78412
- "--office-icon-size-sm": "12px",
78413
- "--office-icon-size": "14px",
78414
- "--office-icon-size-md": "16px",
78415
- "--office-icon-size-ml": "18px",
78416
- "--office-icon-size-lg": "20px",
78417
- // Elevation and layering
78418
- "--office-shadow-sm": "0 1px 3px rgb(0 0 0 / 20%)",
78419
- "--office-shadow": "0 6px 20px rgb(0 0 0 / 18%)",
78420
- "--office-shadow-lg": "0 10px 25px rgb(0 0 0 / 20%)",
78421
- "--office-z-popover": "1100",
78422
- "--office-z-dialog": "1000",
78423
- "--office-z-backstage": "30",
78424
- // Motion
78425
- "--office-duration-fast": ".12s",
78426
- "--office-duration": ".15s",
78427
- "--office-duration-spin": ".8s",
78428
- // Component: fields
78429
- "--office-field-height": "28px",
78430
- "--office-field-height-lg": "40px",
78431
- "--office-field-radius": "5px",
78432
- "--office-field-border": "var(--office-border, #d1d5db)",
78433
- "--office-field-border-focus": "var(--office-ring, #2563eb)",
78434
- "--office-field-background": "var(--office-background, #ffffff)",
78435
- "--office-field-foreground": "var(--office-foreground, #1f2937)",
78436
- "--office-field-placeholder": "var(--office-muted-foreground, #6b7280)",
78437
- // Component: checkbox, radio, switch
78438
- "--office-checkbox-size": "16px",
78439
- "--office-checkbox-size-touch": "22px",
78440
- "--office-checkbox-radius": "3px",
78441
- "--office-checkbox-border": "var(--office-border, #d1d5db)",
78442
- "--office-checkbox-background": "var(--office-background, #ffffff)",
78443
- "--office-checkbox-accent": "var(--office-accent, #2563eb)",
78444
- "--office-checkbox-accent-foreground": "var(--office-accent-foreground, #ffffff)",
78445
- "--office-radio-dot-size": "8px",
78446
- "--office-radio-dot-size-touch": "12px",
78447
- "--office-switch-width": "32px",
78448
- "--office-switch-height": "18px",
78449
- "--office-switch-width-touch": "44px",
78450
- "--office-switch-height-touch": "24px",
78451
- "--office-switch-border-width": "1px",
78452
- "--office-switch-knob-size": "12px",
78453
- "--office-switch-knob-size-touch": "18px",
78454
- "--office-switch-knob-offset": "2px",
78455
- "--office-switch-border": "var(--office-border, #d1d5db)",
78456
- "--office-switch-track": "var(--office-surface, #f3f4f6)",
78457
- "--office-switch-track-on": "var(--office-accent, #2563eb)",
78458
- "--office-switch-thumb": "var(--office-foreground, #1f2937)",
78459
- "--office-switch-thumb-on": "var(--office-accent-foreground, #ffffff)",
78460
- // Component: ribbon, status bar, tabs
78461
- "--office-ribbon-tab-height": "35px",
78462
- "--office-ribbon-contextual": "var(--office-accent, #2563eb)",
78463
- "--office-ribbon-group-gap": "2px",
78464
- "--office-ribbon-group-height": "78px",
78465
- "--office-ribbon-group-padding": "4px 8px 2px",
78466
- "--office-ribbon-separator-inset": "0px",
78467
- "--office-ribbon-separator": "color-mix(in srgb, var(--office-border, #d1d5db) 60%, transparent)",
78468
- "--office-ribbon-caption-size": "10px",
78469
- "--office-ribbon-caption-padding": "2px 0 0",
78470
- "--office-launcher-inset-end": "-6px",
78471
- "--office-launcher-inset-bottom": "-1px",
78472
- "--office-ribbon-compact-row-max": "36px",
78473
- "--office-ribbon-stack-max-height": "80px",
78474
- "--office-ribbon-collapse-x": "8px",
78475
- "--office-ribbon-collapse-y": "120px",
78476
- "--office-command-icon-color": "currentColor",
78477
- "--office-command-large-height": "66px",
78478
- "--office-command-large-min-width": "48px",
78479
- "--office-command-large-max-width": "80px",
78480
- "--office-command-large-icon": "32px",
78481
- "--office-command-small-icon": "16px",
78482
- "--office-command-tall-height": "62px",
78483
- "--office-command-tall-min-width": "40px",
78484
- "--office-command-tall-icon": "30px",
78485
- "--office-command-active": "color-mix(in srgb, var(--office-accent, #2563eb) 15%, transparent)",
78486
- "--office-collapsed-group-min-width": "56px",
78487
- "--office-ribbon-caption-line-height": "12px",
78488
- "--office-ribbon-row-height": "22px",
78489
- "--office-ribbon-file-min-width": "52px",
78490
- "--office-launcher-width": "16px",
78491
- "--office-launcher-height": "14px",
78492
- "--office-tab-indicator-width": "2.5px",
78493
- "--office-status-bar-height": "24px",
78494
- "--office-status-bar-separator-opacity": "1",
78495
- "--office-tab-height": "28px",
78496
- "--office-tab-max-width": "220px",
78497
- "--office-zoom-slider-width": "120px",
78498
- "--office-zoom-slider-min-width": "48px",
78499
- "--office-zoom-value-width": "40px",
78500
- // Component: panels and dialogs
78501
- "--office-dialog-width": "auto",
78502
- "--office-dialog-max-width": "min(640px, 100vw)",
78503
- "--office-dialog-max-height": "90vh",
78504
- "--office-dialog-min-width": "min(320px, 100vw)",
78505
- "--office-dialog-button-min-width": "76px",
78506
- "--office-options-width": "min(728px, 92vw)",
78507
- "--office-options-nav-width": "172px",
78508
- "--office-options-height": "510px",
78509
- "--office-options-chrome-height": "130px",
78510
- "--office-options-text-width": "180px",
78511
- "--office-options-row-height": "30px",
78512
- "--office-options-number-width": "112px",
78513
- "--office-options-check-size": "16px",
78514
- "--office-info-size": "15px",
78515
- "--office-selection-bar-width": "3px",
78516
- "--office-backstage-nav-width": "200px",
78517
- "--office-backstage-nav-background": "var(--office-accent, #2563eb)",
78518
- "--office-backstage-nav-foreground": "var(--office-accent-foreground, #ffffff)",
78519
- "--office-backstage-item-hover": "rgb(0 0 0 / 22%)",
78520
- "--office-backstage-padding": "28px 40px",
78521
- "--office-backstage-back-size": "36px",
78522
- "--office-backstage-item-height": "38px",
78523
- "--office-menu-min-width": "180px",
78524
- "--office-menu-max-height": "60vh",
78525
- "--office-context-menu-min-width": "200px",
78526
- "--office-search-popup-min-width": "240px",
78527
- "--office-search-popup-max-height": "320px",
78528
- "--office-select-max-height": "240px",
78529
- "--office-select-background": "var(--office-background, #ffffff)",
78530
- "--office-select-menu-min-width": "90px",
78531
- "--office-select-option-active": "color-mix(in srgb, var(--office-accent, #2563eb) 20%, var(--office-popover, #ffffff))",
78532
- "--office-select-ribbon-menu-width": "192px",
78533
- "--office-font-picker-max-height": "320px",
78534
- "--office-font-picker-width": "256px",
78535
- "--office-chevron-size": "6px",
78536
- "--office-ribbon-combo-height": "28px",
78537
- "--office-ribbon-icon-select-width": "36px",
78538
- "--office-search-width": "320px",
78539
- "--office-print-preview-width": "420px",
78540
- "--office-find-max-width": "640px",
78541
- "--office-find-bar-height": "40px",
78542
- "--office-find-replace-field-min-width": "120px",
78543
- "--office-find-replace-select-min-width": "150px",
78544
- "--office-ruler-size": "18px",
78545
- "--office-avatar-size": "48px",
78546
- "--office-avatar-color": "var(--office-muted-foreground, #6b7280)",
78547
- "--office-toast-width": "360px",
78548
- "--office-comments-pane-width": "300px",
78549
- "--office-comment-avatar-size": "24px",
78550
- "--office-account-field-width": "320px",
78551
- // Component: galleries
78552
- "--office-gallery-trigger-height": "24px",
78553
- "--office-gallery-strip-background": "color-mix(in srgb, var(--office-surface, #f3f4f6) 30%, transparent)",
78554
- "--office-gallery-command-min-width": "54px",
78555
- "--office-gallery-command-max-width": "78px",
78556
- "--office-gallery-command-height": "58px",
78557
- "--office-gallery-command-icon": "24px",
78558
- "--office-gallery-popup-max-height": "65vh",
78559
- // Component: title bar
78560
- "--office-title-bar-height": "36px",
78561
- "--office-title-bar-below-height": "28px",
78562
- "--office-title-bar-background": "var(--office-surface, #f3f4f6)",
78563
- "--office-title-bar-foreground": "var(--office-foreground, #1f2937)",
78564
- "--office-title-bar-border": "var(--office-border, #d1d5db)",
78565
- "--office-title-bar-mark-size": "20px",
78566
- "--office-title-bar-mark-background": "var(--office-accent, #2563eb)",
78567
- "--office-title-bar-mark-foreground": "var(--office-accent-foreground, #ffffff)",
78568
- "--office-title-bar-name-foreground": "var(--office-title-bar-foreground, var(--office-foreground, #1f2937))",
78569
- "--office-title-bar-result-selected": "var(--office-selected, #e5e7eb)",
78570
- "--office-title-bar-name-max-width": "240px",
78571
- "--office-title-bar-name-max-width-narrow": "140px",
78572
- "--office-title-bar-search-max-width": "448px",
78573
- "--office-title-bar-results-max-height": "256px",
78574
- // Component: team workspace (a Teams-like surface)
78575
- "--office-teams-brand": "#5b5fc7",
78576
- "--office-teams-brand-hover": "#4f52b2",
78577
- "--office-teams-brand-pressed": "#3f4296",
78578
- "--office-teams-brand-subtle": "#e8ebfa",
78579
- "--office-teams-brand-foreground": "#ffffff",
78580
- "--office-teams-rail": "#ebebeb",
78581
- "--office-teams-panel": "#f5f5f5",
78582
- "--office-teams-bubble": "#f5f5f5",
78583
- "--office-teams-bubble-own": "#e8ebfa",
78584
- "--office-teams-divider": "#e0e0e0",
78585
- "--office-teams-text-subtle": "#616161",
78586
- "--office-teams-message-gap": "var(--office-space-3)",
78587
- "--office-teams-message-padding": "var(--office-space-2) var(--office-space-3)",
78588
- "--office-presence-available": "#6bb700",
78589
- "--office-presence-busy": "#c50f1f",
78590
- "--office-presence-away": "#eaa300",
78591
- "--office-presence-offline": "#8a8886",
78592
- "--office-file-docx": "#2b579a",
78593
- "--office-file-xlsx": "#217346",
78594
- "--office-file-pptx": "#c43e1c",
78595
- "--office-file-vsdx": "#3955a3",
78596
- "--office-file-other": "#6b7280",
78597
- "--office-call-background": "#292929",
78598
- "--office-call-tile": "#3d3d3d",
78599
- "--office-call-foreground": "#ffffff",
78600
- "--office-call-muted-foreground": "#c8c8c8",
78601
- "--office-call-control": "#3d3d3d",
78602
- "--office-call-control-hover": "#525252",
78603
- "--office-call-danger": "#c4314b",
78604
- "--office-call-danger-hover": "#a72a40",
78605
- "--office-call-live": "#6bb700",
78606
- "--office-call-scrim": "rgb(0 0 0 / 60%)",
78607
- "--office-shadow-teams": "0 2px 4px rgb(0 0 0 / 14%), 0 0 2px rgb(0 0 0 / 12%)"
78608
- };
78609
- function tok2(name) {
78610
- return `var(${name}, ${OFFICE_TOKENS[name]})`;
78611
- }
78612
- `outline: ${tok2("--office-focus-width")} solid ${tok2("--office-ring")}; outline-offset: ${tok2("--office-focus-offset")};`;
78613
- var COMPACT = "(max-width: 767px)";
78614
- var TOUCH = `(pointer: coarse), ${COMPACT}`;
78615
-
78616
78339
  // src/styles.ts
78617
78340
  var COMMON_CONTROL_CSS = `
78618
78341
  :host([hidden]) { display: none !important; }
78619
78342
  @media ${TOUCH} {
78620
- :host { --office-target-size: ${tok2("--office-target-size-touch")}; }
78343
+ :host { --office-target-size: ${tok("--office-target-size-touch")}; }
78621
78344
  }
78622
78345
  @media (forced-colors: active) {
78623
- :host(:focus-visible), :focus-visible { outline: ${tok2("--office-focus-width")} solid Highlight; outline-offset: ${tok2("--office-focus-offset")}; }
78346
+ :host(:focus-visible), :focus-visible { outline: ${tok("--office-focus-width")} solid Highlight; outline-offset: ${tok("--office-focus-offset")}; }
78624
78347
  }
78625
78348
  `;
78626
78349
 
@@ -79122,8 +78845,8 @@ var OfficeUiPasteOptions = class extends OfficeElement {
79122
78845
  willUpdate() {
79123
78846
  const { left, top } = this.model;
79124
78847
  this.hostWrite(() => {
79125
- this.style.left = `calc(${left}px + ${tok2("--office-space-1")})`;
79126
- this.style.top = `calc(${top}px + ${tok2("--office-space-1")})`;
78848
+ this.style.left = `calc(${left}px + ${tok("--office-space-1")})`;
78849
+ this.style.top = `calc(${top}px + ${tok("--office-space-1")})`;
79127
78850
  });
79128
78851
  }
79129
78852
  render() {
@@ -79908,7 +79631,7 @@ var defineRibbonGroup = definer("office-ui-ribbon-group", () => OfficeUiRibbonGr
79908
79631
  var ribbon_section_default = ":host {\n display: inline-flex;\n align-items: stretch;\n}\n::slotted(*) {\n flex: none;\n}\n";
79909
79632
 
79910
79633
  // src/ribbon/ribbon-section.ts
79911
- var COLUMN_STYLE = { display: "flex", flexDirection: "column", gap: tok2("--office-space-0") };
79634
+ var COLUMN_STYLE = { display: "flex", flexDirection: "column", gap: tok("--office-space-0") };
79912
79635
  function setOptional(el, name, value) {
79913
79636
  if (value === void 0) el.removeAttribute(name);
79914
79637
  else el.setAttribute(name, String(value));
@@ -82176,60 +81899,40 @@ var defineTitleBar = definer("office-ui-title-bar", () => OfficeUiTitleBar, [
82176
81899
 
82177
81900
  // src/pptx/web-components/office-token-bridge.ts
82178
81901
  var BASE = `
82179
- --office-font: system-ui, sans-serif;
82180
- --office-foreground: var(--pptx-foreground, #f3f4f6);
82181
- --office-muted-foreground: var(--pptx-muted-foreground, #9ca3af);
82182
- --office-background: var(--pptx-background, #030712);
82183
- --office-surface: var(--pptx-muted, #2a2a3d);
82184
- --office-selected: var(--pptx-accent, #33334d);
82185
- --office-border: var(--pptx-border, #374151);
82186
- --office-accent: var(--pptx-primary, #6366f1);
82187
- --office-accent-foreground: var(--pptx-primary-foreground, #fff);
82188
- --office-ring: ${tok("--pptx-focus-ring-color")};
82189
- --office-popover: var(--pptx-popover, #111827);
82190
- --office-popover-foreground: var(--pptx-popover-foreground, var(--pptx-foreground, #e2e8f0));
82191
- --office-danger: #b91c1c;
82192
- --office-warning: #d97706;
82193
- --office-info: #60a5fa;
82194
- --office-notice-background: rgb(120 53 15 / 20%);
82195
- --office-notice-foreground: #fde68a;
82196
- --office-notice-border: rgb(180 83 9 / 30%);
82197
- --office-notice-accent: #fbbf24;
82198
- --office-shadow: 0 8px 20px rgb(0 0 0 / 35%);
82199
- --office-shadow-lg: 0 10px 25px rgb(0 0 0 / 35%);
82200
- --office-focus-width: ${tok("--pptx-focus-ring-width")};
82201
- --office-focus-offset: ${tok("--pptx-focus-ring-offset")};
82202
- --office-target-size-touch: ${tok("--pptx-touch-target")};
82203
- --office-field-height: ${tok("--pptx-field-height")};
82204
- --office-field-height-lg: ${tok("--pptx-field-height-lg")};
82205
- --office-field-radius: ${tok("--pptx-field-radius")};
82206
- --office-field-border: ${tok("--pptx-field-border")};
82207
- --office-field-border-focus: ${tok("--pptx-field-border-focus")};
82208
- --office-field-background: ${tok("--pptx-field-bg")};
82209
- --office-field-foreground: ${tok("--pptx-field-fg")};
82210
- --office-field-placeholder: ${tok("--pptx-field-placeholder")};
82211
- --office-checkbox-size: ${tok("--pptx-checkbox-size")};
82212
- --office-checkbox-size-touch: ${tok("--pptx-checkbox-size-touch")};
82213
- --office-checkbox-radius: ${tok("--pptx-checkbox-radius")};
82214
- --office-checkbox-border: ${tok("--pptx-checkbox-border")};
82215
- --office-checkbox-background: ${tok("--pptx-checkbox-bg")};
82216
- --office-checkbox-accent: ${tok("--pptx-checkbox-accent")};
82217
- --office-checkbox-accent-foreground: ${tok("--pptx-checkbox-accent-fg")};
82218
- --office-radio-dot-size: ${tok("--pptx-radio-dot-size")};
82219
- --office-radio-dot-size-touch: ${tok("--pptx-radio-dot-size-touch")};
82220
- --office-switch-width: ${tok("--pptx-switch-width")};
82221
- --office-switch-height: ${tok("--pptx-switch-height")};
82222
- --office-switch-width-touch: ${tok("--pptx-switch-width")};
82223
- --office-switch-height-touch: ${tok("--pptx-switch-height")};
81902
+ --office-ring: var(--pptx-focus-ring-color, var(--_pptx-ring));
81903
+ --office-focus-width: ${tok2("--pptx-focus-ring-width")};
81904
+ --office-focus-offset: ${tok2("--pptx-focus-ring-offset")};
81905
+ --office-target-size-touch: ${tok2("--pptx-touch-target")};
81906
+ --office-field-height: ${tok2("--pptx-field-height")};
81907
+ --office-field-height-lg: ${tok2("--pptx-field-height-lg")};
81908
+ --office-field-radius: ${tok2("--pptx-field-radius")};
81909
+ --office-field-border: ${tok2("--pptx-field-border")};
81910
+ --office-field-border-focus: ${tok2("--pptx-field-border-focus")};
81911
+ --office-field-background: ${tok2("--pptx-field-bg")};
81912
+ --office-field-foreground: ${tok2("--pptx-field-fg")};
81913
+ --office-field-placeholder: ${tok2("--pptx-field-placeholder")};
81914
+ --office-checkbox-size: ${tok2("--pptx-checkbox-size")};
81915
+ --office-checkbox-size-touch: ${tok2("--pptx-checkbox-size-touch")};
81916
+ --office-checkbox-radius: ${tok2("--pptx-checkbox-radius")};
81917
+ --office-checkbox-border: ${tok2("--pptx-checkbox-border")};
81918
+ --office-checkbox-background: ${tok2("--pptx-checkbox-bg")};
81919
+ --office-checkbox-accent: ${tok2("--pptx-checkbox-accent")};
81920
+ --office-checkbox-accent-foreground: ${tok2("--pptx-checkbox-accent-fg")};
81921
+ --office-radio-dot-size: ${tok2("--pptx-radio-dot-size")};
81922
+ --office-radio-dot-size-touch: ${tok2("--pptx-radio-dot-size-touch")};
81923
+ --office-switch-width: ${tok2("--pptx-switch-width")};
81924
+ --office-switch-height: ${tok2("--pptx-switch-height")};
81925
+ --office-switch-width-touch: ${tok2("--pptx-switch-width")};
81926
+ --office-switch-height-touch: ${tok2("--pptx-switch-height")};
82224
81927
  --office-switch-border-width: 0px;
82225
- --office-switch-knob-size: ${tok("--pptx-switch-knob-size")};
82226
- --office-switch-knob-size-touch: ${tok("--pptx-switch-knob-size")};
82227
- --office-switch-knob-offset: ${tok("--pptx-switch-knob-offset")};
82228
- --office-switch-knob-travel: ${tok("--pptx-switch-knob-travel")};
82229
- --office-switch-track: ${tok("--pptx-switch-track")};
82230
- --office-switch-track-on: ${tok("--pptx-switch-track-on")};
82231
- --office-switch-thumb: ${tok("--pptx-switch-thumb")};
82232
- --office-switch-thumb-on: ${tok("--pptx-switch-thumb")};
81928
+ --office-switch-knob-size: ${tok2("--pptx-switch-knob-size")};
81929
+ --office-switch-knob-size-touch: ${tok2("--pptx-switch-knob-size")};
81930
+ --office-switch-knob-offset: ${tok2("--pptx-switch-knob-offset")};
81931
+ --office-switch-knob-travel: ${tok2("--pptx-switch-knob-travel")};
81932
+ --office-switch-track: ${tok2("--pptx-switch-track")};
81933
+ --office-switch-track-on: ${tok2("--pptx-switch-track-on")};
81934
+ --office-switch-thumb: ${tok2("--pptx-switch-thumb")};
81935
+ --office-switch-thumb-on: ${tok2("--pptx-switch-thumb")};
82233
81936
  `;
82234
81937
  var TITLE_BAR = `:host {
82235
81938
  --office-title-bar-height: ${TITLE_BAR_METRICS.height}px;
@@ -82249,10 +81952,7 @@ var TITLE_BAR = `:host {
82249
81952
  --office-icon-stroke: 1.4;
82250
81953
  --office-control-height-md: 24px;
82251
81954
  --office-selected: color-mix(in srgb, var(--pptx-accent, #33334d) 60%, transparent);
82252
- --office-warning: #eab308;
82253
- --office-danger: #f87171;
82254
81955
  --office-popover: var(--pptx-popover, var(--pptx-card, #1e1e2e));
82255
- --office-shadow-lg: 0 14px 28px rgb(0 0 0 / 40%);
82256
81956
  --pptx-switch-width: ${TITLE_BAR_METRICS.switchTrackWidth}px;
82257
81957
  --pptx-switch-height: ${TITLE_BAR_METRICS.switchTrackHeight}px;
82258
81958
  --pptx-switch-knob-size: ${TITLE_BAR_METRICS.switchKnobSize}px;
@@ -82271,8 +81971,6 @@ var STATUS_BAR = `:host {
82271
81971
  --office-font-size-xs: 10px;
82272
81972
  --office-control-height-xs: 24px;
82273
81973
  --office-icon-stroke: 1.45;
82274
- --office-warning: #facc15;
82275
- --office-danger: #f87171;
82276
81974
  line-height: 1.2;
82277
81975
  }`;
82278
81976
  var EXTRAS = {
@@ -82281,7 +81979,7 @@ var EXTRAS = {
82281
81979
  "pptx-ui-ribbon-gallery": `:host { --office-foreground: var(--pptx-foreground, #f9fafb); --office-background: var(--pptx-background, #111827);
82282
81980
  --office-gallery-strip-background: color-mix(in srgb, var(--pptx-muted, #2a2a3d) 30%, transparent);
82283
81981
  --office-command-icon-color: var(--pptx-primary, #6366f1); --office-z-popover: 1200;
82284
- --office-popover-foreground: var(--pptx-popover-foreground, #f9fafb); --office-shadow-lg: 0 8px 24px #0006;
81982
+ --office-popover-foreground: var(--pptx-popover-foreground, #f9fafb);
82285
81983
  --office-icon-stroke: 1.6; --office-line-height-tight: 11px; }`,
82286
81984
  "pptx-ui-select": `:host { --office-select-background: var(--pptx-select-control-bg, var(--pptx-background, #11111b)); }
82287
81985
  :host(.bg-muted) { --office-select-background: var(--pptx-muted, #1f2937); }
@@ -82305,8 +82003,38 @@ var EXTRAS = {
82305
82003
  --office-selected: var(--pptx-accent, #33334d); --office-radius-md: var(--pptx-radius, 6px); }`
82306
82004
  };
82307
82005
  function bridgeCss(tag) {
82308
- return `:host {${BASE}}
82309
- ${EXTRAS[tag] ?? ""}`;
82006
+ const extras = EXTRAS[tag] ?? "";
82007
+ const palette = new Set(Object.values(LEGACY_OFFICE_THEME_TOKENS));
82008
+ const inner2 = extras.replace(
82009
+ /(:host(?:\([^)]*\))?)\s*\{([^{}]*)\}/g,
82010
+ (_rule, selector, body) => {
82011
+ const host2 = [];
82012
+ const children = [];
82013
+ for (const declaration of body.split(";").map((value) => value.trim()).filter(Boolean)) {
82014
+ const property = declaration.slice(0, declaration.indexOf(":")).trim();
82015
+ if (palette.has(property)) children.push(declaration);
82016
+ else {
82017
+ host2.push(declaration);
82018
+ if (property.startsWith("--office-")) {
82019
+ const input = `--_pptx-control-${property.slice("--office-".length)}`;
82020
+ host2.push(`${input}: var(${property})`);
82021
+ children.push(`${property}: var(${input})`);
82022
+ }
82023
+ }
82024
+ }
82025
+ return `${selector} { ${host2.join(";")}; } ${selector} > * { ${children.join(";")}; }`;
82026
+ }
82027
+ );
82028
+ const hostTokens = BASE.replace(/--office-ring:[^;]+;/, "");
82029
+ const hostColor = ["pptx-ui-checkbox", "pptx-ui-radio", "pptx-ui-switch"].includes(tag) ? "" : "color:var(--_pptx-foreground);";
82030
+ return withOfficeThemeCss(
82031
+ `:host { ${hostTokens} ${hostColor} font-family:var(--_pptx-font); }
82032
+ ${legacyThemeBridge(":host > *", "--_pptx-")}
82033
+ :host > * {${BASE}}
82034
+ ${inner2}
82035
+ :host(:focus-visible) { outline-color:var(--pptx-focus-ring-color,var(--_pptx-ring)); }`,
82036
+ ":host"
82037
+ );
82310
82038
  }
82311
82039
  var OFFICE_TOKEN_BRIDGE = `
82312
82040
  /* Bindings put utility classes on the host; only the shadow trigger draws a box. */
@@ -82998,7 +82726,7 @@ var PRESENTER_CONSOLE_STYLES = `
82998
82726
  .strip {
82999
82727
  box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: ${PRESENTER_LAYOUT_METRICS.stripGap}px;
83000
82728
  padding: ${PRESENTER_LAYOUT_METRICS.stripPaddingY}px ${PRESENTER_LAYOUT_METRICS.stripPaddingX}px; border-bottom: 1px solid var(--pptx-border, #33334d);
83001
- background: var(--pptx-card, #1e1e2e); color: var(--pptx-foreground, #e2e8f0); font: 12px/16px system-ui, sans-serif;
82729
+ background: var(--pptx-card, #1e1e2e); color: var(--pptx-foreground, #e2e8f0); font: 12px/16px var(--pptx-font,var(--office-font,system-ui,sans-serif));
83002
82730
  }
83003
82731
  svg { flex: none; width: ${PRESENTER_LAYOUT_METRICS.controlIconSize}px; height: ${PRESENTER_LAYOUT_METRICS.controlIconSize}px; }
83004
82732
  button {
@@ -86738,7 +86466,7 @@ var SUBTITLE_SETTINGS_STYLES = `
86738
86466
  :host { display: inline-flex; }
86739
86467
  dialog { box-sizing: border-box; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
86740
86468
  margin: auto; padding: 24px; border: 1px solid var(--pptx-border, #374151); border-radius: 10px;
86741
- background: var(--pptx-background, #181b20); color: var(--pptx-foreground, #f9fafb); font: 14px/1.5 system-ui; }
86469
+ background: var(--pptx-background, #181b20); color: var(--pptx-foreground, #f9fafb); font: 14px/1.5 var(--pptx-font,var(--office-font,system-ui,sans-serif)); }
86742
86470
  dialog::backdrop { background: #0008; }
86743
86471
  h2 { margin: 0 0 12px; font-size: 18px; } p { margin: 0 0 20px; }
86744
86472
  label { display: block; margin-bottom: 8px; }
@@ -86956,7 +86684,7 @@ var THEME_EDITOR_STYLES = `
86956
86684
  :host { display: block; position: fixed; z-index: 1090; box-sizing: border-box; width: 288px;
86957
86685
  color: var(--pptx-foreground, #e2e8f0); background: var(--pptx-card, #181c20);
86958
86686
  border-left: 1px solid var(--pptx-border, #33334d); box-shadow: -8px 0 24px #0002;
86959
- font: 12px/1.4 var(--pptx-ui-font-family, system-ui, sans-serif); }
86687
+ font: 12px/1.4 var(--pptx-ui-font-family, var(--office-font, system-ui, sans-serif)); }
86960
86688
  :host([inline]) { position: static; width: 100%; border: 0; box-shadow: none; }
86961
86689
  :host([inline]) .close { display: none; }
86962
86690
  * { box-sizing: border-box; }
@@ -87478,7 +87206,7 @@ var CHART_FORMAT_PANE_STYLES = `
87478
87206
  :host { display: block; position: fixed; z-index: 1090; box-sizing: border-box; width: 288px;
87479
87207
  color: var(--pptx-foreground, #e2e8f0); background: var(--pptx-card, #181c20);
87480
87208
  border-left: 1px solid var(--pptx-border, #33334d); box-shadow: -8px 0 24px #0002;
87481
- font: 12px/1.4 var(--pptx-ui-font-family, system-ui, sans-serif); }
87209
+ font: 12px/1.4 var(--pptx-ui-font-family, var(--office-font, system-ui, sans-serif)); }
87482
87210
  :host([inline]) { position: static; width: 100%; border: 0; box-shadow: none; }
87483
87211
  * { box-sizing: border-box; }
87484
87212
  .panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }
@@ -88426,6 +88154,7 @@ function registerPptxWebControls() {
88426
88154
  if (typeof window === "undefined" || !window.customElements) {
88427
88155
  return;
88428
88156
  }
88157
+ installOfficeUiTheme(document);
88429
88158
  const registry2 = window.customElements;
88430
88159
  assertWebControlContract(
88431
88160
  registry2,
@@ -88434,7 +88163,10 @@ function registerPptxWebControls() {
88434
88163
  if (!document.getElementById("pptx-ui-control-hosts")) {
88435
88164
  const style = document.createElement("style");
88436
88165
  style.id = "pptx-ui-control-hosts";
88437
- style.textContent = HOST_STYLES + OFFICE_TOKEN_BRIDGE;
88166
+ style.textContent = withOfficeThemeCss(
88167
+ HOST_STYLES + OFFICE_TOKEN_BRIDGE,
88168
+ controls.map(([name]) => name).join(",")
88169
+ );
88438
88170
  document.head.append(style);
88439
88171
  }
88440
88172
  for (const [name, define] of controls) {