@openelement/ui 1.0.0-alpha.5 → 1.0.0-alpha.7

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.
package/src/register.d.ts CHANGED
@@ -1 +1,4 @@
1
- /** Explicitly register every first-party UI element. Safe to call repeatedly. */ export declare function registerOpenUi(registry?: CustomElementRegistry | undefined): void;
1
+ //#region src/register.d.ts
2
+ /** Explicitly register every first-party UI element. Safe to call repeatedly. */
3
+ export declare function registerOpenUi(registry?: CustomElementRegistry | undefined): void;
4
+ //#endregion
package/src/register.js CHANGED
@@ -1,61 +1,30 @@
1
- import { OpenBadge } from './open-badge.js';
2
- import { OpenButton } from './open-button.js';
3
- import { OpenCallout } from './open-callout.js';
4
- import { OpenCard } from './open-card.js';
5
- import { OpenCodeBlock } from './open-code-block.js';
6
- import { OpenDialog } from './open-dialog.js';
7
- import { OpenDropdown } from './open-dropdown.js';
8
- import { OpenInput } from './open-input.js';
9
- import { OpenTabs } from './open-tabs.js';
10
- import { OpenThemeToggle } from './open-theme-toggle.js';
11
- // Compiled modules carry no runtime tagName export (the compiled
12
- // program owns the tag), so the registration table lives here, beside the
13
- // class imports. Keep aligned with manifest.declarations order.
1
+ import { OpenButton } from "./open-button.js";
2
+ import { OpenCard } from "./open-card.js";
3
+ import { OpenInput } from "./open-input.js";
4
+ import { OpenCodeBlock } from "./open-code-block.js";
5
+ import { OpenBadge } from "./open-badge.js";
6
+ import { OpenThemeToggle } from "./open-theme-toggle.js";
7
+ import { OpenDialog } from "./open-dialog.js";
8
+ import { OpenCallout } from "./open-callout.js";
9
+ import { OpenDropdown } from "./open-dropdown.js";
10
+ import { OpenTabs } from "./open-tabs.js";
11
+ //#region src/register.ts
14
12
  const COMPONENTS = [
15
- [
16
- 'open-card',
17
- OpenCard
18
- ],
19
- [
20
- 'open-callout',
21
- OpenCallout
22
- ],
23
- [
24
- 'open-button',
25
- OpenButton
26
- ],
27
- [
28
- 'open-input',
29
- OpenInput
30
- ],
31
- [
32
- 'open-theme-toggle',
33
- OpenThemeToggle
34
- ],
35
- [
36
- 'open-code-block',
37
- OpenCodeBlock
38
- ],
39
- [
40
- 'open-badge',
41
- OpenBadge
42
- ],
43
- [
44
- 'open-dialog',
45
- OpenDialog
46
- ],
47
- [
48
- 'open-dropdown',
49
- OpenDropdown
50
- ],
51
- [
52
- 'open-tabs',
53
- OpenTabs
54
- ]
13
+ ["open-card", OpenCard],
14
+ ["open-callout", OpenCallout],
15
+ ["open-button", OpenButton],
16
+ ["open-input", OpenInput],
17
+ ["open-theme-toggle", OpenThemeToggle],
18
+ ["open-code-block", OpenCodeBlock],
19
+ ["open-badge", OpenBadge],
20
+ ["open-dialog", OpenDialog],
21
+ ["open-dropdown", OpenDropdown],
22
+ ["open-tabs", OpenTabs]
55
23
  ];
56
- /** Explicitly register every first-party UI element. Safe to call repeatedly. */ export function registerOpenUi(registry = globalThis.customElements) {
57
- if (!registry) return;
58
- for (const [tagName, constructor] of COMPONENTS){
59
- if (!registry.get(tagName)) registry.define(tagName, constructor);
60
- }
24
+ /** Explicitly register every first-party UI element. Safe to call repeatedly. */
25
+ function registerOpenUi(registry = globalThis.customElements) {
26
+ if (!registry) return;
27
+ for (const [tagName, constructor] of COMPONENTS) if (!registry.get(tagName)) registry.define(tagName, constructor);
61
28
  }
29
+ //#endregion
30
+ export { registerOpenUi };