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
@@ -0,0 +1,53 @@
1
+ import { OfficeElement } from '../base.js';
2
+ /**
3
+ * One collaborator as the avatar stack needs it. This is a deliberately minimal structural
4
+ * view of an awareness entry (identity, colour, activity); core's `collab` awareness model
5
+ * satisfies it, and `participantsFromAwareness` adapts raw `{ user }` awareness states.
6
+ */
7
+ export interface PresenceParticipant {
8
+ id: string;
9
+ name: string;
10
+ /** CSS colour of the participant's cursor and avatar ring. */
11
+ color?: string;
12
+ status?: 'active' | 'idle' | 'away';
13
+ /** The local user: sorted first and labelled "(you)". */
14
+ self?: boolean;
15
+ }
16
+ export type OfficePresenceSelectEvent = CustomEvent<{
17
+ id: string;
18
+ }>;
19
+ /** Adapt awareness-like states (`{ clientId?, user: { id?, name, color? } }`) to participants. */
20
+ export declare function participantsFromAwareness(states: Iterable<{
21
+ clientId?: string | number;
22
+ user?: Partial<PresenceParticipant>;
23
+ } | undefined>, selfId?: string): PresenceParticipant[];
24
+ export declare const initialsOf: (name: string) => string;
25
+ /**
26
+ * Presence avatar stack. `participants` property (array of `PresenceParticipant`), `max`
27
+ * attribute (visible avatars, default 4; the rest collapse into a "+N" chip). `role="list"`
28
+ * with one button per person (accessible name = name, status and "(you)"); activating one emits
29
+ * `office-presence-select` `{ id }` so the host can follow that user. Rendering carries no
30
+ * identity beyond what the host passes in.
31
+ */
32
+ export declare class OfficeUiPresence extends OfficeElement {
33
+ static styles: import("lit").CSSResult[];
34
+ static properties: {
35
+ max: {
36
+ type: StringConstructor;
37
+ };
38
+ label: {
39
+ type: StringConstructor;
40
+ };
41
+ };
42
+ max: string | null;
43
+ label: string | null;
44
+ private people;
45
+ constructor();
46
+ get participants(): PresenceParticipant[];
47
+ set participants(next: PresenceParticipant[]);
48
+ private get visible();
49
+ protected willUpdate(): void;
50
+ private person;
51
+ protected render(): import("lit").TemplateResult<1>;
52
+ }
53
+ export declare const definePresence: import("../registry.js").Definer;
@@ -1,31 +1 @@
1
- /**
2
- * One collaborator as the avatar stack needs it. This is a deliberately minimal structural
3
- * view of an awareness entry (identity, colour, activity); core's `collab` awareness model
4
- * satisfies it, and `participantsFromAwareness` adapts raw `{ user }` awareness states.
5
- */
6
- export interface PresenceParticipant {
7
- id: string;
8
- name: string;
9
- /** CSS colour of the participant's cursor and avatar ring. */
10
- color?: string;
11
- status?: 'active' | 'idle' | 'away';
12
- /** The local user: sorted first and labelled "(you)". */
13
- self?: boolean;
14
- }
15
- export type OfficePresenceSelectEvent = CustomEvent<{
16
- id: string;
17
- }>;
18
- /** Adapt awareness-like states (`{ clientId?, user: { id?, name, color? } }`) to participants. */
19
- export declare function participantsFromAwareness(states: Iterable<{
20
- clientId?: string | number;
21
- user?: Partial<PresenceParticipant>;
22
- } | undefined>, selfId?: string): PresenceParticipant[];
23
- export declare const initialsOf: (name: string) => string;
24
- /**
25
- * Presence avatar stack. `participants` property (array of `PresenceParticipant`), `max`
26
- * attribute (visible avatars, default 4; the rest collapse into a "+N" chip). `role="list"`
27
- * with one button per person (accessible name = name, status and "(you)"); activating one emits
28
- * `office-presence-select` `{ id }` so the host can follow that user. Rendering carries no
29
- * identity beyond what the host passes in.
30
- */
31
- export declare const definePresence: import("./registry.js").Definer;
1
+ export * from './presence/presence.js';
package/dist/presence.js CHANGED
@@ -1,3 +1,3 @@
1
- export { definePresence, initialsOf, participantsFromAwareness } from './chunk-24MMSCKW.js';
2
- import './chunk-UEJ4F33J.js';
3
- import './chunk-G3LAGZEW.js';
1
+ export { OfficeUiPresence, definePresence, initialsOf, participantsFromAwareness } from './chunk-E47762NY.js';
2
+ import './chunk-5A4REH6T.js';
3
+ import './chunk-HSJH6SUW.js';
@@ -0,0 +1,60 @@
1
+ import { OfficeElement } from '../base.js';
2
+ export type OfficeCommandEvent = CustomEvent<{
3
+ command: string;
4
+ }>;
5
+ /**
6
+ * Command button. Attributes: `label`, `icon`, `command`, `disabled`, `pressed` (aria-pressed),
7
+ * `expanded` (aria-expanded), `icon-only`, `variant="stacked"`, `size="large|small"` (ribbon
8
+ * large and small commands), `tall` (with `icon-only`: a tool tile), `active`, `badge`, `caret`
9
+ * (a trailing menu chevron), `title`, `keyshortcuts` (forwarded as aria-keyshortcuts).
10
+ * Activation (pointer, Enter, Space) emits one bubbling, composed `office-command` `{ command }`;
11
+ * Enter and Space never reach the host's own key handlers. Nothing happens when disabled.
12
+ * Static `requestEvent`, `idAttribute` and `detailKey`, and the `iconName()` and `showsCaret()`
13
+ * methods, let a product subclass keep its published contract and glyph set.
14
+ */
15
+ export declare class OfficeUiButton extends OfficeElement {
16
+ static requestEvent: string;
17
+ static idAttribute: string;
18
+ static detailKey: string;
19
+ static shadowRootOptions: {
20
+ clonable?: boolean;
21
+ customElementRegistry?: CustomElementRegistry | null;
22
+ mode: ShadowRootMode;
23
+ serializable?: boolean;
24
+ slotAssignment?: SlotAssignmentMode;
25
+ delegatesFocus: boolean;
26
+ };
27
+ static styles: import("lit").CSSResult[];
28
+ static properties: {
29
+ disabled: {
30
+ type: BooleanConstructor;
31
+ reflect: true;
32
+ converter: {
33
+ fromAttribute: (value: string | null) => boolean;
34
+ toAttribute: (value: unknown) => string | null;
35
+ };
36
+ };
37
+ pressed: {
38
+ reflect: true;
39
+ converter: {
40
+ fromAttribute: (value: string | null) => boolean | undefined;
41
+ toAttribute: (value: unknown) => string | null;
42
+ };
43
+ };
44
+ };
45
+ /** Everything else is an attribute, as it always was (see `OfficeElement.watched`). */
46
+ static watched: string[];
47
+ disabled: boolean;
48
+ pressed: boolean | undefined;
49
+ constructor();
50
+ /** The registered icon to draw; a product subclass may map names onto its glyph set. */
51
+ protected iconName(): string | null;
52
+ /** The tooltip: `title`, else the label of an icon-only button; a product may always show it. */
53
+ protected tooltip(label: string, iconOnly: boolean): string;
54
+ /** Whether the trailing menu chevron shows. */
55
+ protected showsCaret(): boolean;
56
+ private onKeydown;
57
+ private onClick;
58
+ protected render(): import("lit").TemplateResult<1>;
59
+ }
60
+ export declare const defineButton: import("../registry.js").Definer;
@@ -0,0 +1,2 @@
1
+ /** Add the light-DOM rules to the root holding `host` (a document or a shadow root), once. */
2
+ export declare function attachGalleryStyles(host: HTMLElement): void;
@@ -0,0 +1,97 @@
1
+ import { type TemplateResult } from 'lit';
2
+ import { OfficeElement } from '../base.js';
3
+ export type OfficeGalleryPickEvent = CustomEvent<{
4
+ gallery: string;
5
+ itemId: string;
6
+ }>;
7
+ /** One tile. `preview` is SVG markup, parsed as an SVG document with executable parts removed. */
8
+ export interface OfficeGalleryItem {
9
+ id: string;
10
+ label: string;
11
+ applied?: boolean | undefined;
12
+ preview?: string | undefined;
13
+ }
14
+ export interface OfficeGallerySection {
15
+ title?: string | undefined;
16
+ columns: number;
17
+ tileWidth: number;
18
+ tileHeight: number;
19
+ items: readonly OfficeGalleryItem[];
20
+ }
21
+ /** A gallery, translated. With `command` it is a single button that picks the first item. */
22
+ export interface OfficeGalleryState {
23
+ id: string;
24
+ label: string;
25
+ /** Trigger name in the inline strip; defaults to "More <label>". */
26
+ moreLabel?: string | undefined;
27
+ disabled?: boolean | undefined;
28
+ command?: {
29
+ icon: string;
30
+ large?: boolean | undefined;
31
+ hint?: string | undefined;
32
+ } | undefined;
33
+ sections: readonly OfficeGallerySection[];
34
+ /** Tiles shown inline (`mode="inline"`); defaults to the first section's items. */
35
+ inline?: readonly OfficeGalleryItem[] | undefined;
36
+ }
37
+ /**
38
+ * `<office-ui-gallery>`: Office's ribbon gallery (Shape Styles, Themes, Table Styles). Set
39
+ * `state` (`OfficeGalleryState`, translated). `mode="inline"` shows a strip of tiles beside a
40
+ * More button; otherwise the trigger is a labelled dropdown (`chevron-only` keeps just the
41
+ * chevron, `icon` names its glyph). The popup opens below the trigger, keeps inside the window
42
+ * and closes on Escape, an outside press or a pick. ArrowDown on the trigger opens it and focuses
43
+ * the first tile. A pick emits `office-gallery-pick` `{ gallery, itemId }`.
44
+ *
45
+ * Tiles render in the light DOM beside the host's children (Lit renders the template into the
46
+ * host itself) so products can query them (`data-gallery-item`); the rules join the host's root
47
+ * once. Static `pickEvent`, `triggerAttribute`, `popupAttribute`, `itemAttribute` and
48
+ * `compactAttribute` keep a product's published names; override `triggerIcon()` to draw a product
49
+ * glyph.
50
+ */
51
+ export declare class OfficeUiGallery extends OfficeElement {
52
+ static pickEvent: string;
53
+ static triggerAttribute: string;
54
+ static popupAttribute: string;
55
+ static itemAttribute: string;
56
+ static compactAttribute: string | null;
57
+ static styles: import("lit").CSSResult[];
58
+ /** `mode`, `chevron-only` and `icon` are read from the attributes, as before. */
59
+ static get observedAttributes(): string[];
60
+ private model;
61
+ private locked;
62
+ private opened;
63
+ attributeChangedCallback(name: string, old: string | null, value: string | null): void;
64
+ get state(): OfficeGalleryState | undefined;
65
+ set state(value: OfficeGalleryState | null | undefined);
66
+ get disabled(): boolean;
67
+ set disabled(value: unknown);
68
+ get open(): boolean;
69
+ set open(value: unknown);
70
+ close(): void;
71
+ get trigger(): HTMLButtonElement;
72
+ /** The open popup; while closed it is not in the DOM, so this is a detached hidden placeholder. */
73
+ get popup(): HTMLElement;
74
+ private readonly closedPopup;
75
+ /** The trigger glyph: `command.icon` for a command, else the `icon` attribute. */
76
+ triggerIcon(): Element | null;
77
+ connectedCallback(): void;
78
+ /** Host attributes (never written before the element is connected). */
79
+ private markHost;
80
+ disconnectedCallback(): void;
81
+ private unavailable;
82
+ private pick;
83
+ private onTrigger;
84
+ private onKey;
85
+ private readonly onOutside;
86
+ private readonly onEscape;
87
+ private readonly position;
88
+ private cleanup;
89
+ private tile;
90
+ private lightTemplate;
91
+ private section;
92
+ /** The tiles are light-DOM children of the host, shown through this slot. */
93
+ protected render(): TemplateResult<1>;
94
+ protected updated(): void;
95
+ }
96
+ export declare const defineGallery: import("../registry.js").Definer;
97
+ export { parseSvgPreview } from './safe-svg.js';
@@ -0,0 +1,35 @@
1
+ import { OfficeElement } from '../base.js';
2
+ /**
3
+ * Labelled group of ribbon commands: `role="group"`, `label` is the caption and name. `launcher`
4
+ * adds Office's corner dialog launcher (`launcher="<command>"` emits `office-command`
5
+ * `{ command }`; `launcher-label` names it; `launcher-disabled` disables it). For narrow windows
6
+ * an overflow controller sets `data-collapsed` (the group becomes one button showing `icon` and
7
+ * the label; activating it emits `office-ribbon-collapse-toggle`) and `data-open` (its commands
8
+ * open in a popup at `--office-ribbon-collapse-x/-y`). The group marks itself `data-compact-row`
9
+ * when every command is one line tall (they centre vertically) and `data-stack` when it holds only
10
+ * small drop-down galleries (`[mode="dropdown"]` without `data-command-large`), which stack in
11
+ * columns. Static `launcherEvent`/`collapseEvent` and `launcherDetail()` let a product subclass
12
+ * keep its published events.
13
+ */
14
+ export declare class OfficeUiRibbonGroup extends OfficeElement {
15
+ static launcherEvent: string;
16
+ static collapseEvent: string;
17
+ static styles: import("lit").CSSResult[];
18
+ /** The group is configured by attributes, as it always was (see `OfficeElement.watched`). */
19
+ static watched: string[];
20
+ private observer;
21
+ /** The launcher's event detail; null emits nothing. */
22
+ protected launcherDetail(): Record<string, unknown> | null;
23
+ /** The registered icon on the collapsed face; a product subclass may map names. */
24
+ protected iconName(): string;
25
+ connectedCallback(): void;
26
+ disconnectedCallback(): void;
27
+ private observe;
28
+ private measure;
29
+ private onLauncher;
30
+ /** The overflow controller listens for this and owns which popup is open. */
31
+ private onFace;
32
+ protected willUpdate(): void;
33
+ protected render(): import("lit").TemplateResult<1>;
34
+ }
35
+ export declare const defineRibbonGroup: import("../registry.js").Definer;
@@ -1,3 +1,4 @@
1
+ import { OfficeElement } from '../base.js';
1
2
  /** One ribbon command, translated. Booleans map to the command element's attributes. */
2
3
  export interface OfficeRibbonCommandView {
3
4
  id: string;
@@ -33,4 +34,16 @@ export interface OfficeRibbonGroupView {
33
34
  * light DOM, so their events (`office-command` and so on) bubble as usual. Static `groupTag`,
34
35
  * `commandTag`, `groupIdAttribute` and `commandIdAttribute` let a product keep its aliases.
35
36
  */
36
- export declare const defineRibbonSection: import("./registry.js").Definer;
37
+ export declare class OfficeUiRibbonSection extends OfficeElement {
38
+ #private;
39
+ static styles: import("lit").CSSResult[];
40
+ static groupTag: string;
41
+ static commandTag: string;
42
+ static groupIdAttribute: string;
43
+ static commandIdAttribute: string;
44
+ protected render(): import("lit").TemplateResult<1>;
45
+ get groups(): readonly OfficeRibbonGroupView[];
46
+ set groups(value: readonly OfficeRibbonGroupView[] | null | undefined);
47
+ connectedCallback(): void;
48
+ }
49
+ export declare const defineRibbonSection: import("../registry.js").Definer;
@@ -0,0 +1,10 @@
1
+ import { OfficeElement } from '../base.js';
2
+ /**
3
+ * Layout for small ribbon commands: a column (Office's three-row stack of Cut, Copy and Format
4
+ * Painter) or, with `orientation="horizontal"`, a row (Bold, Italic, Underline). Not a group.
5
+ */
6
+ export declare class OfficeUiRibbonStack extends OfficeElement {
7
+ static styles: import("lit").CSSResult[];
8
+ protected render(): import("lit").TemplateResult<1>;
9
+ }
10
+ export declare const defineRibbonStack: import("../registry.js").Definer;
@@ -0,0 +1,82 @@
1
+ import { OfficeElement } from '../base.js';
2
+ /** Emitted when the user picks a tab; cancelable (`preventDefault()` keeps the current tab). */
3
+ export type OfficeRibbonSelectEvent = CustomEvent<{
4
+ tab: string;
5
+ }>;
6
+ interface RibbonTab {
7
+ id: string;
8
+ label: string;
9
+ keytip?: string;
10
+ keytipPanel?: string;
11
+ }
12
+ /**
13
+ * `<office-ui-ribbon>`: the Office tab row (Quick Access Toolbar, File, tabs, search) over the
14
+ * tab panels. Panels are light-DOM children carrying `data-ribbon-tab` (id), `data-label` and
15
+ * optionally `data-tab-keytip`; the element builds the tabs from them, keeps exactly one panel
16
+ * visible and moves between tabs with the arrow keys, Home and End. Slots: `quick-access`,
17
+ * `search`, `end`. Attributes: `selected`, `label` (tab list name), `file-label` (default "File"),
18
+ * `no-file`, `file-expanded`, `file-keytip`. Events: `office-ribbon-select` `{ tab }`
19
+ * (cancelable) and `office-ribbon-file` when File is activated.
20
+ */
21
+ export declare class OfficeUiRibbon extends OfficeElement {
22
+ static styles: import("lit").CSSResult[];
23
+ static properties: {
24
+ selected: {
25
+ type: StringConstructor;
26
+ noAccessor: boolean;
27
+ };
28
+ label: {
29
+ type: StringConstructor;
30
+ };
31
+ fileLabel: {
32
+ attribute: string;
33
+ type: StringConstructor;
34
+ };
35
+ noFile: {
36
+ type: BooleanConstructor;
37
+ reflect: true;
38
+ converter: {
39
+ fromAttribute: (value: string | null) => boolean;
40
+ toAttribute: (value: unknown) => string | null;
41
+ };
42
+ attribute: string;
43
+ };
44
+ fileExpanded: {
45
+ attribute: string;
46
+ type: StringConstructor;
47
+ };
48
+ fileKeytip: {
49
+ attribute: string;
50
+ type: StringConstructor;
51
+ };
52
+ tabs: {
53
+ state: boolean;
54
+ };
55
+ };
56
+ label: string | null;
57
+ fileLabel: string | null;
58
+ noFile: boolean;
59
+ fileExpanded: string | null;
60
+ fileKeytip: string | null;
61
+ tabs: RibbonTab[];
62
+ private chosen;
63
+ constructor();
64
+ get selected(): string;
65
+ set selected(tab: string | null);
66
+ /** Focus the File button (for example when the backstage it opened closes). */
67
+ focusFile(): void;
68
+ /** Focus the selected tab. */
69
+ focusTab(): void;
70
+ private panels;
71
+ /** Read the tabs off the panels (on connection and whenever the slotted panels change). */
72
+ private build;
73
+ private choose;
74
+ private onTabClick;
75
+ private onKey;
76
+ connectedCallback(): void;
77
+ /** Exactly one panel shows. */
78
+ protected updated(): void;
79
+ protected render(): import("lit").TemplateResult<1>;
80
+ }
81
+ export declare const defineRibbon: import("../registry.js").Definer;
82
+ export {};
@@ -0,0 +1,49 @@
1
+ import { OfficeElement } from '../base.js';
2
+ /**
3
+ * A ribbon checkbox row (View > Ruler, Gridlines): a labelled `office-ui-checkbox` sharing its
4
+ * keyboard and focus behaviour. Moved from pptx-viewer `pptx-ui-ribbon-toggle`. Controlled:
5
+ * `label`, `checked`, `disabled`, `title` and `command` attributes; user activation emits
6
+ * `office-toggle` `{ command, checked }` (static `requestEvent`, `idAttribute` and `detailKey`
7
+ * let a product subclass keep its published names). The host reflects the new state.
8
+ */
9
+ export declare class OfficeUiRibbonToggle extends OfficeElement {
10
+ static requestEvent: string;
11
+ static idAttribute: string;
12
+ static detailKey: string;
13
+ /** The checkbox drawn inside; a product subclass may use its own aliased tag. */
14
+ static checkboxTag: string;
15
+ static styles: import("lit").CSSResult[];
16
+ static properties: {
17
+ label: {
18
+ type: StringConstructor;
19
+ };
20
+ checked: {
21
+ type: BooleanConstructor;
22
+ reflect: true;
23
+ converter: {
24
+ fromAttribute: (value: string | null) => boolean;
25
+ toAttribute: (value: unknown) => string | null;
26
+ };
27
+ };
28
+ disabled: {
29
+ type: BooleanConstructor;
30
+ reflect: true;
31
+ converter: {
32
+ fromAttribute: (value: string | null) => boolean;
33
+ toAttribute: (value: unknown) => string | null;
34
+ };
35
+ };
36
+ };
37
+ label: string;
38
+ checked: boolean;
39
+ disabled: boolean;
40
+ /** `title` is a native attribute, so it is watched rather than declared as a property. */
41
+ static get observedAttributes(): string[];
42
+ constructor();
43
+ attributeChangedCallback(name: string, old: string | null, value: string | null): void;
44
+ /** Clicking the label text presses the checkbox, which is the only control that toggles. */
45
+ private onLabelClick;
46
+ private onChange;
47
+ protected render(): import("lit").TemplateResult;
48
+ }
49
+ export declare const defineRibbonToggle: import("../registry.js").Definer;
@@ -0,0 +1,15 @@
1
+ import { OfficeElement } from '../base.js';
2
+ /**
3
+ * `role="toolbar"` container. Left/Right/Home/End move focus between enabled direct or
4
+ * group-nested controls (Up/Down instead when `aria-orientation="vertical"`).
5
+ * All items stay in the tab order: roving tabindex is not implemented yet.
6
+ */
7
+ export declare class OfficeUiToolbar extends OfficeElement {
8
+ static styles: import("lit").CSSResult[];
9
+ constructor();
10
+ private items;
11
+ private onKey;
12
+ protected willUpdate(): void;
13
+ protected render(): import("lit").TemplateResult<1>;
14
+ }
15
+ export declare const defineToolbar: import("../registry.js").Definer;
@@ -0,0 +1,43 @@
1
+ import { type PropertyValues } from 'lit';
2
+ import type { DiagramDrawing } from 'ooxml-core/diagram';
3
+ import { OfficeElement } from '../base.js';
4
+ import { type SchemeColors, type SmartArtRenderReport } from './smartart-svg.js';
5
+ export type { SchemeColors, SmartArtRenderReport } from './smartart-svg.js';
6
+ export { renderDiagramDrawing } from './smartart-svg.js';
7
+ export type OfficeSmartArtRenderEvent = CustomEvent<SmartArtRenderReport>;
8
+ /**
9
+ * `<office-ui-smartart>` draws the cached drawing of a SmartArt diagram (core
10
+ * `DiagramDrawing`, from `ooxml-core/diagram`) as SVG. Set `drawing` (and
11
+ * optionally `schemeColors`, resolved theme colours such as `{ accent1: '#4472c4' }`);
12
+ * `label` becomes the accessible name (`role="img"`). It never re-lays-out a diagram: it shows
13
+ * what the producing application last computed. Approximations (preset outlines drawn as
14
+ * rectangles, gradient and pattern fills, 3D) are reported honestly in the
15
+ * `office-smartart-render` event detail and in `data-approximated` attributes, never hidden.
16
+ */
17
+ export declare class OfficeUiSmartArt extends OfficeElement {
18
+ static styles: import("lit").CSSResult[];
19
+ static properties: {
20
+ drawing: {
21
+ attribute: boolean;
22
+ };
23
+ schemeColors: {
24
+ attribute: boolean;
25
+ };
26
+ label: {
27
+ type: StringConstructor;
28
+ };
29
+ };
30
+ drawing: DiagramDrawing | undefined;
31
+ schemeColors: SchemeColors;
32
+ label: string | null;
33
+ private figure;
34
+ private lastReport;
35
+ constructor();
36
+ /** The report of the last render (undefined while empty). */
37
+ get report(): SmartArtRenderReport | undefined;
38
+ /** The SVG is rebuilt only when the drawing or the scheme colours change. */
39
+ protected willUpdate(changed: PropertyValues<this>): void;
40
+ protected updated(changed: PropertyValues<this>): void;
41
+ protected render(): SVGSVGElement | import("lit").TemplateResult<1>;
42
+ }
43
+ export declare const defineSmartArt: import("../registry.js").Definer;
@@ -1,14 +1 @@
1
- import { type SmartArtRenderReport } from './smartart-svg.js';
2
- export type { SchemeColors, SmartArtRenderReport } from './smartart-svg.js';
3
- export { renderDiagramDrawing } from './smartart-svg.js';
4
- export type OfficeSmartArtRenderEvent = CustomEvent<SmartArtRenderReport>;
5
- /**
6
- * `<office-ui-smartart>` draws the cached drawing of a SmartArt diagram (core
7
- * `DiagramDrawing`, from `ooxml-core/diagram`) as SVG. Set `drawing` (and
8
- * optionally `schemeColors`, resolved theme colours such as `{ accent1: '#4472c4' }`);
9
- * `label` becomes the accessible name (`role="img"`). It never re-lays-out a diagram: it shows
10
- * what the producing application last computed. Approximations (preset outlines drawn as
11
- * rectangles, gradient and pattern fills, 3D) are reported honestly in the
12
- * `office-smartart-render` event detail and in `data-approximated` attributes, never hidden.
13
- */
14
- export declare const defineSmartArt: import("./registry.js").Definer;
1
+ export * from './smartart/smartart.js';
package/dist/smartart.js CHANGED
@@ -1,3 +1,3 @@
1
- export { defineSmartArt, renderDiagramDrawing } from './chunk-4JQLQROF.js';
2
- import './chunk-UEJ4F33J.js';
3
- import './chunk-G3LAGZEW.js';
1
+ export { OfficeUiSmartArt, defineSmartArt, renderDiagramDrawing } from './chunk-3MDKXKKQ.js';
2
+ import './chunk-5A4REH6T.js';
3
+ import './chunk-HSJH6SUW.js';
package/dist/styles.d.ts CHANGED
@@ -1,8 +1,5 @@
1
- /** Attach scoped CSS to a shadow root: a constructed stylesheet when available, else a `<style>`. */
2
- export declare function attachStyles(root: ShadowRoot, css: string): void;
3
1
  /**
4
2
  * Rules every control repeats: `hidden`, the coarse-pointer touch target and the forced-colors
5
- * focus ring. Prepended to each control's own CSS by `controlCss`.
3
+ * focus ring. `controlStyles` (base.ts) puts it ahead of each element's own `.css` file.
6
4
  */
7
5
  export declare const COMMON_CONTROL_CSS: string;
8
- export declare const controlCss: (css: string) => string;
@@ -0,0 +1,29 @@
1
+ import { TeamsElement } from './base.js';
2
+ export interface RailItem {
3
+ id: string;
4
+ label: string;
5
+ /** An icon name from the ooxml-ui icon registry (`chat`, `users`, `phone`, `folder`, ...). */
6
+ icon: string;
7
+ badge?: number;
8
+ }
9
+ /**
10
+ * The narrow app bar on the far left (Chat, Teams, Calls, Files). Properties: `items`,
11
+ * `selected`. Emits `office-rail-select` `{ id }`.
12
+ */
13
+ export declare class OfficeUiAppRail extends TeamsElement {
14
+ static styles: import("lit").CSSResult[];
15
+ static properties: {
16
+ items: {
17
+ attribute: boolean;
18
+ };
19
+ selected: {
20
+ type: StringConstructor;
21
+ };
22
+ };
23
+ items: RailItem[];
24
+ selected: string;
25
+ constructor();
26
+ connectedCallback(): void;
27
+ protected render(): import("lit").TemplateResult<1>;
28
+ }
29
+ export declare const defineAppRail: import("../registry.js").Definer;
@@ -0,0 +1,39 @@
1
+ import { type PropertyValues } from 'lit';
2
+ import { TeamsElement } from './base.js';
3
+ export type Presence = 'available' | 'busy' | 'away' | 'offline';
4
+ /**
5
+ * Round avatar with initials and an optional presence badge, like the Teams persona.
6
+ * Attributes: `name`, `color` (default derived from `seed`/`name`), `size` (`sm` | `md` | `lg` |
7
+ * `xl`), `presence` (`available` | `busy` | `away` | `offline`, absent = no badge).
8
+ */
9
+ export declare class OfficeUiAvatar extends TeamsElement {
10
+ static styles: import("lit").CSSResult[];
11
+ static properties: {
12
+ name: {
13
+ type: StringConstructor;
14
+ };
15
+ seed: {
16
+ type: StringConstructor;
17
+ };
18
+ color: {
19
+ type: StringConstructor;
20
+ };
21
+ size: {
22
+ type: StringConstructor;
23
+ reflect: boolean;
24
+ };
25
+ presence: {
26
+ type: StringConstructor;
27
+ reflect: boolean;
28
+ };
29
+ };
30
+ name: string;
31
+ seed: string;
32
+ color: string;
33
+ size: 'sm' | 'md' | 'lg' | 'xl';
34
+ presence: Presence | '';
35
+ constructor();
36
+ protected willUpdate(changed: PropertyValues<this>): void;
37
+ protected render(): import("lit").TemplateResult<1>;
38
+ }
39
+ export declare const defineAvatar: import("../registry.js").Definer;
@@ -0,0 +1,17 @@
1
+ import { type CSSResult } from 'lit';
2
+ import { OfficeElement } from '../base.js';
3
+ /** An element's style list: the shared control base, the team reset and its own .css file. */
4
+ export declare const withStyles: (css: string) => CSSResult[];
5
+ /**
6
+ * Base of the team-workspace elements. They keep Lit's batched (asynchronous) updates: a host
7
+ * awaits `updateComplete`, and a chat list redraws once however many properties it sets.
8
+ */
9
+ export declare class TeamsElement extends OfficeElement {
10
+ static syncUpdates: boolean;
11
+ }
12
+ /** A stable colour per id, so one person looks the same in every list. */
13
+ export declare function colorFor(id: string): string;
14
+ export declare function formatTime(ts: number): string;
15
+ /** "Today", "Yesterday" or a date, for the separators between days in a conversation. */
16
+ export declare function dayLabel(ts: number, now?: number): string;
17
+ export declare function formatSize(bytes?: number): string;