ooxml-ui 0.20.0 → 0.22.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 (114) hide show
  1. package/README.md +47 -2
  2. package/dist/base.d.ts +118 -0
  3. package/dist/{account.d.ts → chrome/account-profile.d.ts} +0 -6
  4. package/dist/chrome/account.d.ts +17 -0
  5. package/dist/chrome/backstage.d.ts +78 -0
  6. package/dist/chrome/find-bar.d.ts +111 -0
  7. package/dist/chrome/print-preview.d.ts +39 -0
  8. package/dist/chrome/ruler.d.ts +43 -0
  9. package/dist/chrome/status-bar.d.ts +80 -0
  10. package/dist/chrome/status-item.d.ts +40 -0
  11. package/dist/chrome/tab-strip.d.ts +88 -0
  12. package/dist/chrome/title-bar-types.d.ts +75 -0
  13. package/dist/chrome/title-bar.d.ts +81 -0
  14. package/dist/{chunk-7XBKSYGM.js → chunk-2X6QYQ3Q.js} +10 -1
  15. package/dist/{chunk-4JQLQROF.js → chunk-3MDKXKKQ.js} +53 -65
  16. package/dist/chunk-5A4REH6T.js +259 -0
  17. package/dist/chunk-E47762NY.js +90 -0
  18. package/dist/chunk-HNGJI5EZ.js +834 -0
  19. package/dist/{chunk-G3LAGZEW.js → chunk-HSJH6SUW.js} +33 -1
  20. package/dist/{chunk-W5PYFBEZ.js → chunk-HZ422LTR.js} +1 -49
  21. package/dist/chunk-LKLZOPTO.js +4536 -0
  22. package/dist/controls.d.ts +56 -46
  23. package/dist/controls.js +5 -5
  24. package/dist/dialog/dialog-footer.d.ts +40 -0
  25. package/dist/dialog/dialog.d.ts +52 -0
  26. package/dist/{options.d.ts → dialog/options-dialog.d.ts} +46 -1
  27. package/dist/form/checkable.d.ts +49 -0
  28. package/dist/form/checkbox.d.ts +8 -0
  29. package/dist/form/radio.d.ts +68 -0
  30. package/dist/form/search-field.d.ts +54 -0
  31. package/dist/{select-menu.d.ts → form/select-menu.d.ts} +3 -13
  32. package/dist/form/select.d.ts +115 -0
  33. package/dist/form/switch.d.ts +11 -0
  34. package/dist/form/zoom-slider.d.ts +78 -0
  35. package/dist/glyph.d.ts +2 -0
  36. package/dist/icon.d.ts +19 -0
  37. package/dist/icons.d.ts +0 -3
  38. package/dist/icons.js +1 -3
  39. package/dist/index.d.ts +4 -1
  40. package/dist/index.js +16 -12
  41. package/dist/menu/command-search.d.ts +74 -0
  42. package/dist/menu/context-menu.d.ts +89 -0
  43. package/dist/menu/menu-button.d.ts +77 -0
  44. package/dist/menu/menu-item.d.ts +52 -0
  45. package/dist/{menu-model.d.ts → menu/menu-model.d.ts} +2 -0
  46. package/dist/menu/menu-separator.d.ts +7 -0
  47. package/dist/notices/paste-options.d.ts +41 -0
  48. package/dist/notices/read-only-banner.d.ts +53 -0
  49. package/dist/notices/toasts.d.ts +40 -0
  50. package/dist/presence/presence.d.ts +53 -0
  51. package/dist/presence.d.ts +1 -31
  52. package/dist/presence.js +3 -3
  53. package/dist/ribbon/button.d.ts +60 -0
  54. package/dist/ribbon/gallery-styles.d.ts +2 -0
  55. package/dist/ribbon/gallery.d.ts +97 -0
  56. package/dist/ribbon/ribbon-group.d.ts +35 -0
  57. package/dist/{ribbon-section.d.ts → ribbon/ribbon-section.d.ts} +14 -1
  58. package/dist/ribbon/ribbon-stack.d.ts +10 -0
  59. package/dist/ribbon/ribbon-tabs.d.ts +82 -0
  60. package/dist/ribbon/ribbon-toggle.d.ts +49 -0
  61. package/dist/ribbon/ribbon-toolbar.d.ts +15 -0
  62. package/dist/smartart/smartart.d.ts +43 -0
  63. package/dist/smartart.d.ts +1 -14
  64. package/dist/smartart.js +3 -3
  65. package/dist/styles.d.ts +1 -4
  66. package/dist/teams/app-rail.d.ts +29 -0
  67. package/dist/teams/avatar.d.ts +39 -0
  68. package/dist/teams/base.d.ts +17 -0
  69. package/dist/teams/call-controls.d.ts +61 -0
  70. package/dist/teams/call-grid.d.ts +33 -0
  71. package/dist/teams/channel-list.d.ts +40 -0
  72. package/dist/teams/chat-composer.d.ts +60 -0
  73. package/dist/teams/chat-list.d.ts +51 -0
  74. package/dist/teams/icons.d.ts +3 -0
  75. package/dist/teams/index.d.ts +14 -0
  76. package/dist/teams/prejoin.d.ts +40 -0
  77. package/dist/teams.js +5 -0
  78. package/dist/theme.js +2 -2
  79. package/dist/tokens.d.ts +245 -214
  80. package/package.json +12 -6
  81. package/dist/backstage.d.ts +0 -28
  82. package/dist/button.d.ts +0 -14
  83. package/dist/checkable.d.ts +0 -4
  84. package/dist/chrome-controls.d.ts +0 -52
  85. package/dist/chunk-24MMSCKW.js +0 -119
  86. package/dist/chunk-UEJ4F33J.js +0 -78
  87. package/dist/chunk-W7YI5DSJ.js +0 -5970
  88. package/dist/command-search.d.ts +0 -18
  89. package/dist/context-menu.d.ts +0 -20
  90. package/dist/dialog.d.ts +0 -13
  91. package/dist/document-notices.d.ts +0 -55
  92. package/dist/find-bar.d.ts +0 -15
  93. package/dist/gallery-styles.d.ts +0 -7
  94. package/dist/gallery-view.d.ts +0 -53
  95. package/dist/gallery.d.ts +0 -20
  96. package/dist/menu.d.ts +0 -15
  97. package/dist/print-preview.d.ts +0 -11
  98. package/dist/radio.d.ts +0 -1
  99. package/dist/ribbon-tabs.d.ts +0 -14
  100. package/dist/ribbon-toggle.d.ts +0 -1
  101. package/dist/ribbon.d.ts +0 -24
  102. package/dist/ruler.d.ts +0 -10
  103. package/dist/search-field.d.ts +0 -1
  104. package/dist/select-styles.d.ts +0 -6
  105. package/dist/select.d.ts +0 -19
  106. package/dist/status-bar-view.d.ts +0 -50
  107. package/dist/status-bar.d.ts +0 -19
  108. package/dist/tab-strip.d.ts +0 -20
  109. package/dist/title-bar-search.d.ts +0 -43
  110. package/dist/title-bar-strip.d.ts +0 -20
  111. package/dist/title-bar.d.ts +0 -49
  112. package/dist/zoom-slider.d.ts +0 -9
  113. /package/dist/{safe-svg.d.ts → ribbon/safe-svg.d.ts} +0 -0
  114. /package/dist/{smartart-svg.d.ts → smartart/smartart-svg.d.ts} +0 -0
@@ -1,18 +0,0 @@
1
- /** One searchable command: label and optional keywords; disabled commands show their reason. */
2
- export interface OfficeSearchCommand {
3
- id: string;
4
- label: string;
5
- keywords?: string;
6
- /** Where the command lives, shown under the label (for example "Home › Paragraph"). */
7
- description?: string;
8
- disabled?: boolean;
9
- title?: string;
10
- }
11
- /**
12
- * Office's "Tell me what you want to do" box. Set `commands` (`OfficeSearchCommand[]`); typing
13
- * lists up to `limit` (default 8) matches by label or keywords in a top-layer listbox.
14
- * ArrowUp/Down move, Enter or click run an enabled match (`office-command` `{ command }`),
15
- * Escape closes then clears. Disabled matches stay visible with their reason. Attributes:
16
- * `placeholder`, `label` (accessible name), `limit`. Setting `commands` never emits.
17
- */
18
- export declare const defineCommandSearch: import("./registry.js").Definer;
@@ -1,20 +0,0 @@
1
- /** A `role="separator"` rule between groups of menu items. */
2
- export declare const defineMenuSeparator: import("./registry.js").Definer;
3
- /**
4
- * Office's right-click menu, in two modes sharing keyboard, type-ahead and dismissal:
5
- *
6
- * - **Children** (self-managed): `office-ui-menu-item` and `office-ui-menu-separator` children.
7
- * `openAt(x, y)` shows it in the popover top layer, kept inside the viewport; `close()` hides it.
8
- * Choosing an item closes the menu and its `office-command` bubbles to the host.
9
- * - **Controlled** (moved from pptx-viewer `pptx-ui-context-menu`): set `state`
10
- * (`{ x, y, label, items: [{ id, label, separatorBefore?, heading?, danger?, disabled?,
11
- * checked?, icon? }], markers?, zIndex?, autoFocus? }`). The host is the fixed box at the
12
- * pointer, clamped into the window. It emits `office-menu-request` `{ id }` when a row is chosen
13
- * and `office-menu-close` `{ reason: 'escape' | 'outside' | 'tab' }` when dismissed, and never
14
- * closes itself: the host removes it or clears its items. While open it takes focus on the first
15
- * enabled row and returns focus to the opener when it goes away, unless something else took it.
16
- *
17
- * Arrow keys, Home, End and type-ahead (repeating a letter cycles) move between enabled rows.
18
- * Static `requestEvent`, `closeEvent` and `markerPattern` let a product keep its published names.
19
- */
20
- export declare const defineContextMenu: import("./registry.js").Definer;
package/dist/dialog.d.ts DELETED
@@ -1,13 +0,0 @@
1
- export type OfficeDialogCloseReason = 'escape' | 'close-button' | 'backdrop' | 'api';
2
- /** Cancelable: `preventDefault()` keeps the dialog open. */
3
- export type OfficeDialogCloseEvent = CustomEvent<{
4
- reason: OfficeDialogCloseReason;
5
- }>;
6
- /**
7
- * Modal dialog shell. `open` and `heading` attributes, `dismissible` (default true; set
8
- * `dismissible="false"` to ignore Escape and backdrop). Default slot is the body, `slot="footer"`
9
- * holds actions. `role="dialog"`, `aria-modal`, labelled by the heading. Escape, the close button
10
- * and the backdrop emit a cancelable `office-dialog-close` and close unless prevented; focus
11
- * moves in on open, is trapped with Tab, and returns to the previously focused element on close.
12
- */
13
- export declare const defineDialog: import("./registry.js").Definer;
@@ -1,55 +0,0 @@
1
- export interface OfficeReadOnlyBannerState {
2
- /** Why read-only is recommended; mirrored onto the host's `data-kind`. */
3
- kind: string | null;
4
- /** Translated reason. */
5
- message: string;
6
- /** Swap Edit anyway / Dismiss for the inline password form. */
7
- passwordPromptOpen?: boolean;
8
- /** Translated password error, or null. */
9
- passwordError?: string | null;
10
- /** Disables the form while a submitted password is checked. */
11
- checkingPassword?: boolean;
12
- labels?: {
13
- title?: string;
14
- editAnyway?: string;
15
- dismiss?: string;
16
- passwordLabel?: string;
17
- passwordPlaceholder?: string;
18
- unlock?: string;
19
- cancel?: string;
20
- };
21
- }
22
- export type OfficeReadOnlyBannerIntent = {
23
- id: 'editAnyway' | 'dismiss' | 'cancelPassword';
24
- } | {
25
- id: 'submitPassword';
26
- password: string;
27
- };
28
- /**
29
- * `<office-ui-read-only-banner>`: controlled banner. The host owns the lock (Edit anyway,
30
- * Dismiss, the password check); the element owns the markup, the password form and its focus.
31
- * Each activation emits `office-read-only-request` with an {@link OfficeReadOnlyBannerIntent}.
32
- */
33
- export declare const defineReadOnlyBanner: import("./registry.js").Definer;
34
- export interface OfficePasteOption {
35
- /** Echoed back as `format` in the request event. */
36
- id: string;
37
- /** Translated label. */
38
- label: string;
39
- }
40
- export interface OfficePasteOptionsState {
41
- /** Right edge of the pasted object in viewport pixels. */
42
- left: number;
43
- /** Bottom edge of the pasted object in viewport pixels. */
44
- top: number;
45
- options: readonly OfficePasteOption[];
46
- /** Toolbar accessible name. */
47
- label?: string;
48
- }
49
- /**
50
- * `<office-ui-paste-options>`: the strip anchored one `--office-space-1` step past a just-pasted object's bottom-right
51
- * corner (the host is the fixed box). A choice emits `office-paste-options-request`
52
- * `{ format }` then `office-paste-options-dismiss`; the first pointerdown or keydown outside
53
- * (Escape inside too) dismisses, armed one task after connecting so the paste gesture does not.
54
- */
55
- export declare const definePasteOptions: import("./registry.js").Definer;
@@ -1,15 +0,0 @@
1
- export type OfficeFindInputEvent = CustomEvent<{
2
- query: string;
3
- }>;
4
- export type OfficeFindStepEvent = CustomEvent<{
5
- direction: 'next' | 'previous';
6
- }>;
7
- /**
8
- * `<office-ui-find-bar>`: Office's on-demand Find bar under the ribbon. Shown while `open`;
9
- * `show()` opens it and selects the query. Enter steps to the next result, Shift+Enter to the
10
- * previous; Escape clears a query, or closes the bar when it is already empty. Attributes:
11
- * `open`, `label`, `input-label`, `placeholder`, `maxlength`, `disabled`, `navigation-disabled`,
12
- * `previous-label`, `next-label`, `close-label`. Properties: `value`, `status`, `statusTitle`.
13
- * Events: `office-find-input` `{ query }`, `office-find-step` `{ direction }`, `office-find-close`.
14
- */
15
- export declare const defineFindBar: import("./registry.js").Definer;
@@ -1,7 +0,0 @@
1
- /**
2
- * Light-DOM styles: the gallery renders its tiles beside the host's own children so products can
3
- * query them, so the rules live in the host's root (document or shadow root), once per root.
4
- */
5
- export declare const GALLERY_LIGHT_CSS: string;
6
- /** Add the light-DOM rules to the root holding `host` (a document or a shadow root), once. */
7
- export declare function attachGalleryStyles(host: HTMLElement): void;
@@ -1,53 +0,0 @@
1
- /** One tile. `preview` is SVG markup, parsed as an SVG document with executable parts removed. */
2
- export interface OfficeGalleryItem {
3
- id: string;
4
- label: string;
5
- applied?: boolean | undefined;
6
- preview?: string | undefined;
7
- }
8
- export interface OfficeGallerySection {
9
- title?: string | undefined;
10
- columns: number;
11
- tileWidth: number;
12
- tileHeight: number;
13
- items: readonly OfficeGalleryItem[];
14
- }
15
- /** A gallery, translated. With `command` it is a single button that picks the first item. */
16
- export interface OfficeGalleryState {
17
- id: string;
18
- label: string;
19
- /** Trigger name in the inline strip; defaults to "More <label>". */
20
- moreLabel?: string | undefined;
21
- disabled?: boolean | undefined;
22
- command?: {
23
- icon: string;
24
- large?: boolean | undefined;
25
- hint?: string | undefined;
26
- } | undefined;
27
- sections: readonly OfficeGallerySection[];
28
- /** Tiles shown inline (`mode="inline"`); defaults to the first section's items. */
29
- inline?: readonly OfficeGalleryItem[] | undefined;
30
- }
31
- export interface GalleryHooks {
32
- triggerAttribute: string;
33
- popupAttribute: string;
34
- itemAttribute: string;
35
- compactAttribute: string | null;
36
- }
37
- export interface GalleryPaint {
38
- state: OfficeGalleryState;
39
- disabled: boolean;
40
- inline: boolean;
41
- chevronOnly: boolean;
42
- open: boolean;
43
- icon: Element | null;
44
- }
45
- /** All gallery markup: the strip, the trigger and the popup. The element owns behaviour. */
46
- export declare function createGalleryView(doc: Document, hooks: GalleryHooks, pick: (id: string) => void, toggle: () => void): {
47
- root: HTMLSpanElement;
48
- trigger: HTMLButtonElement;
49
- popup: HTMLDivElement;
50
- clear(): void;
51
- setOpen(open: boolean): void;
52
- paint({ state, disabled, inline, chevronOnly, open, icon }: GalleryPaint): void;
53
- };
package/dist/gallery.d.ts DELETED
@@ -1,20 +0,0 @@
1
- export type OfficeGalleryPickEvent = CustomEvent<{
2
- gallery: string;
3
- itemId: string;
4
- }>;
5
- /**
6
- * `<office-ui-gallery>`: Office's ribbon gallery (Shape Styles, Themes, Table Styles). Set
7
- * `state` (`OfficeGalleryState`, translated). `mode="inline"` shows a strip of tiles beside a
8
- * More button; otherwise the trigger is a labelled dropdown (`chevron-only` keeps just the
9
- * chevron, `icon` names its glyph). The popup opens below the trigger, keeps inside the window
10
- * and closes on Escape, an outside press or a pick. ArrowDown on the trigger opens it and focuses
11
- * the first tile. A pick emits `office-gallery-pick` `{ gallery, itemId }`.
12
- *
13
- * Tiles render in the light DOM beside the host's children so products can query them
14
- * (`data-gallery-item`); the rules join the host's root once. Static `pickEvent`,
15
- * `triggerAttribute`, `popupAttribute`, `itemAttribute` and `compactAttribute` keep a product's
16
- * published names; override `triggerIcon()` to draw a product glyph.
17
- */
18
- export declare const defineGallery: import("./registry.js").Definer;
19
- export type { OfficeGalleryItem, OfficeGallerySection, OfficeGalleryState, } from './gallery-view.js';
20
- export { parseSvgPreview } from './safe-svg.js';
package/dist/menu.d.ts DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * One menu entry: `command`, `label`, `icon`, `disabled`, `checked` (renders a
3
- * `menuitemcheckbox`), `title`. Activation emits `office-command` `{ command }`.
4
- */
5
- export declare const defineMenuItem: import("./registry.js").Definer;
6
- /**
7
- * Dropdown command with a menu of `office-ui-menu-item` children (Office's Find, Layers,
8
- * Align). With a `command` attribute it is a split button: the main part emits that command
9
- * and the caret opens the menu. Attributes: `label`, `icon`, `command`, `variant="stacked"`, `icon-only`,
10
- * `disabled`, `title`, `keyshortcuts`. The menu uses the top layer (`popover`) so ribbon
11
- * overflow never clips it. Keyboard: Enter, Space or ArrowDown open; arrows, Home and End move;
12
- * Escape and Tab close; focus returns to the trigger. Choosing an item closes the menu; its
13
- * `office-command` bubbles to the host.
14
- */
15
- export declare const defineMenuButton: import("./registry.js").Definer;
@@ -1,11 +0,0 @@
1
- export type OfficePrintPreviewPageEvent = CustomEvent<{
2
- index: number;
3
- }>;
4
- /**
5
- * `<office-ui-print-preview>`: the Print page's paper preview with page navigation. Set `pages`
6
- * to rendered nodes (for example the SVG of each page); the element shows a deep clone of the
7
- * current one with `tabindex` and inline `style` removed, so the preview is inert and never
8
- * parses markup. `index` selects the page; the arrows emit `office-print-preview-page`.
9
- * Attributes: `label` (default "Print preview"), `empty-label`.
10
- */
11
- export declare const definePrintPreview: import("./registry.js").Definer;
package/dist/radio.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const defineRadio: import("./registry.js").Definer;
@@ -1,14 +0,0 @@
1
- /** Emitted when the user picks a tab; cancelable (`preventDefault()` keeps the current tab). */
2
- export type OfficeRibbonSelectEvent = CustomEvent<{
3
- tab: string;
4
- }>;
5
- /**
6
- * `<office-ui-ribbon>`: the Office tab row (Quick Access Toolbar, File, tabs, search) over the
7
- * tab panels. Panels are light-DOM children carrying `data-ribbon-tab` (id), `data-label` and
8
- * optionally `data-tab-keytip`; the element builds the tabs from them, keeps exactly one panel
9
- * visible and moves between tabs with the arrow keys, Home and End. Slots: `quick-access`,
10
- * `search`, `end`. Attributes: `selected`, `label` (tab list name), `file-label` (default "File"),
11
- * `no-file`, `file-expanded`, `file-keytip`. Events: `office-ribbon-select` `{ tab }`
12
- * (cancelable) and `office-ribbon-file` when File is activated.
13
- */
14
- export declare const defineRibbon: import("./registry.js").Definer;
@@ -1 +0,0 @@
1
- export declare const defineRibbonToggle: import("./registry.js").Definer;
package/dist/ribbon.d.ts DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * Labelled group of ribbon commands: `role="group"`, `label` is the caption and name. `launcher`
3
- * adds Office's corner dialog launcher (`launcher="<command>"` emits `office-command`
4
- * `{ command }`; `launcher-label` names it; `launcher-disabled` disables it). For narrow windows
5
- * an overflow controller sets `data-collapsed` (the group becomes one button showing `icon` and
6
- * the label; activating it emits `office-ribbon-collapse-toggle`) and `data-open` (its commands
7
- * open in a popup at `--office-ribbon-collapse-x/-y`). The group marks itself `data-compact-row`
8
- * when every command is one line tall (they centre vertically) and `data-stack` when it holds only
9
- * small drop-down galleries (`[mode="dropdown"]` without `data-command-large`), which stack in
10
- * columns. Static `launcherEvent`/`collapseEvent` and `launcherDetail()` let a product subclass
11
- * keep its published events.
12
- */
13
- export declare const defineRibbonGroup: import("./registry.js").Definer;
14
- /**
15
- * Layout for small ribbon commands: a column (Office's three-row stack of Cut, Copy and Format
16
- * Painter) or, with `orientation="horizontal"`, a row (Bold, Italic, Underline). Not a group.
17
- */
18
- export declare const defineRibbonStack: import("./registry.js").Definer;
19
- /**
20
- * `role="toolbar"` container. Left/Right/Home/End move focus between enabled direct or
21
- * group-nested controls (Up/Down instead when `aria-orientation="vertical"`).
22
- * All items stay in the tab order: roving tabindex is not implemented yet.
23
- */
24
- export declare const defineToolbar: import("./registry.js").Definer;
package/dist/ruler.d.ts DELETED
@@ -1,10 +0,0 @@
1
- /** Tick subdivisions per unit for a given unit length in CSS pixels, finer as it grows. */
2
- export declare function rulerDivisions(unitPixels: number): number;
3
- /**
4
- * `<office-ui-ruler>`: a decorative Office ruler (inches by default). The product positions it
5
- * and says where zero is: `origin` is the CSS-pixel offset of zero from the ruler's start edge,
6
- * `scale` the CSS pixels per unit (96 at 100% for inches). `orientation="vertical"` draws a
7
- * side ruler; `direction="reverse"` makes values grow toward the start edge, as Visio's
8
- * vertical ruler grows upward from the page bottom. Hidden from assistive technology.
9
- */
10
- export declare const defineRuler: import("./registry.js").Definer;
@@ -1 +0,0 @@
1
- export declare const defineSearchField: import("./registry.js").Definer;
@@ -1,6 +0,0 @@
1
- /**
2
- * `office-ui-select` styles, moved from pptx-viewer (`select-styles.ts`, `select-ribbon-styles.ts`)
3
- * and expressed in tokens. `variant="ribbon-font"` and `variant="ribbon-icon"` are the compact
4
- * ribbon combo and icon picker; `data-font-picker="family"` widens and lengthens the popup.
5
- */
6
- export declare const SELECT_CSS: string;
package/dist/select.d.ts DELETED
@@ -1,19 +0,0 @@
1
- /** A programmatic choice; `<option>` elements satisfy the same shape. */
2
- export interface OfficeSelectOption {
3
- value: string;
4
- label: string;
5
- disabled?: boolean;
6
- }
7
- /**
8
- * Single-select combobox. Moved from pptx-viewer `pptx-ui-select` (the declarative, most complete
9
- * implementation). Choices come from `<option>` / `<optgroup>` children (with `data-display-label`,
10
- * `data-description` and font previews through `style="font-family"`), or from the `options`
11
- * property when there are none. `value`, `disabled`, `selectedIndex`, `aria-label`;
12
- * `variant="ribbon-font"` (compact ribbon combo that accepts unlisted values, such as a typed font
13
- * size) or `"ribbon-icon"`; `data-font-picker="family|size"`; an `icon` slot and a `custom` slot at
14
- * the top of the popup. Keyboard: arrows, Home, End, PageUp/PageDown (8 options), typeahead,
15
- * Enter/Space, Escape, Tab; disabled and hidden choices are skipped. The popup is a top-layer
16
- * `popover`, flipped above the trigger when there is more room. `input` then `change` bubble on a
17
- * user choice; setting a property is silent. Form-associated.
18
- */
19
- export declare const defineSelect: import("./registry.js").Definer;
@@ -1,50 +0,0 @@
1
- /** A text segment at the start of the bar (page count, words, language, save state). */
2
- export interface OfficeStatusText {
3
- id: string;
4
- text: string;
5
- title?: string | undefined;
6
- tone?: 'idle' | 'saving' | 'error' | undefined;
7
- /** Announce changes politely (a page counter). */
8
- live?: boolean | undefined;
9
- /** Hide on phone widths. */
10
- narrowHide?: boolean | undefined;
11
- }
12
- /** A status-bar button (Notes, Comments, a view switch). `label` is its name and ScreenTip. */
13
- export interface OfficeStatusButton {
14
- id: string;
15
- icon: string;
16
- label: string;
17
- /** Visible text after the glyph; hidden on phone widths. */
18
- text?: string | undefined;
19
- pressed?: boolean | undefined;
20
- hidden?: boolean | undefined;
21
- }
22
- /** Everything the controlled bar shows, already translated. Absent parts are not rendered. */
23
- export interface OfficeStatusBarState {
24
- items?: readonly OfficeStatusText[] | undefined;
25
- toggles?: readonly OfficeStatusButton[] | undefined;
26
- /** The view switches (Normal, Sorter, Reading); hidden while empty, all hidden or `false`. */
27
- views?: readonly OfficeStatusButton[] | false | undefined;
28
- /** Zoom out, percentage (zoom to fit) and zoom in; emits `zoomOut`, `zoomFit`, `zoomIn`. */
29
- zoom?: {
30
- percent: number;
31
- outLabel: string;
32
- fitLabel: string;
33
- inLabel: string;
34
- /** Keeps the named buttons but hides the cluster. */
35
- hidden?: boolean | undefined;
36
- /** Glyphs; default `minus` and `plus`. */
37
- outIcon?: string | undefined;
38
- inIcon?: string | undefined;
39
- } | undefined;
40
- }
41
- export interface StatusBarView {
42
- bar: HTMLElement;
43
- render(state: OfficeStatusBarState | undefined): void;
44
- }
45
- /**
46
- * The controlled status bar: built once, then patched in place so a focused button survives
47
- * updates. Slots stay in the row: the default slot after the texts, `collaboration` between the
48
- * views and the zoom, and `end` before the zoom.
49
- */
50
- export declare function createStatusBarView(doc: Document, activate: (id: string) => void): StatusBarView;
@@ -1,19 +0,0 @@
1
- export type OfficeStatusActivateEvent = CustomEvent<{
2
- id: string;
3
- }>;
4
- /**
5
- * Status bar: `role="group"` named by its `label` attribute (default "Status"). Two ways to fill
6
- * it. Composed: children, with `slot="end"` pushed to the trailing edge (zoom, view switches).
7
- * Controlled: set `state` (`OfficeStatusBarState`: start texts, toggles, view switches and a zoom
8
- * cluster, all translated); every button emits `office-status-activate` `{ id }` (static
9
- * `activateEvent` lets a product subclass keep its published name). Slots stay available in
10
- * controlled mode: the default after the texts, `collaboration` and `end` before the zoom.
11
- */
12
- export declare const defineStatusBar: import("./registry.js").Definer;
13
- /**
14
- * One status entry: `label` and `value` attributes (textual, so assistive tech reads both).
15
- * With the `interactive` attribute it renders a button and emits `office-status-activate`
16
- * `{ id }` (`id` attribute) on click, Enter or Space; zoom or language pickers are examples.
17
- */
18
- export declare const defineStatusItem: import("./registry.js").Definer;
19
- export type { OfficeStatusBarState, OfficeStatusButton, OfficeStatusText, } from './status-bar-view.js';
@@ -1,20 +0,0 @@
1
- export interface OfficeTab {
2
- id: string;
3
- label: string;
4
- /** Tooltip; defaults to the label. */
5
- title?: string;
6
- }
7
- export type OfficeTabSelectEvent = CustomEvent<{
8
- id: string;
9
- }>;
10
- /**
11
- * Bottom document tabs (Visio pages, Excel sheets). Set `tabs` (`OfficeTab[]`) and `selected`
12
- * (a tab id). Labels are inserted as text. The previous/next buttons and arrow, Home and End
13
- * keys move the selection; the tab list uses a roving tabindex. User selection emits
14
- * `office-tab-select` `{ id }` (cancelable); setting properties never emits.
15
- * Attributes: `label` (tab list name, default "Tabs"), `previous-label` and `next-label`
16
- * (step button names, default "Previous" and "Next"), `disabled`, and `add-label` to show an
17
- * add button after the tabs (Insert Page, New Sheet) that emits `office-command`
18
- * `{ command: 'tab-add' }`; `add-disabled` and `add-title` disable and explain it.
19
- */
20
- export declare const defineTabStrip: import("./registry.js").Definer;
@@ -1,43 +0,0 @@
1
- /** One command the title-bar search can run. `category` shows on the right of its row. */
2
- export interface OfficeTitleBarCommand {
3
- id: string;
4
- label: string;
5
- category?: string | undefined;
6
- }
7
- /** The centred command search. Every string arrives translated from the host. */
8
- export interface OfficeTitleBarSearch {
9
- placeholder: string;
10
- label: string;
11
- /** Heading over the matches and the live-region text when there are some. */
12
- heading: string;
13
- /** Row and live-region text when nothing matches. */
14
- empty: string;
15
- /** Searched by label when `match` is absent. */
16
- commands?: readonly OfficeTitleBarCommand[] | undefined;
17
- /** Host ranking (synonyms, keywords); replaces the default label search. */
18
- match?: ((query: string) => readonly OfficeTitleBarCommand[]) | undefined;
19
- /** Text of the trailing "search the document" row; absent drops that row. */
20
- content?: ((query: string) => string) | undefined;
21
- /** Glyph of the content row; defaults to `search`. */
22
- contentIcon?: string | undefined;
23
- }
24
- /** Detail of the search request: a chosen command, or a document search when `command` is absent. */
25
- export interface OfficeTitleBarSearchDetail {
26
- query: string;
27
- command?: string;
28
- }
29
- /** The dropdown shows at most this many commands so it never outgrows its box. */
30
- export declare const OFFICE_TITLE_BAR_SEARCH_LIMIT = 8;
31
- export interface TitleBarSearchView {
32
- box: HTMLElement;
33
- input: HTMLElement & {
34
- value: string;
35
- };
36
- render(search: OfficeTitleBarSearch | undefined): void;
37
- close(): void;
38
- }
39
- /**
40
- * A search field plus its result list. The query stays local to the view, so hosts never
41
- * round-trip keystrokes; they receive one request per commit.
42
- */
43
- export declare function createTitleBarSearch(doc: Document, fieldTag: string, request: (detail: OfficeTitleBarSearchDetail) => void): TitleBarSearchView;
@@ -1,20 +0,0 @@
1
- /** One Quick Access Toolbar button; every string arrives translated from the host. */
2
- export interface OfficeQuickAccessItem {
3
- id: string;
4
- /** Registered glyph name (see `registerIcon`). */
5
- icon: string;
6
- /** Accessible name, and the visible text when labels show. */
7
- label: string;
8
- /** ScreenTip; absent leaves the button without a `title`. */
9
- title?: string | undefined;
10
- disabled?: boolean | undefined;
11
- }
12
- export interface QuickAccessStrip {
13
- toolbar: HTMLElement;
14
- render(items: readonly OfficeQuickAccessItem[], label: string, showLabels: boolean): void;
15
- }
16
- /**
17
- * The Quick Access Toolbar: one roving tab stop, arrows/Home/End between enabled buttons.
18
- * Buttons are keyed by id and patched in place, so a focused button survives every update.
19
- */
20
- export declare function createQuickAccessStrip(doc: Document, activate: (id: string) => void): QuickAccessStrip;
@@ -1,49 +0,0 @@
1
- import { type OfficeQuickAccessItem } from './title-bar-strip.js';
2
- import { type OfficeTitleBarSearch } from './title-bar-search.js';
3
- export type OfficeTitleBarPlacement = 'titleBar' | 'belowRibbon';
4
- export type OfficeTitleBarTone = 'idle' | 'saving' | 'error';
5
- /** The AutoSave switch. The host owns the state; a change is only a request. */
6
- export interface OfficeTitleBarAutosave {
7
- enabled: boolean;
8
- /** Default true. False renders the switch inert. */
9
- available?: boolean | undefined;
10
- /** "AutoSave". */
11
- label: string;
12
- /** "On" / "Off", shown after the switch. */
13
- stateLabel: string;
14
- /** Accessible name of the switch. */
15
- toggleLabel: string;
16
- /** ScreenTip of the switch; defaults to `toggleLabel`. */
17
- title?: string | undefined;
18
- }
19
- /** Everything the bar shows, already translated. Absent parts are not rendered. */
20
- export interface OfficeTitleBarState {
21
- /** One or two letters in the product-coloured app mark; absent hides the mark. */
22
- appMark?: string | undefined;
23
- fileName: string;
24
- /** Save-location or save-progress text after the name. */
25
- status?: string | undefined;
26
- tone?: OfficeTitleBarTone | undefined;
27
- autosave?: OfficeTitleBarAutosave | undefined;
28
- quickAccess?: {
29
- label: string;
30
- items: readonly OfficeQuickAccessItem[];
31
- showLabels?: boolean | undefined;
32
- } | undefined;
33
- search?: OfficeTitleBarSearch | undefined;
34
- }
35
- /**
36
- * `<office-ui-title-bar>`: Office's title bar above the ribbon (app mark, AutoSave, Quick
37
- * Access Toolbar, file name and status, centred command search, `collaboration` and `account`
38
- * slots). Controlled: set `state` (`OfficeTitleBarState`, every string translated); the bar
39
- * owns no effects. `placement="belowRibbon"` renders only the Quick Access row and hides
40
- * itself (`data-empty`) while that row is empty. Events (bubbling, composed; static names let a
41
- * product subclass keep its published ones): `office-autosave-toggle`, `office-command`
42
- * `{ command }` from a Quick Access button and `office-command-search` `{ query, command? }`.
43
- * Override `activate(id)` to route Quick Access buttons differently and `rendered()` to mirror
44
- * state onto the host. Tokens: `--office-title-bar-*`.
45
- */
46
- export declare const defineTitleBar: import("./registry.js").Definer;
47
- export type { OfficeQuickAccessItem } from './title-bar-strip.js';
48
- export type { OfficeTitleBarCommand, OfficeTitleBarSearch, OfficeTitleBarSearchDetail, } from './title-bar-search.js';
49
- export { OFFICE_TITLE_BAR_SEARCH_LIMIT } from './title-bar-search.js';
@@ -1,9 +0,0 @@
1
- /**
2
- * Office status-bar zoom: zoom out, slider, zoom in, percentage and an optional fit button.
3
- * Attributes: `value` (percent, default 100), `min` (10), `max` (400), `step` (10, for the
4
- * buttons), `disabled`, `fit` (shows the fit button; its value is the button's name, e.g.
5
- * "Fit page to current window"), `label` (group name, default "Zoom").
6
- * User changes emit native `input` (slider drag) and `change` events with `value` updated;
7
- * the fit button emits `office-command` `{ command: 'zoom-fit' }`. Setting `value` never emits.
8
- */
9
- export declare const defineZoomSlider: import("./registry.js").Definer;
File without changes