@arbor-css/core 0.0.108 → 0.0.111

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 (184) hide show
  1. package/dist/cli/introspection.test.js +3 -3
  2. package/dist/cli/introspection.test.js.map +1 -1
  3. package/dist/cli/run.js +15 -6
  4. package/dist/cli/run.js.map +1 -1
  5. package/dist/cli/validate.test.js +3 -3
  6. package/dist/cli/validate.test.js.map +1 -1
  7. package/dist/getStructuredTokensMap.test.js +1 -1
  8. package/dist/getStructuredTokensMap.test.js.map +1 -1
  9. package/dist/index.d.ts +3 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/presets/arborPreset/modeSchema/global.d.ts +119 -31
  14. package/dist/presets/arborPreset/modeSchema/global.d.ts.map +1 -1
  15. package/dist/presets/arborPreset/modeSchema/global.js +117 -31
  16. package/dist/presets/arborPreset/modeSchema/global.js.map +1 -1
  17. package/dist/presets/arborPreset/modeSchema/intents/action.d.ts +3 -3
  18. package/dist/presets/arborPreset/modeSchema/intents/common.d.ts +1 -1
  19. package/dist/presets/arborPreset/modeSchema/intents/common.js +1 -1
  20. package/dist/presets/arborPreset/modeSchema/intents/common.js.map +1 -1
  21. package/dist/presets/arborPreset/modeSchema/intents/control.d.ts +1 -1
  22. package/dist/presets/arborPreset/modeSchema/intents/surface.d.ts +3 -3
  23. package/dist/presets/arborPreset/modeSchema/modeSchema.d.ts +124 -38
  24. package/dist/presets/arborPreset/modeSchema/modeSchema.d.ts.map +1 -1
  25. package/dist/presets/arborPreset/modeValues/color/color.d.ts +15 -23
  26. package/dist/presets/arborPreset/modeValues/color/color.d.ts.map +1 -1
  27. package/dist/presets/arborPreset/modeValues/color/color.js +4 -12
  28. package/dist/presets/arborPreset/modeValues/color/color.js.map +1 -1
  29. package/dist/presets/arborPreset/modeValues/color/compile.d.ts +5 -9
  30. package/dist/presets/arborPreset/modeValues/color/compile.d.ts.map +1 -1
  31. package/dist/presets/arborPreset/modeValues/color/compile.js +4 -4
  32. package/dist/presets/arborPreset/modeValues/color/compile.js.map +1 -1
  33. package/dist/presets/arborPreset/modeValues/color/compile.test.js +43 -40
  34. package/dist/presets/arborPreset/modeValues/color/compile.test.js.map +1 -1
  35. package/dist/presets/arborPreset/modeValues/color/ranges.d.ts +12 -12
  36. package/dist/presets/arborPreset/modeValues/color/ranges.d.ts.map +1 -1
  37. package/dist/presets/arborPreset/modeValues/color/ranges.js +9 -7
  38. package/dist/presets/arborPreset/modeValues/color/ranges.js.map +1 -1
  39. package/dist/presets/arborPreset/modeValues/intents.d.ts +45 -45
  40. package/dist/presets/arborPreset/modeValues/intents.d.ts.map +1 -1
  41. package/dist/presets/arborPreset/modeValues/intents.js +7 -7
  42. package/dist/presets/arborPreset/modeValues/intents.js.map +1 -1
  43. package/dist/presets/arborPreset/modeValues/semantics.d.ts +57 -57
  44. package/dist/presets/arborPreset/modeValues/semantics.d.ts.map +1 -1
  45. package/dist/presets/arborPreset/modeValues/semantics.js +15 -15
  46. package/dist/presets/arborPreset/modeValues/semantics.js.map +1 -1
  47. package/dist/presets/arborPreset/modeValues/shadow/index.d.ts +9 -16
  48. package/dist/presets/arborPreset/modeValues/shadow/index.d.ts.map +1 -1
  49. package/dist/presets/arborPreset/modeValues/shadow/index.js +16 -23
  50. package/dist/presets/arborPreset/modeValues/shadow/index.js.map +1 -1
  51. package/dist/presets/arborPreset/modeValues/spacing/index.d.ts +5 -22
  52. package/dist/presets/arborPreset/modeValues/spacing/index.d.ts.map +1 -1
  53. package/dist/presets/arborPreset/modeValues/spacing/index.js +2 -2
  54. package/dist/presets/arborPreset/modeValues/spacing/index.js.map +1 -1
  55. package/dist/presets/arborPreset/modeValues/typography/index.d.ts +9 -41
  56. package/dist/presets/arborPreset/modeValues/typography/index.d.ts.map +1 -1
  57. package/dist/presets/arborPreset/modeValues/typography/index.js +10 -7
  58. package/dist/presets/arborPreset/modeValues/typography/index.js.map +1 -1
  59. package/dist/presets/arborPreset/preset.d.ts +218 -43
  60. package/dist/presets/arborPreset/preset.d.ts.map +1 -1
  61. package/dist/presets/arborPreset/preset.js +171 -156
  62. package/dist/presets/arborPreset/preset.js.map +1 -1
  63. package/dist/presets/arborPreset/preset.test.js +18 -4
  64. package/dist/presets/arborPreset/preset.test.js.map +1 -1
  65. package/dist/presets/basicPreset/commonFunctions.d.ts +9 -9
  66. package/dist/presets/basicPreset/commonFunctions.d.ts.map +1 -1
  67. package/dist/presets/basicPreset/commonFunctions.js +14 -14
  68. package/dist/presets/basicPreset/commonFunctions.js.map +1 -1
  69. package/dist/presets/basicPreset/functions.test.js +12 -10
  70. package/dist/presets/basicPreset/functions.test.js.map +1 -1
  71. package/dist/presets/basicPreset/mixins.d.ts +3 -3
  72. package/dist/presets/basicPreset/mixins.d.ts.map +1 -1
  73. package/dist/presets/basicPreset/mixins.js +40 -63
  74. package/dist/presets/basicPreset/mixins.js.map +1 -1
  75. package/dist/presets/basicPreset/preset.d.ts +1 -1
  76. package/dist/presets/basicPreset/preset.d.ts.map +1 -1
  77. package/dist/presets/basicPreset/preset.js +6 -6
  78. package/dist/presets/basicPreset/preset.js.map +1 -1
  79. package/dist/publicResolve.d.ts +5 -0
  80. package/dist/publicResolve.d.ts.map +1 -0
  81. package/dist/publicResolve.js +11 -0
  82. package/dist/publicResolve.js.map +1 -0
  83. package/dist/runtime/components/ColorSwatch.d.ts +2 -0
  84. package/dist/runtime/components/ColorSwatch.d.ts.map +1 -0
  85. package/dist/runtime/components/ColorSwatch.js +39 -0
  86. package/dist/runtime/components/ColorSwatch.js.map +1 -0
  87. package/dist/runtime/components/FunctionsList.js +1 -1
  88. package/dist/runtime/components/MixinsList.js +1 -1
  89. package/dist/runtime/components/ModeGraph.d.ts.map +1 -1
  90. package/dist/runtime/components/ModeGraph.js +93 -46
  91. package/dist/runtime/components/ModeGraph.js.map +1 -1
  92. package/dist/runtime/components/Outputs.d.ts.map +1 -1
  93. package/dist/runtime/components/Outputs.js +2 -1
  94. package/dist/runtime/components/Outputs.js.map +1 -1
  95. package/dist/runtime/components/SpacingScale.js +2 -2
  96. package/dist/runtime/components/SpacingScale.js.map +1 -1
  97. package/dist/runtime/components/SystemDemo.d.ts +2 -0
  98. package/dist/runtime/components/SystemDemo.d.ts.map +1 -0
  99. package/dist/runtime/components/SystemDemo.js +32 -0
  100. package/dist/runtime/components/SystemDemo.js.map +1 -0
  101. package/dist/runtime/components/index.d.ts.map +1 -1
  102. package/dist/runtime/components/index.js +4 -0
  103. package/dist/runtime/components/index.js.map +1 -1
  104. package/dist/runtime/registration.d.ts +5 -1
  105. package/dist/runtime/registration.d.ts.map +1 -1
  106. package/dist/runtime/registration.js +32 -1
  107. package/dist/runtime/registration.js.map +1 -1
  108. package/dist/runtime/tokenGroups.d.ts.map +1 -1
  109. package/dist/stylesheet/generateStylesheet.d.ts +3 -1
  110. package/dist/stylesheet/generateStylesheet.d.ts.map +1 -1
  111. package/dist/stylesheet/generateStylesheet.js +2 -2
  112. package/dist/stylesheet/generateStylesheet.js.map +1 -1
  113. package/dist/stylesheet/generateStylesheet.test.js +4 -4
  114. package/dist/stylesheet/generateStylesheet.test.js.map +1 -1
  115. package/dist/stylesheet/modeToCss.d.ts +2 -3
  116. package/dist/stylesheet/modeToCss.d.ts.map +1 -1
  117. package/dist/stylesheet/modeToCss.js +2 -4
  118. package/dist/stylesheet/modeToCss.js.map +1 -1
  119. package/dist/stylesheet/modeToCss.test.js +10 -9
  120. package/dist/stylesheet/modeToCss.test.js.map +1 -1
  121. package/dist/util/buildModeTokenGraph.d.ts +4 -1
  122. package/dist/util/buildModeTokenGraph.d.ts.map +1 -1
  123. package/dist/util/buildModeTokenGraph.js +16 -10
  124. package/dist/util/buildModeTokenGraph.js.map +1 -1
  125. package/dist/util/buildModeTokenGraph.test.js +9 -4
  126. package/dist/util/buildModeTokenGraph.test.js.map +1 -1
  127. package/dist/util/flattenAndApplyTokenValues.d.ts +2 -1
  128. package/dist/util/flattenAndApplyTokenValues.d.ts.map +1 -1
  129. package/dist/util/flattenAndApplyTokenValues.js.map +1 -1
  130. package/dist/util/resolveComputedTokenValue.d.ts +2 -4
  131. package/dist/util/resolveComputedTokenValue.d.ts.map +1 -1
  132. package/dist/util/resolveComputedTokenValue.js +11 -13
  133. package/dist/util/resolveComputedTokenValue.js.map +1 -1
  134. package/dist/util/resolveComputedTokenValue.test.js +20 -10
  135. package/dist/util/resolveComputedTokenValue.test.js.map +1 -1
  136. package/package.json +8 -8
  137. package/dist/runtime/componentsOld/BaseElement.d.ts +0 -8
  138. package/dist/runtime/componentsOld/BaseElement.d.ts.map +0 -1
  139. package/dist/runtime/componentsOld/BaseElement.js +0 -14
  140. package/dist/runtime/componentsOld/BaseElement.js.map +0 -1
  141. package/dist/runtime/componentsOld/ModeSelector.d.ts +0 -2
  142. package/dist/runtime/componentsOld/ModeSelector.d.ts.map +0 -1
  143. package/dist/runtime/componentsOld/ModeSelector.js +0 -36
  144. package/dist/runtime/componentsOld/ModeSelector.js.map +0 -1
  145. package/dist/runtime/componentsOld/SchemeSelector.d.ts +0 -2
  146. package/dist/runtime/componentsOld/SchemeSelector.d.ts.map +0 -1
  147. package/dist/runtime/componentsOld/SchemeSelector.js +0 -34
  148. package/dist/runtime/componentsOld/SchemeSelector.js.map +0 -1
  149. package/dist/runtime/componentsOld/SystemDemo.d.ts +0 -2
  150. package/dist/runtime/componentsOld/SystemDemo.d.ts.map +0 -1
  151. package/dist/runtime/componentsOld/SystemDemo.js +0 -45
  152. package/dist/runtime/componentsOld/SystemDemo.js.map +0 -1
  153. package/dist/runtime/componentsOld/TokenColorValuePreview.d.ts +0 -2
  154. package/dist/runtime/componentsOld/TokenColorValuePreview.d.ts.map +0 -1
  155. package/dist/runtime/componentsOld/TokenColorValuePreview.js +0 -12
  156. package/dist/runtime/componentsOld/TokenColorValuePreview.js.map +0 -1
  157. package/dist/runtime/componentsOld/TokenFontValuesPreview.d.ts +0 -2
  158. package/dist/runtime/componentsOld/TokenFontValuesPreview.d.ts.map +0 -1
  159. package/dist/runtime/componentsOld/TokenFontValuesPreview.js +0 -14
  160. package/dist/runtime/componentsOld/TokenFontValuesPreview.js.map +0 -1
  161. package/dist/runtime/componentsOld/TokenShadowValuePreview.d.ts +0 -2
  162. package/dist/runtime/componentsOld/TokenShadowValuePreview.d.ts.map +0 -1
  163. package/dist/runtime/componentsOld/TokenShadowValuePreview.js +0 -14
  164. package/dist/runtime/componentsOld/TokenShadowValuePreview.js.map +0 -1
  165. package/dist/runtime/componentsOld/TokenSizeValuePreview.d.ts +0 -2
  166. package/dist/runtime/componentsOld/TokenSizeValuePreview.d.ts.map +0 -1
  167. package/dist/runtime/componentsOld/TokenSizeValuePreview.js +0 -12
  168. package/dist/runtime/componentsOld/TokenSizeValuePreview.js.map +0 -1
  169. package/dist/runtime/componentsOld/TokenValuePreview.d.ts +0 -2
  170. package/dist/runtime/componentsOld/TokenValuePreview.d.ts.map +0 -1
  171. package/dist/runtime/componentsOld/TokenValuePreview.js +0 -25
  172. package/dist/runtime/componentsOld/TokenValuePreview.js.map +0 -1
  173. package/dist/runtime/componentsOld/TokenValues.d.ts +0 -2
  174. package/dist/runtime/componentsOld/TokenValues.d.ts.map +0 -1
  175. package/dist/runtime/componentsOld/TokenValues.js +0 -103
  176. package/dist/runtime/componentsOld/TokenValues.js.map +0 -1
  177. package/dist/runtime/componentsOld/index.d.ts +0 -11
  178. package/dist/runtime/componentsOld/index.d.ts.map +0 -1
  179. package/dist/runtime/componentsOld/index.js +0 -11
  180. package/dist/runtime/componentsOld/index.js.map +0 -1
  181. package/dist/util/printTokens.d.ts +0 -5
  182. package/dist/util/printTokens.d.ts.map +0 -1
  183. package/dist/util/printTokens.js +0 -6
  184. package/dist/util/printTokens.js.map +0 -1
@@ -1,34 +0,0 @@
1
- import { ArborElement } from './BaseElement.js';
2
- class SchemeSelector extends ArborElement {
3
- constructor() {
4
- super();
5
- this.render = () => {
6
- const schemeNames = ['light', 'dark'];
7
- const selected = this.getAttribute('selected') || 'base';
8
- this.shadowRoot.innerHTML = `<div class="@scheme-${selected}" style="background: var(--m-surface-ambient-bg); color: var(--m-surface-ambient-fg);">
9
- <select data-scheme-select name="scheme" aria-label="Select scheme" style="position: sticky; top: 0;">
10
- ${schemeNames
11
- .map((schemeName) => `<option value="${schemeName}" ${schemeName === selected ? 'selected' : ''}>${schemeName}</option>`)
12
- .join('\n')}
13
- </select>
14
- <slot></slot>
15
- </div>`;
16
- const schemeSelect = this.shadowRoot?.querySelector('[data-scheme-select]');
17
- schemeSelect?.addEventListener('change', () => {
18
- const selectedMode = schemeSelect.value;
19
- this.setAttribute('selected', selectedMode);
20
- });
21
- };
22
- this.render();
23
- }
24
- static get observedAttributes() {
25
- return ['selected'];
26
- }
27
- attributeChangedCallback(name, oldValue, newValue) {
28
- if (name === 'selected' && oldValue !== newValue) {
29
- this.render();
30
- }
31
- }
32
- }
33
- customElements.define('arbor-scheme-selector', SchemeSelector);
34
- //# sourceMappingURL=SchemeSelector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SchemeSelector.js","sourceRoot":"","sources":["../../../src/runtime/componentsOld/SchemeSelector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,cAAe,SAAQ,YAAY;IACxC;QACC,KAAK,EAAE,CAAC;QAIT,WAAM,GAAG,GAAG,EAAE;YACb,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC;YACzD,IAAI,CAAC,UAAW,CAAC,SAAS,GAAG,uBAAuB,QAAQ;;MAExD,WAAW;iBACX,GAAG,CACH,CAAC,UAAU,EAAE,EAAE,CACd,kBAAkB,UAAU,KAAK,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,UAAU,WAAW,CACpG;iBACA,IAAI,CAAC,IAAI,CAAC;;;SAGP,CAAC;YACR,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAClD,sBAAsB,CACM,CAAC;YAC9B,YAAY,EAAE,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE;gBAC7C,MAAM,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC;gBACxC,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC;QAxBD,IAAI,CAAC,MAAM,EAAE,CAAC;IACf,CAAC;IAwBD,MAAM,KAAK,kBAAkB;QAC5B,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;IACD,wBAAwB,CACvB,IAAY,EACZ,QAAuB,EACvB,QAAuB;QAEvB,IAAI,IAAI,KAAK,UAAU,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAClD,IAAI,CAAC,MAAM,EAAE,CAAC;QACf,CAAC;IACF,CAAC;CACD;AAED,cAAc,CAAC,MAAM,CAAC,uBAAuB,EAAE,cAAc,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=SystemDemo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SystemDemo.d.ts","sourceRoot":"","sources":["../../../src/runtime/componentsOld/SystemDemo.ts"],"names":[],"mappings":""}
@@ -1,45 +0,0 @@
1
- import { isToken } from '@arbor-css/tokens';
2
- import { convertStructure } from '@arbor-css/util';
3
- import { generateStylesheet } from '../../stylesheet/generateStylesheet.js';
4
- import { ArborElement } from './BaseElement.js';
5
- class SystemDemo extends ArborElement {
6
- constructor() {
7
- super();
8
- this.shadowRoot.innerHTML = `
9
- <div data-mode-base>
10
- <details>
11
- <summary>Primitive Tokens</summary>
12
- <pre>${JSON.stringify(convertStructure(this.config.$.mode.primitive, isToken, (token) => token.name), null, 2)}</pre>
13
- </details>
14
- <details>
15
- <summary>Mode Tokens</summary>
16
- <pre>${JSON.stringify(convertStructure(this.config.$.mode, isToken, (token) => token.name), null, 2)}</pre>
17
- </details>
18
- <details>
19
- <summary>Generated CSS</summary>
20
- <pre>${generateStylesheet(this.config)}</pre>
21
- </details>
22
- <arbor-scheme-selector>
23
- <details open>
24
- <summary><h2 id="primitives" style="display: inline; margin: 0;">Primitive Tokens</h2></summary>
25
- <arbor-token-values schema-path="$.mode.primitive"></arbor-token-values>
26
- </details>
27
- <details open>
28
- <summary><h2 id="modes" style="display: inline; margin: 0;">Mode Tokens</h2></summary>
29
- <arbor-mode-selector>
30
- <arbor-token-values schema-path="modes.base.schema.$tokens"></arbor-token-values>
31
- </arbor-mode-selector>
32
- </details>
33
- </arbor-scheme-selector>
34
- </div>
35
- <style>
36
- h2 {
37
- font-size: 1.5rem;
38
- margin-bottom: 0.5rem;
39
- }
40
- </style>
41
- `;
42
- }
43
- }
44
- customElements.define('arbor-system-demo', SystemDemo);
45
- //# sourceMappingURL=SystemDemo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SystemDemo.js","sourceRoot":"","sources":["../../../src/runtime/componentsOld/SystemDemo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,UAAW,SAAQ,YAAY;IACpC;QACC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG;;;;YAIlB,IAAI,CAAC,SAAS,CACpB,gBAAgB,CACf,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAC5B,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CACrB,EACD,IAAI,EACJ,CAAC,CACD;;;;YAIM,IAAI,CAAC,SAAS,CACpB,gBAAgB,CACf,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAClB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CACrB,EACD,IAAI,EACJ,CAAC,CACD;;;;YAIM,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;GAqBxC,CAAC;IACH,CAAC;CACD;AAED,cAAc,CAAC,MAAM,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TokenColorValuePreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenColorValuePreview.d.ts","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenColorValuePreview.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { ArborElement } from './BaseElement.js';
2
- class TokenColorValuePreview extends ArborElement {
3
- constructor() {
4
- super();
5
- const color = this.getAttribute('color') ?? 'unknown';
6
- this.shadowRoot.innerHTML = `
7
- <div style="width: 50px; height: 50px; background: ${color}; border: 1px solid black; border-radius: 1rem;"></div>
8
- `;
9
- }
10
- }
11
- customElements.define('arbor-token-color-value-preview', TokenColorValuePreview);
12
- //# sourceMappingURL=TokenColorValuePreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenColorValuePreview.js","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenColorValuePreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,sBAAuB,SAAQ,YAAY;IAChD;QACC,KAAK,EAAE,CAAC;QACR,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC;QACtD,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG;wDAC0B,KAAK;GAC1D,CAAC;IACH,CAAC;CACD;AACD,cAAc,CAAC,MAAM,CACpB,iCAAiC,EACjC,sBAAsB,CACtB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TokenFontValuesPreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenFontValuesPreview.d.ts","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenFontValuesPreview.ts"],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- import { ArborElement } from './BaseElement.js';
2
- class TokenFontValuesPreview extends ArborElement {
3
- constructor() {
4
- super();
5
- const size = this.getAttribute('size') ?? 'unknown';
6
- const weight = this.getAttribute('weight') ?? 'normal';
7
- const lineHeight = this.getAttribute('line-height') ?? 'normal';
8
- this.shadowRoot.innerHTML = `
9
- <div style="font-size: ${size}; font-weight: ${weight}; line-height: ${lineHeight}; border: 1px solid black; padding: 0.5rem;">Aa</div>
10
- `;
11
- }
12
- }
13
- customElements.define('arbor-token-font-values-preview', TokenFontValuesPreview);
14
- //# sourceMappingURL=TokenFontValuesPreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenFontValuesPreview.js","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenFontValuesPreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,sBAAuB,SAAQ,YAAY;IAChD;QACC,KAAK,EAAE,CAAC;QACR,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC;QACpD,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC;QACvD,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,QAAQ,CAAC;QAChE,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG;4BACF,IAAI,kBAAkB,MAAM,kBAAkB,UAAU;GACjF,CAAC;IACH,CAAC;CACD;AACD,cAAc,CAAC,MAAM,CACpB,iCAAiC,EACjC,sBAAsB,CACtB,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TokenShadowValuePreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenShadowValuePreview.d.ts","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenShadowValuePreview.ts"],"names":[],"mappings":""}
@@ -1,14 +0,0 @@
1
- import { ArborElement } from './BaseElement.js';
2
- class ShadowValuePreview extends ArborElement {
3
- constructor() {
4
- super();
5
- const shadow = this.getAttribute('shadow') ?? 'none';
6
- this.shadowRoot.innerHTML = `
7
- <div style="padding: 20px; display: flex;">
8
- <div style="place-self: center; width: 20px; height: 20px; background: white; border: 1px solid black; box-shadow: ${shadow};"></div>
9
- </div>
10
- `;
11
- }
12
- }
13
- customElements.define('arbor-token-shadow-value-preview', ShadowValuePreview);
14
- //# sourceMappingURL=TokenShadowValuePreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenShadowValuePreview.js","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenShadowValuePreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,kBAAmB,SAAQ,YAAY;IAC5C;QACC,KAAK,EAAE,CAAC;QACR,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC;QACrD,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG;;wHAE0F,MAAM;;GAE3H,CAAC;IACH,CAAC;CACD;AACD,cAAc,CAAC,MAAM,CAAC,kCAAkC,EAAE,kBAAkB,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TokenSizeValuePreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenSizeValuePreview.d.ts","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenSizeValuePreview.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { ArborElement } from './BaseElement.js';
2
- class TokenSizeValuePreview extends ArborElement {
3
- constructor() {
4
- super();
5
- const size = this.getAttribute('size') ?? 'unknown';
6
- this.shadowRoot.innerHTML = `
7
- <div style="width: ${size}; height: ${size}; border: 1px solid black;"></div>
8
- `;
9
- }
10
- }
11
- customElements.define('arbor-token-size-value-preview', TokenSizeValuePreview);
12
- //# sourceMappingURL=TokenSizeValuePreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenSizeValuePreview.js","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenSizeValuePreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,qBAAsB,SAAQ,YAAY;IAC/C;QACC,KAAK,EAAE,CAAC;QACR,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC;QACpD,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG;wBACN,IAAI,aAAa,IAAI;GAC1C,CAAC;IACH,CAAC;CACD;AACD,cAAc,CAAC,MAAM,CAAC,gCAAgC,EAAE,qBAAqB,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TokenValuePreview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenValuePreview.d.ts","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenValuePreview.ts"],"names":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { ArborElement } from './BaseElement.js';
2
- class TokenValuePreview extends ArborElement {
3
- constructor() {
4
- super();
5
- const value = this.getAttribute('value');
6
- const purpose = this.getAttribute('purpose');
7
- let preview;
8
- switch (purpose) {
9
- case 'color':
10
- preview = `<arbor-token-color-value-preview color="${value}"></arbor-token-color-value-preview>`;
11
- break;
12
- case 'spacing':
13
- preview = `<arbor-token-size-value-preview size="${value}"></arbor-token-size-value-preview>`;
14
- break;
15
- case 'shadow':
16
- preview = `<arbor-token-shadow-value-preview shadow="${value}"></arbor-token-shadow-value-preview>`;
17
- break;
18
- default:
19
- preview = `<div style="width: 50px; height: 50px; border: 1px solid black; display: flex; align-items: center; justify-content: center;">?</div>`;
20
- }
21
- this.shadowRoot.innerHTML = preview;
22
- }
23
- }
24
- customElements.define('arbor-token-value-preview', TokenValuePreview);
25
- //# sourceMappingURL=TokenValuePreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenValuePreview.js","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenValuePreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,iBAAkB,SAAQ,YAAY;IAC3C;QACC,KAAK,EAAE,CAAC;QACR,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAE7C,IAAI,OAAe,CAAC;QACpB,QAAQ,OAAO,EAAE,CAAC;YACjB,KAAK,OAAO;gBACX,OAAO,GAAG,2CAA2C,KAAK,sCAAsC,CAAC;gBACjG,MAAM;YACP,KAAK,SAAS;gBACb,OAAO,GAAG,yCAAyC,KAAK,qCAAqC,CAAC;gBAC9F,MAAM;YACP,KAAK,QAAQ;gBACZ,OAAO,GAAG,6CAA6C,KAAK,uCAAuC,CAAC;gBACpG,MAAM;YACP;gBACC,OAAO,GAAG,uIAAuI,CAAC;QACpJ,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,OAAO,CAAC;IACrC,CAAC;CACD;AAED,cAAc,CAAC,MAAM,CAAC,2BAA2B,EAAE,iBAAiB,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=TokenValues.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenValues.d.ts","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenValues.ts"],"names":[],"mappings":""}
@@ -1,103 +0,0 @@
1
- import { groupTokens } from '../tokenGroups.js';
2
- import { ArborElement } from './BaseElement.js';
3
- class TokenValues extends ArborElement {
4
- constructor() {
5
- super();
6
- const config = this.config;
7
- const schemaPath = this.getAttribute('schema-path');
8
- const schemaPathParts = schemaPath ? schemaPath.split('.') : [];
9
- const tokenSchema = schemaPathParts.reduce((acc, part) => acc?.[part], config);
10
- const tokens = groupTokens(tokenSchema);
11
- this.shadowRoot.innerHTML = `
12
- <div class="root">
13
- ${Object.entries(tokens.simple)
14
- .map(([purpose, tokens]) => {
15
- // subgroup by group if exists
16
- const subgroups = tokens.reduce((groups, token) => {
17
- const group = token.group ?? '';
18
- if (!groups[group]) {
19
- groups[group] = [];
20
- }
21
- groups[group].push(token);
22
- return groups;
23
- }, {});
24
- return `<div class="token-group">
25
- <h3>${purpose}</h3>
26
- <div class="token-values">
27
- ${Object.entries(subgroups)
28
- .map(([group, tokens]) => {
29
- return `
30
- <div class="token-subgroup">
31
- <h4>${group}</h4>
32
- ${tokens
33
- .map((token) => {
34
- return `
35
- <div class="token-value">
36
- <strong>${token.name}</strong>
37
- <arbor-token-value-preview value="${token.var}" purpose="${token.purpose}"></arbor-token-value-preview>
38
- </div>`;
39
- })
40
- .join('\n')}
41
- </div>`;
42
- })
43
- .join('\n')}
44
- </div>
45
- </div>`;
46
- })
47
- .join('\n')}
48
- <div class="token-group">
49
- <h3>Typography</h3>
50
- <div class="token-values">
51
- ${Object.entries(tokens.typography)
52
- .map(([level, { size, weight, lineHeight }]) => {
53
- const sizeVar = size ? size.var : 'unknown';
54
- const weightVar = weight ? weight.var : 'unknown';
55
- const lineHeightVar = lineHeight ? lineHeight.var : 'unknown';
56
- return `
57
- <div class="token-value">
58
- <div>
59
- <strong>${level}</strong>
60
- <div>size: ${sizeVar}</div>
61
- <div>weight: ${weightVar}</div>
62
- <div>line-height: ${lineHeightVar}</div>
63
- </div>
64
- <arbor-token-font-values-preview size="${sizeVar}" weight="${weightVar}" line-height="${lineHeightVar}"></arbor-token-font-values-preview>
65
- </div>
66
- `;
67
- })
68
- .join('\n')}
69
- </div>
70
- </div>
71
- </div>
72
- <style>
73
- .root {
74
- display: flex;
75
- flex-direction: column;
76
- gap: 0.25rem;
77
- }
78
- .token-group {
79
- margin-bottom: 2rem;
80
- padding: 0.25rem;
81
- }
82
- .token-subgroup {
83
- margin-bottom: 1rem;
84
- padding-left: 0.5rem;
85
- }
86
- .token-values {
87
- display: grid;
88
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
89
- gap: 0.125rem;
90
- }
91
- .token-value {
92
- display: flex;
93
- flex-direction: row;
94
- align-items: center;
95
- justify-content: space-between;
96
- padding: 0.2rem;
97
- }
98
- </style>
99
- `;
100
- }
101
- }
102
- customElements.define('arbor-token-values', TokenValues);
103
- //# sourceMappingURL=TokenValues.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TokenValues.js","sourceRoot":"","sources":["../../../src/runtime/componentsOld/TokenValues.ts"],"names":[],"mappings":"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"}
@@ -1,11 +0,0 @@
1
- import './ModeSelector.js';
2
- import './SchemeSelector.js';
3
- import './SystemDemo.js';
4
- import './TokenColorValuePreview.js';
5
- import './TokenFontValuesPreview.js';
6
- import './TokenShadowValuePreview.js';
7
- import './TokenSizeValuePreview.js';
8
- import './TokenValuePreview.js';
9
- import './TokenValues.js';
10
- export { ArborElement } from './BaseElement.js';
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtime/componentsOld/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,iBAAiB,CAAC;AACzB,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,8BAA8B,CAAC;AACtC,OAAO,4BAA4B,CAAC;AACpC,OAAO,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,11 +0,0 @@
1
- import './ModeSelector.js';
2
- import './SchemeSelector.js';
3
- import './SystemDemo.js';
4
- import './TokenColorValuePreview.js';
5
- import './TokenFontValuesPreview.js';
6
- import './TokenShadowValuePreview.js';
7
- import './TokenSizeValuePreview.js';
8
- import './TokenValuePreview.js';
9
- import './TokenValues.js';
10
- export { ArborElement } from './BaseElement.js';
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/componentsOld/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,iBAAiB,CAAC;AACzB,OAAO,6BAA6B,CAAC;AACrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,8BAA8B,CAAC;AACtC,OAAO,4BAA4B,CAAC;AACpC,OAAO,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,5 +0,0 @@
1
- import { TokenSchema } from '@arbor-css/tokens';
2
- export declare function printTokens(tokens: TokenSchema, values: Record<string, any>, { prefix }?: {
3
- prefix?: string;
4
- }): string;
5
- //# sourceMappingURL=printTokens.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"printTokens.d.ts","sourceRoot":"","sources":["../../src/util/printTokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,wBAAgB,WAAW,CAC1B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,EAAE,MAAM,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,UAKpC"}
@@ -1,6 +0,0 @@
1
- import { flattenAndApplyTokenValues } from './flattenAndApplyTokenValues.js';
2
- import { formatObjectToCss } from './formatObjectToCss.js';
3
- export function printTokens(tokens, values, { prefix } = {}) {
4
- return formatObjectToCss(flattenAndApplyTokenValues(tokens, values, { prefix }));
5
- }
6
- //# sourceMappingURL=printTokens.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"printTokens.js","sourceRoot":"","sources":["../../src/util/printTokens.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,UAAU,WAAW,CAC1B,MAAmB,EACnB,MAA2B,EAC3B,EAAE,MAAM,KAA0B,EAAE;IAEpC,OAAO,iBAAiB,CACvB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CACtD,CAAC;AACH,CAAC"}