@samtv12345/etherpad-webcomponents 0.0.13 → 0.0.14
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/README.md +41 -10
- package/dist/EpButton.js +4 -4
- package/dist/EpCard.js +2 -2
- package/dist/EpCheckbox.js +2 -2
- package/dist/EpColorPicker.js +2 -2
- package/dist/EpDropdown.js +2 -2
- package/dist/EpDropdownItem.js +1 -1
- package/dist/EpInput.js +3 -3
- package/dist/EpModal.js +6 -6
- package/dist/EpModal.js.map +1 -1
- package/dist/EpNotification.js +6 -6
- package/dist/EpSelect.js +3 -3
- package/dist/EpTabs.d.ts +64 -0
- package/dist/EpTabs.d.ts.map +1 -0
- package/dist/EpTabs.js +296 -0
- package/dist/EpTabs.js.map +1 -0
- package/dist/EpTheme.d.ts +23 -16
- package/dist/EpTheme.d.ts.map +1 -1
- package/dist/EpTheme.js +91 -64
- package/dist/EpTheme.js.map +1 -1
- package/dist/EpToast.js +7 -7
- package/dist/EpToast.js.map +1 -1
- package/dist/EpToolbarSelect.js +2 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/themes.d.ts +81 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/themes.js +227 -0
- package/dist/themes.js.map +1 -0
- package/package.json +17 -23
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,9 @@ export { EpToolbarSelect } from './EpToolbarSelect.js';
|
|
|
14
14
|
export { EpSelect } from './EpSelect.js';
|
|
15
15
|
export type { EpSelectOption } from './EpSelect.js';
|
|
16
16
|
export { EpUserBadge } from './EpUserBadge.js';
|
|
17
|
-
export {
|
|
17
|
+
export { EpTabs, EpTab } from './EpTabs.js';
|
|
18
|
+
export { EpTheme } from './EpTheme.js';
|
|
19
|
+
export * from './themes.js';
|
|
18
20
|
export type { ThemeTokens } from './EpTheme.js';
|
|
19
21
|
export { EpEditor } from './EpEditor.js';
|
|
20
22
|
export { AceEditor } from './editor/AceEditor.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,E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C;AACtH,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACpG,YAAY,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,9 @@ export { EpToastContainer, EpToastItem } from './EpToast.js';
|
|
|
13
13
|
export { EpToolbarSelect } from './EpToolbarSelect.js';
|
|
14
14
|
export { EpSelect } from './EpSelect.js';
|
|
15
15
|
export { EpUserBadge } from './EpUserBadge.js';
|
|
16
|
-
export {
|
|
16
|
+
export { EpTabs, EpTab } from './EpTabs.js';
|
|
17
|
+
export { EpTheme } from './EpTheme.js';
|
|
18
|
+
export * from './themes.js';
|
|
17
19
|
export { EpEditor } from './EpEditor.js';
|
|
18
20
|
export { AceEditor } from './editor/AceEditor.js';
|
|
19
21
|
export { default as AttributePool } from './editor/AttributePool.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,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AAc,CAAC;AACvC,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC"}
|
package/dist/themes.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export interface ThemeTokens {
|
|
2
|
+
'--bg-color': string;
|
|
3
|
+
'--bg-soft-color': string;
|
|
4
|
+
'--text-color': string;
|
|
5
|
+
'--text-soft-color': string;
|
|
6
|
+
'--middle-color': string;
|
|
7
|
+
'--dark-color': string;
|
|
8
|
+
'--super-dark-color': string;
|
|
9
|
+
'--light-color': string;
|
|
10
|
+
'--super-light-color': string;
|
|
11
|
+
'--primary-color': string;
|
|
12
|
+
'--main-font-family': string;
|
|
13
|
+
/** Text colour on top of `--primary-color` (primary buttons, badges). */
|
|
14
|
+
'--primary-text-color'?: string;
|
|
15
|
+
/** Errors, destructive actions. */
|
|
16
|
+
'--danger-color'?: string;
|
|
17
|
+
/** Success notices. */
|
|
18
|
+
'--success-color'?: string;
|
|
19
|
+
/** Warnings. */
|
|
20
|
+
'--warning-color'?: string;
|
|
21
|
+
/** Focus ring colour. */
|
|
22
|
+
'--focus-color'?: string;
|
|
23
|
+
/** Corner radius of buttons; inputs and selects use 1px less. */
|
|
24
|
+
'--radius'?: string;
|
|
25
|
+
/** Corner radius of surfaces (cards, dialogs, menus, toasts). */
|
|
26
|
+
'--radius-large'?: string;
|
|
27
|
+
/** `light` or `dark`; overrides the detection from `--bg-color`. */
|
|
28
|
+
'--color-scheme'?: string;
|
|
29
|
+
/** Elevation of floating surfaces. */
|
|
30
|
+
'--shadow'?: string;
|
|
31
|
+
/** Allows extra, app-specific tokens (`--my-token`). */
|
|
32
|
+
[token: `--${string}`]: string | undefined;
|
|
33
|
+
}
|
|
34
|
+
/** Name of the theme used when nothing else is selected. */
|
|
35
|
+
export declare const DEFAULT_THEME = "colibris";
|
|
36
|
+
/** Registry of all known themes. Prefer `defineTheme` for adding new ones. */
|
|
37
|
+
export declare const themes: Record<string, ThemeTokens>;
|
|
38
|
+
/**
|
|
39
|
+
* Registers a theme. Tokens that are not given are taken from `base`
|
|
40
|
+
* (default: colibris), so a theme only has to state what differs – e.g. a
|
|
41
|
+
* different accent colour:
|
|
42
|
+
*
|
|
43
|
+
* defineTheme('acme', { '--primary-color': '#7c3aed' });
|
|
44
|
+
*
|
|
45
|
+
* Returns the complete token set.
|
|
46
|
+
*/
|
|
47
|
+
export declare function defineTheme(name: string, tokens: Partial<ThemeTokens>, base?: string): ThemeTokens;
|
|
48
|
+
/** Returns the tokens of a theme, or undefined if it is unknown. */
|
|
49
|
+
export declare function getTheme(name: string): ThemeTokens | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Renders a theme as plain CSS (`selector { --token: value; … }`), for pages
|
|
52
|
+
* that set tokens on `:root` – or server-side – instead of using `<ep-theme>`.
|
|
53
|
+
*
|
|
54
|
+
* Token names must look like `--name`, and values must not contain
|
|
55
|
+
* `; { } < > \`; anything else throws instead of producing broken or
|
|
56
|
+
* injectable CSS. The selector is written as given and must be trusted.
|
|
57
|
+
*/
|
|
58
|
+
export declare function themeToCss(theme: string | Partial<ThemeTokens>, selector?: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* Sets a theme's tokens as inline custom properties on `el` (e.g.
|
|
61
|
+
* `document.documentElement`). Tokens set by an earlier call that the new
|
|
62
|
+
* theme does not define are removed again.
|
|
63
|
+
*/
|
|
64
|
+
export declare function applyTheme(el: HTMLElement, theme: string | Partial<ThemeTokens>): void;
|
|
65
|
+
/** Calls `fn` whenever a theme is (re)defined at runtime. Returns an unsubscribe function. */
|
|
66
|
+
export declare function onThemeDefined(fn: (name: string) => void): () => void;
|
|
67
|
+
/** @internal */
|
|
68
|
+
export declare function notifyThemeChanged(name: string): void;
|
|
69
|
+
/**
|
|
70
|
+
* Parses hex (#rgb, #rgba, #rrggbb, #rrggbbaa), rgb()/rgba() and a few named
|
|
71
|
+
* colours. Returns undefined for anything else (hsl(), color-mix(), …); in a
|
|
72
|
+
* browser `<ep-theme>` resolves such values through the CSS engine first.
|
|
73
|
+
*/
|
|
74
|
+
export declare function parseColor(value: string): [number, number, number] | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Whether a theme has a dark background. Uses `--color-scheme` when the theme
|
|
77
|
+
* sets it (`light` / `dark`), otherwise the luminance of `--bg-color`.
|
|
78
|
+
* Unparseable colours count as light.
|
|
79
|
+
*/
|
|
80
|
+
export declare function isDark(tokens: Partial<ThemeTokens>, resolvedBg?: string): boolean;
|
|
81
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yEAAyE;IACzE,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAg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GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAgB9E;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAQjF"}
|
package/dist/themes.js
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/** Name of the theme used when nothing else is selected. */
|
|
2
|
+
export const DEFAULT_THEME = 'colibris';
|
|
3
|
+
const SHADOW = '0 0 0 1px rgba(99, 114, 130, 0.16), 0 8px 16px rgba(27, 39, 51, 0.08)';
|
|
4
|
+
const SHADOW_DARK = '0 0 0 1px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.35)';
|
|
5
|
+
/** Registry of all known themes. Prefer `defineTheme` for adding new ones. */
|
|
6
|
+
export const themes = {
|
|
7
|
+
colibris: {
|
|
8
|
+
'--bg-color': 'white',
|
|
9
|
+
'--bg-soft-color': '#f2f3f4',
|
|
10
|
+
'--text-color': '#485365',
|
|
11
|
+
'--text-soft-color': '#576273',
|
|
12
|
+
'--middle-color': '#d2d2d2',
|
|
13
|
+
'--dark-color': '#576273',
|
|
14
|
+
'--super-dark-color': '#485365',
|
|
15
|
+
'--light-color': '#f2f3f4',
|
|
16
|
+
'--super-light-color': 'white',
|
|
17
|
+
'--primary-color': '#64d29b',
|
|
18
|
+
'--main-font-family': 'Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif',
|
|
19
|
+
'--primary-text-color': 'white',
|
|
20
|
+
'--danger-color': '#d1242f',
|
|
21
|
+
'--success-color': '#64d29b',
|
|
22
|
+
'--warning-color': '#d4a72c',
|
|
23
|
+
'--focus-color': '#576273',
|
|
24
|
+
'--radius': '4px',
|
|
25
|
+
'--radius-large': '5px',
|
|
26
|
+
'--shadow': SHADOW,
|
|
27
|
+
},
|
|
28
|
+
'colibris-dark': {
|
|
29
|
+
'--bg-color': '#2c3143',
|
|
30
|
+
'--bg-soft-color': '#363b50',
|
|
31
|
+
'--text-color': '#e4e6eb',
|
|
32
|
+
'--text-soft-color': '#a8adb8',
|
|
33
|
+
'--middle-color': '#4a5068',
|
|
34
|
+
'--dark-color': '#a8adb8',
|
|
35
|
+
'--super-dark-color': '#e4e6eb',
|
|
36
|
+
'--light-color': '#363b50',
|
|
37
|
+
'--super-light-color': '#2c3143',
|
|
38
|
+
'--primary-color': '#64d29b',
|
|
39
|
+
'--main-font-family': 'Quicksand, Cantarell, "Open Sans", "Helvetica Neue", sans-serif',
|
|
40
|
+
'--primary-text-color': '#2c3143',
|
|
41
|
+
'--danger-color': '#ff6b6b',
|
|
42
|
+
'--success-color': '#64d29b',
|
|
43
|
+
'--warning-color': '#e3b341',
|
|
44
|
+
'--focus-color': '#a8adb8',
|
|
45
|
+
'--radius': '4px',
|
|
46
|
+
'--radius-large': '5px',
|
|
47
|
+
'--shadow': SHADOW_DARK,
|
|
48
|
+
},
|
|
49
|
+
'high-contrast': {
|
|
50
|
+
'--bg-color': 'white',
|
|
51
|
+
'--bg-soft-color': '#f5f5f5',
|
|
52
|
+
'--text-color': '#111111',
|
|
53
|
+
'--text-soft-color': '#333333',
|
|
54
|
+
'--middle-color': '#999999',
|
|
55
|
+
'--dark-color': '#333333',
|
|
56
|
+
'--super-dark-color': '#111111',
|
|
57
|
+
'--light-color': '#f5f5f5',
|
|
58
|
+
'--super-light-color': 'white',
|
|
59
|
+
'--primary-color': '#0066cc',
|
|
60
|
+
'--main-font-family': '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
61
|
+
'--primary-text-color': 'white',
|
|
62
|
+
'--danger-color': '#b00020',
|
|
63
|
+
'--success-color': '#006b2e',
|
|
64
|
+
'--warning-color': '#8a5a00',
|
|
65
|
+
'--focus-color': '#111111',
|
|
66
|
+
'--radius': '4px',
|
|
67
|
+
'--radius-large': '5px',
|
|
68
|
+
'--shadow': SHADOW,
|
|
69
|
+
},
|
|
70
|
+
warm: {
|
|
71
|
+
'--bg-color': '#fdfbf7',
|
|
72
|
+
'--bg-soft-color': '#f5f0e8',
|
|
73
|
+
'--text-color': '#4a3f35',
|
|
74
|
+
'--text-soft-color': '#7a6e62',
|
|
75
|
+
'--middle-color': '#d6cfc5',
|
|
76
|
+
'--dark-color': '#7a6e62',
|
|
77
|
+
'--super-dark-color': '#4a3f35',
|
|
78
|
+
'--light-color': '#f5f0e8',
|
|
79
|
+
'--super-light-color': '#fdfbf7',
|
|
80
|
+
'--primary-color': '#c47a4a',
|
|
81
|
+
'--main-font-family': 'Georgia, "Times New Roman", serif',
|
|
82
|
+
'--primary-text-color': '#fdfbf7',
|
|
83
|
+
'--danger-color': '#b3261e',
|
|
84
|
+
'--success-color': '#5a8a3c',
|
|
85
|
+
'--warning-color': '#b7791f',
|
|
86
|
+
'--focus-color': '#7a6e62',
|
|
87
|
+
'--radius': '4px',
|
|
88
|
+
'--radius-large': '5px',
|
|
89
|
+
'--shadow': SHADOW,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Registers a theme. Tokens that are not given are taken from `base`
|
|
94
|
+
* (default: colibris), so a theme only has to state what differs – e.g. a
|
|
95
|
+
* different accent colour:
|
|
96
|
+
*
|
|
97
|
+
* defineTheme('acme', { '--primary-color': '#7c3aed' });
|
|
98
|
+
*
|
|
99
|
+
* Returns the complete token set.
|
|
100
|
+
*/
|
|
101
|
+
export function defineTheme(name, tokens, base = DEFAULT_THEME) {
|
|
102
|
+
const parent = themes[base];
|
|
103
|
+
if (!parent)
|
|
104
|
+
throw new Error(`ep-theme: unknown base theme "${base}"`);
|
|
105
|
+
const merged = { ...parent };
|
|
106
|
+
for (const [k, v] of Object.entries(tokens)) {
|
|
107
|
+
if (v !== undefined)
|
|
108
|
+
merged[k] = v;
|
|
109
|
+
}
|
|
110
|
+
themes[name] = merged;
|
|
111
|
+
notifyThemeChanged(name);
|
|
112
|
+
return merged;
|
|
113
|
+
}
|
|
114
|
+
/** Returns the tokens of a theme, or undefined if it is unknown. */
|
|
115
|
+
export function getTheme(name) {
|
|
116
|
+
return themes[name];
|
|
117
|
+
}
|
|
118
|
+
const TOKEN_NAME = /^--[a-zA-Z0-9_-]+$/;
|
|
119
|
+
const UNSAFE_VALUE = /[;{}<>\\]/;
|
|
120
|
+
/**
|
|
121
|
+
* Renders a theme as plain CSS (`selector { --token: value; … }`), for pages
|
|
122
|
+
* that set tokens on `:root` – or server-side – instead of using `<ep-theme>`.
|
|
123
|
+
*
|
|
124
|
+
* Token names must look like `--name`, and values must not contain
|
|
125
|
+
* `; { } < > \`; anything else throws instead of producing broken or
|
|
126
|
+
* injectable CSS. The selector is written as given and must be trusted.
|
|
127
|
+
*/
|
|
128
|
+
export function themeToCss(theme, selector = ':root') {
|
|
129
|
+
const tokens = typeof theme === 'string' ? themes[theme] : theme;
|
|
130
|
+
if (!tokens)
|
|
131
|
+
throw new Error(`ep-theme: unknown theme "${theme}"`);
|
|
132
|
+
const body = Object.entries(tokens)
|
|
133
|
+
.filter(([, v]) => v !== undefined && v !== '')
|
|
134
|
+
.map(([k, v]) => {
|
|
135
|
+
if (!TOKEN_NAME.test(k))
|
|
136
|
+
throw new Error(`ep-theme: invalid token name "${k}"`);
|
|
137
|
+
const value = String(v);
|
|
138
|
+
if (UNSAFE_VALUE.test(value))
|
|
139
|
+
throw new Error(`ep-theme: invalid value for ${k}`);
|
|
140
|
+
return ` ${k}: ${value};`;
|
|
141
|
+
})
|
|
142
|
+
.join('\n');
|
|
143
|
+
return `${selector} {\n${body}\n}`;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Sets a theme's tokens as inline custom properties on `el` (e.g.
|
|
147
|
+
* `document.documentElement`). Tokens set by an earlier call that the new
|
|
148
|
+
* theme does not define are removed again.
|
|
149
|
+
*/
|
|
150
|
+
export function applyTheme(el, theme) {
|
|
151
|
+
const tokens = typeof theme === 'string' ? themes[theme] : theme;
|
|
152
|
+
if (!tokens)
|
|
153
|
+
return;
|
|
154
|
+
const previous = applied.get(el) ?? [];
|
|
155
|
+
const next = [];
|
|
156
|
+
for (const [prop, value] of Object.entries(tokens)) {
|
|
157
|
+
if (value === undefined || value === '')
|
|
158
|
+
continue;
|
|
159
|
+
el.style.setProperty(prop, String(value));
|
|
160
|
+
next.push(prop);
|
|
161
|
+
}
|
|
162
|
+
for (const prop of previous) {
|
|
163
|
+
if (!next.includes(prop))
|
|
164
|
+
el.style.removeProperty(prop);
|
|
165
|
+
}
|
|
166
|
+
applied.set(el, next);
|
|
167
|
+
}
|
|
168
|
+
const applied = new WeakMap();
|
|
169
|
+
const listeners = new Set();
|
|
170
|
+
/** Calls `fn` whenever a theme is (re)defined at runtime. Returns an unsubscribe function. */
|
|
171
|
+
export function onThemeDefined(fn) {
|
|
172
|
+
listeners.add(fn);
|
|
173
|
+
return () => listeners.delete(fn);
|
|
174
|
+
}
|
|
175
|
+
/** @internal */
|
|
176
|
+
export function notifyThemeChanged(name) {
|
|
177
|
+
for (const fn of listeners)
|
|
178
|
+
fn(name);
|
|
179
|
+
}
|
|
180
|
+
const NAMED_COLORS = {
|
|
181
|
+
black: [0, 0, 0], white: [255, 255, 255],
|
|
182
|
+
navy: [0, 0, 128], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79],
|
|
183
|
+
dimgray: [105, 105, 105], dimgrey: [105, 105, 105], gray: [128, 128, 128], grey: [128, 128, 128],
|
|
184
|
+
midnightblue: [25, 25, 112], darkblue: [0, 0, 139], indigo: [75, 0, 130],
|
|
185
|
+
silver: [192, 192, 192], whitesmoke: [245, 245, 245], ivory: [255, 255, 240],
|
|
186
|
+
snow: [255, 250, 250], ghostwhite: [248, 248, 255], linen: [250, 240, 230],
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Parses hex (#rgb, #rgba, #rrggbb, #rrggbbaa), rgb()/rgba() and a few named
|
|
190
|
+
* colours. Returns undefined for anything else (hsl(), color-mix(), …); in a
|
|
191
|
+
* browser `<ep-theme>` resolves such values through the CSS engine first.
|
|
192
|
+
*/
|
|
193
|
+
export function parseColor(value) {
|
|
194
|
+
const v = value.trim().toLowerCase();
|
|
195
|
+
if (NAMED_COLORS[v])
|
|
196
|
+
return NAMED_COLORS[v];
|
|
197
|
+
const hex = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(v);
|
|
198
|
+
if (hex) {
|
|
199
|
+
let h = hex[1];
|
|
200
|
+
if (h.length <= 4)
|
|
201
|
+
h = h.split('').map((c) => c + c).join('');
|
|
202
|
+
return [0, 2, 4].map((i) => parseInt(h.slice(i, i + 2), 16));
|
|
203
|
+
}
|
|
204
|
+
const rgb = /^rgba?\(\s*([\d.]+%?)[\s,]+([\d.]+%?)[\s,]+([\d.]+%?)/.exec(v);
|
|
205
|
+
if (rgb) {
|
|
206
|
+
return [rgb[1], rgb[2], rgb[3]].map((c) => c.endsWith('%') ? Math.round(parseFloat(c) * 2.55) : Math.round(parseFloat(c)));
|
|
207
|
+
}
|
|
208
|
+
return undefined;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Whether a theme has a dark background. Uses `--color-scheme` when the theme
|
|
212
|
+
* sets it (`light` / `dark`), otherwise the luminance of `--bg-color`.
|
|
213
|
+
* Unparseable colours count as light.
|
|
214
|
+
*/
|
|
215
|
+
export function isDark(tokens, resolvedBg) {
|
|
216
|
+
const scheme = tokens['--color-scheme']?.trim();
|
|
217
|
+
if (scheme === 'dark')
|
|
218
|
+
return true;
|
|
219
|
+
if (scheme === 'light')
|
|
220
|
+
return false;
|
|
221
|
+
const rgb = parseColor(resolvedBg ?? tokens['--bg-color'] ?? '');
|
|
222
|
+
if (!rgb)
|
|
223
|
+
return false;
|
|
224
|
+
const [r, g, b] = rgb;
|
|
225
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b < 128;
|
|
226
|
+
}
|
|
227
|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version": "0.0.14",
|
|
4
4
|
"description": "Etherpad Web Components built with Lit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"./EpToolbarSelect.js": "./dist/EpToolbarSelect.js",
|
|
24
24
|
"./EpSelect.js": "./dist/EpSelect.js",
|
|
25
25
|
"./EpUserBadge.js": "./dist/EpUserBadge.js",
|
|
26
|
+
"./EpTabs.js": "./dist/EpTabs.js",
|
|
26
27
|
"./EpTheme.js": "./dist/EpTheme.js",
|
|
28
|
+
"./themes.js": "./dist/themes.js",
|
|
27
29
|
"./EpEditor.js": "./dist/EpEditor.js",
|
|
28
30
|
"./editor/AceEditor.js": "./dist/editor/AceEditor.js",
|
|
29
31
|
"./editor/AttributePool.js": "./dist/editor/AttributePool.js",
|
|
@@ -50,30 +52,22 @@
|
|
|
50
52
|
},
|
|
51
53
|
"dependencies": {
|
|
52
54
|
"@lit/reactive-element": "^2.1.2",
|
|
53
|
-
"lit": "^3.3.
|
|
55
|
+
"lit": "^3.3.3",
|
|
54
56
|
"lit-element": "^4.2.2",
|
|
55
|
-
"lit-html": "^3.3.
|
|
57
|
+
"lit-html": "^3.3.3"
|
|
56
58
|
},
|
|
57
59
|
"devDependencies": {
|
|
58
|
-
"@storybook/addon-vitest": "^10.
|
|
59
|
-
"@storybook/web-components": "^10.
|
|
60
|
-
"@storybook/web-components-vite": "^10.
|
|
61
|
-
"@vitest/browser": "^4.1.
|
|
62
|
-
"@vitest/browser-playwright": "^4.1.
|
|
63
|
-
"@vitest/runner": "^4.1.
|
|
64
|
-
"playwright": "^1.
|
|
65
|
-
"storybook": "^10.
|
|
66
|
-
"typescript": "^6.0.
|
|
67
|
-
"vite": "^8.
|
|
68
|
-
"vitest": "^4.1.
|
|
60
|
+
"@storybook/addon-vitest": "^10.6.8",
|
|
61
|
+
"@storybook/web-components": "^10.6.8",
|
|
62
|
+
"@storybook/web-components-vite": "^10.6.8",
|
|
63
|
+
"@vitest/browser": "^4.1.12",
|
|
64
|
+
"@vitest/browser-playwright": "^4.1.12",
|
|
65
|
+
"@vitest/runner": "^4.1.11",
|
|
66
|
+
"playwright": "^1.65.1",
|
|
67
|
+
"storybook": "^10.6.8",
|
|
68
|
+
"typescript": "^6.0.3",
|
|
69
|
+
"vite": "^8.3.8",
|
|
70
|
+
"vitest": "^4.1.12"
|
|
69
71
|
},
|
|
70
|
-
"
|
|
71
|
-
"onlyBuiltDependencies": [
|
|
72
|
-
"esbuild",
|
|
73
|
-
"playwright"
|
|
74
|
-
],
|
|
75
|
-
"overrides": {
|
|
76
|
-
"etherpad-webcomponents": "link:../../AppData/Local/pnpm/global/5/node_modules/etherpad-webcomponents"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
72
|
+
"packageManager": "pnpm@11.29.0"
|
|
79
73
|
}
|