ooxml-ui 0.10.2 → 0.12.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.
@@ -62,7 +62,11 @@ var BUILT_IN = {
62
62
  connector: "M3.5 15.5h5v-11h8M14.5 2.5l2 2-2 2M2.5 13.5v4",
63
63
  textBox: "M3 3h14v14H3ZM6.5 6.5h7M10 6.5v7",
64
64
  ruler: "M2 7h16v6H2ZM5 7v3M8 7v2M11 7v3M14 7v2",
65
- launcher: "M5 15 15 5M9 5h6v6"
65
+ launcher: "M5 15 15 5M9 5h6v6",
66
+ warning: "M10 3l7.5 13H2.5ZM10 8v3.5M10 14v.1",
67
+ info: "M3 10a7 7 0 1 0 14 0 7 7 0 1 0-14 0M10 9v4.5M10 6.3v.1",
68
+ restore: "M3.5 10a6.5 6.5 0 1 0 2-4.6M3.5 3v3.5H7M10 6.5v3.8l2.5 1.6",
69
+ print: "M5.5 7.5V3h9v4.5M5.5 14.5H3V8h14v6.5h-2.5M5.5 12h9v5h-9Z"
66
70
  };
67
71
  for (const [name, d] of Object.entries(BUILT_IN)) registry.set(name, { d });
68
72
  function registerIcon(name, icon) {
@@ -1,3 +1,8 @@
1
+ import { defineDialogFooter, defineToasts } from './chrome-controls.js';
2
+ import { definePasteOptions, defineReadOnlyBanner } from './document-notices.js';
3
+ import { defineRadio } from './radio.js';
4
+ import { defineRibbonToggle } from './ribbon-toggle.js';
5
+ import { defineSearchField } from './search-field.js';
1
6
  import { defineBackstage } from './backstage.js';
2
7
  import { defineFindBar } from './find-bar.js';
3
8
  import { definePrintPreview } from './print-preview.js';
@@ -17,7 +22,7 @@ import { defineSelect } from './select.js';
17
22
  import { defineStatusBar, defineStatusItem } from './status-bar.js';
18
23
  import { defineTabStrip } from './tab-strip.js';
19
24
  import { defineZoomSlider } from './zoom-slider.js';
20
- export { defineAccount, defineBackstage, defineFindBar, definePrintPreview, defineRibbon, defineRuler, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, defineRibbonGroup, defineRibbonStack, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToolbar, defineZoomSlider, };
25
+ export { defineAccount, defineDialogFooter, definePasteOptions, defineRadio, defineReadOnlyBanner, defineRibbonToggle, defineSearchField, defineToasts, defineBackstage, defineFindBar, definePrintPreview, defineRibbon, defineRuler, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineIcon, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, defineRibbonGroup, defineRibbonStack, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToolbar, defineZoomSlider, };
21
26
  export type { OfficeCommandEvent } from './button.js';
22
27
  export type { OfficeDialogCloseEvent, OfficeDialogCloseReason } from './dialog.js';
23
28
  export type { OfficeSelectOption } from './select.js';
@@ -30,9 +35,11 @@ export type { OfficeFindInputEvent, OfficeFindStepEvent } from './find-bar.js';
30
35
  export type { OfficePrintPreviewPageEvent } from './print-preview.js';
31
36
  export type { OfficeRibbonSelectEvent } from './ribbon-tabs.js';
32
37
  export { rulerDivisions } from './ruler.js';
38
+ export { OFFICE_TOAST_VISIBLE_LIMIT, type OfficeDialogFooterAction, type OfficeDialogFooterState, type OfficeDialogFooterVariant, type OfficeToast, type OfficeToastsState, } from './chrome-controls.js';
39
+ export type { OfficePasteOption, OfficePasteOptionsState, OfficeReadOnlyBannerIntent, OfficeReadOnlyBannerState, } from './document-notices.js';
33
40
  export { clearOfficeProfile, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, profileInitials, readOfficeProfile, sanitizeOfficeProfile, writeOfficeProfile, type OfficeProfile, type OfficeProfileChangeEvent, } from './account.js';
34
41
  export { clampOptionNumber, type OfficeOptionCategory, type OfficeOptionChoice, type OfficeOptionControl, type OfficeOptionSection, type OfficeOptionsChangeEvent, type OfficeOptionValue, type OfficeOptionValues, } from './options.js';
35
42
  /** Every control of this entry. */
36
- export declare const CONTROL_DEFINERS: readonly [import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer];
43
+ export declare const CONTROL_DEFINERS: readonly [import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer, import("./registry.js").Definer];
37
44
  /** Idempotent, SSR-safe (no-op without a DOM). */
38
45
  export declare function registerControls(registry?: CustomElementRegistry): void;
package/dist/controls.js CHANGED
@@ -1,4 +1,4 @@
1
- export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, attachKeyTips, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineFindBar, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePrintPreview, defineRibbon, defineRibbonGroup, defineRibbonStack, defineRuler, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToolbar, defineZoomSlider, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, writeOfficeProfile } from './chunk-X5C3BTJS.js';
2
- export { defineIcon } from './chunk-PCSUQPMC.js';
1
+ export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToasts, defineToolbar, defineZoomSlider, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, writeOfficeProfile } from './chunk-BN3UBHTC.js';
2
+ export { defineIcon } from './chunk-YZ2JQNHX.js';
3
3
  import './chunk-RLPL7Q6J.js';
4
4
  import './chunk-EY266IK3.js';
@@ -0,0 +1,55 @@
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 4px 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;
package/dist/icons.js CHANGED
@@ -1,2 +1,2 @@
1
- export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-PCSUQPMC.js';
1
+ export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-YZ2JQNHX.js';
2
2
  import './chunk-EY266IK3.js';
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export * from './smartart.js';
5
5
  export * from './theme.js';
6
6
  export { CONTRACT_REVISION, type Definer } from './registry.js';
7
7
  /** Every ooxml-ui tag this package defines, in registration order. */
8
- export declare const OFFICE_UI_TAGS: readonly ["office-ui-icon", "office-ui-button", "office-ui-checkbox", "office-ui-switch", "office-ui-select", "office-ui-ribbon-group", "office-ui-ribbon-stack", "office-ui-menu-item", "office-ui-menu-button", "office-ui-menu-separator", "office-ui-context-menu", "office-ui-command-search", "office-ui-toolbar", "office-ui-dialog", "office-ui-status-bar", "office-ui-status-item", "office-ui-zoom-slider", "office-ui-tab-strip", "office-ui-options-dialog", "office-ui-account", "office-ui-ribbon", "office-ui-find-bar", "office-ui-ruler", "office-ui-backstage", "office-ui-print-preview", "office-ui-presence", "office-ui-smartart"];
8
+ export declare const OFFICE_UI_TAGS: readonly ["office-ui-icon", "office-ui-button", "office-ui-checkbox", "office-ui-switch", "office-ui-select", "office-ui-ribbon-group", "office-ui-ribbon-stack", "office-ui-menu-item", "office-ui-menu-button", "office-ui-menu-separator", "office-ui-context-menu", "office-ui-command-search", "office-ui-toolbar", "office-ui-dialog", "office-ui-status-bar", "office-ui-status-item", "office-ui-zoom-slider", "office-ui-tab-strip", "office-ui-options-dialog", "office-ui-account", "office-ui-ribbon", "office-ui-find-bar", "office-ui-ruler", "office-ui-backstage", "office-ui-print-preview", "office-ui-radio", "office-ui-search", "office-ui-ribbon-toggle", "office-ui-dialog-footer", "office-ui-toasts", "office-ui-read-only-banner", "office-ui-paste-options", "office-ui-presence", "office-ui-smartart"];
9
9
  /**
10
10
  * Install the theme tokens and define every element. Idempotent and safe to call from every
11
11
  * viewer binding; a no-op where there is no DOM (SSR).
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { installOfficeUiTheme } from './chunk-H4KFVIGT.js';
2
2
  export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme } from './chunk-H4KFVIGT.js';
3
- import { registerControls } from './chunk-X5C3BTJS.js';
4
- export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, attachKeyTips, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineFindBar, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePrintPreview, defineRibbon, defineRibbonGroup, defineRibbonStack, defineRuler, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToolbar, defineZoomSlider, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, writeOfficeProfile } from './chunk-X5C3BTJS.js';
5
- export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-PCSUQPMC.js';
3
+ import { registerControls } from './chunk-BN3UBHTC.js';
4
+ export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToasts, defineToolbar, defineZoomSlider, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, writeOfficeProfile } from './chunk-BN3UBHTC.js';
5
+ export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-YZ2JQNHX.js';
6
6
  import { definePresence } from './chunk-RLPL7Q6J.js';
7
7
  export { definePresence, initialsOf, participantsFromAwareness } from './chunk-RLPL7Q6J.js';
8
8
  import { defineSmartArt } from './chunk-KJV76AB7.js';
@@ -36,6 +36,13 @@ var OFFICE_UI_TAGS = [
36
36
  "office-ui-ruler",
37
37
  "office-ui-backstage",
38
38
  "office-ui-print-preview",
39
+ "office-ui-radio",
40
+ "office-ui-search",
41
+ "office-ui-ribbon-toggle",
42
+ "office-ui-dialog-footer",
43
+ "office-ui-toasts",
44
+ "office-ui-read-only-banner",
45
+ "office-ui-paste-options",
39
46
  "office-ui-presence",
40
47
  "office-ui-smartart"
41
48
  ];
@@ -0,0 +1 @@
1
+ export declare const defineRadio: import("./registry.js").Definer;
@@ -0,0 +1 @@
1
+ export declare const defineRibbonToggle: import("./registry.js").Definer;
@@ -0,0 +1 @@
1
+ export declare const defineSearchField: import("./registry.js").Definer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml-ui",
3
- "version": "0.10.2",
3
+ "version": "0.12.0",
4
4
  "description": "Shared, format-neutral web components and styles for the Office viewers (Word, PowerPoint, Excel)",
5
5
  "keywords": [
6
6
  "custom-elements",