@newtonedev/editor 0.1.12 → 0.2.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 (116) hide show
  1. package/dist/Editor.d.ts.map +1 -1
  2. package/dist/components/CodeBlock.d.ts.map +1 -1
  3. package/dist/components/ConfiguratorPanel.d.ts +6 -3
  4. package/dist/components/ConfiguratorPanel.d.ts.map +1 -1
  5. package/dist/components/EditorHeader.d.ts +3 -2
  6. package/dist/components/EditorHeader.d.ts.map +1 -1
  7. package/dist/components/EditorShell.d.ts.map +1 -1
  8. package/dist/components/PresetSelector.d.ts +3 -2
  9. package/dist/components/PresetSelector.d.ts.map +1 -1
  10. package/dist/components/PreviewWindow.d.ts.map +1 -1
  11. package/dist/components/RightSidebar.d.ts.map +1 -1
  12. package/dist/components/Sidebar.d.ts +8 -1
  13. package/dist/components/Sidebar.d.ts.map +1 -1
  14. package/dist/components/TableOfContents.d.ts.map +1 -1
  15. package/dist/components/sections/ColorsSection.d.ts +6 -3
  16. package/dist/components/sections/ColorsSection.d.ts.map +1 -1
  17. package/dist/components/sections/DynamicRangeSection.d.ts +2 -2
  18. package/dist/components/sections/DynamicRangeSection.d.ts.map +1 -1
  19. package/dist/components/sections/FontsSection.d.ts +2 -2
  20. package/dist/components/sections/FontsSection.d.ts.map +1 -1
  21. package/dist/components/sections/IconsSection.d.ts +2 -2
  22. package/dist/components/sections/IconsSection.d.ts.map +1 -1
  23. package/dist/components/sections/OthersSection.d.ts +2 -2
  24. package/dist/components/sections/OthersSection.d.ts.map +1 -1
  25. package/dist/components/sections/ScalePlots.d.ts +11 -0
  26. package/dist/components/sections/ScalePlots.d.ts.map +1 -0
  27. package/dist/components/sections/index.d.ts +1 -0
  28. package/dist/components/sections/index.d.ts.map +1 -1
  29. package/dist/configurator/bridge/toCSS.d.ts +7 -0
  30. package/dist/configurator/bridge/toCSS.d.ts.map +1 -0
  31. package/dist/configurator/bridge/toJSON.d.ts +15 -0
  32. package/dist/configurator/bridge/toJSON.d.ts.map +1 -0
  33. package/dist/configurator/bridge/toThemeConfig.d.ts +8 -0
  34. package/dist/configurator/bridge/toThemeConfig.d.ts.map +1 -0
  35. package/dist/configurator/constants.d.ts +13 -0
  36. package/dist/configurator/constants.d.ts.map +1 -0
  37. package/dist/configurator/hex-conversion.d.ts +21 -0
  38. package/dist/configurator/hex-conversion.d.ts.map +1 -0
  39. package/dist/configurator/hooks/useConfigurator.d.ts +11 -0
  40. package/dist/configurator/hooks/useConfigurator.d.ts.map +1 -0
  41. package/dist/configurator/hooks/usePreviewColors.d.ts +8 -0
  42. package/dist/configurator/hooks/usePreviewColors.d.ts.map +1 -0
  43. package/dist/configurator/hooks/useWcagValidation.d.ts +20 -0
  44. package/dist/configurator/hooks/useWcagValidation.d.ts.map +1 -0
  45. package/dist/configurator/hue-conversion.d.ts +10 -0
  46. package/dist/configurator/hue-conversion.d.ts.map +1 -0
  47. package/dist/configurator/state/actions.d.ts +107 -0
  48. package/dist/configurator/state/actions.d.ts.map +1 -0
  49. package/dist/configurator/state/defaults.d.ts +7 -0
  50. package/dist/configurator/state/defaults.d.ts.map +1 -0
  51. package/dist/configurator/state/reducer.d.ts +19 -0
  52. package/dist/configurator/state/reducer.d.ts.map +1 -0
  53. package/dist/configurator/types.d.ts +60 -0
  54. package/dist/configurator/types.d.ts.map +1 -0
  55. package/dist/hooks/useEditorState.d.ts +8 -6
  56. package/dist/hooks/useEditorState.d.ts.map +1 -1
  57. package/dist/hooks/usePresets.d.ts +7 -6
  58. package/dist/hooks/usePresets.d.ts.map +1 -1
  59. package/dist/index.cjs +30372 -808
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.d.ts +17 -0
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +30351 -799
  64. package/dist/index.js.map +1 -1
  65. package/dist/preview/CategoryView.d.ts.map +1 -1
  66. package/dist/preview/ComponentDetailView.d.ts.map +1 -1
  67. package/dist/preview/ComponentRenderer.d.ts.map +1 -1
  68. package/dist/preview/IconBrowserView.d.ts.map +1 -1
  69. package/dist/preview/OverviewView.d.ts.map +1 -1
  70. package/dist/preview/PaletteScaleView.d.ts +11 -0
  71. package/dist/preview/PaletteScaleView.d.ts.map +1 -0
  72. package/dist/types.d.ts +4 -3
  73. package/dist/types.d.ts.map +1 -1
  74. package/package.json +7 -4
  75. package/src/Editor.tsx +43 -19
  76. package/src/components/CodeBlock.tsx +7 -11
  77. package/src/components/ConfiguratorPanel.tsx +25 -18
  78. package/src/components/EditorHeader.tsx +29 -39
  79. package/src/components/EditorShell.tsx +17 -29
  80. package/src/components/FontPicker.tsx +7 -7
  81. package/src/components/PresetSelector.tsx +211 -129
  82. package/src/components/PreviewWindow.tsx +5 -12
  83. package/src/components/PrimaryNav.tsx +6 -6
  84. package/src/components/RightSidebar.tsx +24 -25
  85. package/src/components/Sidebar.tsx +54 -60
  86. package/src/components/TableOfContents.tsx +4 -5
  87. package/src/components/sections/ColorsSection.tsx +109 -121
  88. package/src/components/sections/DynamicRangeSection.tsx +61 -75
  89. package/src/components/sections/FontsSection.tsx +17 -28
  90. package/src/components/sections/IconsSection.tsx +2 -2
  91. package/src/components/sections/OthersSection.tsx +4 -5
  92. package/src/components/sections/ScalePlots.tsx +221 -0
  93. package/src/components/sections/index.ts +1 -0
  94. package/src/configurator/bridge/toCSS.ts +44 -0
  95. package/src/configurator/bridge/toJSON.ts +24 -0
  96. package/src/configurator/bridge/toThemeConfig.ts +114 -0
  97. package/src/configurator/constants.ts +13 -0
  98. package/src/configurator/hex-conversion.ts +67 -0
  99. package/src/configurator/hooks/useConfigurator.ts +33 -0
  100. package/src/configurator/hooks/usePreviewColors.ts +47 -0
  101. package/src/configurator/hooks/useWcagValidation.ts +133 -0
  102. package/src/configurator/hue-conversion.ts +25 -0
  103. package/src/configurator/state/actions.ts +43 -0
  104. package/src/configurator/state/defaults.ts +107 -0
  105. package/src/configurator/state/reducer.ts +399 -0
  106. package/src/configurator/types.ts +65 -0
  107. package/src/hooks/useEditorState.ts +25 -11
  108. package/src/hooks/usePresets.ts +54 -33
  109. package/src/index.ts +33 -0
  110. package/src/preview/CategoryView.tsx +8 -11
  111. package/src/preview/ComponentDetailView.tsx +24 -54
  112. package/src/preview/ComponentRenderer.tsx +2 -4
  113. package/src/preview/IconBrowserView.tsx +9 -10
  114. package/src/preview/OverviewView.tsx +9 -12
  115. package/src/preview/PaletteScaleView.tsx +122 -0
  116. package/src/types.ts +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../src/Editor.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,MAAM,CAAC,EACrB,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,WAAW,GACZ,EAAE,WAAW,2CAwJb"}
1
+ {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../src/Editor.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,MAAM,CAAC,EACrB,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,WAAW,GACZ,EAAE,WAAW,2CA+Kb"}
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../src/components/CodeBlock.tsx"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,2CAqC7D;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,GACL,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,2CAsCA"}
1
+ {"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../src/components/CodeBlock.tsx"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,2CAiC7D;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,GACL,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,2CAsCA"}
@@ -1,7 +1,7 @@
1
1
  import type { ColorMode } from "@newtonedev/components";
2
2
  import type { ColorResult } from "newtone";
3
- import type { ConfiguratorState } from "@newtonedev/configurator";
4
- import type { ConfiguratorAction } from "@newtonedev/configurator";
3
+ import type { ConfiguratorState } from "../configurator/types";
4
+ import type { ConfiguratorAction } from "../configurator/state/actions";
5
5
  import type { GoogleFontEntry } from "@newtonedev/fonts";
6
6
  interface ConfiguratorPanelProps {
7
7
  readonly activeSectionId: string;
@@ -11,7 +11,10 @@ interface ConfiguratorPanelProps {
11
11
  readonly colorMode: ColorMode;
12
12
  readonly onColorModeChange: (mode: ColorMode) => void;
13
13
  readonly fontCatalog?: readonly GoogleFontEntry[];
14
+ readonly activePaletteIndex: number;
15
+ readonly onActivePaletteChange: (index: number) => void;
16
+ readonly useP3: boolean;
14
17
  }
15
- export declare function ConfiguratorPanel({ activeSectionId, state, dispatch, previewColors, colorMode, onColorModeChange, fontCatalog, }: ConfiguratorPanelProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function ConfiguratorPanel({ activeSectionId, state, dispatch, previewColors, colorMode, onColorModeChange, fontCatalog, activePaletteIndex, onActivePaletteChange, useP3, }: ConfiguratorPanelProps): import("react/jsx-runtime").JSX.Element;
16
19
  export {};
17
20
  //# sourceMappingURL=ConfiguratorPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfiguratorPanel.d.ts","sourceRoot":"","sources":["../../src/components/ConfiguratorPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AASzD,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,aAAa,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,CAAC;IAC5D,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CACnD;AAID,wBAAgB,iBAAiB,CAAC,EAChC,eAAe,EACf,KAAK,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,WAAW,GACZ,EAAE,sBAAsB,2CAyCxB"}
1
+ {"version":3,"file":"ConfiguratorPanel.d.ts","sourceRoot":"","sources":["../../src/components/ConfiguratorPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AASzD,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,aAAa,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,CAAC;IAC5D,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IAClD,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,qBAAqB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAID,wBAAgB,iBAAiB,CAAC,EAChC,eAAe,EACf,KAAK,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,GACN,EAAE,sBAAsB,2CA2CxB"}
@@ -12,13 +12,14 @@ interface EditorHeaderProps {
12
12
  };
13
13
  readonly presets: readonly Preset[];
14
14
  readonly activePresetId: string;
15
- readonly publishedPresetId: string | null;
15
+ readonly defaultVariantId: string | null;
16
16
  readonly onSwitchPreset: (presetId: string) => void;
17
17
  readonly onCreatePreset: (name: string) => Promise<string>;
18
18
  readonly onRenamePreset: (presetId: string, name: string) => void;
19
19
  readonly onDeletePreset: (presetId: string) => Promise<void>;
20
20
  readonly onDuplicatePreset: (presetId: string, name: string) => Promise<string>;
21
+ readonly onSetDefaultVariant: (presetId: string) => void;
21
22
  }
22
- export declare function EditorHeader({ saveStatus, isPublished, publishing, onPublish, onRetry, headerSlots, presets, activePresetId, publishedPresetId, onSwitchPreset, onCreatePreset, onRenamePreset, onDeletePreset, onDuplicatePreset, }: EditorHeaderProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function EditorHeader({ saveStatus, isPublished, publishing, onPublish, onRetry, headerSlots, presets, activePresetId, defaultVariantId, onSwitchPreset, onCreatePreset, onRenamePreset, onDeletePreset, onDuplicatePreset, onSetDefaultVariant, }: EditorHeaderProps): import("react/jsx-runtime").JSX.Element;
23
24
  export {};
24
25
  //# sourceMappingURL=EditorHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorHeader.d.ts","sourceRoot":"","sources":["../../src/components/EditorHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGnD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE;QACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;QAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;KAC5B,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,Q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AAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;CAChC;AAED,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,GACX,EAAE,gBAAgB,2CAgDlB"}
1
+ {"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../src/components/EditorShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,UAAU,gBAAgB;IACxB,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;CAChC;AAED,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,MAAM,EACN,OAAO,EACP,UAAU,GACX,EAAE,gBAAgB,2CAqClB"}
@@ -2,13 +2,14 @@ import type { Preset } from "../types";
2
2
  interface PresetSelectorProps {
3
3
  readonly presets: readonly Preset[];
4
4
  readonly activePresetId: string;
5
- readonly publishedPresetId: string | null;
5
+ readonly defaultVariantId: string | null;
6
6
  readonly onSwitchPreset: (presetId: string) => void;
7
7
  readonly onCreatePreset: (name: string) => Promise<string>;
8
8
  readonly onRenamePreset: (presetId: string, name: string) => void;
9
9
  readonly onDeletePreset: (presetId: string) => Promise<void>;
10
10
  readonly onDuplicatePreset: (presetId: string, name: string) => Promise<string>;
11
+ readonly onSetDefaultVariant: (presetId: string) => void;
11
12
  }
12
- export declare function PresetSelector({ presets, activePresetId, publishedPresetId, onSwitchPreset, onCreatePreset, onRenamePreset, onDeletePreset, onDuplicatePreset, }: PresetSelectorProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function PresetSelector({ presets, activePresetId, defaultVariantId, onSwitchPreset, onCreatePreset, onRenamePreset, onDeletePreset, onDuplicatePreset, onSetDefaultVariant, }: PresetSelectorProps): import("react/jsx-runtime").JSX.Element;
13
14
  export {};
14
15
  //# sourceMappingURL=PresetSelector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PresetSelector.d.ts","sourceRoot":"","sources":["../../src/components/PresetSelector.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,QAAQ,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,QAAQ,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,QAAQ,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,QAAQ,CAAC,iBAAiB,EAAE,CAC1B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB;AAED,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,GAClB,EAAE,mBAAmB,2CAgZrB"}
1
+ {"version":3,"file":"PresetSelector.d.ts","sourceRoot":"","sources":["../../src/components/PresetSelector.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAA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,EAC3B,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,aAAa,EACb,SAAS,GACV,EAAE,iBAAiB,2CAgNnB"}
@@ -1,7 +1,14 @@
1
+ import type { ColorResult } from "newtone";
2
+ import type { ConfiguratorState } from "../configurator/types";
1
3
  interface SidebarProps {
2
4
  readonly isDirty: boolean;
3
5
  readonly onRevert: () => void;
6
+ readonly state: ConfiguratorState;
7
+ readonly previewColors: readonly (readonly ColorResult[])[];
8
+ readonly activePaletteIndex: number;
9
+ readonly activeSectionId: string;
10
+ readonly useP3: boolean;
4
11
  }
5
- export declare function Sidebar({ isDirty, onRevert, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function Sidebar({ isDirty, onRevert, state, previewColors, activePaletteIndex, activeSectionId, useP3, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
6
13
  export {};
7
14
  //# sourceMappingURL=Sidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../src/components/Sidebar.tsx"],"names":[],"mappings":"AAKA,UAAU,YAAY;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,QAAQ,GACT,EAAE,YAAY,2CA+Ed"}
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../src/components/Sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAK/D,UAAU,YAAY;IACpB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,CAAC;IAC5D,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,QAAQ,EACR,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,KAAK,GACN,EAAE,YAAY,2CA6Dd"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableOfContents.d.ts","sourceRoot":"","sources":["../../src/components/TableOfContents.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CAClD;AAID,wBAAgB,eAAe,CAAC,EAC9B,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,UAAU,GACX,EAAE,oBAAoB,2CA4FtB"}
1
+ {"version":3,"file":"TableOfContents.d.ts","sourceRoot":"","sources":["../../src/components/TableOfContents.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IACjC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CAClD;AAID,wBAAgB,eAAe,CAAC,EAC9B,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,UAAU,GACX,EAAE,oBAAoB,2CA4FtB"}
@@ -1,14 +1,17 @@
1
1
  import type { ColorMode } from "@newtonedev/components";
2
2
  import type { ColorResult } from "newtone";
3
- import type { ConfiguratorState } from "@newtonedev/configurator";
4
- import type { ConfiguratorAction } from "@newtonedev/configurator";
3
+ import type { ConfiguratorState } from "../../configurator/types";
4
+ import type { ConfiguratorAction } from "../../configurator/state/actions";
5
5
  interface ColorsSectionProps {
6
6
  readonly state: ConfiguratorState;
7
7
  readonly dispatch: (action: ConfiguratorAction) => void;
8
8
  readonly previewColors: readonly (readonly ColorResult[])[];
9
9
  readonly colorMode: ColorMode;
10
10
  readonly onColorModeChange: (mode: ColorMode) => void;
11
+ readonly activePaletteIndex: number;
12
+ readonly onActivePaletteChange: (index: number) => void;
13
+ readonly useP3: boolean;
11
14
  }
12
- export declare function ColorsSection({ state, dispatch, previewColors, colorMode, onColorModeChange, }: ColorsSectionProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function ColorsSection({ state, dispatch, previewColors, colorMode, onColorModeChange, activePaletteIndex, onActivePaletteChange, useP3, }: ColorsSectionProps): import("react/jsx-runtime").JSX.Element;
13
16
  export {};
14
17
  //# sourceMappingURL=ColorsSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorsSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/ColorsSection.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAgB,MAAM,SAAS,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAenE,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,KAAK,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,EAAE,OAAO,CAAC;CACzB;AAsBD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,GACN,EAAE,kBAAkB,2CA6YpB"}
@@ -1,5 +1,5 @@
1
- import type { ConfiguratorState } from "@newtonedev/configurator";
2
- import type { ConfiguratorAction } from "@newtonedev/configurator";
1
+ import type { ConfiguratorState } from "../../configurator/types";
2
+ import type { ConfiguratorAction } from "../../configurator/state/actions";
3
3
  interface DynamicRangeSectionProps {
4
4
  readonly state: ConfiguratorState;
5
5
  readonly dispatch: (action: ConfiguratorAction) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicRangeSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/DynamicRangeSection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAuQnE,UAAU,wBAAwB;IAChC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACzD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,GACT,EAAE,wBAAwB,2CA0H1B"}
1
+ {"version":3,"file":"DynamicRangeSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/DynamicRangeSection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAgQ3E,UAAU,wBAAwB;IAChC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACzD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,GACT,EAAE,wBAAwB,2CAqH1B"}
@@ -1,5 +1,5 @@
1
- import type { ConfiguratorState } from "@newtonedev/configurator";
2
- import type { ConfiguratorAction } from "@newtonedev/configurator";
1
+ import type { ConfiguratorState } from "../../configurator/types";
2
+ import type { ConfiguratorAction } from "../../configurator/state/actions";
3
3
  import type { GoogleFontEntry } from "@newtonedev/fonts";
4
4
  interface FontsSectionProps {
5
5
  readonly state: ConfiguratorState;
@@ -1 +1 @@
1
- {"version":3,"file":"FontsSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/FontsSection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAA6B,MAAM,0BAA0B,CAAC;AAC7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA2BzD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CACnD;AASD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CAqD/E"}
1
+ {"version":3,"file":"FontsSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/FontsSection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAA6B,MAAM,0BAA0B,CAAC;AAC7F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA2BzD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CACnD;AASD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CA4C/E"}
@@ -1,5 +1,5 @@
1
- import type { ConfiguratorState } from "@newtonedev/configurator";
2
- import type { ConfiguratorAction } from "@newtonedev/configurator";
1
+ import type { ConfiguratorState } from "../../configurator/types";
2
+ import type { ConfiguratorAction } from "../../configurator/state/actions";
3
3
  interface IconsSectionProps {
4
4
  readonly state: ConfiguratorState;
5
5
  readonly dispatch: (action: ConfiguratorAction) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"IconsSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/IconsSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAkBnE,UAAU,iBAAiB;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACzD;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAwClE"}
1
+ {"version":3,"file":"IconsSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/IconsSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAkB3E,UAAU,iBAAiB;IACzB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACzD;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAwClE"}
@@ -1,5 +1,5 @@
1
- import type { ConfiguratorState } from "@newtonedev/configurator";
2
- import type { ConfiguratorAction } from "@newtonedev/configurator";
1
+ import type { ConfiguratorState } from "../../configurator/types";
2
+ import type { ConfiguratorAction } from "../../configurator/state/actions";
3
3
  interface OthersSectionProps {
4
4
  readonly state: ConfiguratorState;
5
5
  readonly dispatch: (action: ConfiguratorAction) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"OthersSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/OthersSection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACzD;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAiEpE"}
1
+ {"version":3,"file":"OthersSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/OthersSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CACzD;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAiEpE"}
@@ -0,0 +1,11 @@
1
+ import type { ColorResult } from "newtone";
2
+ import type { ConfiguratorState } from "../../configurator/types";
3
+ interface ScalePlotsProps {
4
+ readonly state: ConfiguratorState;
5
+ readonly scale: readonly ColorResult[];
6
+ readonly activePaletteIndex: number;
7
+ readonly useP3: boolean;
8
+ }
9
+ export declare function ScalePlots({ state, scale, activePaletteIndex, useP3 }: ScalePlotsProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
11
+ //# sourceMappingURL=ScalePlots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScalePlots.d.ts","sourceRoot":"","sources":["../../../src/components/sections/ScalePlots.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAMlE,UAAU,eAAe;IACvB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;IACvC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAOD,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,eAAe,kDAuMtF"}
@@ -1,4 +1,5 @@
1
1
  export { ColorsSection } from "./ColorsSection";
2
+ export { ScalePlots } from "./ScalePlots";
2
3
  export { DynamicRangeSection } from "./DynamicRangeSection";
3
4
  export { IconsSection } from "./IconsSection";
4
5
  export { FontsSection } from "./FontsSection";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sections/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/sections/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ConfiguratorState } from '../types';
2
+ /**
3
+ * Generate CSS custom properties for both light and dark modes.
4
+ * Computes tokens for the primary theme at grounded elevation in sRGB gamut.
5
+ */
6
+ export declare function toCSS(state: ConfiguratorState): string;
7
+ //# sourceMappingURL=toCSS.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toCSS.d.ts","sourceRoot":"","sources":["../../../src/configurator/bridge/toCSS.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAKlD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAkCtD"}
@@ -0,0 +1,15 @@
1
+ import type { ConfiguratorState } from '../types';
2
+ import type { NewtoneThemeConfig } from '@newtonedev/components';
3
+ /** Serializable configurator export format */
4
+ export interface ConfiguratorExport {
5
+ readonly version: '1.0';
6
+ readonly configuratorState: ConfiguratorState;
7
+ readonly themeConfig: NewtoneThemeConfig;
8
+ }
9
+ /**
10
+ * Export the configurator state as a JSON string.
11
+ * Includes both the human-readable state (for round-tripping)
12
+ * and the engine-ready theme config.
13
+ */
14
+ export declare function toJSON(state: ConfiguratorState): string;
15
+ //# sourceMappingURL=toJSON.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toJSON.d.ts","sourceRoot":"","sources":["../../../src/configurator/bridge/toJSON.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGjE,8CAA8C;AAC9C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;IACxB,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAOvD"}
@@ -0,0 +1,8 @@
1
+ import type { ConfiguratorState } from '../types';
2
+ import type { NewtoneThemeConfig } from '@newtonedev/components';
3
+ /**
4
+ * Convert configurator state to a NewtoneThemeConfig (engine-ready format).
5
+ * Hues are already in OKLCH space — passed through directly.
6
+ */
7
+ export declare function toThemeConfig(state: ConfiguratorState): NewtoneThemeConfig;
8
+ //# sourceMappingURL=toThemeConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toThemeConfig.d.ts","sourceRoot":"","sources":["../../../src/configurator/bridge/toThemeConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA+BjE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB,CA6E1E"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Hue ranges for semantic palettes (OKLCH hues).
3
+ * Indices 0 (Primary), 1 (Secondary), and 2 (Tertiary) are unconstrained.
4
+ *
5
+ * Gaps between ranges prevent adjacent semantics from overlapping:
6
+ * - ~34–45: gap between Error (reds) and Warning (yellows)
7
+ * - ~103–130: gap between Warning and Success (greens)
8
+ */
9
+ export declare const SEMANTIC_HUE_RANGES: Readonly<Record<number, {
10
+ readonly min: number;
11
+ readonly max: number;
12
+ }>>;
13
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/configurator/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAIxG,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { DynamicRange } from 'newtone';
2
+ /** Result of decomposing a hex color into palette parameters */
3
+ export interface HexPaletteParams {
4
+ /** OKLCH hue [0, 360) */
5
+ readonly hue: number;
6
+ /** Chroma as fraction of max in-gamut chroma [0, 1] */
7
+ readonly chromaRatio: number;
8
+ /** Step index in the 26-step scale [0, 25] (0 = lightest, 25 = darkest) */
9
+ readonly stepIndex: number;
10
+ }
11
+ /**
12
+ * Decompose a hex color string into palette parameters (hue, chromaRatio, normalizedValue).
13
+ *
14
+ * Returns null if the hex string is invalid.
15
+ * Hue is returned in OKLCH space [0, 360).
16
+ *
17
+ * @param hex - Hex color string (e.g., "#FF0000", "#f00", "FF0000")
18
+ * @param dynamicRange - Current dynamic range for normalizedValue mapping
19
+ */
20
+ export declare function hexToPaletteParams(hex: string, dynamicRange: DynamicRange): HexPaletteParams | null;
21
+ //# sourceMappingURL=hex-conversion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hex-conversion.d.ts","sourceRoot":"","sources":["../../src/configurator/hex-conversion.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,gEAAgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,yBAAyB;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,2EAA2E;IAC3E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAgBD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,YAAY,GACzB,gBAAgB,GAAG,IAAI,CAqBzB"}
@@ -0,0 +1,11 @@
1
+ import type { ConfiguratorState } from '../types';
2
+ import type { ConfiguratorAction } from '../state/actions';
3
+ import type { NewtoneThemeConfig } from '@newtonedev/components';
4
+ export interface UseConfiguratorResult {
5
+ readonly state: ConfiguratorState;
6
+ readonly dispatch: (action: ConfiguratorAction) => void;
7
+ readonly themeConfig: NewtoneThemeConfig;
8
+ readonly reset: () => void;
9
+ }
10
+ export declare function useConfigurator(initialState?: Partial<ConfiguratorState>): UseConfiguratorResult;
11
+ //# sourceMappingURL=useConfigurator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConfigurator.d.ts","sourceRoot":"","sources":["../../../src/configurator/hooks/useConfigurator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAKjE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,eAAe,CAC7B,YAAY,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACxC,qBAAqB,CAevB"}
@@ -0,0 +1,8 @@
1
+ import type { ColorResult } from 'newtone';
2
+ import type { ConfiguratorState } from '../types';
3
+ /**
4
+ * Compute preview swatches for all palettes.
5
+ * Returns an array of arrays: one preview row per palette.
6
+ */
7
+ export declare function usePreviewColors(state: ConfiguratorState, useP3?: boolean): readonly (readonly ColorResult[])[];
8
+ //# sourceMappingURL=usePreviewColors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreviewColors.d.ts","sourceRoot":"","sources":["../../../src/configurator/hooks/usePreviewColors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,UAAQ,GAAG,SAAS,CAAC,SAAS,WAAW,EAAE,CAAC,EAAE,CAoC7G"}
@@ -0,0 +1,20 @@
1
+ import type { ConfiguratorState } from '../types';
2
+ export interface WcagValidation {
3
+ /** WCAG contrast ratio at the key color position (null if no keyColor set) */
4
+ readonly keyColorContrast: number | null;
5
+ /** Whether the key color passes WCAG AA for normal text (>= 4.5:1) */
6
+ readonly passesAA: boolean;
7
+ /** Whether the key color passes WCAG AA for large text (>= 3:1) */
8
+ readonly passesAALargeText: boolean;
9
+ /** The step index where auto contrast search would place the key color [0, 25] */
10
+ readonly autoStep: number;
11
+ }
12
+ /**
13
+ * Compute WCAG validation info for a non-primary palette's key color.
14
+ *
15
+ * Validates the palette's key color against the primary background
16
+ * in the current preview mode. Also computes where the auto contrast
17
+ * search would place the key color (for showing the default position).
18
+ */
19
+ export declare function useWcagValidation(state: ConfiguratorState, paletteIndex: number): WcagValidation;
20
+ //# sourceMappingURL=useWcagValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWcagValidation.d.ts","sourceRoot":"","sources":["../../../src/configurator/hooks/useWcagValidation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAyBlD,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAMD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,iBAAiB,EACxB,YAAY,EAAE,MAAM,GACnB,cAAc,CA8EhB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Convert a traditional HSL color wheel hue (0-359) to its equivalent OKLCH hue.
3
+ *
4
+ * Uses the fully saturated HSL color (S=1, L=0.5) at the given hue,
5
+ * converts to sRGB, then extracts the OKLCH hue component.
6
+ *
7
+ * Traditional hues: 0=red, 60=yellow, 120=green, 180=cyan, 240=blue, 300=magenta.
8
+ */
9
+ export declare function traditionalHueToOklch(hue: number): number;
10
+ //# sourceMappingURL=hue-conversion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hue-conversion.d.ts","sourceRoot":"","sources":["../../src/configurator/hue-conversion.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAazD"}
@@ -0,0 +1,107 @@
1
+ import type { ColorMode } from '@newtonedev/components';
2
+ import type { TextRole } from '@newtonedev/fonts';
3
+ import type { ConfiguratorState, FontSlotConfig, FontScope, SpacingPreset } from '../types';
4
+ export type ConfiguratorAction = {
5
+ readonly type: 'SET_PALETTE_HUE';
6
+ readonly index: number;
7
+ readonly hue: number;
8
+ } | {
9
+ readonly type: 'SET_PALETTE_CHROMA_RATIO';
10
+ readonly index: number;
11
+ readonly chromaRatio: number;
12
+ } | {
13
+ readonly type: 'SET_PALETTE_CHROMA_PEAK';
14
+ readonly index: number;
15
+ readonly chromaPeak: number;
16
+ } | {
17
+ readonly type: 'SET_PALETTE_LOCAL_HUE_GRADE_INTENSITY';
18
+ readonly index: number;
19
+ readonly intensity: number;
20
+ } | {
21
+ readonly type: 'SET_PALETTE_LOCAL_HUE_GRADE_HUE';
22
+ readonly index: number;
23
+ readonly hue: number;
24
+ } | {
25
+ readonly type: 'SET_PALETTE_LOCAL_HUE_GRADE_SIDE';
26
+ readonly index: number;
27
+ readonly side: 'light' | 'dark';
28
+ } | {
29
+ readonly type: 'SET_PALETTE_KEY_COLOR_STEP';
30
+ readonly index: number;
31
+ readonly step: number;
32
+ } | {
33
+ readonly type: 'CLEAR_PALETTE_KEY_COLOR_STEP';
34
+ readonly index: number;
35
+ } | {
36
+ readonly type: 'SET_PALETTE_FROM_HEX';
37
+ readonly index: number;
38
+ readonly hue: number;
39
+ readonly chromaRatio: number;
40
+ readonly keyColorStep: number;
41
+ } | {
42
+ readonly type: 'SET_PALETTE_KEY_COLOR_STEP_DARK';
43
+ readonly index: number;
44
+ readonly step: number;
45
+ } | {
46
+ readonly type: 'CLEAR_PALETTE_KEY_COLOR_STEP_DARK';
47
+ readonly index: number;
48
+ } | {
49
+ readonly type: 'SET_PALETTE_FROM_HEX_DARK';
50
+ readonly index: number;
51
+ readonly hue: number;
52
+ readonly chromaRatio: number;
53
+ readonly keyColorStep: number;
54
+ } | {
55
+ readonly type: 'SET_LIGHTEST';
56
+ readonly value: number;
57
+ } | {
58
+ readonly type: 'SET_DARKEST';
59
+ readonly value: number;
60
+ } | {
61
+ readonly type: 'SET_GLOBAL_GRADE_LIGHT_INTENSITY';
62
+ readonly intensity: number;
63
+ } | {
64
+ readonly type: 'SET_GLOBAL_GRADE_LIGHT_HUE';
65
+ readonly hue: number;
66
+ } | {
67
+ readonly type: 'SET_GLOBAL_GRADE_DARK_INTENSITY';
68
+ readonly intensity: number;
69
+ } | {
70
+ readonly type: 'SET_GLOBAL_GRADE_DARK_HUE';
71
+ readonly hue: number;
72
+ } | {
73
+ readonly type: 'SET_SPACING_PRESET';
74
+ readonly preset: SpacingPreset;
75
+ } | {
76
+ readonly type: 'SET_ROUNDNESS_INTENSITY';
77
+ readonly intensity: number;
78
+ } | {
79
+ readonly type: 'SET_FONT';
80
+ readonly scope: FontScope;
81
+ readonly font: FontSlotConfig;
82
+ } | {
83
+ readonly type: 'SET_TYPE_SCALE_OFFSET';
84
+ readonly offset: number;
85
+ } | {
86
+ readonly type: 'SET_ROLE_WEIGHT';
87
+ readonly role: TextRole;
88
+ readonly weight: number;
89
+ } | {
90
+ readonly type: 'SET_ICON_VARIANT';
91
+ readonly variant: 'outlined' | 'rounded' | 'sharp';
92
+ } | {
93
+ readonly type: 'SET_ICON_WEIGHT';
94
+ readonly weight: 100 | 200 | 300 | 400 | 500 | 600 | 700;
95
+ } | {
96
+ readonly type: 'SET_ICON_AUTO_GRADE';
97
+ readonly autoGrade: boolean;
98
+ } | {
99
+ readonly type: 'SET_PREVIEW_MODE';
100
+ readonly mode: ColorMode;
101
+ } | {
102
+ readonly type: 'RESET';
103
+ } | {
104
+ readonly type: 'LOAD_STATE';
105
+ readonly state: ConfiguratorState;
106
+ };
107
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/configurator/state/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ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AAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAA;CAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ConfiguratorState } from '../types';
2
+ /**
3
+ * Default configurator state.
4
+ * All hue values are OKLCH hues [0, 360).
5
+ */
6
+ export declare const DEFAULT_CONFIGURATOR_STATE: ConfiguratorState;
7
+ //# sourceMappingURL=defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/configurator/state/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,iBAoGxC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { ConfiguratorState, PaletteState } from '../types';
2
+ import type { ConfiguratorAction } from './actions';
3
+ /**
4
+ * Migrate persisted palette state from old format to new format.
5
+ * Handles:
6
+ * - Old `saturation` (0-100) → `chromaRatio` (0-1)
7
+ * - Old `desaturation` (-1 to 1) → `chromaPeak` (0-1, 0.5=natural)
8
+ * - Old `hueGradeStrength/hueGradeHue/hueGradeDirection` → `localHueGrade`
9
+ * - Legacy `desaturationStrength/desaturationDirection` era
10
+ * Idempotent: already-migrated state passes through unchanged.
11
+ */
12
+ export declare function migratePaletteState(p: Record<string, unknown>): PaletteState;
13
+ /**
14
+ * Migrate a full ConfiguratorState loaded from DB (old or new format) to the current format.
15
+ * Safe to call on already-migrated state (idempotent).
16
+ */
17
+ export declare function migrateConfiguratorState(raw: unknown): ConfiguratorState;
18
+ export declare function configuratorReducer(state: ConfiguratorState, action: ConfiguratorAction): ConfiguratorState;
19
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../src/configurator/state/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAqDpD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAgE5E;AA4CD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,iBAAiB,CAwBxE;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,iBAAiB,EACxB,MAAM,EAAE,kBAAkB,GACzB,iBAAiB,CAkMnB"}