arethesis 0.1.0 → 0.1.1

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 (151) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE +0 -0
  3. package/README.md +2 -1
  4. package/dist/{arethesis-z8eGA7mL.js → arethesis-DTJOJ7F-.js} +331 -329
  5. package/dist/arethesis-DTJOJ7F-.js.map +1 -0
  6. package/dist/arethesis.js +2 -2
  7. package/dist/arethesis.js.map +1 -1
  8. package/dist/binding/data-binder.d.ts +0 -0
  9. package/dist/binding/data-binder.d.ts.map +0 -0
  10. package/dist/binding/types.d.ts +0 -0
  11. package/dist/binding/types.d.ts.map +0 -0
  12. package/dist/binding/validation-engine.d.ts +0 -0
  13. package/dist/binding/validation-engine.d.ts.map +0 -0
  14. package/dist/components/component.d.ts +0 -0
  15. package/dist/components/component.d.ts.map +0 -0
  16. package/dist/components/decorators.d.ts +0 -0
  17. package/dist/components/decorators.d.ts.map +0 -0
  18. package/dist/components/runtime.d.ts +0 -0
  19. package/dist/components/runtime.d.ts.map +0 -0
  20. package/dist/components/template-loader.d.ts +0 -0
  21. package/dist/components/template-loader.d.ts.map +0 -0
  22. package/dist/components/types.d.ts +0 -0
  23. package/dist/components/types.d.ts.map +0 -0
  24. package/dist/components.js +43 -2
  25. package/dist/components.js.map +1 -1
  26. package/dist/core/arethesis.d.ts +3 -2
  27. package/dist/core/arethesis.d.ts.map +1 -1
  28. package/dist/core/types.d.ts +0 -0
  29. package/dist/core/types.d.ts.map +0 -0
  30. package/dist/data/list-view-registry.d.ts +0 -0
  31. package/dist/data/list-view-registry.d.ts.map +0 -0
  32. package/dist/data/object-store.d.ts +0 -0
  33. package/dist/data/object-store.d.ts.map +0 -0
  34. package/dist/data/optimistic-updates.d.ts +0 -0
  35. package/dist/data/optimistic-updates.d.ts.map +0 -0
  36. package/dist/data/persistence-manager.d.ts +0 -0
  37. package/dist/data/persistence-manager.d.ts.map +0 -0
  38. package/dist/data/types.d.ts +0 -0
  39. package/dist/data/types.d.ts.map +0 -0
  40. package/dist/http/auth-manager.d.ts +0 -0
  41. package/dist/http/auth-manager.d.ts.map +0 -0
  42. package/dist/http/http-client.d.ts +0 -0
  43. package/dist/http/http-client.d.ts.map +0 -0
  44. package/dist/http/http-error.d.ts +0 -0
  45. package/dist/http/http-error.d.ts.map +0 -0
  46. package/dist/http/mapping.d.ts +0 -0
  47. package/dist/http/mapping.d.ts.map +0 -0
  48. package/dist/http/types.d.ts +0 -0
  49. package/dist/http/types.d.ts.map +0 -0
  50. package/dist/index.d.ts +0 -0
  51. package/dist/index.d.ts.map +0 -0
  52. package/dist/kit/data-table.d.ts +0 -0
  53. package/dist/kit/data-table.d.ts.map +0 -0
  54. package/dist/kit/flex-view.d.ts +0 -0
  55. package/dist/kit/flex-view.d.ts.map +0 -0
  56. package/dist/kit/form.d.ts +0 -0
  57. package/dist/kit/form.d.ts.map +0 -0
  58. package/dist/kit/index.d.ts +6 -0
  59. package/dist/kit/index.d.ts.map +1 -1
  60. package/dist/kit/list.d.ts +0 -0
  61. package/dist/kit/list.d.ts.map +0 -0
  62. package/dist/kit/theme-boot.generated.d.ts +3 -0
  63. package/dist/kit/theme-boot.generated.d.ts.map +1 -0
  64. package/dist/kit/theme.d.ts +34 -0
  65. package/dist/kit/theme.d.ts.map +1 -0
  66. package/dist/mixins/context-menu.d.ts +0 -0
  67. package/dist/mixins/context-menu.d.ts.map +0 -0
  68. package/dist/mixins/draggable.d.ts +0 -0
  69. package/dist/mixins/draggable.d.ts.map +0 -0
  70. package/dist/mixins/dropdown.d.ts +0 -0
  71. package/dist/mixins/dropdown.d.ts.map +0 -0
  72. package/dist/mixins/editable.d.ts +0 -0
  73. package/dist/mixins/editable.d.ts.map +0 -0
  74. package/dist/mixins/grid-navigation.d.ts +0 -0
  75. package/dist/mixins/grid-navigation.d.ts.map +0 -0
  76. package/dist/mixins/index.d.ts +0 -0
  77. package/dist/mixins/index.d.ts.map +0 -0
  78. package/dist/mixins/infinite-scroll.d.ts +0 -0
  79. package/dist/mixins/infinite-scroll.d.ts.map +0 -0
  80. package/dist/mixins/registry.d.ts +0 -0
  81. package/dist/mixins/registry.d.ts.map +0 -0
  82. package/dist/mixins/resizable.d.ts +0 -0
  83. package/dist/mixins/resizable.d.ts.map +0 -0
  84. package/dist/mixins/sortable.d.ts +0 -0
  85. package/dist/mixins/sortable.d.ts.map +0 -0
  86. package/dist/mixins/tooltip.d.ts +0 -0
  87. package/dist/mixins/tooltip.d.ts.map +0 -0
  88. package/dist/mixins/types.d.ts +0 -0
  89. package/dist/mixins/types.d.ts.map +0 -0
  90. package/dist/mixins/utils.d.ts +0 -0
  91. package/dist/mixins/utils.d.ts.map +0 -0
  92. package/dist/plugins/async-validators.d.ts +0 -0
  93. package/dist/plugins/async-validators.d.ts.map +1 -1
  94. package/dist/plugins/builtins.d.ts +0 -0
  95. package/dist/plugins/builtins.d.ts.map +0 -0
  96. package/dist/plugins/date-utils.d.ts +0 -0
  97. package/dist/plugins/date-utils.d.ts.map +1 -1
  98. package/dist/plugins/plugin-manager.d.ts +0 -0
  99. package/dist/plugins/plugin-manager.d.ts.map +0 -0
  100. package/dist/plugins/rich-text.d.ts +0 -0
  101. package/dist/plugins/rich-text.d.ts.map +1 -1
  102. package/dist/plugins/types.d.ts +0 -0
  103. package/dist/plugins/types.d.ts.map +0 -0
  104. package/dist/realtime/azure-pubsub-manager.d.ts +0 -0
  105. package/dist/realtime/azure-pubsub-manager.d.ts.map +0 -0
  106. package/dist/realtime/collab/collab-session.d.ts +0 -0
  107. package/dist/realtime/collab/collab-session.d.ts.map +0 -0
  108. package/dist/realtime/collab/cursor-overlay.d.ts +0 -0
  109. package/dist/realtime/collab/cursor-overlay.d.ts.map +0 -0
  110. package/dist/realtime/collab/textarea-adapter.d.ts +0 -0
  111. package/dist/realtime/collab/textarea-adapter.d.ts.map +0 -0
  112. package/dist/realtime/ot/client.d.ts +0 -0
  113. package/dist/realtime/ot/client.d.ts.map +0 -0
  114. package/dist/realtime/ot/server.d.ts +0 -0
  115. package/dist/realtime/ot/server.d.ts.map +0 -0
  116. package/dist/realtime/ot/text-operation.d.ts +0 -0
  117. package/dist/realtime/ot/text-operation.d.ts.map +0 -0
  118. package/dist/realtime/reconnect.d.ts +0 -0
  119. package/dist/realtime/reconnect.d.ts.map +0 -0
  120. package/dist/realtime/sse-manager.d.ts +0 -0
  121. package/dist/realtime/sse-manager.d.ts.map +0 -0
  122. package/dist/realtime/types.d.ts +0 -0
  123. package/dist/realtime/types.d.ts.map +0 -0
  124. package/dist/realtime/websocket-manager.d.ts +0 -0
  125. package/dist/realtime/websocket-manager.d.ts.map +0 -0
  126. package/dist/theme-boot.js +17 -0
  127. package/dist/theme.css +180 -16
  128. package/dist/tokens/arethesis.resolver.json +57 -0
  129. package/dist/tokens/base.tokens.json +55 -0
  130. package/dist/tokens/dark-high-contrast.tokens.json +172 -0
  131. package/dist/tokens/dark.tokens.json +331 -0
  132. package/dist/tokens/light-high-contrast.tokens.json +115 -0
  133. package/dist/tokens/light.tokens.json +331 -0
  134. package/dist/utils/backoff.d.ts +0 -0
  135. package/dist/utils/backoff.d.ts.map +0 -0
  136. package/dist/utils/dates.d.ts +0 -0
  137. package/dist/utils/dates.d.ts.map +0 -0
  138. package/dist/utils/dom.d.ts +0 -0
  139. package/dist/utils/dom.d.ts.map +0 -0
  140. package/dist/utils/emitter.d.ts +0 -0
  141. package/dist/utils/emitter.d.ts.map +0 -0
  142. package/dist/utils/path.d.ts +0 -0
  143. package/dist/utils/path.d.ts.map +0 -0
  144. package/dist/utils/sanitize.d.ts +0 -0
  145. package/dist/utils/sanitize.d.ts.map +0 -0
  146. package/dist/utils/url.d.ts +0 -0
  147. package/dist/utils/url.d.ts.map +0 -0
  148. package/dist/version.d.ts +3 -0
  149. package/dist/version.d.ts.map +1 -0
  150. package/package.json +11 -4
  151. package/dist/arethesis-z8eGA7mL.js.map +0 -1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/index.d.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -7,6 +7,10 @@
7
7
  * import 'arethesis/components/theme.css';
8
8
  * ```
9
9
  *
10
+ * The theme is built from design tokens (W3C Design Tokens Format 2025.10),
11
+ * published as `arethesis/tokens/*`. See `setTheme`, `setContrast` and
12
+ * `themeBootHtml` for switching themes without a flash.
13
+ *
10
14
  * @packageDocumentation
11
15
  */
12
16
  export { DataTable } from './data-table';
@@ -15,4 +19,6 @@ export { FlexView } from './flex-view';
15
19
  export type { FlexPanelConfig, FlexViewConfig } from './flex-view';
16
20
  export { List } from './list';
17
21
  export { Form } from './form';
22
+ export { setTheme, setContrast, getTheme, getContrast, applyStoredTheme, themeBootScript, themeBootHtml, CRITICAL_CSS, THEME_STORAGE_KEY, CONTRAST_STORAGE_KEY, } from './theme';
23
+ export type { ThemeChoice, ContrastChoice, ThemeStorageOptions } from './theme';
18
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kit/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/kit/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC"}
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ /** Background, text color and color-scheme for every theme: what a page needs before its stylesheet loads. */
2
+ export declare const CRITICAL_CSS = ":root{background:#ffffff;color:#161a23;color-scheme:light}@media (prefers-color-scheme: dark){:root:not([data-theme='light']){background:#0f1117;color:#e8eaf1;color-scheme:dark}}:root[data-theme='dark']{background:#0f1117;color:#e8eaf1;color-scheme:dark}@media (prefers-contrast: more){:root:not([data-contrast='standard']){background:#ffffff;color:#000000;color-scheme:light}}:root[data-contrast='more']{background:#ffffff;color:#000000;color-scheme:light}@media (prefers-contrast: more) and (prefers-color-scheme: dark){:root:not([data-contrast='standard']):not([data-theme='light']){background:#000000;color:#ffffff;color-scheme:dark}}@media (prefers-contrast: more){:root[data-theme='dark']:not([data-contrast='standard']){background:#000000;color:#ffffff;color-scheme:dark}}@media (prefers-color-scheme: dark){:root[data-contrast='more']:not([data-theme='light']){background:#000000;color:#ffffff;color-scheme:dark}}:root[data-theme='dark'][data-contrast='more']{background:#000000;color:#ffffff;color-scheme:dark}";
3
+ //# sourceMappingURL=theme-boot.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-boot.generated.d.ts","sourceRoot":"","sources":["../../src/kit/theme-boot.generated.ts"],"names":[],"mappings":"AAEA,8GAA8G;AAC9G,eAAO,MAAM,YAAY,ggCAAggC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { CRITICAL_CSS } from './theme-boot.generated';
2
+ export declare const THEME_STORAGE_KEY = "ar-theme";
3
+ export declare const CONTRAST_STORAGE_KEY = "ar-contrast";
4
+ export type ThemeChoice = 'light' | 'dark' | 'system';
5
+ export type ContrastChoice = 'more' | 'standard' | 'system';
6
+ export interface ThemeStorageOptions {
7
+ /** localStorage key for the theme. @default 'ar-theme' */
8
+ themeKey?: string;
9
+ /** localStorage key for the contrast. @default 'ar-contrast' */
10
+ contrastKey?: string;
11
+ }
12
+ export { CRITICAL_CSS };
13
+ /** Use the light or dark theme, or follow the OS again with `'system'`. The choice is remembered. */
14
+ export declare function setTheme(choice: ThemeChoice, { themeKey }?: ThemeStorageOptions): void;
15
+ /** Use high contrast (`'more'`), turn it off (`'standard'`), or follow the OS with `'system'`. The choice is remembered. */
16
+ export declare function setContrast(choice: ContrastChoice, { contrastKey }?: ThemeStorageOptions): void;
17
+ /** The theme in effect: an explicit choice, or the OS preference. */
18
+ export declare function getTheme(): 'light' | 'dark';
19
+ /** The contrast in effect: an explicit choice, or the OS preference. */
20
+ export declare function getContrast(): 'more' | 'standard';
21
+ /** Re-apply stored choices (what the boot snippet does), e.g. after `<html>` was replaced. */
22
+ export declare function applyStoredTheme({ themeKey, contrastKey }?: ThemeStorageOptions): void;
23
+ /** The boot script's source (no `<script>` tag), for inlining. */
24
+ export declare function themeBootScript({ themeKey, contrastKey }?: ThemeStorageOptions): string;
25
+ /**
26
+ * `<style>` and `<script>` tags to put at the top of `<head>`, so the first
27
+ * paint already has the right background, text color and theme. For servers
28
+ * and build tools; in the browser, use the drop-in `theme-boot.js` instead.
29
+ * Pass `nonce` if your Content Security Policy requires one.
30
+ */
31
+ export declare function themeBootHtml(options?: ThemeStorageOptions & {
32
+ nonce?: string;
33
+ }): string;
34
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/kit/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAC5C,eAAO,MAAM,oBAAoB,gBAAgB,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE5D,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AAcxB,qGAAqG;AACrG,wBAAgB,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,QAA4B,EAAE,GAAE,mBAAwB,GAAG,IAAI,CAK9G;AAED,4HAA4H;AAC5H,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,WAAkC,EAAE,GAAE,mBAAwB,GAAG,IAAI,CAK1H;AAED,qEAAqE;AACrE,wBAAgB,QAAQ,IAAI,OAAO,GAAG,MAAM,CAI3C;AAED,wEAAwE;AACxE,wBAAgB,WAAW,IAAI,MAAM,GAAG,UAAU,CAIjD;AAED,8FAA8F;AAC9F,wBAAgB,gBAAgB,CAAC,EAAE,QAA4B,EAAE,WAAkC,EAAE,GAAE,mBAAwB,GAAG,IAAI,CASrI;AAED,kEAAkE;AAClE,wBAAgB,eAAe,CAAC,EAAE,QAA4B,EAAE,WAAkC,EAAE,GAAE,mBAAwB,GAAG,MAAM,CAEtI;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,mBAAmB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,CAG5F"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"async-validators.d.ts","sourceRoot":"","sources":["../../src/plugins/async-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM/C,MAAM,WAAW,sBAAsB;IACrC,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,qBAAqB,IAAI,eAAe,CAAC,sBAAsB,CAAC,CAwG/E"}
1
+ {"version":3,"file":"async-validators.d.ts","sourceRoot":"","sources":["../../src/plugins/async-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAO/C,MAAM,WAAW,sBAAsB;IACrC,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,qBAAqB,IAAI,eAAe,CAAC,sBAAsB,CAAC,CAwG/E"}
File without changes
File without changes
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../src/plugins/date-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAK/C,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;QAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;CACtE;AA6DD,wBAAgB,eAAe,IAAI,eAAe,CA2DjD"}
1
+ {"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../../src/plugins/date-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM/C,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,IAAI,GAAG,IAAI,CAAC;QAAC,GAAG,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;CACtE;AA6DD,wBAAgB,eAAe,IAAI,eAAe,CA2DjD"}
File without changes
File without changes
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text.d.ts","sourceRoot":"","sources":["../../src/plugins/rich-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAA4B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKnF,MAAM,MAAM,eAAe,GACvB,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,WAAW,GACtE,YAAY,GAAG,aAAa,GAAG,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9F,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAgCD,iBAAS,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,GAAE,eAAoB,GAAG,aAAa,CAsOtF;AAED,wBAAgB,cAAc,IAAI,eAAe,CAuBhD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"rich-text.d.ts","sourceRoot":"","sources":["../../src/plugins/rich-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAA4B,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKnF,MAAM,MAAM,eAAe,GACvB,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,WAAW,GACtE,YAAY,GAAG,aAAa,GAAG,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9F,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAgCD,iBAAS,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,GAAE,eAAoB,GAAG,aAAa,CAsOtF;AAED,wBAAgB,cAAc,IAAI,eAAe,CAuBhD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,17 @@
1
+ /* Arethesis theme boot: load in <head> with a plain <script src> (not a module) so it runs before the first paint. */
2
+ (function () {
3
+ var script = document.currentScript;
4
+ var themeKey = (script && script.getAttribute('data-theme-key')) || "ar-theme";
5
+ var contrastKey = (script && script.getAttribute('data-contrast-key')) || "ar-contrast";
6
+ try {
7
+ var root = document.documentElement;
8
+ var theme = localStorage.getItem(themeKey);
9
+ var contrast = localStorage.getItem(contrastKey);
10
+ if (theme === 'light' || theme === 'dark') root.setAttribute('data-theme', theme);
11
+ if (contrast === 'more' || contrast === 'standard') root.setAttribute('data-contrast', contrast);
12
+ } catch (e) {}
13
+ var style = document.createElement('style');
14
+ style.setAttribute('data-arethesis-boot', '');
15
+ style.textContent = ":root{background:#ffffff;color:#161a23;color-scheme:light}@media (prefers-color-scheme: dark){:root:not([data-theme='light']){background:#0f1117;color:#e8eaf1;color-scheme:dark}}:root[data-theme='dark']{background:#0f1117;color:#e8eaf1;color-scheme:dark}@media (prefers-contrast: more){:root:not([data-contrast='standard']){background:#ffffff;color:#000000;color-scheme:light}}:root[data-contrast='more']{background:#ffffff;color:#000000;color-scheme:light}@media (prefers-contrast: more) and (prefers-color-scheme: dark){:root:not([data-contrast='standard']):not([data-theme='light']){background:#000000;color:#ffffff;color-scheme:dark}}@media (prefers-contrast: more){:root[data-theme='dark']:not([data-contrast='standard']){background:#000000;color:#ffffff;color-scheme:dark}}@media (prefers-color-scheme: dark){:root[data-contrast='more']:not([data-theme='light']){background:#000000;color:#ffffff;color-scheme:dark}}:root[data-theme='dark'][data-contrast='more']{background:#000000;color:#ffffff;color-scheme:dark}";
16
+ document.head.appendChild(style);
17
+ })();
package/dist/theme.css CHANGED
@@ -5,19 +5,25 @@
5
5
  * (tooltips, menus, dropdowns, the rich-text editor, validation messages…).
6
6
  * Everything is driven by custom properties: override them on :root (or any
7
7
  * container) to restyle. Light and dark modes follow the OS unless you set
8
- * data-theme="light" or data-theme="dark" on <html>.
8
+ * data-theme="light" or data-theme="dark" on <html>. High contrast follows
9
+ * the OS (prefers-contrast: more) unless you set data-contrast="more" or
10
+ * data-contrast="standard".
11
+ *
12
+ * The values come from the design tokens in src/kit/tokens (W3C Design Tokens
13
+ * Format 2025.10), also published as arethesis/tokens/*.
9
14
  */
10
15
 
16
+ /* ── Design tokens (generated from src/kit/tokens by `npm run tokens`; do not edit by hand) ── */
17
+
11
18
  :root {
12
- --ar-font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
13
- --ar-font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
19
+ --ar-font: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
20
+ --ar-font-mono: ui-monospace, 'SFMono-Regular', 'Menlo', 'Consolas', monospace;
14
21
  --ar-radius: 10px;
15
22
  --ar-radius-sm: 6px;
16
23
  --ar-space: 1rem;
17
-
18
24
  --ar-bg: #ffffff;
19
- --ar-surface: #f7f7fb;
20
25
  --ar-surface-2: #eef0f6;
26
+ --ar-surface: #f7f7fb;
21
27
  --ar-border: #dcdfe8;
22
28
  --ar-text: #161a23;
23
29
  --ar-text-muted: #5b6275;
@@ -33,17 +39,16 @@
33
39
  --ar-success-text: #ffffff;
34
40
  --ar-warning: #a35200;
35
41
  --ar-warning-soft: #fff4e5;
36
- --ar-focus: 0 0 0 3px color-mix(in srgb, var(--ar-accent) 35%, transparent);
37
- --ar-shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 4px 16px rgb(16 24 40 / 0.08);
38
- --ar-shadow-lg: 0 12px 40px rgb(16 24 40 / 0.18);
42
+ --ar-shadow: 0 1px 2px 0 rgb(16 24 40 / 0.06), 0 4px 16px 0 rgb(16 24 40 / 0.08);
43
+ --ar-shadow-lg: 0 12px 40px 0 rgb(16 24 40 / 0.18);
39
44
  color-scheme: light;
40
45
  }
41
46
 
42
47
  @media (prefers-color-scheme: dark) {
43
48
  :root:not([data-theme='light']) {
44
49
  --ar-bg: #0f1117;
45
- --ar-surface: #171a22;
46
50
  --ar-surface-2: #20242f;
51
+ --ar-surface: #171a22;
47
52
  --ar-border: #2c3140;
48
53
  --ar-text: #e8eaf1;
49
54
  --ar-text-muted: #9aa2b5;
@@ -53,24 +58,22 @@
53
58
  --ar-accent-text: #0f1117;
54
59
  --ar-danger: #ff7a7a;
55
60
  --ar-danger-soft: #3a1d22;
56
- --ar-danger-text: #0f1117;
57
61
  --ar-danger-text: #0f1117;
58
62
  --ar-success: #4cd394;
59
63
  --ar-success-soft: #13301f;
60
- --ar-success-text: #0f1117;
61
64
  --ar-success-text: #0f1117;
62
65
  --ar-warning: #ffb44d;
63
66
  --ar-warning-soft: #33260f;
64
- --ar-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 16px rgb(0 0 0 / 0.35);
65
- --ar-shadow-lg: 0 12px 40px rgb(0 0 0 / 0.55);
67
+ --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
68
+ --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
66
69
  color-scheme: dark;
67
70
  }
68
71
  }
69
72
 
70
73
  :root[data-theme='dark'] {
71
74
  --ar-bg: #0f1117;
72
- --ar-surface: #171a22;
73
75
  --ar-surface-2: #20242f;
76
+ --ar-surface: #171a22;
74
77
  --ar-border: #2c3140;
75
78
  --ar-text: #e8eaf1;
76
79
  --ar-text-muted: #9aa2b5;
@@ -86,11 +89,172 @@
86
89
  --ar-success-text: #0f1117;
87
90
  --ar-warning: #ffb44d;
88
91
  --ar-warning-soft: #33260f;
89
- --ar-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 16px rgb(0 0 0 / 0.35);
90
- --ar-shadow-lg: 0 12px 40px rgb(0 0 0 / 0.55);
92
+ --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
93
+ --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
91
94
  color-scheme: dark;
92
95
  }
93
96
 
97
+ @media (prefers-contrast: more) {
98
+ :root:not([data-contrast='standard']) {
99
+ --ar-bg: #ffffff;
100
+ --ar-surface-2: #eef0f6;
101
+ --ar-surface: #f7f7fb;
102
+ --ar-border: #6b7280;
103
+ --ar-text: #000000;
104
+ --ar-text-muted: #2f3542;
105
+ --ar-accent: #3525b8;
106
+ --ar-accent-hover: #2a1d96;
107
+ --ar-accent-soft: #e4e6ff;
108
+ --ar-accent-text: #ffffff;
109
+ --ar-danger: #8f1717;
110
+ --ar-danger-soft: #fdecec;
111
+ --ar-danger-text: #ffffff;
112
+ --ar-success: #0b5a37;
113
+ --ar-success-soft: #e6f6ee;
114
+ --ar-success-text: #ffffff;
115
+ --ar-warning: #6f3800;
116
+ --ar-warning-soft: #fff4e5;
117
+ --ar-shadow: 0 1px 2px 0 rgb(16 24 40 / 0.06), 0 4px 16px 0 rgb(16 24 40 / 0.08);
118
+ --ar-shadow-lg: 0 12px 40px 0 rgb(16 24 40 / 0.18);
119
+ color-scheme: light;
120
+ }
121
+ }
122
+
123
+ :root[data-contrast='more'] {
124
+ --ar-bg: #ffffff;
125
+ --ar-surface-2: #eef0f6;
126
+ --ar-surface: #f7f7fb;
127
+ --ar-border: #6b7280;
128
+ --ar-text: #000000;
129
+ --ar-text-muted: #2f3542;
130
+ --ar-accent: #3525b8;
131
+ --ar-accent-hover: #2a1d96;
132
+ --ar-accent-soft: #e4e6ff;
133
+ --ar-accent-text: #ffffff;
134
+ --ar-danger: #8f1717;
135
+ --ar-danger-soft: #fdecec;
136
+ --ar-danger-text: #ffffff;
137
+ --ar-success: #0b5a37;
138
+ --ar-success-soft: #e6f6ee;
139
+ --ar-success-text: #ffffff;
140
+ --ar-warning: #6f3800;
141
+ --ar-warning-soft: #fff4e5;
142
+ --ar-shadow: 0 1px 2px 0 rgb(16 24 40 / 0.06), 0 4px 16px 0 rgb(16 24 40 / 0.08);
143
+ --ar-shadow-lg: 0 12px 40px 0 rgb(16 24 40 / 0.18);
144
+ color-scheme: light;
145
+ }
146
+
147
+ @media (prefers-contrast: more) and (prefers-color-scheme: dark) {
148
+ :root:not([data-contrast='standard']):not([data-theme='light']) {
149
+ --ar-bg: #000000;
150
+ --ar-surface-2: #15171e;
151
+ --ar-surface: #0b0c10;
152
+ --ar-border: #9aa2b5;
153
+ --ar-text: #ffffff;
154
+ --ar-text-muted: #d3d8e3;
155
+ --ar-accent: #b8b3ff;
156
+ --ar-accent-hover: #cfcbff;
157
+ --ar-accent-soft: #24233f;
158
+ --ar-accent-text: #000000;
159
+ --ar-danger: #ffa3a3;
160
+ --ar-danger-soft: #3a1d22;
161
+ --ar-danger-text: #000000;
162
+ --ar-success: #7ee8b6;
163
+ --ar-success-soft: #13301f;
164
+ --ar-success-text: #000000;
165
+ --ar-warning: #ffcf85;
166
+ --ar-warning-soft: #33260f;
167
+ --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
168
+ --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
169
+ color-scheme: dark;
170
+ }
171
+ }
172
+
173
+ @media (prefers-contrast: more) {
174
+ :root[data-theme='dark']:not([data-contrast='standard']) {
175
+ --ar-bg: #000000;
176
+ --ar-surface-2: #15171e;
177
+ --ar-surface: #0b0c10;
178
+ --ar-border: #9aa2b5;
179
+ --ar-text: #ffffff;
180
+ --ar-text-muted: #d3d8e3;
181
+ --ar-accent: #b8b3ff;
182
+ --ar-accent-hover: #cfcbff;
183
+ --ar-accent-soft: #24233f;
184
+ --ar-accent-text: #000000;
185
+ --ar-danger: #ffa3a3;
186
+ --ar-danger-soft: #3a1d22;
187
+ --ar-danger-text: #000000;
188
+ --ar-success: #7ee8b6;
189
+ --ar-success-soft: #13301f;
190
+ --ar-success-text: #000000;
191
+ --ar-warning: #ffcf85;
192
+ --ar-warning-soft: #33260f;
193
+ --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
194
+ --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
195
+ color-scheme: dark;
196
+ }
197
+ }
198
+
199
+ @media (prefers-color-scheme: dark) {
200
+ :root[data-contrast='more']:not([data-theme='light']) {
201
+ --ar-bg: #000000;
202
+ --ar-surface-2: #15171e;
203
+ --ar-surface: #0b0c10;
204
+ --ar-border: #9aa2b5;
205
+ --ar-text: #ffffff;
206
+ --ar-text-muted: #d3d8e3;
207
+ --ar-accent: #b8b3ff;
208
+ --ar-accent-hover: #cfcbff;
209
+ --ar-accent-soft: #24233f;
210
+ --ar-accent-text: #000000;
211
+ --ar-danger: #ffa3a3;
212
+ --ar-danger-soft: #3a1d22;
213
+ --ar-danger-text: #000000;
214
+ --ar-success: #7ee8b6;
215
+ --ar-success-soft: #13301f;
216
+ --ar-success-text: #000000;
217
+ --ar-warning: #ffcf85;
218
+ --ar-warning-soft: #33260f;
219
+ --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
220
+ --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
221
+ color-scheme: dark;
222
+ }
223
+ }
224
+
225
+ :root[data-theme='dark'][data-contrast='more'] {
226
+ --ar-bg: #000000;
227
+ --ar-surface-2: #15171e;
228
+ --ar-surface: #0b0c10;
229
+ --ar-border: #9aa2b5;
230
+ --ar-text: #ffffff;
231
+ --ar-text-muted: #d3d8e3;
232
+ --ar-accent: #b8b3ff;
233
+ --ar-accent-hover: #cfcbff;
234
+ --ar-accent-soft: #24233f;
235
+ --ar-accent-text: #000000;
236
+ --ar-danger: #ffa3a3;
237
+ --ar-danger-soft: #3a1d22;
238
+ --ar-danger-text: #000000;
239
+ --ar-success: #7ee8b6;
240
+ --ar-success-soft: #13301f;
241
+ --ar-success-text: #000000;
242
+ --ar-warning: #ffcf85;
243
+ --ar-warning-soft: #33260f;
244
+ --ar-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 4px 16px 0 rgb(0 0 0 / 0.35);
245
+ --ar-shadow-lg: 0 12px 40px 0 rgb(0 0 0 / 0.55);
246
+ color-scheme: dark;
247
+ }
248
+
249
+ /* ── End of generated design tokens ── */
250
+
251
+ /* Focus ring: the accent at 35%, or solid in high contrast. */
252
+ :root { --ar-focus: 0 0 0 3px color-mix(in srgb, var(--ar-accent) 35%, transparent); }
253
+ @media (prefers-contrast: more) {
254
+ :root:not([data-contrast='standard']) { --ar-focus: 0 0 0 3px var(--ar-accent); }
255
+ }
256
+ :root[data-contrast='more'] { --ar-focus: 0 0 0 3px var(--ar-accent); }
257
+
94
258
  /* ── Utilities ─────────────────────────────────────────────────────────── */
95
259
 
96
260
  /* `hidden` always wins over component display rules. */
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "Arethesis",
3
+ "version": "2025-10-01",
4
+ "description": "Arethesis component kit theme. Resolve with the input { \"theme\": \"light\" | \"dark\" | \"light-high-contrast\" | \"dark-high-contrast\" }.",
5
+ "sets": {
6
+ "base": {
7
+ "description": "Typography, radii and spacing.",
8
+ "sources": [
9
+ {
10
+ "$ref": "base.tokens.json"
11
+ }
12
+ ]
13
+ }
14
+ },
15
+ "modifiers": {
16
+ "theme": {
17
+ "description": "Color theme and contrast level.",
18
+ "contexts": {
19
+ "light": [
20
+ {
21
+ "$ref": "light.tokens.json"
22
+ }
23
+ ],
24
+ "dark": [
25
+ {
26
+ "$ref": "dark.tokens.json"
27
+ }
28
+ ],
29
+ "light-high-contrast": [
30
+ {
31
+ "$ref": "light.tokens.json"
32
+ },
33
+ {
34
+ "$ref": "light-high-contrast.tokens.json"
35
+ }
36
+ ],
37
+ "dark-high-contrast": [
38
+ {
39
+ "$ref": "dark.tokens.json"
40
+ },
41
+ {
42
+ "$ref": "dark-high-contrast.tokens.json"
43
+ }
44
+ ]
45
+ },
46
+ "default": "light"
47
+ }
48
+ },
49
+ "resolutionOrder": [
50
+ {
51
+ "$ref": "#/sets/base"
52
+ },
53
+ {
54
+ "$ref": "#/modifiers/theme"
55
+ }
56
+ ]
57
+ }