@spectrabrain/eds 0.0.4 → 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 (62) hide show
  1. package/AI.md +13 -40
  2. package/AI_CONTEXT.json +90 -0
  3. package/CHANGELOG.md +120 -0
  4. package/CONSUMER_AGENT.md +152 -0
  5. package/FRONTEND_CONVENTIONS.md +252 -0
  6. package/QUICKSTART.md +42 -0
  7. package/README.md +38 -69
  8. package/TAILWIND_V4.md +57 -243
  9. package/TOKEN_CONTEXT.md +98 -0
  10. package/consumer/align/templates/components.json +21 -0
  11. package/consumer/align/templates/env.mock +1 -0
  12. package/consumer/align/templates/eslint.config.js +35 -0
  13. package/consumer/align/templates/package.scripts.json +10 -0
  14. package/consumer/align/templates/prettierignore +2 -0
  15. package/consumer/align/templates/prettierrc.json +7 -0
  16. package/consumer/align/templates/src/app/App.tsx +16 -0
  17. package/consumer/align/templates/src/app/main.tsx +27 -0
  18. package/consumer/align/templates/src/app/providers/ErrorBoundary.tsx +58 -0
  19. package/consumer/align/templates/src/app/providers/ErrorHandler.tsx +29 -0
  20. package/consumer/align/templates/src/app/router/index.tsx +23 -0
  21. package/consumer/align/templates/src/app/styles/index.css +2 -0
  22. package/consumer/align/templates/src/mocks/browser.ts +5 -0
  23. package/consumer/align/templates/src/mocks/handlers.ts +4 -0
  24. package/consumer/align/templates/src/shared/api/index.ts +23 -0
  25. package/consumer/align/templates/src/shared/api/queryClient.ts +24 -0
  26. package/consumer/align/templates/src/shared/lib/eventBus.ts +44 -0
  27. package/consumer/align/templates/src/shared/lib/utils/index.ts +6 -0
  28. package/consumer/align/templates/src/vite-env.d.ts +2 -0
  29. package/consumer/align/templates/tsconfig.json +22 -0
  30. package/consumer/align/templates/vite.config.babel.ts +36 -0
  31. package/consumer/align/templates/vite.config.rolldown.ts +35 -0
  32. package/consumer/align-analysis.mjs +1159 -0
  33. package/consumer/align-plan.mjs +377 -0
  34. package/consumer/align-rules.mjs +473 -0
  35. package/consumer/align.mjs +401 -0
  36. package/consumer/cli.mjs +157 -0
  37. package/consumer/css-root.mjs +259 -0
  38. package/consumer/doctor.mjs +204 -0
  39. package/consumer/generate-tailwind.mjs +83 -0
  40. package/consumer/init.mjs +186 -0
  41. package/consumer/managed-block.mjs +126 -0
  42. package/consumer/paths.mjs +266 -0
  43. package/consumer/register-scripts.mjs +129 -0
  44. package/consumer/scan-classes.mjs +71 -0
  45. package/consumer/sync.mjs +155 -0
  46. package/consumer/update-agent-context.mjs +143 -0
  47. package/consumer-postinstall.mjs +60 -0
  48. package/dist/base.css +4 -0
  49. package/dist/components/Button/README.md +70 -80
  50. package/dist/components/Button/spec.json +71 -133
  51. package/dist/components.css +102 -368
  52. package/dist/index.d.mts +40 -1
  53. package/dist/index.d.ts +40 -1
  54. package/dist/index.js +34 -6250
  55. package/dist/index.mjs +36 -6252
  56. package/dist/styles.css +1 -0
  57. package/dist/tokens.d.mts +5 -2
  58. package/dist/tokens.d.ts +5 -2
  59. package/dist/tokens.js +6 -7
  60. package/dist/tokens.mjs +6 -7
  61. package/llms.txt +22 -9
  62. package/package.json +33 -2
package/dist/styles.css CHANGED
@@ -1,4 +1,5 @@
1
1
  /* This file is generated by scripts/build-tokens.ts. Do not edit directly. */
2
2
  @import "./fonts.css";
3
3
  @import "./tokens.css";
4
+ @import "./base.css";
4
5
  @import "./components.css";
package/dist/tokens.d.mts CHANGED
@@ -1,16 +1,19 @@
1
1
  type SemanticTokenName = "color-bg-brand-primary" | "color-bg-brand-primary-hover" | "color-bg-brand-weak" | "color-bg-brand-weak-hover" | "color-bg-critical-primary" | "color-bg-critical-primary-hover" | "color-bg-critical-weak" | "color-bg-critical-weak-hover" | "color-bg-disabled" | "color-bg-informative-primary" | "color-bg-informative-primary-hover" | "color-bg-informative-weak" | "color-bg-informative-weak-hover" | "color-bg-layer-basement" | "color-bg-layer-basement-hover" | "color-bg-layer-default" | "color-bg-layer-default-hover" | "color-bg-layer-floating" | "color-bg-layer-floating-hover" | "color-bg-neutral-inverted" | "color-bg-neutral-inverted-hover" | "color-bg-neutral-primary" | "color-bg-neutral-primary-hover" | "color-bg-neutral-weak" | "color-bg-neutral-weak-hover" | "color-bg-positive-primary" | "color-bg-positive-primary-hover" | "color-bg-positive-weak" | "color-bg-positive-weak-hover" | "color-bg-transparent" | "color-bg-transparent-hover" | "color-bg-warning-primary" | "color-bg-warning-primary-hover" | "color-bg-warning-weak" | "color-bg-warning-weak-hover" | "color-fg-brand" | "color-fg-brand-contrast" | "color-fg-critical" | "color-fg-critical-contrast" | "color-fg-disabled" | "color-fg-focus" | "color-fg-informative" | "color-fg-informative-contrast" | "color-fg-neutral" | "color-fg-neutral-inverted" | "color-fg-neutral-secondary" | "color-fg-neutral-tertiary" | "color-fg-placeholder" | "color-fg-positive" | "color-fg-positive-contrast" | "color-fg-warning" | "color-fg-warning-contrast" | "color-stroke-brand-primary" | "color-stroke-brand-weak" | "color-stroke-critical-primary" | "color-stroke-critical-weak" | "color-stroke-focusRing" | "color-stroke-informative-primary" | "color-stroke-informative-weak" | "color-stroke-neutral-contrast" | "color-stroke-neutral-primary" | "color-stroke-neutral-secondary" | "color-stroke-neutral-tertiary" | "color-stroke-neutral-weak" | "color-stroke-positive-primary" | "color-stroke-positive-weak" | "color-stroke-warning-primary" | "color-stroke-warning-weak" | "typography-body1-fontFamily" | "typography-body1-fontSize" | "typography-body1-fontWeight" | "typography-body1-letterSpacing" | "typography-body1-lineHeight" | "typography-body2-fontFamily" | "typography-body2-fontSize" | "typography-body2-fontWeight" | "typography-body2-letterSpacing" | "typography-body2-lineHeight" | "typography-body3-fontFamily" | "typography-body3-fontSize" | "typography-body3-fontWeight" | "typography-body3-letterSpacing" | "typography-body3-lineHeight" | "typography-body4-fontFamily" | "typography-body4-fontSize" | "typography-body4-fontWeight" | "typography-body4-letterSpacing" | "typography-body4-lineHeight" | "typography-caption1-fontFamily" | "typography-caption1-fontSize" | "typography-caption1-fontWeight" | "typography-caption1-letterSpacing" | "typography-caption1-lineHeight" | "typography-caption2-fontFamily" | "typography-caption2-fontSize" | "typography-caption2-fontWeight" | "typography-caption2-letterSpacing" | "typography-caption2-lineHeight" | "typography-caption3-fontFamily" | "typography-caption3-fontSize" | "typography-caption3-fontWeight" | "typography-caption3-letterSpacing" | "typography-caption3-lineHeight" | "typography-display1-fontFamily" | "typography-display1-fontSize" | "typography-display1-fontWeight" | "typography-display1-letterSpacing" | "typography-display1-lineHeight" | "typography-display2-fontFamily" | "typography-display2-fontSize" | "typography-display2-fontWeight" | "typography-display2-letterSpacing" | "typography-display2-lineHeight" | "typography-heading1-fontFamily" | "typography-heading1-fontSize" | "typography-heading1-fontWeight" | "typography-heading1-letterSpacing" | "typography-heading1-lineHeight" | "typography-heading2-fontFamily" | "typography-heading2-fontSize" | "typography-heading2-fontWeight" | "typography-heading2-letterSpacing" | "typography-heading2-lineHeight" | "typography-heading3-fontFamily" | "typography-heading3-fontSize" | "typography-heading3-fontWeight" | "typography-heading3-letterSpacing" | "typography-heading3-lineHeight" | "typography-heading4-fontFamily" | "typography-heading4-fontSize" | "typography-heading4-fontWeight" | "typography-heading4-letterSpacing" | "typography-heading4-lineHeight" | "typography-title1-fontFamily" | "typography-title1-fontSize" | "typography-title1-fontWeight" | "typography-title1-letterSpacing" | "typography-title1-lineHeight" | "typography-title2-fontFamily" | "typography-title2-fontSize" | "typography-title2-fontWeight" | "typography-title2-letterSpacing" | "typography-title2-lineHeight" | "typography-title3-fontFamily" | "typography-title3-fontSize" | "typography-title3-fontWeight" | "typography-title3-letterSpacing" | "typography-title3-lineHeight" | "typography-title4-fontFamily" | "typography-title4-fontSize" | "typography-title4-fontWeight" | "typography-title4-letterSpacing" | "typography-title4-lineHeight";
2
2
  type SemanticTokenType = "color" | "dimension" | "fontFamily" | "fontWeight";
3
- type SemanticTokenCssVariable = "--eds-color-bg-brand-primary" | "--eds-color-bg-brand-primary-hover" | "--eds-color-bg-brand-weak" | "--eds-color-bg-brand-weak-hover" | "--eds-color-bg-critical-primary" | "--eds-color-bg-critical-primary-hover" | "--eds-color-bg-critical-weak" | "--eds-color-bg-critical-weak-hover" | "--eds-color-bg-disabled" | "--eds-color-bg-informative-primary" | "--eds-color-bg-informative-primary-hover" | "--eds-color-bg-informative-weak" | "--eds-color-bg-informative-weak-hover" | "--eds-color-bg-layer-basement" | "--eds-color-bg-layer-basement-hover" | "--eds-color-bg-layer-default" | "--eds-color-bg-layer-default-hover" | "--eds-color-bg-layer-floating" | "--eds-color-bg-layer-floating-hover" | "--eds-color-bg-neutral-inverted" | "--eds-color-bg-neutral-inverted-hover" | "--eds-color-bg-neutral-primary" | "--eds-color-bg-neutral-primary-hover" | "--eds-color-bg-neutral-weak" | "--eds-color-bg-neutral-weak-hover" | "--eds-color-bg-positive-primary" | "--eds-color-bg-positive-primary-hover" | "--eds-color-bg-positive-weak" | "--eds-color-bg-positive-weak-hover" | "--eds-color-bg-transparent" | "--eds-color-bg-transparent-hover" | "--eds-color-bg-warning-primary" | "--eds-color-bg-warning-primary-hover" | "--eds-color-bg-warning-weak" | "--eds-color-bg-warning-weak-hover" | "--eds-color-fg-brand" | "--eds-color-fg-brand-contrast" | "--eds-color-fg-critical" | "--eds-color-fg-critical-contrast" | "--eds-color-fg-disabled" | "--eds-color-fg-focus" | "--eds-color-fg-informative" | "--eds-color-fg-informative-contrast" | "--eds-color-fg-neutral" | "--eds-color-fg-neutral-inverted" | "--eds-color-fg-neutral-secondary" | "--eds-color-fg-neutral-tertiary" | "--eds-color-fg-placeholder" | "--eds-color-fg-positive" | "--eds-color-fg-positive-contrast" | "--eds-color-fg-warning" | "--eds-color-fg-warning-contrast" | "--eds-color-stroke-brand-primary" | "--eds-color-stroke-brand-weak" | "--eds-color-stroke-critical-primary" | "--eds-color-stroke-critical-weak" | "--eds-color-stroke-focusRing" | "--eds-color-stroke-informative-primary" | "--eds-color-stroke-informative-weak" | "--eds-color-stroke-neutral-contrast" | "--eds-color-stroke-neutral-primary" | "--eds-color-stroke-neutral-secondary" | "--eds-color-stroke-neutral-tertiary" | "--eds-color-stroke-neutral-weak" | "--eds-color-stroke-positive-primary" | "--eds-color-stroke-positive-weak" | "--eds-color-stroke-warning-primary" | "--eds-color-stroke-warning-weak" | "--eds-typography-body1-fontFamily" | "--eds-typography-body1-fontSize" | "--eds-typography-body1-fontWeight" | "--eds-typography-body1-letterSpacing" | "--eds-typography-body1-lineHeight" | "--eds-typography-body2-fontFamily" | "--eds-typography-body2-fontSize" | "--eds-typography-body2-fontWeight" | "--eds-typography-body2-letterSpacing" | "--eds-typography-body2-lineHeight" | "--eds-typography-body3-fontFamily" | "--eds-typography-body3-fontSize" | "--eds-typography-body3-fontWeight" | "--eds-typography-body3-letterSpacing" | "--eds-typography-body3-lineHeight" | "--eds-typography-body4-fontFamily" | "--eds-typography-body4-fontSize" | "--eds-typography-body4-fontWeight" | "--eds-typography-body4-letterSpacing" | "--eds-typography-body4-lineHeight" | "--eds-typography-caption1-fontFamily" | "--eds-typography-caption1-fontSize" | "--eds-typography-caption1-fontWeight" | "--eds-typography-caption1-letterSpacing" | "--eds-typography-caption1-lineHeight" | "--eds-typography-caption2-fontFamily" | "--eds-typography-caption2-fontSize" | "--eds-typography-caption2-fontWeight" | "--eds-typography-caption2-letterSpacing" | "--eds-typography-caption2-lineHeight" | "--eds-typography-caption3-fontFamily" | "--eds-typography-caption3-fontSize" | "--eds-typography-caption3-fontWeight" | "--eds-typography-caption3-letterSpacing" | "--eds-typography-caption3-lineHeight" | "--eds-typography-display1-fontFamily" | "--eds-typography-display1-fontSize" | "--eds-typography-display1-fontWeight" | "--eds-typography-display1-letterSpacing" | "--eds-typography-display1-lineHeight" | "--eds-typography-display2-fontFamily" | "--eds-typography-display2-fontSize" | "--eds-typography-display2-fontWeight" | "--eds-typography-display2-letterSpacing" | "--eds-typography-display2-lineHeight" | "--eds-typography-heading1-fontFamily" | "--eds-typography-heading1-fontSize" | "--eds-typography-heading1-fontWeight" | "--eds-typography-heading1-letterSpacing" | "--eds-typography-heading1-lineHeight" | "--eds-typography-heading2-fontFamily" | "--eds-typography-heading2-fontSize" | "--eds-typography-heading2-fontWeight" | "--eds-typography-heading2-letterSpacing" | "--eds-typography-heading2-lineHeight" | "--eds-typography-heading3-fontFamily" | "--eds-typography-heading3-fontSize" | "--eds-typography-heading3-fontWeight" | "--eds-typography-heading3-letterSpacing" | "--eds-typography-heading3-lineHeight" | "--eds-typography-heading4-fontFamily" | "--eds-typography-heading4-fontSize" | "--eds-typography-heading4-fontWeight" | "--eds-typography-heading4-letterSpacing" | "--eds-typography-heading4-lineHeight" | "--eds-typography-title1-fontFamily" | "--eds-typography-title1-fontSize" | "--eds-typography-title1-fontWeight" | "--eds-typography-title1-letterSpacing" | "--eds-typography-title1-lineHeight" | "--eds-typography-title2-fontFamily" | "--eds-typography-title2-fontSize" | "--eds-typography-title2-fontWeight" | "--eds-typography-title2-letterSpacing" | "--eds-typography-title2-lineHeight" | "--eds-typography-title3-fontFamily" | "--eds-typography-title3-fontSize" | "--eds-typography-title3-fontWeight" | "--eds-typography-title3-letterSpacing" | "--eds-typography-title3-lineHeight" | "--eds-typography-title4-fontFamily" | "--eds-typography-title4-fontSize" | "--eds-typography-title4-fontWeight" | "--eds-typography-title4-letterSpacing" | "--eds-typography-title4-lineHeight";
4
- type SemanticTokenCssReference = "var(--eds-color-bg-brand-primary)" | "var(--eds-color-bg-brand-primary-hover)" | "var(--eds-color-bg-brand-weak)" | "var(--eds-color-bg-brand-weak-hover)" | "var(--eds-color-bg-critical-primary)" | "var(--eds-color-bg-critical-primary-hover)" | "var(--eds-color-bg-critical-weak)" | "var(--eds-color-bg-critical-weak-hover)" | "var(--eds-color-bg-disabled)" | "var(--eds-color-bg-informative-primary)" | "var(--eds-color-bg-informative-primary-hover)" | "var(--eds-color-bg-informative-weak)" | "var(--eds-color-bg-informative-weak-hover)" | "var(--eds-color-bg-layer-basement)" | "var(--eds-color-bg-layer-basement-hover)" | "var(--eds-color-bg-layer-default)" | "var(--eds-color-bg-layer-default-hover)" | "var(--eds-color-bg-layer-floating)" | "var(--eds-color-bg-layer-floating-hover)" | "var(--eds-color-bg-neutral-inverted)" | "var(--eds-color-bg-neutral-inverted-hover)" | "var(--eds-color-bg-neutral-primary)" | "var(--eds-color-bg-neutral-primary-hover)" | "var(--eds-color-bg-neutral-weak)" | "var(--eds-color-bg-neutral-weak-hover)" | "var(--eds-color-bg-positive-primary)" | "var(--eds-color-bg-positive-primary-hover)" | "var(--eds-color-bg-positive-weak)" | "var(--eds-color-bg-positive-weak-hover)" | "var(--eds-color-bg-transparent)" | "var(--eds-color-bg-transparent-hover)" | "var(--eds-color-bg-warning-primary)" | "var(--eds-color-bg-warning-primary-hover)" | "var(--eds-color-bg-warning-weak)" | "var(--eds-color-bg-warning-weak-hover)" | "var(--eds-color-fg-brand)" | "var(--eds-color-fg-brand-contrast)" | "var(--eds-color-fg-critical)" | "var(--eds-color-fg-critical-contrast)" | "var(--eds-color-fg-disabled)" | "var(--eds-color-fg-focus)" | "var(--eds-color-fg-informative)" | "var(--eds-color-fg-informative-contrast)" | "var(--eds-color-fg-neutral)" | "var(--eds-color-fg-neutral-inverted)" | "var(--eds-color-fg-neutral-secondary)" | "var(--eds-color-fg-neutral-tertiary)" | "var(--eds-color-fg-placeholder)" | "var(--eds-color-fg-positive)" | "var(--eds-color-fg-positive-contrast)" | "var(--eds-color-fg-warning)" | "var(--eds-color-fg-warning-contrast)" | "var(--eds-color-stroke-brand-primary)" | "var(--eds-color-stroke-brand-weak)" | "var(--eds-color-stroke-critical-primary)" | "var(--eds-color-stroke-critical-weak)" | "var(--eds-color-stroke-focusRing)" | "var(--eds-color-stroke-informative-primary)" | "var(--eds-color-stroke-informative-weak)" | "var(--eds-color-stroke-neutral-contrast)" | "var(--eds-color-stroke-neutral-primary)" | "var(--eds-color-stroke-neutral-secondary)" | "var(--eds-color-stroke-neutral-tertiary)" | "var(--eds-color-stroke-neutral-weak)" | "var(--eds-color-stroke-positive-primary)" | "var(--eds-color-stroke-positive-weak)" | "var(--eds-color-stroke-warning-primary)" | "var(--eds-color-stroke-warning-weak)" | "var(--eds-typography-body1-fontFamily)" | "var(--eds-typography-body1-fontSize)" | "var(--eds-typography-body1-fontWeight)" | "var(--eds-typography-body1-letterSpacing)" | "var(--eds-typography-body1-lineHeight)" | "var(--eds-typography-body2-fontFamily)" | "var(--eds-typography-body2-fontSize)" | "var(--eds-typography-body2-fontWeight)" | "var(--eds-typography-body2-letterSpacing)" | "var(--eds-typography-body2-lineHeight)" | "var(--eds-typography-body3-fontFamily)" | "var(--eds-typography-body3-fontSize)" | "var(--eds-typography-body3-fontWeight)" | "var(--eds-typography-body3-letterSpacing)" | "var(--eds-typography-body3-lineHeight)" | "var(--eds-typography-body4-fontFamily)" | "var(--eds-typography-body4-fontSize)" | "var(--eds-typography-body4-fontWeight)" | "var(--eds-typography-body4-letterSpacing)" | "var(--eds-typography-body4-lineHeight)" | "var(--eds-typography-caption1-fontFamily)" | "var(--eds-typography-caption1-fontSize)" | "var(--eds-typography-caption1-fontWeight)" | "var(--eds-typography-caption1-letterSpacing)" | "var(--eds-typography-caption1-lineHeight)" | "var(--eds-typography-caption2-fontFamily)" | "var(--eds-typography-caption2-fontSize)" | "var(--eds-typography-caption2-fontWeight)" | "var(--eds-typography-caption2-letterSpacing)" | "var(--eds-typography-caption2-lineHeight)" | "var(--eds-typography-caption3-fontFamily)" | "var(--eds-typography-caption3-fontSize)" | "var(--eds-typography-caption3-fontWeight)" | "var(--eds-typography-caption3-letterSpacing)" | "var(--eds-typography-caption3-lineHeight)" | "var(--eds-typography-display1-fontFamily)" | "var(--eds-typography-display1-fontSize)" | "var(--eds-typography-display1-fontWeight)" | "var(--eds-typography-display1-letterSpacing)" | "var(--eds-typography-display1-lineHeight)" | "var(--eds-typography-display2-fontFamily)" | "var(--eds-typography-display2-fontSize)" | "var(--eds-typography-display2-fontWeight)" | "var(--eds-typography-display2-letterSpacing)" | "var(--eds-typography-display2-lineHeight)" | "var(--eds-typography-heading1-fontFamily)" | "var(--eds-typography-heading1-fontSize)" | "var(--eds-typography-heading1-fontWeight)" | "var(--eds-typography-heading1-letterSpacing)" | "var(--eds-typography-heading1-lineHeight)" | "var(--eds-typography-heading2-fontFamily)" | "var(--eds-typography-heading2-fontSize)" | "var(--eds-typography-heading2-fontWeight)" | "var(--eds-typography-heading2-letterSpacing)" | "var(--eds-typography-heading2-lineHeight)" | "var(--eds-typography-heading3-fontFamily)" | "var(--eds-typography-heading3-fontSize)" | "var(--eds-typography-heading3-fontWeight)" | "var(--eds-typography-heading3-letterSpacing)" | "var(--eds-typography-heading3-lineHeight)" | "var(--eds-typography-heading4-fontFamily)" | "var(--eds-typography-heading4-fontSize)" | "var(--eds-typography-heading4-fontWeight)" | "var(--eds-typography-heading4-letterSpacing)" | "var(--eds-typography-heading4-lineHeight)" | "var(--eds-typography-title1-fontFamily)" | "var(--eds-typography-title1-fontSize)" | "var(--eds-typography-title1-fontWeight)" | "var(--eds-typography-title1-letterSpacing)" | "var(--eds-typography-title1-lineHeight)" | "var(--eds-typography-title2-fontFamily)" | "var(--eds-typography-title2-fontSize)" | "var(--eds-typography-title2-fontWeight)" | "var(--eds-typography-title2-letterSpacing)" | "var(--eds-typography-title2-lineHeight)" | "var(--eds-typography-title3-fontFamily)" | "var(--eds-typography-title3-fontSize)" | "var(--eds-typography-title3-fontWeight)" | "var(--eds-typography-title3-letterSpacing)" | "var(--eds-typography-title3-lineHeight)" | "var(--eds-typography-title4-fontFamily)" | "var(--eds-typography-title4-fontSize)" | "var(--eds-typography-title4-fontWeight)" | "var(--eds-typography-title4-letterSpacing)" | "var(--eds-typography-title4-lineHeight)";
3
+ type SemanticTokenCssVariable = `--eds-${SemanticTokenName}`;
4
+ type SemanticTokenCssReference = `var(${SemanticTokenCssVariable})`;
5
5
  interface SemanticToken {
6
6
  readonly name: SemanticTokenName;
7
7
  readonly type: SemanticTokenType;
8
+ /** 빌드 시 해석된 참고용 값입니다. 스타일에는 cssVariable 또는 cssVar()를 씁니다. */
8
9
  readonly value: unknown;
9
10
  readonly cssVariable: string;
10
11
  }
11
12
  type SemanticTokenMap = Readonly<Record<SemanticTokenName, SemanticToken>>;
13
+ /** 공개 token manifest입니다. 이름 목록은 tokenNames, CSS 참조는 cssVar()입니다. */
12
14
  declare const tokens: SemanticTokenMap;
13
15
  declare const tokenNames: readonly SemanticTokenName[];
16
+ /** 공개 token 이름을 var(--eds-…) 참조로 바꿉니다. 이름은 SemanticTokenName 리터럴로 전달하며, tokenNames에 없는 문자열은 런타임 오류입니다. */
14
17
  declare function cssVar(name: SemanticTokenName): SemanticTokenCssReference;
15
18
 
16
19
  export { type SemanticToken, type SemanticTokenCssReference, type SemanticTokenCssVariable, type SemanticTokenMap, type SemanticTokenName, type SemanticTokenType, cssVar, tokenNames, tokens };
package/dist/tokens.d.ts CHANGED
@@ -1,16 +1,19 @@
1
1
  type SemanticTokenName = "color-bg-brand-primary" | "color-bg-brand-primary-hover" | "color-bg-brand-weak" | "color-bg-brand-weak-hover" | "color-bg-critical-primary" | "color-bg-critical-primary-hover" | "color-bg-critical-weak" | "color-bg-critical-weak-hover" | "color-bg-disabled" | "color-bg-informative-primary" | "color-bg-informative-primary-hover" | "color-bg-informative-weak" | "color-bg-informative-weak-hover" | "color-bg-layer-basement" | "color-bg-layer-basement-hover" | "color-bg-layer-default" | "color-bg-layer-default-hover" | "color-bg-layer-floating" | "color-bg-layer-floating-hover" | "color-bg-neutral-inverted" | "color-bg-neutral-inverted-hover" | "color-bg-neutral-primary" | "color-bg-neutral-primary-hover" | "color-bg-neutral-weak" | "color-bg-neutral-weak-hover" | "color-bg-positive-primary" | "color-bg-positive-primary-hover" | "color-bg-positive-weak" | "color-bg-positive-weak-hover" | "color-bg-transparent" | "color-bg-transparent-hover" | "color-bg-warning-primary" | "color-bg-warning-primary-hover" | "color-bg-warning-weak" | "color-bg-warning-weak-hover" | "color-fg-brand" | "color-fg-brand-contrast" | "color-fg-critical" | "color-fg-critical-contrast" | "color-fg-disabled" | "color-fg-focus" | "color-fg-informative" | "color-fg-informative-contrast" | "color-fg-neutral" | "color-fg-neutral-inverted" | "color-fg-neutral-secondary" | "color-fg-neutral-tertiary" | "color-fg-placeholder" | "color-fg-positive" | "color-fg-positive-contrast" | "color-fg-warning" | "color-fg-warning-contrast" | "color-stroke-brand-primary" | "color-stroke-brand-weak" | "color-stroke-critical-primary" | "color-stroke-critical-weak" | "color-stroke-focusRing" | "color-stroke-informative-primary" | "color-stroke-informative-weak" | "color-stroke-neutral-contrast" | "color-stroke-neutral-primary" | "color-stroke-neutral-secondary" | "color-stroke-neutral-tertiary" | "color-stroke-neutral-weak" | "color-stroke-positive-primary" | "color-stroke-positive-weak" | "color-stroke-warning-primary" | "color-stroke-warning-weak" | "typography-body1-fontFamily" | "typography-body1-fontSize" | "typography-body1-fontWeight" | "typography-body1-letterSpacing" | "typography-body1-lineHeight" | "typography-body2-fontFamily" | "typography-body2-fontSize" | "typography-body2-fontWeight" | "typography-body2-letterSpacing" | "typography-body2-lineHeight" | "typography-body3-fontFamily" | "typography-body3-fontSize" | "typography-body3-fontWeight" | "typography-body3-letterSpacing" | "typography-body3-lineHeight" | "typography-body4-fontFamily" | "typography-body4-fontSize" | "typography-body4-fontWeight" | "typography-body4-letterSpacing" | "typography-body4-lineHeight" | "typography-caption1-fontFamily" | "typography-caption1-fontSize" | "typography-caption1-fontWeight" | "typography-caption1-letterSpacing" | "typography-caption1-lineHeight" | "typography-caption2-fontFamily" | "typography-caption2-fontSize" | "typography-caption2-fontWeight" | "typography-caption2-letterSpacing" | "typography-caption2-lineHeight" | "typography-caption3-fontFamily" | "typography-caption3-fontSize" | "typography-caption3-fontWeight" | "typography-caption3-letterSpacing" | "typography-caption3-lineHeight" | "typography-display1-fontFamily" | "typography-display1-fontSize" | "typography-display1-fontWeight" | "typography-display1-letterSpacing" | "typography-display1-lineHeight" | "typography-display2-fontFamily" | "typography-display2-fontSize" | "typography-display2-fontWeight" | "typography-display2-letterSpacing" | "typography-display2-lineHeight" | "typography-heading1-fontFamily" | "typography-heading1-fontSize" | "typography-heading1-fontWeight" | "typography-heading1-letterSpacing" | "typography-heading1-lineHeight" | "typography-heading2-fontFamily" | "typography-heading2-fontSize" | "typography-heading2-fontWeight" | "typography-heading2-letterSpacing" | "typography-heading2-lineHeight" | "typography-heading3-fontFamily" | "typography-heading3-fontSize" | "typography-heading3-fontWeight" | "typography-heading3-letterSpacing" | "typography-heading3-lineHeight" | "typography-heading4-fontFamily" | "typography-heading4-fontSize" | "typography-heading4-fontWeight" | "typography-heading4-letterSpacing" | "typography-heading4-lineHeight" | "typography-title1-fontFamily" | "typography-title1-fontSize" | "typography-title1-fontWeight" | "typography-title1-letterSpacing" | "typography-title1-lineHeight" | "typography-title2-fontFamily" | "typography-title2-fontSize" | "typography-title2-fontWeight" | "typography-title2-letterSpacing" | "typography-title2-lineHeight" | "typography-title3-fontFamily" | "typography-title3-fontSize" | "typography-title3-fontWeight" | "typography-title3-letterSpacing" | "typography-title3-lineHeight" | "typography-title4-fontFamily" | "typography-title4-fontSize" | "typography-title4-fontWeight" | "typography-title4-letterSpacing" | "typography-title4-lineHeight";
2
2
  type SemanticTokenType = "color" | "dimension" | "fontFamily" | "fontWeight";
3
- type SemanticTokenCssVariable = "--eds-color-bg-brand-primary" | "--eds-color-bg-brand-primary-hover" | "--eds-color-bg-brand-weak" | "--eds-color-bg-brand-weak-hover" | "--eds-color-bg-critical-primary" | "--eds-color-bg-critical-primary-hover" | "--eds-color-bg-critical-weak" | "--eds-color-bg-critical-weak-hover" | "--eds-color-bg-disabled" | "--eds-color-bg-informative-primary" | "--eds-color-bg-informative-primary-hover" | "--eds-color-bg-informative-weak" | "--eds-color-bg-informative-weak-hover" | "--eds-color-bg-layer-basement" | "--eds-color-bg-layer-basement-hover" | "--eds-color-bg-layer-default" | "--eds-color-bg-layer-default-hover" | "--eds-color-bg-layer-floating" | "--eds-color-bg-layer-floating-hover" | "--eds-color-bg-neutral-inverted" | "--eds-color-bg-neutral-inverted-hover" | "--eds-color-bg-neutral-primary" | "--eds-color-bg-neutral-primary-hover" | "--eds-color-bg-neutral-weak" | "--eds-color-bg-neutral-weak-hover" | "--eds-color-bg-positive-primary" | "--eds-color-bg-positive-primary-hover" | "--eds-color-bg-positive-weak" | "--eds-color-bg-positive-weak-hover" | "--eds-color-bg-transparent" | "--eds-color-bg-transparent-hover" | "--eds-color-bg-warning-primary" | "--eds-color-bg-warning-primary-hover" | "--eds-color-bg-warning-weak" | "--eds-color-bg-warning-weak-hover" | "--eds-color-fg-brand" | "--eds-color-fg-brand-contrast" | "--eds-color-fg-critical" | "--eds-color-fg-critical-contrast" | "--eds-color-fg-disabled" | "--eds-color-fg-focus" | "--eds-color-fg-informative" | "--eds-color-fg-informative-contrast" | "--eds-color-fg-neutral" | "--eds-color-fg-neutral-inverted" | "--eds-color-fg-neutral-secondary" | "--eds-color-fg-neutral-tertiary" | "--eds-color-fg-placeholder" | "--eds-color-fg-positive" | "--eds-color-fg-positive-contrast" | "--eds-color-fg-warning" | "--eds-color-fg-warning-contrast" | "--eds-color-stroke-brand-primary" | "--eds-color-stroke-brand-weak" | "--eds-color-stroke-critical-primary" | "--eds-color-stroke-critical-weak" | "--eds-color-stroke-focusRing" | "--eds-color-stroke-informative-primary" | "--eds-color-stroke-informative-weak" | "--eds-color-stroke-neutral-contrast" | "--eds-color-stroke-neutral-primary" | "--eds-color-stroke-neutral-secondary" | "--eds-color-stroke-neutral-tertiary" | "--eds-color-stroke-neutral-weak" | "--eds-color-stroke-positive-primary" | "--eds-color-stroke-positive-weak" | "--eds-color-stroke-warning-primary" | "--eds-color-stroke-warning-weak" | "--eds-typography-body1-fontFamily" | "--eds-typography-body1-fontSize" | "--eds-typography-body1-fontWeight" | "--eds-typography-body1-letterSpacing" | "--eds-typography-body1-lineHeight" | "--eds-typography-body2-fontFamily" | "--eds-typography-body2-fontSize" | "--eds-typography-body2-fontWeight" | "--eds-typography-body2-letterSpacing" | "--eds-typography-body2-lineHeight" | "--eds-typography-body3-fontFamily" | "--eds-typography-body3-fontSize" | "--eds-typography-body3-fontWeight" | "--eds-typography-body3-letterSpacing" | "--eds-typography-body3-lineHeight" | "--eds-typography-body4-fontFamily" | "--eds-typography-body4-fontSize" | "--eds-typography-body4-fontWeight" | "--eds-typography-body4-letterSpacing" | "--eds-typography-body4-lineHeight" | "--eds-typography-caption1-fontFamily" | "--eds-typography-caption1-fontSize" | "--eds-typography-caption1-fontWeight" | "--eds-typography-caption1-letterSpacing" | "--eds-typography-caption1-lineHeight" | "--eds-typography-caption2-fontFamily" | "--eds-typography-caption2-fontSize" | "--eds-typography-caption2-fontWeight" | "--eds-typography-caption2-letterSpacing" | "--eds-typography-caption2-lineHeight" | "--eds-typography-caption3-fontFamily" | "--eds-typography-caption3-fontSize" | "--eds-typography-caption3-fontWeight" | "--eds-typography-caption3-letterSpacing" | "--eds-typography-caption3-lineHeight" | "--eds-typography-display1-fontFamily" | "--eds-typography-display1-fontSize" | "--eds-typography-display1-fontWeight" | "--eds-typography-display1-letterSpacing" | "--eds-typography-display1-lineHeight" | "--eds-typography-display2-fontFamily" | "--eds-typography-display2-fontSize" | "--eds-typography-display2-fontWeight" | "--eds-typography-display2-letterSpacing" | "--eds-typography-display2-lineHeight" | "--eds-typography-heading1-fontFamily" | "--eds-typography-heading1-fontSize" | "--eds-typography-heading1-fontWeight" | "--eds-typography-heading1-letterSpacing" | "--eds-typography-heading1-lineHeight" | "--eds-typography-heading2-fontFamily" | "--eds-typography-heading2-fontSize" | "--eds-typography-heading2-fontWeight" | "--eds-typography-heading2-letterSpacing" | "--eds-typography-heading2-lineHeight" | "--eds-typography-heading3-fontFamily" | "--eds-typography-heading3-fontSize" | "--eds-typography-heading3-fontWeight" | "--eds-typography-heading3-letterSpacing" | "--eds-typography-heading3-lineHeight" | "--eds-typography-heading4-fontFamily" | "--eds-typography-heading4-fontSize" | "--eds-typography-heading4-fontWeight" | "--eds-typography-heading4-letterSpacing" | "--eds-typography-heading4-lineHeight" | "--eds-typography-title1-fontFamily" | "--eds-typography-title1-fontSize" | "--eds-typography-title1-fontWeight" | "--eds-typography-title1-letterSpacing" | "--eds-typography-title1-lineHeight" | "--eds-typography-title2-fontFamily" | "--eds-typography-title2-fontSize" | "--eds-typography-title2-fontWeight" | "--eds-typography-title2-letterSpacing" | "--eds-typography-title2-lineHeight" | "--eds-typography-title3-fontFamily" | "--eds-typography-title3-fontSize" | "--eds-typography-title3-fontWeight" | "--eds-typography-title3-letterSpacing" | "--eds-typography-title3-lineHeight" | "--eds-typography-title4-fontFamily" | "--eds-typography-title4-fontSize" | "--eds-typography-title4-fontWeight" | "--eds-typography-title4-letterSpacing" | "--eds-typography-title4-lineHeight";
4
- type SemanticTokenCssReference = "var(--eds-color-bg-brand-primary)" | "var(--eds-color-bg-brand-primary-hover)" | "var(--eds-color-bg-brand-weak)" | "var(--eds-color-bg-brand-weak-hover)" | "var(--eds-color-bg-critical-primary)" | "var(--eds-color-bg-critical-primary-hover)" | "var(--eds-color-bg-critical-weak)" | "var(--eds-color-bg-critical-weak-hover)" | "var(--eds-color-bg-disabled)" | "var(--eds-color-bg-informative-primary)" | "var(--eds-color-bg-informative-primary-hover)" | "var(--eds-color-bg-informative-weak)" | "var(--eds-color-bg-informative-weak-hover)" | "var(--eds-color-bg-layer-basement)" | "var(--eds-color-bg-layer-basement-hover)" | "var(--eds-color-bg-layer-default)" | "var(--eds-color-bg-layer-default-hover)" | "var(--eds-color-bg-layer-floating)" | "var(--eds-color-bg-layer-floating-hover)" | "var(--eds-color-bg-neutral-inverted)" | "var(--eds-color-bg-neutral-inverted-hover)" | "var(--eds-color-bg-neutral-primary)" | "var(--eds-color-bg-neutral-primary-hover)" | "var(--eds-color-bg-neutral-weak)" | "var(--eds-color-bg-neutral-weak-hover)" | "var(--eds-color-bg-positive-primary)" | "var(--eds-color-bg-positive-primary-hover)" | "var(--eds-color-bg-positive-weak)" | "var(--eds-color-bg-positive-weak-hover)" | "var(--eds-color-bg-transparent)" | "var(--eds-color-bg-transparent-hover)" | "var(--eds-color-bg-warning-primary)" | "var(--eds-color-bg-warning-primary-hover)" | "var(--eds-color-bg-warning-weak)" | "var(--eds-color-bg-warning-weak-hover)" | "var(--eds-color-fg-brand)" | "var(--eds-color-fg-brand-contrast)" | "var(--eds-color-fg-critical)" | "var(--eds-color-fg-critical-contrast)" | "var(--eds-color-fg-disabled)" | "var(--eds-color-fg-focus)" | "var(--eds-color-fg-informative)" | "var(--eds-color-fg-informative-contrast)" | "var(--eds-color-fg-neutral)" | "var(--eds-color-fg-neutral-inverted)" | "var(--eds-color-fg-neutral-secondary)" | "var(--eds-color-fg-neutral-tertiary)" | "var(--eds-color-fg-placeholder)" | "var(--eds-color-fg-positive)" | "var(--eds-color-fg-positive-contrast)" | "var(--eds-color-fg-warning)" | "var(--eds-color-fg-warning-contrast)" | "var(--eds-color-stroke-brand-primary)" | "var(--eds-color-stroke-brand-weak)" | "var(--eds-color-stroke-critical-primary)" | "var(--eds-color-stroke-critical-weak)" | "var(--eds-color-stroke-focusRing)" | "var(--eds-color-stroke-informative-primary)" | "var(--eds-color-stroke-informative-weak)" | "var(--eds-color-stroke-neutral-contrast)" | "var(--eds-color-stroke-neutral-primary)" | "var(--eds-color-stroke-neutral-secondary)" | "var(--eds-color-stroke-neutral-tertiary)" | "var(--eds-color-stroke-neutral-weak)" | "var(--eds-color-stroke-positive-primary)" | "var(--eds-color-stroke-positive-weak)" | "var(--eds-color-stroke-warning-primary)" | "var(--eds-color-stroke-warning-weak)" | "var(--eds-typography-body1-fontFamily)" | "var(--eds-typography-body1-fontSize)" | "var(--eds-typography-body1-fontWeight)" | "var(--eds-typography-body1-letterSpacing)" | "var(--eds-typography-body1-lineHeight)" | "var(--eds-typography-body2-fontFamily)" | "var(--eds-typography-body2-fontSize)" | "var(--eds-typography-body2-fontWeight)" | "var(--eds-typography-body2-letterSpacing)" | "var(--eds-typography-body2-lineHeight)" | "var(--eds-typography-body3-fontFamily)" | "var(--eds-typography-body3-fontSize)" | "var(--eds-typography-body3-fontWeight)" | "var(--eds-typography-body3-letterSpacing)" | "var(--eds-typography-body3-lineHeight)" | "var(--eds-typography-body4-fontFamily)" | "var(--eds-typography-body4-fontSize)" | "var(--eds-typography-body4-fontWeight)" | "var(--eds-typography-body4-letterSpacing)" | "var(--eds-typography-body4-lineHeight)" | "var(--eds-typography-caption1-fontFamily)" | "var(--eds-typography-caption1-fontSize)" | "var(--eds-typography-caption1-fontWeight)" | "var(--eds-typography-caption1-letterSpacing)" | "var(--eds-typography-caption1-lineHeight)" | "var(--eds-typography-caption2-fontFamily)" | "var(--eds-typography-caption2-fontSize)" | "var(--eds-typography-caption2-fontWeight)" | "var(--eds-typography-caption2-letterSpacing)" | "var(--eds-typography-caption2-lineHeight)" | "var(--eds-typography-caption3-fontFamily)" | "var(--eds-typography-caption3-fontSize)" | "var(--eds-typography-caption3-fontWeight)" | "var(--eds-typography-caption3-letterSpacing)" | "var(--eds-typography-caption3-lineHeight)" | "var(--eds-typography-display1-fontFamily)" | "var(--eds-typography-display1-fontSize)" | "var(--eds-typography-display1-fontWeight)" | "var(--eds-typography-display1-letterSpacing)" | "var(--eds-typography-display1-lineHeight)" | "var(--eds-typography-display2-fontFamily)" | "var(--eds-typography-display2-fontSize)" | "var(--eds-typography-display2-fontWeight)" | "var(--eds-typography-display2-letterSpacing)" | "var(--eds-typography-display2-lineHeight)" | "var(--eds-typography-heading1-fontFamily)" | "var(--eds-typography-heading1-fontSize)" | "var(--eds-typography-heading1-fontWeight)" | "var(--eds-typography-heading1-letterSpacing)" | "var(--eds-typography-heading1-lineHeight)" | "var(--eds-typography-heading2-fontFamily)" | "var(--eds-typography-heading2-fontSize)" | "var(--eds-typography-heading2-fontWeight)" | "var(--eds-typography-heading2-letterSpacing)" | "var(--eds-typography-heading2-lineHeight)" | "var(--eds-typography-heading3-fontFamily)" | "var(--eds-typography-heading3-fontSize)" | "var(--eds-typography-heading3-fontWeight)" | "var(--eds-typography-heading3-letterSpacing)" | "var(--eds-typography-heading3-lineHeight)" | "var(--eds-typography-heading4-fontFamily)" | "var(--eds-typography-heading4-fontSize)" | "var(--eds-typography-heading4-fontWeight)" | "var(--eds-typography-heading4-letterSpacing)" | "var(--eds-typography-heading4-lineHeight)" | "var(--eds-typography-title1-fontFamily)" | "var(--eds-typography-title1-fontSize)" | "var(--eds-typography-title1-fontWeight)" | "var(--eds-typography-title1-letterSpacing)" | "var(--eds-typography-title1-lineHeight)" | "var(--eds-typography-title2-fontFamily)" | "var(--eds-typography-title2-fontSize)" | "var(--eds-typography-title2-fontWeight)" | "var(--eds-typography-title2-letterSpacing)" | "var(--eds-typography-title2-lineHeight)" | "var(--eds-typography-title3-fontFamily)" | "var(--eds-typography-title3-fontSize)" | "var(--eds-typography-title3-fontWeight)" | "var(--eds-typography-title3-letterSpacing)" | "var(--eds-typography-title3-lineHeight)" | "var(--eds-typography-title4-fontFamily)" | "var(--eds-typography-title4-fontSize)" | "var(--eds-typography-title4-fontWeight)" | "var(--eds-typography-title4-letterSpacing)" | "var(--eds-typography-title4-lineHeight)";
3
+ type SemanticTokenCssVariable = `--eds-${SemanticTokenName}`;
4
+ type SemanticTokenCssReference = `var(${SemanticTokenCssVariable})`;
5
5
  interface SemanticToken {
6
6
  readonly name: SemanticTokenName;
7
7
  readonly type: SemanticTokenType;
8
+ /** 빌드 시 해석된 참고용 값입니다. 스타일에는 cssVariable 또는 cssVar()를 씁니다. */
8
9
  readonly value: unknown;
9
10
  readonly cssVariable: string;
10
11
  }
11
12
  type SemanticTokenMap = Readonly<Record<SemanticTokenName, SemanticToken>>;
13
+ /** 공개 token manifest입니다. 이름 목록은 tokenNames, CSS 참조는 cssVar()입니다. */
12
14
  declare const tokens: SemanticTokenMap;
13
15
  declare const tokenNames: readonly SemanticTokenName[];
16
+ /** 공개 token 이름을 var(--eds-…) 참조로 바꿉니다. 이름은 SemanticTokenName 리터럴로 전달하며, tokenNames에 없는 문자열은 런타임 오류입니다. */
14
17
  declare function cssVar(name: SemanticTokenName): SemanticTokenCssReference;
15
18
 
16
19
  export { type SemanticToken, type SemanticTokenCssReference, type SemanticTokenCssVariable, type SemanticTokenMap, type SemanticTokenName, type SemanticTokenType, cssVar, tokenNames, tokens };
package/dist/tokens.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  // src/generated/tokens.ts
4
- var tokenMap = {
4
+ var tokenMap = /* @__PURE__ */ Object.freeze({
5
5
  "color-bg-brand-primary": {
6
6
  "name": "color-bg-brand-primary",
7
7
  "type": "color",
@@ -1141,9 +1141,9 @@ var tokenMap = {
1141
1141
  },
1142
1142
  "cssVariable": "--eds-typography-title4-lineHeight"
1143
1143
  }
1144
- };
1145
- var tokens = Object.freeze(tokenMap);
1146
- var tokenNames = Object.freeze([
1144
+ });
1145
+ var tokens = tokenMap;
1146
+ var tokenNames = /* @__PURE__ */ Object.freeze([
1147
1147
  "color-bg-brand-primary",
1148
1148
  "color-bg-brand-primary-hover",
1149
1149
  "color-bg-brand-weak",
@@ -1299,11 +1299,10 @@ var tokenNames = Object.freeze([
1299
1299
  "typography-title4-lineHeight"
1300
1300
  ]);
1301
1301
  function cssVar(name) {
1302
- const token = tokens[name];
1303
- if (!token) {
1302
+ if (!tokenNames.includes(name)) {
1304
1303
  throw new Error("Unknown semantic token: " + name);
1305
1304
  }
1306
- return "var(" + token.cssVariable + ")";
1305
+ return "var(--eds-" + name + ")";
1307
1306
  }
1308
1307
 
1309
1308
  exports.cssVar = cssVar;
package/dist/tokens.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/generated/tokens.ts
2
- var tokenMap = {
2
+ var tokenMap = /* @__PURE__ */ Object.freeze({
3
3
  "color-bg-brand-primary": {
4
4
  "name": "color-bg-brand-primary",
5
5
  "type": "color",
@@ -1139,9 +1139,9 @@ var tokenMap = {
1139
1139
  },
1140
1140
  "cssVariable": "--eds-typography-title4-lineHeight"
1141
1141
  }
1142
- };
1143
- var tokens = Object.freeze(tokenMap);
1144
- var tokenNames = Object.freeze([
1142
+ });
1143
+ var tokens = tokenMap;
1144
+ var tokenNames = /* @__PURE__ */ Object.freeze([
1145
1145
  "color-bg-brand-primary",
1146
1146
  "color-bg-brand-primary-hover",
1147
1147
  "color-bg-brand-weak",
@@ -1297,11 +1297,10 @@ var tokenNames = Object.freeze([
1297
1297
  "typography-title4-lineHeight"
1298
1298
  ]);
1299
1299
  function cssVar(name) {
1300
- const token = tokens[name];
1301
- if (!token) {
1300
+ if (!tokenNames.includes(name)) {
1302
1301
  throw new Error("Unknown semantic token: " + name);
1303
1302
  }
1304
- return "var(" + token.cssVariable + ")";
1303
+ return "var(--eds-" + name + ")";
1305
1304
  }
1306
1305
 
1307
1306
  export { cssVar, tokenNames, tokens };
package/llms.txt CHANGED
@@ -1,12 +1,25 @@
1
- # EVA Design System AI 문서 인덱스
1
+ # EVA Design System (@spectrabrain/eds)
2
2
 
3
- 이 패키지는 React 웹용 EVA 디자인 시스템입니다. 다음 순서로 문서를 읽습니다.
3
+ > React 웹용 EVA 디자인 시스템 패키지입니다. 소비처 AI는 package root(`require.resolve("@spectrabrain/eds/package.json")`의 디렉터리)의 `QUICKSTART.md` 하나를 먼저 읽고, 나머지는 아래 조건에 해당할 때만 읽습니다. 같은 목록의 기계용 원천은 `AI_CONTEXT.json`의 `readOrder`입니다.
4
4
 
5
- 1. [AI 사용 규칙](./AI.md)을 읽고 공개 범위와 금지 사례를 확인합니다.
6
- 2. Tailwind CSS v4에서 token만 연결하려면 [Tailwind CSS v4 token 설정](./TAILWIND_V4.md)을 읽습니다.
7
- 3. [semantic token manifest](./dist/tokens.json)에서 사용 가능한 token 이름을 확인합니다.
8
- 4. [npm 소비자 안내](./README.md)에서 설치와 CSS 진입점을 확인합니다.
9
- 5. 컴포넌트를 사용할 때만 [Button 개요·사용 맥락·API](./dist/components/Button/README.md)를 읽습니다.
10
- 6. Button을 사용할 때만 [Button 공개 manifest](./dist/components/Button/spec.json)에서 허용 조합과 접근성 계약을 확인합니다.
5
+ EDS 내부 소스로 동작을 추론하지 않고 공개 문서와 TypeScript contract를 기준으로 합니다. 링크는 모두 package root 기준 경로입니다.
11
6
 
12
- 문서에 없는 API나 시각 상태를 추측하지 않습니다. 구현보다 문서와 TypeScript contract를 우선합니다.
7
+ ## 필수
8
+
9
+ - [QUICKSTART.md](./QUICKSTART.md): UI 작업 규칙, 완료 기준과 doctor 실패 시 복구 순서, 명령(`npm run sync:eds`, `npm run eds:doctor`), 조건부 문서 목록입니다.
10
+
11
+ ## 조건부
12
+
13
+ - [CONSUMER_AGENT.md](./CONSUMER_AGENT.md): 소비처 `AGENTS.md`에 `<!-- EDS:BEGIN -->` block이 없거나, sync·doctor가 exit 2이거나 sync 뒤에도 doctor가 exit 1이거나, EDS 버전을 올렸거나, 사용자가 프로토타입을 EVA 구조로 정리하라고 요청했을 때(`eds align`) 읽습니다.
14
+ - [TOKEN_CONTEXT.md](./TOKEN_CONTEXT.md): EDS 컴포넌트 prop 밖에서 색상·typography token을 지정하거나 바꿀 때 읽습니다. Tailwind 없이 CSS variable이나 `cssVar()`로 쓰는 경우도 포함합니다.
15
+ - [TAILWIND_V4.md](./TAILWIND_V4.md): Tailwind CSS v4 adapter나 root CSS 배선을 설정하거나 고칠 때 읽습니다.
16
+ - [AI.md](./AI.md): 요청이 dark theme, 생성된 class 밖의 Tailwind utility, `AI_CONTEXT.json` `components`에 없는 컴포넌트를 요구할 때 읽습니다.
17
+ - [FRONTEND_CONVENTIONS.md](./FRONTEND_CONVENTIONS.md): `.eds/align/PLAN.md`가 있거나(`eds align` 진행 중), 소비처 `AGENTS.md`가 구조·라이브러리·코드 패턴 변경에 이 문서를 가리킬 때 읽습니다.
18
+ - [dist/components/Button/README.md](./dist/components/Button/README.md): Button을 쓸 때 사용 맥락, role·variant 선택, prop, 접근성, 목록 밖 아이콘 규칙을 읽습니다.
19
+ - [dist/components/Button/spec.json](./dist/components/Button/spec.json): `api.iconNames`의 아이콘 이름을 확인하거나 도구가 기계용 계약을 읽을 때 씁니다.
20
+ - [dist/tokens.json](./dist/tokens.json): 도구·스크립트가 기계용 token manifest를 읽거나, Tailwind 없이 쓸 `var(--eds-*)` 이름을 확인할 때 씁니다. class 이름은 `src/styles/eds-tokens.css`에 있습니다.
21
+ - [CHANGELOG.md](./CHANGELOG.md): EDS 버전을 올렸을 때(설치된 버전이 `AGENTS.md`의 `EDS:VERSION` 줄보다 높을 때) 읽습니다.
22
+
23
+ ## Optional
24
+
25
+ - [README.md](./README.md): 사람을 위한 설치 안내와 공개 경로 표입니다.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrabrain/eds",
3
- "version": "0.0.4",
3
+ "version": "0.1.1",
4
4
  "description": "EVA services' shared React design system",
5
5
  "author": "SpectraBrain",
6
6
  "license": "UNLICENSED",
@@ -8,14 +8,32 @@
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",
10
10
  "types": "./dist/index.d.ts",
11
+ "typesVersions": {
12
+ "*": {
13
+ "tokens": [
14
+ "./dist/tokens.d.ts"
15
+ ]
16
+ }
17
+ },
11
18
  "files": [
12
19
  "dist",
13
20
  "README.md",
14
21
  "AI.md",
22
+ "AI_CONTEXT.json",
23
+ "CONSUMER_AGENT.md",
24
+ "TOKEN_CONTEXT.md",
15
25
  "llms.txt",
16
26
  "TAILWIND_V4.md",
27
+ "QUICKSTART.md",
28
+ "FRONTEND_CONVENTIONS.md",
29
+ "CHANGELOG.md",
30
+ "consumer-postinstall.mjs",
31
+ "consumer",
17
32
  "NOTICE"
18
33
  ],
34
+ "bin": {
35
+ "eds": "./consumer/cli.mjs"
36
+ },
19
37
  "scripts": {
20
38
  "tokens:generate": "tsx scripts/build-tokens.ts",
21
39
  "components:generate": "tsx scripts/build-components.ts",
@@ -23,6 +41,7 @@
23
41
  "tokens:validate": "tsx scripts/build-tokens.ts --validate",
24
42
  "tokens:connectivity": "tsx scripts/check-token-connectivity.ts",
25
43
  "tokens:connectivity:strict": "npm run tokens:connectivity -- --strict",
44
+ "tokens:contrast": "npm run tokens:generate && tsx scripts/check-token-contrast.ts",
26
45
  "library:build": "tsup",
27
46
  "fonts:build": "tsx scripts/build-font-assets.ts",
28
47
  "tokens:build": "npm run typecheck && npm run library:build && npm run component-manifest:generate && npm run fonts:build && npm run public-boundary:check",
@@ -33,6 +52,7 @@
33
52
  "typecheck": "npm run tokens:generate && npm run components:generate && npm run component-manifest:generate && tsc --noEmit",
34
53
  "build": "npm run tokens:build",
35
54
  "package:check": "node scripts/check-package-exports.mjs",
55
+ "postinstall": "node ./consumer-postinstall.mjs",
36
56
  "prepack": "npm run tokens:build",
37
57
  "test:unit": "vitest run",
38
58
  "test": "npm run tokens:build && npm run test:unit"
@@ -46,7 +66,9 @@
46
66
  "sideEffects": [
47
67
  "./dist/tokens.css",
48
68
  "./dist/styles.css",
49
- "./dist/fonts.css"
69
+ "./dist/fonts.css",
70
+ "./dist/components.css",
71
+ "./dist/base.css"
50
72
  ],
51
73
  "peerDependencies": {
52
74
  "react": ">=18.2 <20"
@@ -106,11 +128,20 @@
106
128
  "./tokens.css": "./dist/tokens.css",
107
129
  "./styles.css": "./dist/styles.css",
108
130
  "./fonts.css": "./dist/fonts.css",
131
+ "./components.css": "./dist/components.css",
132
+ "./base.css": "./dist/base.css",
109
133
  "./tokens.json": "./dist/tokens.json",
110
134
  "./components/Button/README.md": "./dist/components/Button/README.md",
111
135
  "./components/Button/spec.json": "./dist/components/Button/spec.json",
136
+ "./CONSUMER_AGENT.md": "./CONSUMER_AGENT.md",
137
+ "./AI.md": "./AI.md",
138
+ "./CHANGELOG.md": "./CHANGELOG.md",
139
+ "./AI_CONTEXT.json": "./AI_CONTEXT.json",
140
+ "./TOKEN_CONTEXT.md": "./TOKEN_CONTEXT.md",
112
141
  "./llms.txt": "./llms.txt",
113
142
  "./TAILWIND_V4.md": "./TAILWIND_V4.md",
143
+ "./QUICKSTART.md": "./QUICKSTART.md",
144
+ "./FRONTEND_CONVENTIONS.md": "./FRONTEND_CONVENTIONS.md",
114
145
  "./package.json": "./package.json"
115
146
  }
116
147
  }