@industry-theme/theme-editor-panel 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -14,4 +14,5 @@ export declare const onPackageLoad: () => Promise<void>;
14
14
  * Use this for package-level cleanup.
15
15
  */
16
16
  export declare const onPackageUnload: () => Promise<void>;
17
+ export { themeEditorTools, themeEditorToolsMetadata, setThemeColorTool, resetThemeTool, applyThemePresetTool, exportThemeTool, } from './tools';
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,eAAe,EA4BnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,qBAGzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAG3B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAGlE;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,eAAe,EA6BnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,qBAGzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAG3B,CAAC;AAGF,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,eAAe,GAChB,MAAM,SAAS,CAAC"}
@@ -16,7 +16,7 @@ declare const meta: {
16
16
  };
17
17
  };
18
18
  tags: string[];
19
- decorators: ((Story: import("@storybook/core/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
19
+ decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
20
20
  context: import("@principal-ade/panel-framework-core").PanelContextValue;
21
21
  actions: import("@principal-ade/panel-framework-core").PanelActions;
22
22
  events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
@@ -931,6 +931,127 @@ const ThemeEditorPanelContent = () => {
931
931
  const ThemeEditorPanel = (props) => {
932
932
  return /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(ThemeEditorPanelContent, { ...props }) });
933
933
  };
934
+ const setThemeColorTool = {
935
+ name: "set_theme_color",
936
+ description: "Sets a specific color in the Industry theme",
937
+ inputs: {
938
+ type: "object",
939
+ properties: {
940
+ colorKey: {
941
+ type: "string",
942
+ description: 'The color key to set (e.g., "primary", "secondary", "accent", "background")'
943
+ },
944
+ colorValue: {
945
+ type: "string",
946
+ description: 'The color value in hex format (e.g., "#ff5500")'
947
+ }
948
+ },
949
+ required: ["colorKey", "colorValue"]
950
+ },
951
+ outputs: {
952
+ type: "object",
953
+ properties: {
954
+ success: { type: "boolean" },
955
+ colorKey: { type: "string" },
956
+ colorValue: { type: "string" }
957
+ }
958
+ },
959
+ tags: ["theme", "color", "customization"],
960
+ tool_call_template: {
961
+ call_template_type: "panel_event",
962
+ event_type: "industry-theme.theme-editor:set-color"
963
+ }
964
+ };
965
+ const resetThemeTool = {
966
+ name: "reset_theme",
967
+ description: "Resets the theme to default Industry theme colors",
968
+ inputs: {
969
+ type: "object",
970
+ properties: {
971
+ confirmReset: {
972
+ type: "boolean",
973
+ description: "Confirm the reset action"
974
+ }
975
+ }
976
+ },
977
+ outputs: {
978
+ type: "object",
979
+ properties: {
980
+ success: { type: "boolean" },
981
+ message: { type: "string" }
982
+ }
983
+ },
984
+ tags: ["theme", "reset", "default"],
985
+ tool_call_template: {
986
+ call_template_type: "panel_event",
987
+ event_type: "industry-theme.theme-editor:reset-theme"
988
+ }
989
+ };
990
+ const applyThemePresetTool = {
991
+ name: "apply_theme_preset",
992
+ description: "Applies a predefined theme preset",
993
+ inputs: {
994
+ type: "object",
995
+ properties: {
996
+ presetName: {
997
+ type: "string",
998
+ description: 'The name of the preset to apply (e.g., "dark", "light", "high-contrast")'
999
+ }
1000
+ },
1001
+ required: ["presetName"]
1002
+ },
1003
+ outputs: {
1004
+ type: "object",
1005
+ properties: {
1006
+ success: { type: "boolean" },
1007
+ appliedPreset: { type: "string" }
1008
+ }
1009
+ },
1010
+ tags: ["theme", "preset", "customization"],
1011
+ tool_call_template: {
1012
+ call_template_type: "panel_event",
1013
+ event_type: "industry-theme.theme-editor:apply-preset"
1014
+ }
1015
+ };
1016
+ const exportThemeTool = {
1017
+ name: "export_theme",
1018
+ description: "Exports the current theme configuration",
1019
+ inputs: {
1020
+ type: "object",
1021
+ properties: {
1022
+ format: {
1023
+ type: "string",
1024
+ enum: ["json", "css", "scss"],
1025
+ description: "The export format"
1026
+ }
1027
+ }
1028
+ },
1029
+ outputs: {
1030
+ type: "object",
1031
+ properties: {
1032
+ success: { type: "boolean" },
1033
+ format: { type: "string" },
1034
+ content: { type: "string" }
1035
+ }
1036
+ },
1037
+ tags: ["theme", "export", "configuration"],
1038
+ tool_call_template: {
1039
+ call_template_type: "panel_event",
1040
+ event_type: "industry-theme.theme-editor:export-theme"
1041
+ }
1042
+ };
1043
+ const themeEditorTools = [
1044
+ setThemeColorTool,
1045
+ resetThemeTool,
1046
+ applyThemePresetTool,
1047
+ exportThemeTool
1048
+ ];
1049
+ const themeEditorToolsMetadata = {
1050
+ id: "industry-theme.theme-editor",
1051
+ name: "Theme Editor",
1052
+ description: "Tools provided by the Industry Theme Editor panel extension",
1053
+ tools: themeEditorTools
1054
+ };
934
1055
  const panels = [
935
1056
  {
936
1057
  metadata: {
@@ -940,8 +1061,9 @@ const panels = [
940
1061
  version: "0.1.0",
941
1062
  author: "Principal ADE",
942
1063
  description: "Customize Industry theme colors and appearance",
943
- slices: []
1064
+ slices: [],
944
1065
  // This panel doesn't need data slices
1066
+ tools: themeEditorTools
945
1067
  },
946
1068
  component: ThemeEditorPanel,
947
1069
  // Optional: Called when this specific panel is mounted
@@ -959,14 +1081,20 @@ const panels = [
959
1081
  }
960
1082
  ];
961
1083
  const onPackageLoad = async () => {
962
- console.log("Panel package loaded - Example Panel Extension");
1084
+ console.log("Panel package loaded - Theme Editor Panel Extension");
963
1085
  };
964
1086
  const onPackageUnload = async () => {
965
- console.log("Panel package unloading - Example Panel Extension");
1087
+ console.log("Panel package unloading - Theme Editor Panel Extension");
966
1088
  };
967
1089
  export {
1090
+ applyThemePresetTool,
1091
+ exportThemeTool,
968
1092
  onPackageLoad,
969
1093
  onPackageUnload,
970
- panels
1094
+ panels,
1095
+ resetThemeTool,
1096
+ setThemeColorTool,
1097
+ themeEditorTools,
1098
+ themeEditorToolsMetadata
971
1099
  };
972
1100
  //# sourceMappingURL=panels.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"panels.bundle.js","sources":["../node_modules/@principal-ade/industry-theme/dist/esm/index.js","../node_modules/lucide-react/dist/esm/shared/src/utils.js","../node_modules/lucide-react/dist/esm/defaultAttributes.js","../node_modules/lucide-react/dist/esm/Icon.js","../node_modules/lucide-react/dist/esm/createLucideIcon.js","../node_modules/lucide-react/dist/esm/icons/circle-question-mark.js","../node_modules/lucide-react/dist/esm/icons/palette.js","../node_modules/lucide-react/dist/esm/icons/rotate-ccw.js","../node_modules/react-colorful/dist/index.mjs","../src/components/ColorPickerInput.tsx","../src/panels/ThemeEditorPanel.tsx","../src/index.tsx"],"sourcesContent":["// src/glassmorphismTheme.ts\nvar glassmorphismTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n heading: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.6,\n heading: 1.3,\n tight: 1.4,\n relaxed: 1.8\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 8, 12, 16, 20, 24, 32, 40],\n shadows: [\n \"none\",\n \"0 8px 32px 0 rgba(31, 38, 135, 0.15)\",\n \"0 12px 40px 0 rgba(31, 38, 135, 0.2)\",\n \"0 16px 48px 0 rgba(31, 38, 135, 0.25)\",\n \"0 20px 56px 0 rgba(31, 38, 135, 0.3)\",\n \"0 24px 64px 0 rgba(31, 38, 135, 0.35)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"rgba(255, 255, 255, 0.95)\",\n background: \"rgba(255, 255, 255, 0.1)\",\n primary: \"rgba(99, 102, 241, 0.9)\",\n secondary: \"rgba(139, 92, 246, 0.9)\",\n accent: \"rgba(236, 72, 153, 0.9)\",\n highlight: \"rgba(99, 102, 241, 0.2)\",\n muted: \"rgba(255, 255, 255, 0.05)\",\n success: \"rgba(34, 197, 94, 0.9)\",\n warning: \"rgba(251, 146, 60, 0.9)\",\n error: \"rgba(239, 68, 68, 0.9)\",\n info: \"rgba(59, 130, 246, 0.9)\",\n border: \"rgba(255, 255, 255, 0.18)\",\n backgroundSecondary: \"rgba(255, 255, 255, 0.15)\",\n backgroundTertiary: \"rgba(255, 255, 255, 0.2)\",\n backgroundLight: \"rgba(255, 255, 255, 0.08)\",\n backgroundHover: \"rgba(255, 255, 255, 0.25)\",\n surface: \"rgba(255, 255, 255, 0.12)\",\n textSecondary: \"rgba(255, 255, 255, 0.8)\",\n textTertiary: \"rgba(255, 255, 255, 0.6)\",\n textMuted: \"rgba(255, 255, 255, 0.5)\",\n highlightBg: \"rgba(251, 191, 36, 0.3)\",\n highlightBorder: \"rgba(251, 191, 36, 0.5)\"\n },\n modes: {\n dark: {\n text: \"rgba(255, 255, 255, 0.95)\",\n background: \"rgba(0, 0, 0, 0.3)\",\n primary: \"rgba(129, 140, 248, 0.9)\",\n secondary: \"rgba(167, 139, 250, 0.9)\",\n accent: \"rgba(244, 114, 182, 0.9)\",\n highlight: \"rgba(129, 140, 248, 0.25)\",\n muted: \"rgba(0, 0, 0, 0.15)\",\n success: \"rgba(74, 222, 128, 0.9)\",\n warning: \"rgba(251, 191, 36, 0.9)\",\n error: \"rgba(248, 113, 113, 0.9)\",\n info: \"rgba(96, 165, 250, 0.9)\",\n border: \"rgba(255, 255, 255, 0.15)\",\n backgroundSecondary: \"rgba(0, 0, 0, 0.4)\",\n backgroundTertiary: \"rgba(0, 0, 0, 0.5)\",\n backgroundLight: \"rgba(0, 0, 0, 0.2)\",\n backgroundHover: \"rgba(255, 255, 255, 0.1)\",\n surface: \"rgba(0, 0, 0, 0.35)\",\n textSecondary: \"rgba(255, 255, 255, 0.8)\",\n textTertiary: \"rgba(255, 255, 255, 0.6)\",\n textMuted: \"rgba(255, 255, 255, 0.4)\",\n highlightBg: \"rgba(251, 191, 36, 0.35)\",\n highlightBorder: \"rgba(251, 191, 36, 0.6)\"\n },\n frosted: {\n text: \"rgba(31, 41, 55, 0.95)\",\n background: \"rgba(255, 255, 255, 0.3)\",\n primary: \"rgba(79, 70, 229, 0.95)\",\n secondary: \"rgba(124, 58, 237, 0.95)\",\n accent: \"rgba(219, 39, 119, 0.95)\",\n highlight: \"rgba(79, 70, 229, 0.15)\",\n muted: \"rgba(255, 255, 255, 0.4)\",\n success: \"rgba(16, 185, 129, 0.95)\",\n warning: \"rgba(245, 158, 11, 0.95)\",\n error: \"rgba(220, 38, 38, 0.95)\",\n info: \"rgba(37, 99, 235, 0.95)\",\n border: \"rgba(255, 255, 255, 0.5)\",\n backgroundSecondary: \"rgba(255, 255, 255, 0.4)\",\n backgroundTertiary: \"rgba(255, 255, 255, 0.5)\",\n backgroundLight: \"rgba(255, 255, 255, 0.25)\",\n backgroundHover: \"rgba(255, 255, 255, 0.6)\",\n surface: \"rgba(255, 255, 255, 0.35)\",\n textSecondary: \"rgba(31, 41, 55, 0.8)\",\n textTertiary: \"rgba(31, 41, 55, 0.6)\",\n textMuted: \"rgba(31, 41, 55, 0.5)\",\n highlightBg: \"rgba(251, 191, 36, 0.4)\",\n highlightBorder: \"rgba(251, 191, 36, 0.7)\"\n }\n },\n buttons: {\n primary: {\n color: \"white\",\n bg: \"primary\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"rgba(255, 255, 255, 0.2)\",\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"text\",\n bg: \"rgba(255, 255, 255, 0.1)\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"rgba(255, 255, 255, 0.2)\",\n \"&:hover\": {\n bg: \"rgba(255, 255, 255, 0.2)\"\n }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"transparent\",\n \"&:hover\": {\n borderColor: \"rgba(255, 255, 255, 0.2)\",\n bg: \"rgba(255, 255, 255, 0.05)\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 3\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 3\n }\n }\n};\n// src/defaultThemes.ts\nvar defaultMarkdownTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n heading: '\"Crimson Text\", \"Georgia\", \"Times New Roman\", serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.6,\n heading: 1.3,\n tight: 1.25,\n relaxed: 1.75\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)\",\n \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\",\n \"0 25px 50px -12px rgba(0, 0, 0, 0.25)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#1a1a1a\",\n background: \"#ffffff\",\n primary: \"#007acc\",\n secondary: \"#005a9e\",\n accent: \"#1a1a1a\",\n highlight: \"rgba(0, 122, 204, 0.1)\",\n muted: \"#f0f0f0\",\n success: \"#28a745\",\n warning: \"#ffc107\",\n error: \"#dc3545\",\n info: \"#17a2b8\",\n border: \"rgba(0, 0, 0, 0.1)\",\n backgroundSecondary: \"#f8f9fa\",\n backgroundTertiary: \"#e9ecef\",\n backgroundLight: \"rgba(0, 0, 0, 0.03)\",\n backgroundHover: \"rgba(0, 0, 0, 0.05)\",\n surface: \"#ffffff\",\n textSecondary: \"#555555\",\n textTertiary: \"#888888\",\n textMuted: \"#aaaaaa\",\n highlightBg: \"rgba(255, 235, 59, 0.3)\",\n highlightBorder: \"rgba(255, 235, 59, 0.6)\"\n },\n buttons: {\n primary: {\n color: \"white\",\n bg: \"primary\",\n \"&:hover\": { bg: \"secondary\" }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": { bg: \"highlight\" }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": { bg: \"backgroundHover\" }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 2\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 2\n }\n }\n};\nvar defaultTerminalTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Courier New\", Courier, monospace',\n heading: '\"Courier New\", Courier, monospace',\n monospace: '\"Courier New\", Courier, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 500,\n bold: 600,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.4,\n heading: 1.2,\n tight: 1.3,\n relaxed: 1.6\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 0 5px rgba(255, 193, 7, 0.1)\",\n \"0 0 10px rgba(255, 193, 7, 0.15)\",\n \"0 0 15px rgba(255, 193, 7, 0.2)\",\n \"0 0 20px rgba(255, 193, 7, 0.25)\",\n \"0 0 30px rgba(255, 193, 7, 0.3)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#ffc107\",\n background: \"#000000\",\n primary: \"#ffc107\",\n secondary: \"#ffb300\",\n accent: \"#ffffff\",\n highlight: \"rgba(255, 193, 7, 0.1)\",\n muted: \"#1a1a1a\",\n success: \"#4caf50\",\n warning: \"#ff9800\",\n error: \"#f44336\",\n info: \"#2196f3\",\n border: \"rgba(255, 193, 7, 0.2)\",\n backgroundSecondary: \"#0a0a0a\",\n backgroundTertiary: \"#111111\",\n backgroundLight: \"rgba(255, 193, 7, 0.03)\",\n backgroundHover: \"rgba(255, 193, 7, 0.05)\",\n surface: \"#050505\",\n textSecondary: \"#e0e0e0\",\n textTertiary: \"#b0b0b0\",\n textMuted: \"#808080\",\n highlightBg: \"rgba(255, 193, 7, 0.2)\",\n highlightBorder: \"rgba(255, 193, 7, 0.4)\"\n },\n buttons: {\n primary: {\n color: \"black\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": { bg: \"secondary\" }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": { bg: \"highlight\" }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": { bg: \"backgroundHover\" }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n }\n }\n};\nvar defaultEditorTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace',\n heading: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.5,\n heading: 1.2,\n tight: 1.3,\n relaxed: 1.7\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 2px rgba(0, 0, 0, 0.05)\",\n \"0 2px 4px rgba(0, 0, 0, 0.1)\",\n \"0 4px 8px rgba(0, 0, 0, 0.15)\",\n \"0 8px 16px rgba(0, 0, 0, 0.2)\",\n \"0 12px 24px rgba(0, 0, 0, 0.25)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#d4d4d4\",\n background: \"#1e1e1e\",\n primary: \"#569cd6\",\n secondary: \"#408ac9\",\n accent: \"#c586c0\",\n highlight: \"rgba(86, 156, 214, 0.1)\",\n muted: \"#2a2a2a\",\n success: \"#6a9955\",\n warning: \"#d18616\",\n error: \"#f44747\",\n info: \"#569cd6\",\n border: \"rgba(255, 255, 255, 0.1)\",\n backgroundSecondary: \"#252526\",\n backgroundTertiary: \"#333333\",\n backgroundLight: \"rgba(255, 255, 255, 0.03)\",\n backgroundHover: \"rgba(255, 255, 255, 0.05)\",\n surface: \"#252526\",\n textSecondary: \"#cccccc\",\n textTertiary: \"#999999\",\n textMuted: \"#666666\",\n highlightBg: \"rgba(255, 235, 59, 0.2)\",\n highlightBorder: \"rgba(255, 235, 59, 0.4)\"\n },\n buttons: {\n primary: {\n color: \"white\",\n bg: \"primary\",\n \"&:hover\": { bg: \"secondary\" }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": { bg: \"highlight\" }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": { bg: \"backgroundHover\" }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 1\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 1\n }\n }\n};\n\n// src/themes.ts\nvar regalTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n heading: '\"Crimson Text\", \"Georgia\", \"Times New Roman\", serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.5,\n heading: 1.2,\n tight: 1.25,\n relaxed: 1.75\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)\",\n \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\",\n \"0 25px 50px -12px rgba(0, 0, 0, 0.25)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#f1e8dc\",\n background: \"#1a1f2e\",\n primary: \"#d4a574\",\n secondary: \"#e0b584\",\n accent: \"#c9b8a3\",\n highlight: \"rgba(212, 165, 116, 0.15)\",\n muted: \"#8b7968\",\n success: \"#5c8a72\",\n warning: \"#d4a574\",\n error: \"#a85751\",\n info: \"#d4a574\",\n border: \"rgba(212, 165, 116, 0.2)\",\n backgroundSecondary: \"#212738\",\n backgroundTertiary: \"#2d3446\",\n backgroundLight: \"rgba(212, 165, 116, 0.08)\",\n backgroundHover: \"rgba(212, 165, 116, 0.15)\",\n surface: \"#212738\",\n textSecondary: \"#c9b8a3\",\n textTertiary: \"#8b7968\",\n textMuted: \"#8b7968\",\n highlightBg: \"rgba(255, 193, 7, 0.25)\",\n highlightBorder: \"rgba(255, 193, 7, 0.5)\"\n },\n buttons: {\n primary: {\n color: \"background\",\n bg: \"primary\",\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"text\",\n bg: \"muted\",\n \"&:hover\": {\n bg: \"backgroundSecondary\"\n }\n },\n ghost: {\n color: \"primary\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"muted\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"background\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 2\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 2\n }\n }\n};\nvar terminalTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"SF Mono\", \"Monaco\", \"Inconsolata\", \"Fira Code\", monospace',\n heading: '\"SF Mono\", \"Monaco\", \"Inconsolata\", \"Fira Code\", monospace',\n monospace: '\"SF Mono\", \"Monaco\", \"Inconsolata\", \"Fira Code\", monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 500,\n bold: 600,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.6,\n heading: 1.3,\n tight: 1.4,\n relaxed: 1.8\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n \"0 2px 4px 0 rgba(0, 0, 0, 0.06)\",\n \"0 4px 6px 0 rgba(0, 0, 0, 0.07)\",\n \"0 8px 12px 0 rgba(0, 0, 0, 0.08)\",\n \"0 16px 24px 0 rgba(0, 0, 0, 0.10)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#e4e4e4\",\n background: \"rgba(10, 10, 10, 0.85)\",\n primary: \"#66b3ff\",\n secondary: \"#80c4ff\",\n accent: \"#66ff99\",\n highlight: \"rgba(102, 179, 255, 0.15)\",\n muted: \"rgba(26, 26, 26, 0.8)\",\n success: \"#66ff99\",\n warning: \"#ffcc66\",\n error: \"#ff6666\",\n info: \"#66b3ff\",\n border: \"rgba(255, 255, 255, 0.1)\",\n backgroundSecondary: \"rgba(15, 15, 15, 0.9)\",\n backgroundTertiary: \"rgba(20, 20, 20, 0.9)\",\n backgroundLight: \"rgba(255, 255, 255, 0.05)\",\n backgroundHover: \"rgba(102, 179, 255, 0.08)\",\n surface: \"rgba(15, 15, 15, 0.95)\",\n textSecondary: \"rgba(255, 255, 255, 0.7)\",\n textTertiary: \"rgba(255, 255, 255, 0.5)\",\n textMuted: \"rgba(255, 255, 255, 0.4)\",\n highlightBg: \"rgba(255, 235, 59, 0.25)\",\n highlightBorder: \"rgba(255, 235, 59, 0.5)\"\n },\n modes: {\n light: {\n text: \"#1a1a1a\",\n background: \"rgba(255, 255, 255, 0.9)\",\n primary: \"#0066cc\",\n secondary: \"#0052a3\",\n accent: \"#00cc88\",\n highlight: \"rgba(0, 102, 204, 0.08)\",\n muted: \"rgba(245, 245, 245, 0.8)\",\n success: \"#00cc88\",\n warning: \"#ffaa00\",\n error: \"#ff3333\",\n info: \"#0066cc\",\n border: \"rgba(0, 0, 0, 0.1)\",\n backgroundSecondary: \"rgba(250, 250, 250, 0.9)\",\n backgroundTertiary: \"rgba(245, 245, 245, 0.9)\",\n backgroundLight: \"rgba(0, 0, 0, 0.02)\",\n backgroundHover: \"rgba(0, 102, 204, 0.04)\",\n surface: \"rgba(255, 255, 255, 0.95)\",\n textSecondary: \"rgba(0, 0, 0, 0.6)\",\n textTertiary: \"rgba(0, 0, 0, 0.4)\",\n textMuted: \"rgba(0, 0, 0, 0.3)\",\n highlightBg: \"rgba(255, 235, 59, 0.3)\",\n highlightBorder: \"rgba(255, 235, 59, 0.6)\"\n }\n },\n buttons: {\n primary: {\n color: \"white\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": {\n bg: \"highlight\"\n }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 1\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 1\n }\n }\n};\nvar matrixTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace',\n heading: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace',\n monospace: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 500,\n bold: 600,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.5,\n heading: 1.2,\n tight: 1.3,\n relaxed: 1.7\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 0 5px rgba(0, 216, 53, 0.15)\",\n \"0 0 10px rgba(0, 216, 53, 0.2)\",\n \"0 0 15px rgba(0, 216, 53, 0.25)\",\n \"0 0 20px rgba(0, 216, 53, 0.3)\",\n \"0 0 30px rgba(0, 216, 53, 0.4)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#a8a8a8\",\n background: \"#000000\",\n primary: \"#00d835\",\n secondary: \"#00a828\",\n accent: \"#00d835\",\n highlight: \"rgba(0, 216, 53, 0.15)\",\n muted: \"#0a0a0a\",\n success: \"#00d835\",\n warning: \"#d4a000\",\n error: \"#d63333\",\n info: \"#00a8d6\",\n border: \"rgba(0, 216, 53, 0.2)\",\n backgroundSecondary: \"#0a0a0a\",\n backgroundTertiary: \"#111111\",\n backgroundLight: \"rgba(0, 216, 53, 0.03)\",\n backgroundHover: \"rgba(0, 216, 53, 0.08)\",\n surface: \"#050505\",\n textSecondary: \"#808080\",\n textTertiary: \"#606060\",\n textMuted: \"#484848\",\n highlightBg: \"rgba(0, 216, 53, 0.25)\",\n highlightBorder: \"rgba(0, 216, 53, 0.5)\"\n },\n buttons: {\n primary: {\n color: \"black\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": {\n bg: \"highlight\"\n }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n }\n }\n};\nvar matrixMinimalTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace',\n heading: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace',\n monospace: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 500,\n bold: 600,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.5,\n heading: 1.2,\n tight: 1.3,\n relaxed: 1.7\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 2px rgba(0, 0, 0, 0.05)\",\n \"0 2px 4px rgba(0, 0, 0, 0.1)\",\n \"0 4px 8px rgba(0, 0, 0, 0.15)\",\n \"0 8px 16px rgba(0, 0, 0, 0.2)\",\n \"0 0 20px rgba(0, 216, 53, 0.1)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#a8a8a8\",\n background: \"#000000\",\n primary: \"#b8b8b8\",\n secondary: \"#909090\",\n accent: \"#00d835\",\n highlight: \"rgba(0, 216, 53, 0.1)\",\n muted: \"#0a0a0a\",\n success: \"#00d835\",\n warning: \"#d4a000\",\n error: \"#d63333\",\n info: \"#00a8d6\",\n border: \"rgba(184, 184, 184, 0.1)\",\n backgroundSecondary: \"#0a0a0a\",\n backgroundTertiary: \"#111111\",\n backgroundLight: \"rgba(184, 184, 184, 0.02)\",\n backgroundHover: \"rgba(0, 216, 53, 0.05)\",\n surface: \"#050505\",\n textSecondary: \"#808080\",\n textTertiary: \"#606060\",\n textMuted: \"#484848\",\n highlightBg: \"rgba(0, 216, 53, 0.2)\",\n highlightBorder: \"rgba(0, 216, 53, 0.4)\"\n },\n buttons: {\n primary: {\n color: \"black\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n }\n }\n};\nvar slateTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n heading: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.6,\n heading: 1.3,\n tight: 1.25,\n relaxed: 1.75\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 3px 0 rgba(0, 0, 0, 0.2)\",\n \"0 4px 6px -1px rgba(0, 0, 0, 0.2)\",\n \"0 10px 15px -3px rgba(0, 0, 0, 0.2)\",\n \"0 20px 25px -5px rgba(0, 0, 0, 0.25)\",\n \"0 25px 50px -12px rgba(0, 0, 0, 0.3)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#9ca3af\",\n background: \"#1a1c1e\",\n primary: \"#d1d5db\",\n secondary: \"#6b7280\",\n accent: \"#f59e0b\",\n highlight: \"rgba(209, 213, 219, 0.15)\",\n muted: \"#2d3134\",\n success: \"#10b981\",\n warning: \"#f59e0b\",\n error: \"#ef4444\",\n info: \"#3b82f6\",\n border: \"rgba(156, 163, 175, 0.15)\",\n backgroundSecondary: \"#22252a\",\n backgroundTertiary: \"#2d3134\",\n backgroundLight: \"rgba(156, 163, 175, 0.05)\",\n backgroundHover: \"rgba(156, 163, 175, 0.1)\",\n surface: \"#1f2124\",\n textSecondary: \"#e5e7eb\",\n textTertiary: \"#6b7280\",\n textMuted: \"#4b5563\",\n highlightBg: \"rgba(245, 158, 11, 0.25)\",\n highlightBorder: \"rgba(245, 158, 11, 0.5)\"\n },\n buttons: {\n primary: {\n color: \"#1a1c1e\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"#9ca3af\"\n }\n },\n secondary: {\n color: \"#e5e7eb\",\n bg: \"secondary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"#4b5563\"\n }\n },\n ghost: {\n color: \"textSecondary\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\",\n color: \"textSecondary\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textTertiary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 3\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 3\n }\n }\n};\n// src/ThemeProvider.tsx\nimport React, { createContext, useContext, useState, useEffect } from \"react\";\n\n// src/themeHelpers.ts\nfunction overrideColors(theme, colors) {\n return {\n ...theme,\n colors: {\n ...theme.colors,\n ...colors\n }\n };\n}\nfunction makeTheme(baseTheme, overrides) {\n return {\n ...baseTheme,\n ...overrides,\n colors: {\n ...baseTheme.colors,\n ...overrides.colors\n },\n fonts: {\n ...baseTheme.fonts,\n ...overrides.fonts\n }\n };\n}\nfunction addMode(theme, modeName, colors, baseMode) {\n let baseColors;\n if (baseMode && theme.modes && theme.modes[baseMode]) {\n baseColors = {\n ...theme.colors,\n ...theme.modes[baseMode]\n };\n } else {\n baseColors = theme.colors;\n }\n const newMode = {\n ...baseColors,\n ...colors\n };\n return {\n ...theme,\n modes: {\n ...theme.modes,\n [modeName]: newMode\n }\n };\n}\nfunction getMode(theme, mode) {\n if (!mode || !theme.modes || !theme.modes[mode]) {\n return theme.colors;\n }\n return {\n ...theme.colors,\n ...theme.modes[mode]\n };\n}\n\n// src/ThemeProvider.tsx\nvar ThemeContext;\nvar getThemeContext = () => {\n if (typeof window !== \"undefined\") {\n const globalWindow = window;\n if (!globalWindow.__principlemd_theme_context__) {\n globalWindow.__principlemd_theme_context__ = createContext(undefined);\n }\n return globalWindow.__principlemd_theme_context__;\n } else {\n if (!ThemeContext) {\n ThemeContext = createContext(undefined);\n }\n return ThemeContext;\n }\n};\nvar ThemeContextSingleton = getThemeContext();\nvar useTheme = () => {\n const context = useContext(ThemeContextSingleton);\n if (!context) {\n throw new Error(\"useTheme must be used within a ThemeProvider\");\n }\n return context;\n};\nvar ThemeProvider = ({\n children,\n theme: customTheme = theme,\n initialMode\n}) => {\n const [mode, setMode] = useState(initialMode);\n const activeTheme = React.useMemo(() => {\n if (!mode || !customTheme.modes || !customTheme.modes[mode]) {\n return customTheme;\n }\n return {\n ...customTheme,\n colors: getMode(customTheme, mode)\n };\n }, [customTheme, mode]);\n useEffect(() => {\n if (!initialMode) {\n const savedMode = localStorage.getItem(\"principlemd-theme-mode\");\n if (savedMode) {\n setMode(savedMode);\n }\n }\n }, [initialMode]);\n useEffect(() => {\n if (mode) {\n localStorage.setItem(\"principlemd-theme-mode\", mode);\n } else {\n localStorage.removeItem(\"principlemd-theme-mode\");\n }\n }, [mode]);\n const value = {\n theme: activeTheme,\n mode,\n setMode\n };\n return /* @__PURE__ */ React.createElement(ThemeContextSingleton.Provider, {\n value\n }, children);\n};\nvar withTheme = (Component) => {\n return (props) => {\n const { theme: theme2 } = useTheme();\n return /* @__PURE__ */ React.createElement(Component, {\n ...props,\n theme: theme2\n });\n };\n};\n// src/utils.ts\nvar getColor = (theme2, colorKey) => {\n const colors = theme2.colors;\n const value = colors[colorKey];\n return typeof value === \"string\" ? value : colorKey;\n};\nvar getSpace = (theme2, index) => {\n return theme2.space[index] || 0;\n};\nvar getFontSize = (theme2, index) => {\n return theme2.fontSizes[index] || theme2.fontSizes[2];\n};\nvar getRadius = (theme2, index) => {\n return theme2.radii[index] || 0;\n};\nvar getShadow = (theme2, index) => {\n return theme2.shadows[index] || \"none\";\n};\nvar getZIndex = (theme2, index) => {\n return theme2.zIndices[index] || 0;\n};\nvar responsive = (values) => {\n return values.reduce((acc, value, index) => {\n if (index === 0) {\n return value;\n }\n return {\n ...acc,\n [`@media screen and (min-width: ${values[index - 1]})`]: value\n };\n }, {});\n};\nvar sx = (styles) => styles;\nvar createStyle = (theme2, styleObj) => {\n const processValue = (value) => {\n if (typeof value === \"string\") {\n if (value in theme2.colors) {\n return getColor(theme2, value);\n }\n return value;\n }\n if (typeof value === \"number\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(processValue);\n }\n if (typeof value === \"object\" && value !== null) {\n const processed2 = {};\n for (const [key, val] of Object.entries(value)) {\n processed2[key] = processValue(val);\n }\n return processed2;\n }\n return value;\n };\n const processed = {};\n for (const [key, val] of Object.entries(styleObj)) {\n processed[key] = processValue(val);\n }\n return processed;\n};\nvar mergeThemes = (baseTheme, ...overrides) => {\n return overrides.reduce((theme2, override) => ({\n space: override.space || theme2.space,\n fonts: { ...theme2.fonts, ...override.fonts || {} },\n fontSizes: override.fontSizes || theme2.fontSizes,\n fontWeights: { ...theme2.fontWeights, ...override.fontWeights || {} },\n lineHeights: { ...theme2.lineHeights, ...override.lineHeights || {} },\n breakpoints: override.breakpoints || theme2.breakpoints,\n sizes: override.sizes || theme2.sizes,\n radii: override.radii || theme2.radii,\n shadows: override.shadows || theme2.shadows,\n zIndices: override.zIndices || theme2.zIndices,\n colors: {\n ...theme2.colors,\n ...override.colors || {}\n },\n buttons: { ...theme2.buttons, ...override.buttons || {} },\n text: { ...theme2.text, ...override.text || {} },\n cards: { ...theme2.cards, ...override.cards || {} }\n }), baseTheme);\n};\n// src/ThemeShowcase.tsx\nimport React2 from \"react\";\nvar ThemeShowcase = ({\n theme: theme2,\n title,\n showValues = true,\n sections = [\"colors\", \"typography\", \"spacing\", \"shadows\", \"radii\"]\n}) => {\n const containerStyle = {\n fontFamily: theme2.fonts.body,\n color: theme2.colors.text,\n backgroundColor: theme2.colors.background,\n padding: theme2.space[4],\n minHeight: \"100vh\"\n };\n const sectionStyle = {\n marginBottom: theme2.space[5],\n padding: theme2.space[4],\n backgroundColor: theme2.colors.surface || theme2.colors.backgroundSecondary,\n borderRadius: theme2.radii[2],\n border: `1px solid ${theme2.colors.border}`\n };\n const headingStyle = {\n fontFamily: theme2.fonts.heading,\n fontSize: theme2.fontSizes[5],\n fontWeight: theme2.fontWeights.heading,\n marginBottom: theme2.space[3],\n color: theme2.colors.primary\n };\n const subheadingStyle = {\n fontFamily: theme2.fonts.heading,\n fontSize: theme2.fontSizes[3],\n fontWeight: theme2.fontWeights.medium,\n marginBottom: theme2.space[2],\n marginTop: theme2.space[3],\n color: theme2.colors.text\n };\n return /* @__PURE__ */ React2.createElement(\"div\", {\n style: containerStyle\n }, title && /* @__PURE__ */ React2.createElement(\"h1\", {\n style: {\n ...headingStyle,\n fontSize: theme2.fontSizes[6],\n marginBottom: theme2.space[4]\n }\n }, title), sections.includes(\"colors\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Colors\"), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Primary Colors\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(200px, 1fr))\",\n gap: theme2.space[3],\n marginBottom: theme2.space[3]\n }\n }, [\"text\", \"background\", \"primary\", \"secondary\", \"accent\", \"muted\"].map((key) => {\n const color = theme2.colors[key];\n if (!color)\n return null;\n return /* @__PURE__ */ React2.createElement(\"div\", {\n key,\n style: {\n display: \"flex\",\n alignItems: \"center\",\n padding: theme2.space[2],\n backgroundColor: theme2.colors.backgroundLight || theme2.colors.backgroundTertiary,\n borderRadius: theme2.radii[1]\n }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 40,\n height: 40,\n backgroundColor: color,\n border: `1px solid ${theme2.colors.border}`,\n borderRadius: theme2.radii[1],\n marginRight: theme2.space[2]\n }\n }), /* @__PURE__ */ React2.createElement(\"div\", null, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n fontWeight: theme2.fontWeights.medium\n }\n }, key), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary\n }\n }, color)));\n })), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Status Colors\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(200px, 1fr))\",\n gap: theme2.space[3],\n marginBottom: theme2.space[3]\n }\n }, [\"success\", \"warning\", \"error\", \"info\"].map((key) => {\n const color = theme2.colors[key];\n if (!color)\n return null;\n return /* @__PURE__ */ React2.createElement(\"div\", {\n key,\n style: {\n display: \"flex\",\n alignItems: \"center\",\n padding: theme2.space[2],\n backgroundColor: theme2.colors.backgroundLight || theme2.colors.backgroundTertiary,\n borderRadius: theme2.radii[1]\n }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 40,\n height: 40,\n backgroundColor: color,\n border: `1px solid ${theme2.colors.border}`,\n borderRadius: theme2.radii[1],\n marginRight: theme2.space[2]\n }\n }), /* @__PURE__ */ React2.createElement(\"div\", null, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n fontWeight: theme2.fontWeights.medium\n }\n }, key), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary\n }\n }, color)));\n })), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Background Colors\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(200px, 1fr))\",\n gap: theme2.space[3]\n }\n }, [\"backgroundSecondary\", \"backgroundTertiary\", \"backgroundLight\", \"backgroundHover\", \"surface\"].map((key) => {\n const color = theme2.colors[key];\n if (!color)\n return null;\n return /* @__PURE__ */ React2.createElement(\"div\", {\n key,\n style: {\n padding: theme2.space[3],\n backgroundColor: color,\n border: `1px solid ${theme2.colors.border}`,\n borderRadius: theme2.radii[1]\n }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n fontWeight: theme2.fontWeights.medium\n }\n }, key), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary,\n marginTop: theme2.space[1]\n }\n }, color));\n }))), sections.includes(\"typography\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Typography\"), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Font Families\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: { marginBottom: theme2.space[4] }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.heading,\n fontSize: theme2.fontSizes[4],\n marginBottom: theme2.space[2]\n }\n }, \"Heading Font: \", showValues && /* @__PURE__ */ React2.createElement(\"span\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, \" \", theme2.fonts.heading)), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.body,\n fontSize: theme2.fontSizes[2],\n marginBottom: theme2.space[2]\n }\n }, \"Body Font: \", showValues && /* @__PURE__ */ React2.createElement(\"span\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, \" \", theme2.fonts.body)), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[2]\n }\n }, \"Monospace Font: \", showValues && /* @__PURE__ */ React2.createElement(\"span\", {\n style: {\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, \" \", theme2.fonts.monospace))), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Font Sizes\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: { marginBottom: theme2.space[4] }\n }, theme2.fontSizes.map((size, index) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: index,\n style: {\n fontSize: size,\n lineHeight: theme2.lineHeights.body,\n marginBottom: theme2.space[1]\n }\n }, \"Size \", index, \": Sample Text \", showValues && `(${size}px)`))), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Font Weights\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fit, minmax(150px, 1fr))\",\n gap: theme2.space[2]\n }\n }, Object.entries(theme2.fontWeights).map(([name, weight]) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: name,\n style: {\n fontWeight: weight,\n fontSize: theme2.fontSizes[2]\n }\n }, name, \" \", showValues && `(${weight})`)))), sections.includes(\"spacing\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Spacing\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: { display: \"flex\", flexDirection: \"column\", gap: theme2.space[2] }\n }, theme2.space.map((space, index) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: index,\n style: { display: \"flex\", alignItems: \"center\" }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 60,\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, \"[\", index, \"]\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n height: 24,\n width: space,\n backgroundColor: theme2.colors.primary,\n borderRadius: theme2.radii[1]\n }\n }), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n marginLeft: theme2.space[2],\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, space, \"px\"))))), sections.includes(\"radii\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Border Radii\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(100px, 1fr))\",\n gap: theme2.space[3]\n }\n }, theme2.radii.map((radius, index) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: index,\n style: { textAlign: \"center\" }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 80,\n height: 80,\n backgroundColor: theme2.colors.primary,\n borderRadius: radius,\n marginBottom: theme2.space[1],\n margin: \"0 auto\"\n }\n }), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary\n }\n }, \"[\", index, \"] \", showValues && `${radius}px`))))), sections.includes(\"shadows\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Shadows\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(150px, 1fr))\",\n gap: theme2.space[4]\n }\n }, theme2.shadows.map((shadow, index) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: index,\n style: { textAlign: \"center\" }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 100,\n height: 100,\n backgroundColor: theme2.colors.background,\n boxShadow: shadow,\n borderRadius: theme2.radii[2],\n margin: \"0 auto\",\n marginBottom: theme2.space[2],\n border: `1px solid ${theme2.colors.border}`\n }\n }), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary\n }\n }, \"Shadow [\", index, \"]\"), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textMuted,\n marginTop: theme2.space[1]\n }\n }, shadow === \"none\" ? \"none\" : \"...\"))))), theme2.modes && Object.keys(theme2.modes).length > 0 && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Available Modes\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"flex\",\n gap: theme2.space[2],\n flexWrap: \"wrap\"\n }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n padding: `${theme2.space[2]}px ${theme2.space[3]}px`,\n backgroundColor: theme2.colors.primary,\n color: \"#ffffff\",\n borderRadius: theme2.radii[2],\n fontFamily: theme2.fonts.body,\n fontSize: theme2.fontSizes[1]\n }\n }, \"default\"), Object.keys(theme2.modes).map((modeName) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: modeName,\n style: {\n padding: `${theme2.space[2]}px ${theme2.space[3]}px`,\n backgroundColor: theme2.colors.secondary,\n color: theme2.colors.text,\n borderRadius: theme2.radii[2],\n fontFamily: theme2.fonts.body,\n fontSize: theme2.fontSizes[1]\n }\n }, modeName)))));\n};\n\n// src/index.ts\nvar theme = terminalTheme;\nfunction scaleThemeFonts(theme2, scale) {\n const currentScale = theme2.fontScale || 1;\n const effectiveScale = scale / currentScale;\n return {\n ...theme2,\n fontSizes: theme2.fontSizes.map((size) => Math.round(size * effectiveScale)),\n fontScale: scale\n };\n}\nfunction increaseFontScale(theme2) {\n const currentScale = theme2.fontScale || 1;\n const newScale = Math.min(currentScale * 1.1, 2);\n return scaleThemeFonts(theme2, newScale);\n}\nfunction decreaseFontScale(theme2) {\n const currentScale = theme2.fontScale || 1;\n const newScale = Math.max(currentScale * 0.9, 0.5);\n return scaleThemeFonts(theme2, newScale);\n}\nfunction resetFontScale(theme2) {\n return scaleThemeFonts(theme2, 1);\n}\nvar src_default = theme;\nexport {\n withTheme,\n useTheme,\n theme,\n terminalTheme,\n sx,\n slateTheme,\n scaleThemeFonts,\n responsive,\n resetFontScale,\n regalTheme,\n overrideColors,\n mergeThemes,\n matrixTheme,\n matrixMinimalTheme,\n makeTheme,\n increaseFontScale,\n glassmorphismTheme,\n getZIndex,\n getSpace,\n getShadow,\n getRadius,\n getMode,\n getFontSize,\n getColor,\n defaultTerminalTheme,\n defaultMarkdownTheme,\n defaultEditorTheme,\n src_default as default,\n decreaseFontScale,\n createStyle,\n addMode,\n ThemeShowcase,\n ThemeProvider\n};\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n};\n\nexport { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\", key: \"1u773s\" }],\n [\"path\", { d: \"M12 17h.01\", key: \"p32p05\" }]\n];\nconst CircleQuestionMark = createLucideIcon(\"circle-question-mark\", __iconNode);\n\nexport { __iconNode, CircleQuestionMark as default };\n//# sourceMappingURL=circle-question-mark.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z\",\n key: \"e79jfc\"\n }\n ],\n [\"circle\", { cx: \"13.5\", cy: \"6.5\", r: \".5\", fill: \"currentColor\", key: \"1okk4w\" }],\n [\"circle\", { cx: \"17.5\", cy: \"10.5\", r: \".5\", fill: \"currentColor\", key: \"f64h9f\" }],\n [\"circle\", { cx: \"6.5\", cy: \"12.5\", r: \".5\", fill: \"currentColor\", key: \"qy21gx\" }],\n [\"circle\", { cx: \"8.5\", cy: \"7.5\", r: \".5\", fill: \"currentColor\", key: \"fotxhn\" }]\n];\nconst Palette = createLucideIcon(\"palette\", __iconNode);\n\nexport { __iconNode, Palette as default };\n//# sourceMappingURL=palette.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\", key: \"1357e3\" }],\n [\"path\", { d: \"M3 3v5h5\", key: \"1xhq8a\" }]\n];\nconst RotateCcw = createLucideIcon(\"rotate-ccw\", __iconNode);\n\nexport { __iconNode, RotateCcw as default };\n//# sourceMappingURL=rotate-ccw.js.map\n","import e,{useRef as r,useMemo as t,useEffect as n,useState as o,useCallback as a,useLayoutEffect as l}from\"react\";function u(){return(u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function c(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r.indexOf(t=a[n])>=0||(o[t]=e[t]);return o}function i(e){var t=r(e),n=r(function(e){t.current&&t.current(e)});return t.current=e,n.current}var s=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e<r?r:e},f=function(e){return\"touches\"in e},v=function(e){return e&&e.ownerDocument.defaultView||self},d=function(e,r,t){var n=e.getBoundingClientRect(),o=f(r)?function(e,r){for(var t=0;t<e.length;t++)if(e[t].identifier===r)return e[t];return e[0]}(r.touches,t):r;return{left:s((o.pageX-(n.left+v(e).pageXOffset))/n.width),top:s((o.pageY-(n.top+v(e).pageYOffset))/n.height)}},h=function(e){!f(e)&&e.preventDefault()},m=e.memo(function(o){var a=o.onMove,l=o.onKey,s=c(o,[\"onMove\",\"onKey\"]),m=r(null),g=i(a),p=i(l),b=r(null),_=r(!1),x=t(function(){var e=function(e){h(e),(f(e)?e.touches.length>0:e.buttons>0)&&m.current?g(d(m.current,e,b.current)):t(!1)},r=function(){return t(!1)};function t(t){var n=_.current,o=v(m.current),a=t?o.addEventListener:o.removeEventListener;a(n?\"touchmove\":\"mousemove\",e),a(n?\"touchend\":\"mouseup\",r)}return[function(e){var r=e.nativeEvent,n=m.current;if(n&&(h(r),!function(e,r){return r&&!f(e)}(r,_.current)&&n)){if(f(r)){_.current=!0;var o=r.changedTouches||[];o.length&&(b.current=o[0].identifier)}n.focus(),g(d(n,r,b.current)),t(!0)}},function(e){var r=e.which||e.keyCode;r<37||r>40||(e.preventDefault(),p({left:39===r?.05:37===r?-.05:0,top:40===r?.05:38===r?-.05:0}))},t]},[p,g]),C=x[0],E=x[1],H=x[2];return n(function(){return H},[H]),e.createElement(\"div\",u({},s,{onTouchStart:C,onMouseDown:C,className:\"react-colorful__interactive\",ref:m,onKeyDown:E,tabIndex:0,role:\"slider\"}))}),g=function(e){return e.filter(Boolean).join(\" \")},p=function(r){var t=r.color,n=r.left,o=r.top,a=void 0===o?.5:o,l=g([\"react-colorful__pointer\",r.className]);return e.createElement(\"div\",{className:l,style:{top:100*a+\"%\",left:100*n+\"%\"}},e.createElement(\"div\",{className:\"react-colorful__pointer-fill\",style:{backgroundColor:t}}))},b=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=Math.pow(10,r)),Math.round(t*e)/t},_={grad:.9,turn:360,rad:360/(2*Math.PI)},x=function(e){return L(C(e))},C=function(e){return\"#\"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?b(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?b(parseInt(e.substring(6,8),16)/255,2):1}},E=function(e,r){return void 0===r&&(r=\"deg\"),Number(e)*(_[r]||1)},H=function(e){var r=/hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?N({h:E(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},M=H,N=function(e){var r=e.s,t=e.l;return{h:e.h,s:(r*=(t<50?t:100-t)/100)>0?2*r/(t+r)*100:0,v:t+r,a:e.a}},w=function(e){return K(I(e))},y=function(e){var r=e.s,t=e.v,n=e.a,o=(200-r)*t/100;return{h:b(e.h),s:b(o>0&&o<200?r*t/100/(o<=100?o:200-o)*100:0),l:b(o/2),a:b(n,2)}},q=function(e){var r=y(e);return\"hsl(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%)\"},k=function(e){var r=y(e);return\"hsla(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%, \"+r.a+\")\"},I=function(e){var r=e.h,t=e.s,n=e.v,o=e.a;r=r/360*6,t/=100,n/=100;var a=Math.floor(r),l=n*(1-t),u=n*(1-(r-a)*t),c=n*(1-(1-r+a)*t),i=a%6;return{r:b(255*[n,u,l,l,c,n][i]),g:b(255*[c,n,n,u,l,l][i]),b:b(255*[l,l,c,n,n,u][i]),a:b(o,2)}},O=function(e){var r=/hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?A({h:E(r[1],r[2]),s:Number(r[3]),v:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},j=O,z=function(e){var r=/rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?L({r:Number(r[1])/(r[2]?100/255:1),g:Number(r[3])/(r[4]?100/255:1),b:Number(r[5])/(r[6]?100/255:1),a:void 0===r[7]?1:Number(r[7])/(r[8]?100:1)}):{h:0,s:0,v:0,a:1}},B=z,D=function(e){var r=e.toString(16);return r.length<2?\"0\"+r:r},K=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=o<1?D(b(255*o)):\"\";return\"#\"+D(r)+D(t)+D(n)+a},L=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=Math.max(r,t,n),l=a-Math.min(r,t,n),u=l?a===r?(t-n)/l:a===t?2+(n-r)/l:4+(r-t)/l:0;return{h:b(60*(u<0?u+6:u)),s:b(a?l/a*100:0),v:b(a/255*100),a:o}},A=function(e){return{h:b(e.h),s:b(e.s),v:b(e.v),a:b(e.a,2)}},S=e.memo(function(r){var t=r.hue,n=r.onChange,o=g([\"react-colorful__hue\",r.className]);return e.createElement(\"div\",{className:o},e.createElement(m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:s(t+360*e.left,0,360)})},\"aria-label\":\"Hue\",\"aria-valuenow\":b(t),\"aria-valuemax\":\"360\",\"aria-valuemin\":\"0\"},e.createElement(p,{className:\"react-colorful__hue-pointer\",left:t/360,color:q({h:t,s:100,v:100,a:1})})))}),T=e.memo(function(r){var t=r.hsva,n=r.onChange,o={backgroundColor:q({h:t.h,s:100,v:100,a:1})};return e.createElement(\"div\",{className:\"react-colorful__saturation\",style:o},e.createElement(m,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:s(t.s+100*e.left,0,100),v:s(t.v-100*e.top,0,100)})},\"aria-label\":\"Color\",\"aria-valuetext\":\"Saturation \"+b(t.s)+\"%, Brightness \"+b(t.v)+\"%\"},e.createElement(p,{className:\"react-colorful__saturation-pointer\",top:1-t.v/100,left:t.s/100,color:q(t)})))}),F=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},P=function(e,r){return e.replace(/\\s/g,\"\")===r.replace(/\\s/g,\"\")},X=function(e,r){return e.toLowerCase()===r.toLowerCase()||F(C(e),C(r))};function Y(e,t,l){var u=i(l),c=o(function(){return e.toHsva(t)}),s=c[0],f=c[1],v=r({color:t,hsva:s});n(function(){if(!e.equal(t,v.current.color)){var r=e.toHsva(t);v.current={hsva:r,color:t},f(r)}},[t,e]),n(function(){var r;F(s,v.current.hsva)||e.equal(r=e.fromHsva(s),v.current.color)||(v.current={hsva:s,color:r},u(r))},[s,e,u]);var d=a(function(e){f(function(r){return Object.assign({},r,e)})},[]);return[s,d]}var R,V=\"undefined\"!=typeof window?l:n,$=function(){return R||(\"undefined\"!=typeof __webpack_nonce__?__webpack_nonce__:void 0)},G=function(e){R=e},J=new Map,Q=function(e){V(function(){var r=e.current?e.current.ownerDocument:document;if(void 0!==r&&!J.has(r)){var t=r.createElement(\"style\");t.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\\'data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill-opacity=\".05\"><path d=\"M8 0h8v8H8zM0 8h8v8H0z\"/></svg>\\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',J.set(r,t);var n=$();n&&t.setAttribute(\"nonce\",n),r.head.appendChild(t)}},[])},U=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h,className:\"react-colorful__last-control\"}))},W={defaultColor:\"000\",toHsva:x,fromHsva:function(e){return w({h:e.h,s:e.s,v:e.v,a:1})},equal:X},Z=function(r){return e.createElement(U,u({},r,{colorModel:W}))},ee=function(r){var t=r.className,n=r.hsva,o=r.onChange,a={backgroundImage:\"linear-gradient(90deg, \"+k(Object.assign({},n,{a:0}))+\", \"+k(Object.assign({},n,{a:1}))+\")\"},l=g([\"react-colorful__alpha\",t]),u=b(100*n.a);return e.createElement(\"div\",{className:l},e.createElement(\"div\",{className:\"react-colorful__alpha-gradient\",style:a}),e.createElement(m,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:s(n.a+e.left)})},\"aria-label\":\"Alpha\",\"aria-valuetext\":u+\"%\",\"aria-valuenow\":u,\"aria-valuemin\":\"0\",\"aria-valuemax\":\"100\"},e.createElement(p,{className:\"react-colorful__alpha-pointer\",left:n.a,color:k(n)})))},re=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h}),e.createElement(ee,{hsva:d,onChange:h,className:\"react-colorful__last-control\"}))},te={defaultColor:\"0001\",toHsva:x,fromHsva:w,equal:X},ne=function(r){return e.createElement(re,u({},r,{colorModel:te}))},oe={defaultColor:{h:0,s:0,l:0,a:1},toHsva:N,fromHsva:y,equal:F},ae=function(r){return e.createElement(re,u({},r,{colorModel:oe}))},le={defaultColor:\"hsla(0, 0%, 0%, 1)\",toHsva:H,fromHsva:k,equal:P},ue=function(r){return e.createElement(re,u({},r,{colorModel:le}))},ce={defaultColor:{h:0,s:0,l:0},toHsva:function(e){return N({h:e.h,s:e.s,l:e.l,a:1})},fromHsva:function(e){return{h:(r=y(e)).h,s:r.s,l:r.l};var r},equal:F},ie=function(r){return e.createElement(U,u({},r,{colorModel:ce}))},se={defaultColor:\"hsl(0, 0%, 0%)\",toHsva:M,fromHsva:q,equal:P},fe=function(r){return e.createElement(U,u({},r,{colorModel:se}))},ve={defaultColor:{h:0,s:0,v:0,a:1},toHsva:function(e){return e},fromHsva:A,equal:F},de=function(r){return e.createElement(re,u({},r,{colorModel:ve}))},he={defaultColor:\"hsva(0, 0%, 0%, 1)\",toHsva:O,fromHsva:function(e){var r=A(e);return\"hsva(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%, \"+r.a+\")\"},equal:P},me=function(r){return e.createElement(re,u({},r,{colorModel:he}))},ge={defaultColor:{h:0,s:0,v:0},toHsva:function(e){return{h:e.h,s:e.s,v:e.v,a:1}},fromHsva:function(e){var r=A(e);return{h:r.h,s:r.s,v:r.v}},equal:F},pe=function(r){return e.createElement(U,u({},r,{colorModel:ge}))},be={defaultColor:\"hsv(0, 0%, 0%)\",toHsva:j,fromHsva:function(e){var r=A(e);return\"hsv(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%)\"},equal:P},_e=function(r){return e.createElement(U,u({},r,{colorModel:be}))},xe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:L,fromHsva:I,equal:F},Ce=function(r){return e.createElement(re,u({},r,{colorModel:xe}))},Ee={defaultColor:\"rgba(0, 0, 0, 1)\",toHsva:z,fromHsva:function(e){var r=I(e);return\"rgba(\"+r.r+\", \"+r.g+\", \"+r.b+\", \"+r.a+\")\"},equal:P},He=function(r){return e.createElement(re,u({},r,{colorModel:Ee}))},Me={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return L({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(r=I(e)).r,g:r.g,b:r.b};var r},equal:F},Ne=function(r){return e.createElement(U,u({},r,{colorModel:Me}))},we={defaultColor:\"rgb(0, 0, 0)\",toHsva:B,fromHsva:function(e){var r=I(e);return\"rgb(\"+r.r+\", \"+r.g+\", \"+r.b+\")\"},equal:P},ye=function(r){return e.createElement(U,u({},r,{colorModel:we}))},qe=/^#?([0-9A-F]{3,8})$/i,ke=function(r){var t=r.color,l=void 0===t?\"\":t,s=r.onChange,f=r.onBlur,v=r.escape,d=r.validate,h=r.format,m=r.process,g=c(r,[\"color\",\"onChange\",\"onBlur\",\"escape\",\"validate\",\"format\",\"process\"]),p=o(function(){return v(l)}),b=p[0],_=p[1],x=i(s),C=i(f),E=a(function(e){var r=v(e.target.value);_(r),d(r)&&x(m?m(r):r)},[v,m,d,x]),H=a(function(e){d(e.target.value)||_(v(l)),C(e)},[l,v,d,C]);return n(function(){_(v(l))},[l,v]),e.createElement(\"input\",u({},g,{value:h?h(b):b,spellCheck:\"false\",onChange:E,onBlur:H}))},Ie=function(e){return\"#\"+e},Oe=function(r){var t=r.prefixed,n=r.alpha,o=c(r,[\"prefixed\",\"alpha\"]),l=a(function(e){return e.replace(/([^0-9A-F]+)/gi,\"\").substring(0,n?8:6)},[n]),i=a(function(e){return function(e,r){var t=qe.exec(e),n=t?t[1].length:0;return 3===n||6===n||!!r&&4===n||!!r&&8===n}(e,n)},[n]);return e.createElement(ke,u({},o,{escape:l,format:t?Ie:void 0,process:Ie,validate:i}))};export{ne as HexAlphaColorPicker,Oe as HexColorInput,Z as HexColorPicker,ie as HslColorPicker,fe as HslStringColorPicker,ae as HslaColorPicker,ue as HslaStringColorPicker,pe as HsvColorPicker,_e as HsvStringColorPicker,de as HsvaColorPicker,me as HsvaStringColorPicker,Ne as RgbColorPicker,ye as RgbStringColorPicker,Ce as RgbaColorPicker,He as RgbaStringColorPicker,G as setNonce};\n//# sourceMappingURL=index.module.js.map\n","import React, { useState, useRef, useEffect } from 'react';\nimport { HexColorPicker } from 'react-colorful';\nimport { useTheme } from '@principal-ade/industry-theme';\nimport { RotateCcw } from 'lucide-react';\n\ninterface ColorPickerInputProps {\n label: string;\n value: string;\n onChange: (color: string) => void;\n onReset?: () => void;\n defaultValue?: string;\n}\n\nexport const ColorPickerInput: React.FC<ColorPickerInputProps> = ({\n label,\n value,\n onChange,\n onReset,\n defaultValue,\n}) => {\n const { theme } = useTheme();\n const [showPicker, setShowPicker] = useState(false);\n const [inputValue, setInputValue] = useState(value);\n const pickerRef = useRef<HTMLDivElement>(null);\n\n // Sync input value when value prop changes\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n // Close picker when clicking outside\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n pickerRef.current &&\n !pickerRef.current.contains(event.target as Node)\n ) {\n setShowPicker(false);\n }\n };\n\n if (showPicker) {\n document.addEventListener('mousedown', handleClickOutside);\n return () =>\n document.removeEventListener('mousedown', handleClickOutside);\n }\n }, [showPicker]);\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newColor = e.target.value;\n setInputValue(newColor);\n\n // Only propagate valid complete hex colors\n if (/^#[0-9A-Fa-f]{6}$/.test(newColor)) {\n onChange(newColor);\n }\n };\n\n const handlePickerChange = (newColor: string) => {\n setInputValue(newColor);\n onChange(newColor);\n };\n\n // Ensure we always have a valid color for the picker\n const pickerColor = /^#[0-9A-Fa-f]{6}$/.test(value) ? value : '#000000';\n\n return (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n marginBottom: '12px',\n position: 'relative',\n minWidth: 0,\n }}\n >\n <div\n style={{\n flex: '0 0 40%',\n maxWidth: '40%',\n fontSize: '13px',\n color: theme.colors.textSecondary,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {label}\n </div>\n\n {/* Color preview/button */}\n <div\n onClick={() => setShowPicker(!showPicker)}\n style={{\n flex: '0 0 auto',\n width: '32px',\n height: '32px',\n borderRadius: '6px',\n border: `2px solid ${theme.colors.border}`,\n backgroundColor: pickerColor,\n cursor: 'pointer',\n transition: 'transform 0.15s',\n boxShadow: `0 2px 4px rgba(0, 0, 0, 0.2)`,\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.transform = 'scale(1.1)';\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.transform = 'scale(1)';\n }}\n />\n\n {/* Hex input */}\n <input\n type=\"text\"\n value={inputValue}\n onChange={handleInputChange}\n placeholder=\"#000000\"\n style={{\n flex: '1 1 auto',\n minWidth: '90px',\n padding: '8px 10px',\n borderRadius: '6px',\n border: `1px solid ${theme.colors.border}`,\n backgroundColor: theme.colors.background,\n color: theme.colors.text,\n fontSize: '13px',\n fontFamily: 'monospace',\n boxSizing: 'border-box',\n }}\n />\n\n {/* Reset button */}\n {onReset && defaultValue && value !== defaultValue && (\n <button\n onClick={onReset}\n title=\"Reset to default\"\n style={{\n flex: '0 0 auto',\n padding: '8px',\n borderRadius: '6px',\n border: `1px solid ${theme.colors.border}`,\n backgroundColor: theme.colors.background,\n color: theme.colors.textSecondary,\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: 'all 0.15s',\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor =\n theme.colors.backgroundSecondary;\n e.currentTarget.style.color = theme.colors.text;\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = theme.colors.background;\n e.currentTarget.style.color = theme.colors.textSecondary;\n }}\n >\n <RotateCcw size={16} />\n </button>\n )}\n\n {/* Color picker popover */}\n {showPicker && (\n <div\n ref={pickerRef}\n style={{\n position: 'absolute',\n top: '100%',\n left: '0',\n marginTop: '8px',\n zIndex: 1000,\n padding: '12px',\n borderRadius: '12px',\n backgroundColor: theme.colors.backgroundSecondary,\n border: `1px solid ${theme.colors.border}`,\n boxShadow: `0 8px 24px rgba(0, 0, 0, 0.4)`,\n }}\n >\n <HexColorPicker color={pickerColor} onChange={handlePickerChange} />\n </div>\n )}\n </div>\n );\n};\n","import React, { useState } from 'react';\nimport { ThemeProvider, useTheme } from '@principal-ade/industry-theme';\nimport { Palette, HelpCircle } from 'lucide-react';\nimport type { PanelComponentProps } from '../types';\nimport { ColorPickerInput } from '../components/ColorPickerInput';\n\ninterface ColorConfig {\n label: string;\n path: string;\n}\n\n/**\n * HelpContent - Displays help information for the theme editor\n */\nconst HelpContent: React.FC = () => {\n const { theme } = useTheme();\n\n return (\n <div\n style={{\n maxWidth: '600px',\n margin: '0 auto',\n width: '100%',\n }}\n >\n <p\n style={{\n margin: '0 0 24px 0',\n fontSize: '15px',\n lineHeight: '1.6',\n color: theme.colors.text,\n }}\n >\n Customize the Industry theme colors to match your preferences. Changes will be saved automatically.\n </p>\n\n <div\n style={{\n padding: '20px',\n backgroundColor: theme.colors.backgroundSecondary,\n borderRadius: '8px',\n border: `1px solid ${theme.colors.border}`,\n }}\n >\n <h4\n style={{\n margin: '0 0 16px 0',\n fontSize: theme.fontSizes[3],\n color: theme.colors.text,\n fontWeight: 600,\n }}\n >\n How to Use\n </h4>\n <ul\n style={{\n margin: 0,\n paddingLeft: '20px',\n fontSize: '14px',\n color: theme.colors.textSecondary,\n lineHeight: '1.8',\n }}\n >\n <li>Click the color square to open the color picker</li>\n <li>Enter hex values directly in the input field</li>\n <li>Use the reset button to revert individual colors</li>\n <li>All changes are applied immediately</li>\n </ul>\n </div>\n </div>\n );\n};\n\nconst COLOR_GROUPS: Record<string, ColorConfig[]> = {\n 'Primary Colors': [\n { label: 'Primary', path: 'colors.primary' },\n { label: 'Secondary', path: 'colors.secondary' },\n { label: 'Accent', path: 'colors.accent' },\n ],\n 'Background Colors': [\n { label: 'BG Default', path: 'colors.background' },\n { label: 'BG Light', path: 'colors.backgroundLight' },\n { label: 'BG Dark', path: 'colors.backgroundDark' },\n { label: 'BG Secondary', path: 'colors.backgroundSecondary' },\n { label: 'BG Tertiary', path: 'colors.backgroundTertiary' },\n ],\n 'Text Colors': [\n { label: 'Text', path: 'colors.text' },\n { label: 'Text Secondary', path: 'colors.textSecondary' },\n { label: 'Text Tertiary', path: 'colors.textTertiary' },\n ],\n 'UI Colors': [\n { label: 'Border', path: 'colors.border' },\n { label: 'Border Light', path: 'colors.borderLight' },\n { label: 'Border Dark', path: 'colors.borderDark' },\n ],\n 'Status Colors': [\n { label: 'Success', path: 'colors.success' },\n { label: 'Warning', path: 'colors.warning' },\n { label: 'Error', path: 'colors.error' },\n { label: 'Info', path: 'colors.info' },\n ],\n};\n\n/**\n * ThemeEditorPanelContent - Internal component that uses theme\n */\nconst ThemeEditorPanelContent: React.FC<PanelComponentProps> = () => {\n const { theme } = useTheme();\n const [showHelp, setShowHelp] = useState(false);\n\n const handleColorChange = async (path: string, newValue: string) => {\n // TODO: Implement theme update via panel framework actions\n console.log(`Update ${path} to ${newValue}`);\n };\n\n const handleResetColor = async (path: string) => {\n // TODO: Implement reset via panel framework actions\n console.log(`Reset ${path}`);\n };\n\n const getColorValue = (path: string): string => {\n const parts = path.split('.');\n let value: any = theme;\n\n for (const part of parts) {\n if (value && typeof value === 'object' && part in value) {\n value = value[part];\n } else {\n return '#000000';\n }\n }\n\n return typeof value === 'string' ? value : '#000000';\n };\n\n return (\n <div\n style={{\n fontFamily: theme.fonts.body,\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.colors.background,\n color: theme.colors.text,\n overflow: 'hidden',\n position: 'relative',\n }}\n >\n {/* Header - Fixed */}\n <div\n style={{\n padding: '20px',\n borderBottom: `1px solid ${theme.colors.border}`,\n flex: '0 0 auto',\n }}\n >\n <div style={{ display: 'flex', alignItems: 'center', gap: '12px', justifyContent: 'space-between' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>\n <Palette size={24} color={theme.colors.primary} />\n <h2\n style={{\n margin: 0,\n fontSize: theme.fontSizes[4],\n color: theme.colors.text,\n }}\n >\n Theme Editor\n </h2>\n </div>\n\n {/* Help Button */}\n <button\n onClick={() => setShowHelp(!showHelp)}\n title=\"Help\"\n style={{\n padding: '8px',\n borderRadius: '6px',\n border: `1px solid ${theme.colors.border}`,\n backgroundColor: showHelp ? theme.colors.backgroundSecondary : theme.colors.background,\n color: theme.colors.text,\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: 'all 0.15s',\n }}\n onMouseEnter={(e) => {\n if (!showHelp) {\n e.currentTarget.style.backgroundColor = theme.colors.backgroundSecondary;\n }\n }}\n onMouseLeave={(e) => {\n if (!showHelp) {\n e.currentTarget.style.backgroundColor = theme.colors.background;\n }\n }}\n >\n <HelpCircle size={18} />\n </button>\n </div>\n </div>\n\n {/* Scrollable Content */}\n <div\n style={{\n flex: '1 1 auto',\n overflowY: 'auto',\n padding: '20px',\n display: 'flex',\n flexDirection: 'column',\n gap: '16px',\n }}\n >\n {showHelp ? (\n <HelpContent />\n ) : (\n /* Color Groups */\n <>\n {Object.entries(COLOR_GROUPS).map(([groupName, colors]) => (\n <section\n key={groupName}\n style={{\n padding: '16px',\n background: theme.colors.backgroundSecondary,\n borderRadius: theme.radii[2],\n border: `1px solid ${theme.colors.border}`,\n flex: '0 0 auto',\n }}\n >\n <h3\n style={{\n margin: '0 0 16px 0',\n fontSize: theme.fontSizes[3],\n color: theme.colors.text,\n fontWeight: 600,\n }}\n >\n {groupName}\n </h3>\n {colors.map((color) => (\n <ColorPickerInput\n key={color.path}\n label={color.label}\n value={getColorValue(color.path)}\n onChange={(newValue) => handleColorChange(color.path, newValue)}\n onReset={() => handleResetColor(color.path)}\n defaultValue={getColorValue(color.path)}\n />\n ))}\n </section>\n ))}\n </>\n )}\n </div>\n </div>\n );\n};\n\n/**\n * ThemeEditorPanel - A panel for customizing the Industry theme colors.\n *\n * This panel allows users to:\n * - Customize theme colors across different categories\n * - Preview changes in real-time\n * - Reset individual colors to defaults\n * - Save theme customizations\n */\nexport const ThemeEditorPanel: React.FC<PanelComponentProps> = (props) => {\n return (\n <ThemeProvider>\n <ThemeEditorPanelContent {...props} />\n </ThemeProvider>\n );\n};\n","import { ThemeEditorPanel } from './panels/ThemeEditorPanel';\nimport type { PanelDefinition, PanelContextValue } from './types';\n\n/**\n * Export array of panel definitions.\n * This is the required export for panel extensions.\n */\nexport const panels: PanelDefinition[] = [\n {\n metadata: {\n id: 'industry-theme.theme-editor',\n name: 'Theme Editor',\n icon: '🎨',\n version: '0.1.0',\n author: 'Principal ADE',\n description: 'Customize Industry theme colors and appearance',\n slices: [], // This panel doesn't need data slices\n },\n component: ThemeEditorPanel,\n\n // Optional: Called when this specific panel is mounted\n onMount: async (context: PanelContextValue) => {\n // eslint-disable-next-line no-console\n console.log(\n 'Theme Editor Panel mounted',\n context.currentScope.repository?.path\n );\n },\n\n // Optional: Called when this specific panel is unmounted\n onUnmount: async (_context: PanelContextValue) => {\n // eslint-disable-next-line no-console\n console.log('Theme Editor Panel unmounting');\n },\n },\n];\n\n/**\n * Optional: Called once when the entire package is loaded.\n * Use this for package-level initialization.\n */\nexport const onPackageLoad = async () => {\n // eslint-disable-next-line no-console\n console.log('Panel package loaded - Example Panel Extension');\n};\n\n/**\n * Optional: Called once when the package is unloaded.\n * Use this for package-level cleanup.\n */\nexport const onPackageUnload = async () => {\n // eslint-disable-next-line no-console\n console.log('Panel package unloading - Example Panel Extension');\n};\n"],"names":["theme","React","__iconNode","r","e","t","s","m","g","p","b","x","o","a","C","n","u","c","i","f","v","d","l","h","HexColorPicker","HelpCircle"],"mappings":";;AA6mBA,IAAI,gBAAgB;AAAA,EAClB,OAAO,CAAC,GAAG,GAAG,GAAG,IAAI,IAAI,IAAI,KAAK,KAAK,GAAG;AAAA,EAC1C,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAW;AAAA,EACf;AAAA,EACE,WAAW,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;AAAA,EAClD,WAAW;AAAA,EACX,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,UAAU;AAAA,EACd;AAAA,EACE,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,SAAS;AAAA,EACb;AAAA,EACE,aAAa,CAAC,SAAS,SAAS,UAAU,QAAQ;AAAA,EAClD,OAA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A4B;AAAA,EACvC;AAAA,IACE,UAAU;AAAA,MACR,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,QAAQ,CAAA;AAAA;AAAA,IAAC;AAAA,IAEX,WAAW;AAAA;AAAA,IAGX,SAAS,OAAO,YAA+B;;AAE7C,cAAQ;AAAA,QACN;AAAA,SACA,aAAQ,aAAa,eAArB,mBAAiC;AAAA,MAAA;AAAA,IAErC;AAAA;AAAA,IAGA,WAAW,OAAO,aAAgC;AAEhD,cAAQ,IAAI,+BAA+B;AAAA,IAC7C;AAAA,EAAA;AAEJ;AAMO,MAAM,gBAAgB,YAAY;AAEvC,UAAQ,IAAI,gDAAgD;AAC9D;AAMO,MAAM,kBAAkB,YAAY;AAEzC,UAAQ,IAAI,mDAAmD;AACjE;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
1
+ {"version":3,"file":"panels.bundle.js","sources":["../node_modules/@principal-ade/industry-theme/dist/esm/index.js","../node_modules/lucide-react/dist/esm/shared/src/utils.js","../node_modules/lucide-react/dist/esm/defaultAttributes.js","../node_modules/lucide-react/dist/esm/Icon.js","../node_modules/lucide-react/dist/esm/createLucideIcon.js","../node_modules/lucide-react/dist/esm/icons/circle-question-mark.js","../node_modules/lucide-react/dist/esm/icons/palette.js","../node_modules/lucide-react/dist/esm/icons/rotate-ccw.js","../node_modules/react-colorful/dist/index.mjs","../src/components/ColorPickerInput.tsx","../src/panels/ThemeEditorPanel.tsx","../src/tools/index.ts","../src/index.tsx"],"sourcesContent":["// src/glassmorphismTheme.ts\nvar glassmorphismTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n heading: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.6,\n heading: 1.3,\n tight: 1.4,\n relaxed: 1.8\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 8, 12, 16, 20, 24, 32, 40],\n shadows: [\n \"none\",\n \"0 8px 32px 0 rgba(31, 38, 135, 0.15)\",\n \"0 12px 40px 0 rgba(31, 38, 135, 0.2)\",\n \"0 16px 48px 0 rgba(31, 38, 135, 0.25)\",\n \"0 20px 56px 0 rgba(31, 38, 135, 0.3)\",\n \"0 24px 64px 0 rgba(31, 38, 135, 0.35)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"rgba(255, 255, 255, 0.95)\",\n background: \"rgba(255, 255, 255, 0.1)\",\n primary: \"rgba(99, 102, 241, 0.9)\",\n secondary: \"rgba(139, 92, 246, 0.9)\",\n accent: \"rgba(236, 72, 153, 0.9)\",\n highlight: \"rgba(99, 102, 241, 0.2)\",\n muted: \"rgba(255, 255, 255, 0.05)\",\n success: \"rgba(34, 197, 94, 0.9)\",\n warning: \"rgba(251, 146, 60, 0.9)\",\n error: \"rgba(239, 68, 68, 0.9)\",\n info: \"rgba(59, 130, 246, 0.9)\",\n border: \"rgba(255, 255, 255, 0.18)\",\n backgroundSecondary: \"rgba(255, 255, 255, 0.15)\",\n backgroundTertiary: \"rgba(255, 255, 255, 0.2)\",\n backgroundLight: \"rgba(255, 255, 255, 0.08)\",\n backgroundHover: \"rgba(255, 255, 255, 0.25)\",\n surface: \"rgba(255, 255, 255, 0.12)\",\n textSecondary: \"rgba(255, 255, 255, 0.8)\",\n textTertiary: \"rgba(255, 255, 255, 0.6)\",\n textMuted: \"rgba(255, 255, 255, 0.5)\",\n highlightBg: \"rgba(251, 191, 36, 0.3)\",\n highlightBorder: \"rgba(251, 191, 36, 0.5)\"\n },\n modes: {\n dark: {\n text: \"rgba(255, 255, 255, 0.95)\",\n background: \"rgba(0, 0, 0, 0.3)\",\n primary: \"rgba(129, 140, 248, 0.9)\",\n secondary: \"rgba(167, 139, 250, 0.9)\",\n accent: \"rgba(244, 114, 182, 0.9)\",\n highlight: \"rgba(129, 140, 248, 0.25)\",\n muted: \"rgba(0, 0, 0, 0.15)\",\n success: \"rgba(74, 222, 128, 0.9)\",\n warning: \"rgba(251, 191, 36, 0.9)\",\n error: \"rgba(248, 113, 113, 0.9)\",\n info: \"rgba(96, 165, 250, 0.9)\",\n border: \"rgba(255, 255, 255, 0.15)\",\n backgroundSecondary: \"rgba(0, 0, 0, 0.4)\",\n backgroundTertiary: \"rgba(0, 0, 0, 0.5)\",\n backgroundLight: \"rgba(0, 0, 0, 0.2)\",\n backgroundHover: \"rgba(255, 255, 255, 0.1)\",\n surface: \"rgba(0, 0, 0, 0.35)\",\n textSecondary: \"rgba(255, 255, 255, 0.8)\",\n textTertiary: \"rgba(255, 255, 255, 0.6)\",\n textMuted: \"rgba(255, 255, 255, 0.4)\",\n highlightBg: \"rgba(251, 191, 36, 0.35)\",\n highlightBorder: \"rgba(251, 191, 36, 0.6)\"\n },\n frosted: {\n text: \"rgba(31, 41, 55, 0.95)\",\n background: \"rgba(255, 255, 255, 0.3)\",\n primary: \"rgba(79, 70, 229, 0.95)\",\n secondary: \"rgba(124, 58, 237, 0.95)\",\n accent: \"rgba(219, 39, 119, 0.95)\",\n highlight: \"rgba(79, 70, 229, 0.15)\",\n muted: \"rgba(255, 255, 255, 0.4)\",\n success: \"rgba(16, 185, 129, 0.95)\",\n warning: \"rgba(245, 158, 11, 0.95)\",\n error: \"rgba(220, 38, 38, 0.95)\",\n info: \"rgba(37, 99, 235, 0.95)\",\n border: \"rgba(255, 255, 255, 0.5)\",\n backgroundSecondary: \"rgba(255, 255, 255, 0.4)\",\n backgroundTertiary: \"rgba(255, 255, 255, 0.5)\",\n backgroundLight: \"rgba(255, 255, 255, 0.25)\",\n backgroundHover: \"rgba(255, 255, 255, 0.6)\",\n surface: \"rgba(255, 255, 255, 0.35)\",\n textSecondary: \"rgba(31, 41, 55, 0.8)\",\n textTertiary: \"rgba(31, 41, 55, 0.6)\",\n textMuted: \"rgba(31, 41, 55, 0.5)\",\n highlightBg: \"rgba(251, 191, 36, 0.4)\",\n highlightBorder: \"rgba(251, 191, 36, 0.7)\"\n }\n },\n buttons: {\n primary: {\n color: \"white\",\n bg: \"primary\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"rgba(255, 255, 255, 0.2)\",\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"text\",\n bg: \"rgba(255, 255, 255, 0.1)\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"rgba(255, 255, 255, 0.2)\",\n \"&:hover\": {\n bg: \"rgba(255, 255, 255, 0.2)\"\n }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"transparent\",\n \"&:hover\": {\n borderColor: \"rgba(255, 255, 255, 0.2)\",\n bg: \"rgba(255, 255, 255, 0.05)\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 3\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 3\n }\n }\n};\n// src/defaultThemes.ts\nvar defaultMarkdownTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n heading: '\"Crimson Text\", \"Georgia\", \"Times New Roman\", serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.6,\n heading: 1.3,\n tight: 1.25,\n relaxed: 1.75\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)\",\n \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\",\n \"0 25px 50px -12px rgba(0, 0, 0, 0.25)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#1a1a1a\",\n background: \"#ffffff\",\n primary: \"#007acc\",\n secondary: \"#005a9e\",\n accent: \"#1a1a1a\",\n highlight: \"rgba(0, 122, 204, 0.1)\",\n muted: \"#f0f0f0\",\n success: \"#28a745\",\n warning: \"#ffc107\",\n error: \"#dc3545\",\n info: \"#17a2b8\",\n border: \"rgba(0, 0, 0, 0.1)\",\n backgroundSecondary: \"#f8f9fa\",\n backgroundTertiary: \"#e9ecef\",\n backgroundLight: \"rgba(0, 0, 0, 0.03)\",\n backgroundHover: \"rgba(0, 0, 0, 0.05)\",\n surface: \"#ffffff\",\n textSecondary: \"#555555\",\n textTertiary: \"#888888\",\n textMuted: \"#aaaaaa\",\n highlightBg: \"rgba(255, 235, 59, 0.3)\",\n highlightBorder: \"rgba(255, 235, 59, 0.6)\"\n },\n buttons: {\n primary: {\n color: \"white\",\n bg: \"primary\",\n \"&:hover\": { bg: \"secondary\" }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": { bg: \"highlight\" }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": { bg: \"backgroundHover\" }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 2\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 2\n }\n }\n};\nvar defaultTerminalTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Courier New\", Courier, monospace',\n heading: '\"Courier New\", Courier, monospace',\n monospace: '\"Courier New\", Courier, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 500,\n bold: 600,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.4,\n heading: 1.2,\n tight: 1.3,\n relaxed: 1.6\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 0 5px rgba(255, 193, 7, 0.1)\",\n \"0 0 10px rgba(255, 193, 7, 0.15)\",\n \"0 0 15px rgba(255, 193, 7, 0.2)\",\n \"0 0 20px rgba(255, 193, 7, 0.25)\",\n \"0 0 30px rgba(255, 193, 7, 0.3)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#ffc107\",\n background: \"#000000\",\n primary: \"#ffc107\",\n secondary: \"#ffb300\",\n accent: \"#ffffff\",\n highlight: \"rgba(255, 193, 7, 0.1)\",\n muted: \"#1a1a1a\",\n success: \"#4caf50\",\n warning: \"#ff9800\",\n error: \"#f44336\",\n info: \"#2196f3\",\n border: \"rgba(255, 193, 7, 0.2)\",\n backgroundSecondary: \"#0a0a0a\",\n backgroundTertiary: \"#111111\",\n backgroundLight: \"rgba(255, 193, 7, 0.03)\",\n backgroundHover: \"rgba(255, 193, 7, 0.05)\",\n surface: \"#050505\",\n textSecondary: \"#e0e0e0\",\n textTertiary: \"#b0b0b0\",\n textMuted: \"#808080\",\n highlightBg: \"rgba(255, 193, 7, 0.2)\",\n highlightBorder: \"rgba(255, 193, 7, 0.4)\"\n },\n buttons: {\n primary: {\n color: \"black\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": { bg: \"secondary\" }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": { bg: \"highlight\" }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": { bg: \"backgroundHover\" }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n }\n }\n};\nvar defaultEditorTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace',\n heading: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.5,\n heading: 1.2,\n tight: 1.3,\n relaxed: 1.7\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 2px rgba(0, 0, 0, 0.05)\",\n \"0 2px 4px rgba(0, 0, 0, 0.1)\",\n \"0 4px 8px rgba(0, 0, 0, 0.15)\",\n \"0 8px 16px rgba(0, 0, 0, 0.2)\",\n \"0 12px 24px rgba(0, 0, 0, 0.25)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#d4d4d4\",\n background: \"#1e1e1e\",\n primary: \"#569cd6\",\n secondary: \"#408ac9\",\n accent: \"#c586c0\",\n highlight: \"rgba(86, 156, 214, 0.1)\",\n muted: \"#2a2a2a\",\n success: \"#6a9955\",\n warning: \"#d18616\",\n error: \"#f44747\",\n info: \"#569cd6\",\n border: \"rgba(255, 255, 255, 0.1)\",\n backgroundSecondary: \"#252526\",\n backgroundTertiary: \"#333333\",\n backgroundLight: \"rgba(255, 255, 255, 0.03)\",\n backgroundHover: \"rgba(255, 255, 255, 0.05)\",\n surface: \"#252526\",\n textSecondary: \"#cccccc\",\n textTertiary: \"#999999\",\n textMuted: \"#666666\",\n highlightBg: \"rgba(255, 235, 59, 0.2)\",\n highlightBorder: \"rgba(255, 235, 59, 0.4)\"\n },\n buttons: {\n primary: {\n color: \"white\",\n bg: \"primary\",\n \"&:hover\": { bg: \"secondary\" }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": { bg: \"highlight\" }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": { bg: \"backgroundHover\" }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 1\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 1\n }\n }\n};\n// src/landingPageTheme.ts\nvar landingPageTheme = {\n space: [0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 100, 128],\n fonts: {\n body: 'Inter, \"Geist Sans\", system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',\n heading: '-apple-system, BlinkMacSystemFont, \"SF Pro Display\", \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif',\n monospace: '\"SF Mono\", Monaco, Inconsolata, \"Fira Code\", monospace'\n },\n fontSizes: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 28, 32, 36, 48, 56, 68, 84, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.6,\n heading: 1.2,\n tight: 1.05,\n relaxed: 1.7\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\", \"1400px\"],\n sizes: [16, 32, 64, 128, 200, 240, 256, 300, 512, 740, 768, 820, 900, 1024, 1200, 1400, 1536],\n radii: [0, 2, 4, 6, 7, 8, 9, 10, 12, 14, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)\",\n \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n \"0 4px 12px rgba(0, 194, 255, 0.4)\",\n \"0 6px 24px rgba(0, 194, 255, 0.1)\",\n \"0 8px 32px rgba(0, 0, 0, 0.4)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50, 1000],\n colors: {\n text: \"#ffffff\",\n background: \"#000000\",\n primary: \"#00C2FF\",\n secondary: \"#0098CC\",\n accent: \"#0066FF\",\n highlight: \"rgba(0, 194, 255, 0.15)\",\n muted: \"#1a1a1a\",\n success: \"#4caf50\",\n warning: \"#ff9800\",\n error: \"#f44336\",\n info: \"#2196f3\",\n border: \"rgba(0, 194, 255, 0.2)\",\n backgroundSecondary: \"#0a1628\",\n backgroundTertiary: \"#0f1c2e\",\n backgroundLight: \"rgba(0, 194, 255, 0.04)\",\n backgroundHover: \"rgba(0, 194, 255, 0.1)\",\n surface: \"rgba(0, 0, 0, 0.4)\",\n textSecondary: \"#d1d5db\",\n textTertiary: \"#9ca3af\",\n textMuted: \"#6b7280\",\n highlightBg: \"rgba(255, 235, 59, 0.25)\",\n highlightBorder: \"rgba(255, 235, 59, 0.5)\"\n },\n buttons: {\n primary: {\n color: \"#000000\",\n bg: \"#00C2FF\",\n borderWidth: 0,\n padding: \"8px 20px\",\n fontSize: 14,\n fontWeight: 600,\n cursor: \"pointer\",\n \"&:hover\": {\n bg: \"#00D9FF\"\n }\n },\n secondary: {\n color: \"#00C2FF\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"rgba(0, 194, 255, 0.3)\",\n padding: \"8px 16px\",\n fontSize: 14,\n fontWeight: 600,\n cursor: \"pointer\",\n \"&:hover\": {\n bg: \"rgba(0, 194, 255, 0.1)\",\n borderColor: \"#00C2FF\"\n }\n },\n ghost: {\n color: \"#00C2FF\",\n bg: \"transparent\",\n borderWidth: 0,\n padding: \"8px 16px\",\n fontSize: 14,\n fontWeight: 500,\n cursor: \"pointer\",\n \"&:hover\": {\n color: \"#00D9FF\",\n bg: \"rgba(0, 194, 255, 0.1)\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\",\n color: \"#ffffff\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\",\n color: \"text\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 4\n },\n secondary: {\n bg: \"rgba(0, 194, 255, 0.05)\",\n border: \"1px solid\",\n borderColor: \"rgba(0, 194, 255, 0.2)\",\n borderRadius: 4\n }\n }\n};\nvar landingPageLightTheme = {\n ...landingPageTheme,\n colors: {\n text: \"#1a1a1a\",\n background: \"#ffffff\",\n primary: \"#0098CC\",\n secondary: \"#00C2FF\",\n accent: \"#0066FF\",\n highlight: \"rgba(0, 152, 204, 0.1)\",\n muted: \"#f0f0f0\",\n success: \"#4caf50\",\n warning: \"#ff9800\",\n error: \"#f44336\",\n info: \"#2196f3\",\n border: \"rgba(0, 152, 204, 0.2)\",\n backgroundSecondary: \"#f8f9fa\",\n backgroundTertiary: \"#e9ecef\",\n backgroundLight: \"rgba(0, 152, 204, 0.03)\",\n backgroundHover: \"rgba(0, 152, 204, 0.05)\",\n surface: \"rgba(255, 255, 255, 0.95)\",\n textSecondary: \"#555555\",\n textTertiary: \"#888888\",\n textMuted: \"#aaaaaa\",\n highlightBg: \"rgba(255, 235, 59, 0.3)\",\n highlightBorder: \"rgba(255, 235, 59, 0.6)\"\n },\n buttons: {\n primary: {\n color: \"#ffffff\",\n bg: \"#0098CC\",\n borderWidth: 0,\n padding: \"8px 20px\",\n fontSize: 14,\n fontWeight: 600,\n cursor: \"pointer\",\n \"&:hover\": {\n bg: \"#007aa8\"\n }\n },\n secondary: {\n color: \"#0098CC\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"rgba(0, 152, 204, 0.3)\",\n padding: \"8px 16px\",\n fontSize: 14,\n fontWeight: 600,\n cursor: \"pointer\",\n \"&:hover\": {\n bg: \"rgba(0, 152, 204, 0.05)\",\n borderColor: \"#0098CC\"\n }\n },\n ghost: {\n color: \"#0098CC\",\n bg: \"transparent\",\n borderWidth: 0,\n padding: \"8px 16px\",\n fontSize: 14,\n fontWeight: 500,\n cursor: \"pointer\",\n \"&:hover\": {\n color: \"#007aa8\",\n bg: \"rgba(0, 152, 204, 0.05)\"\n }\n }\n }\n};\n\n// src/themes.ts\nvar regalTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n heading: '\"Crimson Text\", \"Georgia\", \"Times New Roman\", serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.5,\n heading: 1.2,\n tight: 1.25,\n relaxed: 1.75\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)\",\n \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\",\n \"0 25px 50px -12px rgba(0, 0, 0, 0.25)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#f1e8dc\",\n background: \"#1a1f2e\",\n primary: \"#d4a574\",\n secondary: \"#e0b584\",\n accent: \"#c9b8a3\",\n highlight: \"rgba(212, 165, 116, 0.15)\",\n muted: \"#8b7968\",\n success: \"#5c8a72\",\n warning: \"#d4a574\",\n error: \"#a85751\",\n info: \"#d4a574\",\n border: \"rgba(212, 165, 116, 0.2)\",\n backgroundSecondary: \"#212738\",\n backgroundTertiary: \"#2d3446\",\n backgroundLight: \"rgba(212, 165, 116, 0.08)\",\n backgroundHover: \"rgba(212, 165, 116, 0.15)\",\n surface: \"#212738\",\n textSecondary: \"#c9b8a3\",\n textTertiary: \"#8b7968\",\n textMuted: \"#8b7968\",\n highlightBg: \"rgba(255, 193, 7, 0.25)\",\n highlightBorder: \"rgba(255, 193, 7, 0.5)\"\n },\n buttons: {\n primary: {\n color: \"background\",\n bg: \"primary\",\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"text\",\n bg: \"muted\",\n \"&:hover\": {\n bg: \"backgroundSecondary\"\n }\n },\n ghost: {\n color: \"primary\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"muted\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"background\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 2\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 2\n }\n }\n};\nvar terminalTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"SF Mono\", \"Monaco\", \"Inconsolata\", \"Fira Code\", monospace',\n heading: '\"SF Mono\", \"Monaco\", \"Inconsolata\", \"Fira Code\", monospace',\n monospace: '\"SF Mono\", \"Monaco\", \"Inconsolata\", \"Fira Code\", monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 500,\n bold: 600,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.6,\n heading: 1.3,\n tight: 1.4,\n relaxed: 1.8\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n \"0 2px 4px 0 rgba(0, 0, 0, 0.06)\",\n \"0 4px 6px 0 rgba(0, 0, 0, 0.07)\",\n \"0 8px 12px 0 rgba(0, 0, 0, 0.08)\",\n \"0 16px 24px 0 rgba(0, 0, 0, 0.10)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#e4e4e4\",\n background: \"rgba(10, 10, 10, 0.85)\",\n primary: \"#66b3ff\",\n secondary: \"#80c4ff\",\n accent: \"#66ff99\",\n highlight: \"rgba(102, 179, 255, 0.15)\",\n muted: \"rgba(26, 26, 26, 0.8)\",\n success: \"#66ff99\",\n warning: \"#ffcc66\",\n error: \"#ff6666\",\n info: \"#66b3ff\",\n border: \"rgba(255, 255, 255, 0.1)\",\n backgroundSecondary: \"rgba(15, 15, 15, 0.9)\",\n backgroundTertiary: \"rgba(20, 20, 20, 0.9)\",\n backgroundLight: \"rgba(255, 255, 255, 0.05)\",\n backgroundHover: \"rgba(102, 179, 255, 0.08)\",\n surface: \"rgba(15, 15, 15, 0.95)\",\n textSecondary: \"rgba(255, 255, 255, 0.7)\",\n textTertiary: \"rgba(255, 255, 255, 0.5)\",\n textMuted: \"rgba(255, 255, 255, 0.4)\",\n highlightBg: \"rgba(255, 235, 59, 0.25)\",\n highlightBorder: \"rgba(255, 235, 59, 0.5)\"\n },\n modes: {\n light: {\n text: \"#1a1a1a\",\n background: \"rgba(255, 255, 255, 0.9)\",\n primary: \"#0066cc\",\n secondary: \"#0052a3\",\n accent: \"#00cc88\",\n highlight: \"rgba(0, 102, 204, 0.08)\",\n muted: \"rgba(245, 245, 245, 0.8)\",\n success: \"#00cc88\",\n warning: \"#ffaa00\",\n error: \"#ff3333\",\n info: \"#0066cc\",\n border: \"rgba(0, 0, 0, 0.1)\",\n backgroundSecondary: \"rgba(250, 250, 250, 0.9)\",\n backgroundTertiary: \"rgba(245, 245, 245, 0.9)\",\n backgroundLight: \"rgba(0, 0, 0, 0.02)\",\n backgroundHover: \"rgba(0, 102, 204, 0.04)\",\n surface: \"rgba(255, 255, 255, 0.95)\",\n textSecondary: \"rgba(0, 0, 0, 0.6)\",\n textTertiary: \"rgba(0, 0, 0, 0.4)\",\n textMuted: \"rgba(0, 0, 0, 0.3)\",\n highlightBg: \"rgba(255, 235, 59, 0.3)\",\n highlightBorder: \"rgba(255, 235, 59, 0.6)\"\n }\n },\n buttons: {\n primary: {\n color: \"white\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": {\n bg: \"highlight\"\n }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 1\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 1\n }\n }\n};\nvar matrixTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace',\n heading: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace',\n monospace: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 500,\n bold: 600,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.5,\n heading: 1.2,\n tight: 1.3,\n relaxed: 1.7\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 0 5px rgba(0, 216, 53, 0.15)\",\n \"0 0 10px rgba(0, 216, 53, 0.2)\",\n \"0 0 15px rgba(0, 216, 53, 0.25)\",\n \"0 0 20px rgba(0, 216, 53, 0.3)\",\n \"0 0 30px rgba(0, 216, 53, 0.4)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#a8a8a8\",\n background: \"#000000\",\n primary: \"#00d835\",\n secondary: \"#00a828\",\n accent: \"#00d835\",\n highlight: \"rgba(0, 216, 53, 0.15)\",\n muted: \"#0a0a0a\",\n success: \"#00d835\",\n warning: \"#d4a000\",\n error: \"#d63333\",\n info: \"#00a8d6\",\n border: \"rgba(0, 216, 53, 0.2)\",\n backgroundSecondary: \"#0a0a0a\",\n backgroundTertiary: \"#111111\",\n backgroundLight: \"rgba(0, 216, 53, 0.03)\",\n backgroundHover: \"rgba(0, 216, 53, 0.08)\",\n surface: \"#050505\",\n textSecondary: \"#808080\",\n textTertiary: \"#606060\",\n textMuted: \"#484848\",\n highlightBg: \"rgba(0, 216, 53, 0.25)\",\n highlightBorder: \"rgba(0, 216, 53, 0.5)\"\n },\n buttons: {\n primary: {\n color: \"black\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": {\n bg: \"highlight\"\n }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n }\n }\n};\nvar matrixMinimalTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace',\n heading: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace',\n monospace: '\"Courier New\", \"Courier\", \"Lucida Console\", \"Monaco\", monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 500,\n bold: 600,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.5,\n heading: 1.2,\n tight: 1.3,\n relaxed: 1.7\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 2px rgba(0, 0, 0, 0.05)\",\n \"0 2px 4px rgba(0, 0, 0, 0.1)\",\n \"0 4px 8px rgba(0, 0, 0, 0.15)\",\n \"0 8px 16px rgba(0, 0, 0, 0.2)\",\n \"0 0 20px rgba(0, 216, 53, 0.1)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#a8a8a8\",\n background: \"#000000\",\n primary: \"#b8b8b8\",\n secondary: \"#909090\",\n accent: \"#00d835\",\n highlight: \"rgba(0, 216, 53, 0.1)\",\n muted: \"#0a0a0a\",\n success: \"#00d835\",\n warning: \"#d4a000\",\n error: \"#d63333\",\n info: \"#00a8d6\",\n border: \"rgba(184, 184, 184, 0.1)\",\n backgroundSecondary: \"#0a0a0a\",\n backgroundTertiary: \"#111111\",\n backgroundLight: \"rgba(184, 184, 184, 0.02)\",\n backgroundHover: \"rgba(0, 216, 53, 0.05)\",\n surface: \"#050505\",\n textSecondary: \"#808080\",\n textTertiary: \"#606060\",\n textMuted: \"#484848\",\n highlightBg: \"rgba(0, 216, 53, 0.2)\",\n highlightBorder: \"rgba(0, 216, 53, 0.4)\"\n },\n buttons: {\n primary: {\n color: \"black\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"secondary\"\n }\n },\n secondary: {\n color: \"primary\",\n bg: \"transparent\",\n borderWidth: 1,\n borderStyle: \"solid\",\n borderColor: \"primary\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n },\n ghost: {\n color: \"text\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textSecondary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 0\n }\n }\n};\nvar slateTheme = {\n space: [0, 4, 8, 16, 32, 64, 128, 256, 512],\n fonts: {\n body: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n heading: '\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n monospace: '\"Fira Code\", \"SF Mono\", Monaco, Inconsolata, monospace'\n },\n fontSizes: [12, 14, 16, 18, 20, 24, 32, 48, 64, 96],\n fontScale: 1,\n fontWeights: {\n body: 400,\n heading: 600,\n bold: 700,\n light: 300,\n medium: 500,\n semibold: 600\n },\n lineHeights: {\n body: 1.6,\n heading: 1.3,\n tight: 1.25,\n relaxed: 1.75\n },\n breakpoints: [\"640px\", \"768px\", \"1024px\", \"1280px\"],\n sizes: [16, 32, 64, 128, 256, 512, 768, 1024, 1536],\n radii: [0, 2, 4, 6, 8, 12, 16, 24],\n shadows: [\n \"none\",\n \"0 1px 3px 0 rgba(0, 0, 0, 0.2)\",\n \"0 4px 6px -1px rgba(0, 0, 0, 0.2)\",\n \"0 10px 15px -3px rgba(0, 0, 0, 0.2)\",\n \"0 20px 25px -5px rgba(0, 0, 0, 0.25)\",\n \"0 25px 50px -12px rgba(0, 0, 0, 0.3)\"\n ],\n zIndices: [0, 1, 10, 20, 30, 40, 50],\n colors: {\n text: \"#9ca3af\",\n background: \"#1a1c1e\",\n primary: \"#d1d5db\",\n secondary: \"#6b7280\",\n accent: \"#f59e0b\",\n highlight: \"rgba(209, 213, 219, 0.15)\",\n muted: \"#2d3134\",\n success: \"#10b981\",\n warning: \"#f59e0b\",\n error: \"#ef4444\",\n info: \"#3b82f6\",\n border: \"rgba(156, 163, 175, 0.15)\",\n backgroundSecondary: \"#22252a\",\n backgroundTertiary: \"#2d3134\",\n backgroundLight: \"rgba(156, 163, 175, 0.05)\",\n backgroundHover: \"rgba(156, 163, 175, 0.1)\",\n surface: \"#1f2124\",\n textSecondary: \"#e5e7eb\",\n textTertiary: \"#6b7280\",\n textMuted: \"#4b5563\",\n highlightBg: \"rgba(245, 158, 11, 0.25)\",\n highlightBorder: \"rgba(245, 158, 11, 0.5)\"\n },\n buttons: {\n primary: {\n color: \"#1a1c1e\",\n bg: \"primary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"#9ca3af\"\n }\n },\n secondary: {\n color: \"#e5e7eb\",\n bg: \"secondary\",\n borderWidth: 0,\n \"&:hover\": {\n bg: \"#4b5563\"\n }\n },\n ghost: {\n color: \"textSecondary\",\n bg: \"transparent\",\n \"&:hover\": {\n bg: \"backgroundHover\"\n }\n }\n },\n text: {\n heading: {\n fontFamily: \"heading\",\n fontWeight: \"heading\",\n lineHeight: \"heading\",\n color: \"textSecondary\"\n },\n body: {\n fontFamily: \"body\",\n fontWeight: \"body\",\n lineHeight: \"body\"\n },\n caption: {\n fontSize: 1,\n color: \"textTertiary\"\n }\n },\n cards: {\n primary: {\n bg: \"surface\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 3\n },\n secondary: {\n bg: \"backgroundSecondary\",\n border: \"1px solid\",\n borderColor: \"border\",\n borderRadius: 3\n }\n }\n};\n// src/ThemeProvider.tsx\nimport React, { createContext, useContext, useState, useEffect } from \"react\";\n\n// src/themeHelpers.ts\nfunction overrideColors(theme, colors) {\n return {\n ...theme,\n colors: {\n ...theme.colors,\n ...colors\n }\n };\n}\nfunction makeTheme(baseTheme, overrides) {\n return {\n ...baseTheme,\n ...overrides,\n colors: {\n ...baseTheme.colors,\n ...overrides.colors\n },\n fonts: {\n ...baseTheme.fonts,\n ...overrides.fonts\n }\n };\n}\nfunction addMode(theme, modeName, colors, baseMode) {\n let baseColors;\n if (baseMode && theme.modes && theme.modes[baseMode]) {\n baseColors = {\n ...theme.colors,\n ...theme.modes[baseMode]\n };\n } else {\n baseColors = theme.colors;\n }\n const newMode = {\n ...baseColors,\n ...colors\n };\n return {\n ...theme,\n modes: {\n ...theme.modes,\n [modeName]: newMode\n }\n };\n}\nfunction getMode(theme, mode) {\n if (!mode || !theme.modes || !theme.modes[mode]) {\n return theme.colors;\n }\n return {\n ...theme.colors,\n ...theme.modes[mode]\n };\n}\n\n// src/ThemeProvider.tsx\nvar ThemeContext;\nvar getThemeContext = () => {\n if (typeof window !== \"undefined\") {\n const globalWindow = window;\n if (!globalWindow.__principlemd_theme_context__) {\n globalWindow.__principlemd_theme_context__ = createContext(undefined);\n }\n return globalWindow.__principlemd_theme_context__;\n } else {\n if (!ThemeContext) {\n ThemeContext = createContext(undefined);\n }\n return ThemeContext;\n }\n};\nvar ThemeContextSingleton = getThemeContext();\nvar useTheme = () => {\n const context = useContext(ThemeContextSingleton);\n if (!context) {\n throw new Error(\"useTheme must be used within a ThemeProvider\");\n }\n return context;\n};\nvar ThemeProvider = ({\n children,\n theme: customTheme = theme,\n initialMode\n}) => {\n const [mode, setMode] = useState(initialMode);\n const activeTheme = React.useMemo(() => {\n if (!mode || !customTheme.modes || !customTheme.modes[mode]) {\n return customTheme;\n }\n return {\n ...customTheme,\n colors: getMode(customTheme, mode)\n };\n }, [customTheme, mode]);\n useEffect(() => {\n if (!initialMode) {\n const savedMode = localStorage.getItem(\"principlemd-theme-mode\");\n if (savedMode) {\n setMode(savedMode);\n }\n }\n }, [initialMode]);\n useEffect(() => {\n if (mode) {\n localStorage.setItem(\"principlemd-theme-mode\", mode);\n } else {\n localStorage.removeItem(\"principlemd-theme-mode\");\n }\n }, [mode]);\n const value = {\n theme: activeTheme,\n mode,\n setMode\n };\n return /* @__PURE__ */ React.createElement(ThemeContextSingleton.Provider, {\n value\n }, children);\n};\nvar withTheme = (Component) => {\n return (props) => {\n const { theme: theme2 } = useTheme();\n return /* @__PURE__ */ React.createElement(Component, {\n ...props,\n theme: theme2\n });\n };\n};\n// src/utils.ts\nvar getColor = (theme2, colorKey) => {\n const colors = theme2.colors;\n const value = colors[colorKey];\n return typeof value === \"string\" ? value : colorKey;\n};\nvar getSpace = (theme2, index) => {\n return theme2.space[index] || 0;\n};\nvar getFontSize = (theme2, index) => {\n return theme2.fontSizes[index] || theme2.fontSizes[2];\n};\nvar getRadius = (theme2, index) => {\n return theme2.radii[index] || 0;\n};\nvar getShadow = (theme2, index) => {\n return theme2.shadows[index] || \"none\";\n};\nvar getZIndex = (theme2, index) => {\n return theme2.zIndices[index] || 0;\n};\nvar responsive = (values) => {\n return values.reduce((acc, value, index) => {\n if (index === 0) {\n return value;\n }\n return {\n ...acc,\n [`@media screen and (min-width: ${values[index - 1]})`]: value\n };\n }, {});\n};\nvar sx = (styles) => styles;\nvar createStyle = (theme2, styleObj) => {\n const processValue = (value) => {\n if (typeof value === \"string\") {\n if (value in theme2.colors) {\n return getColor(theme2, value);\n }\n return value;\n }\n if (typeof value === \"number\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map(processValue);\n }\n if (typeof value === \"object\" && value !== null) {\n const processed2 = {};\n for (const [key, val] of Object.entries(value)) {\n processed2[key] = processValue(val);\n }\n return processed2;\n }\n return value;\n };\n const processed = {};\n for (const [key, val] of Object.entries(styleObj)) {\n processed[key] = processValue(val);\n }\n return processed;\n};\nvar mergeThemes = (baseTheme, ...overrides) => {\n return overrides.reduce((theme2, override) => ({\n space: override.space || theme2.space,\n fonts: { ...theme2.fonts, ...override.fonts || {} },\n fontSizes: override.fontSizes || theme2.fontSizes,\n fontWeights: { ...theme2.fontWeights, ...override.fontWeights || {} },\n lineHeights: { ...theme2.lineHeights, ...override.lineHeights || {} },\n breakpoints: override.breakpoints || theme2.breakpoints,\n sizes: override.sizes || theme2.sizes,\n radii: override.radii || theme2.radii,\n shadows: override.shadows || theme2.shadows,\n zIndices: override.zIndices || theme2.zIndices,\n colors: {\n ...theme2.colors,\n ...override.colors || {}\n },\n buttons: { ...theme2.buttons, ...override.buttons || {} },\n text: { ...theme2.text, ...override.text || {} },\n cards: { ...theme2.cards, ...override.cards || {} }\n }), baseTheme);\n};\n// src/ThemeShowcase.tsx\nimport React2 from \"react\";\nvar ThemeShowcase = ({\n theme: theme2,\n title,\n showValues = true,\n sections = [\"colors\", \"typography\", \"spacing\", \"shadows\", \"radii\"]\n}) => {\n const containerStyle = {\n fontFamily: theme2.fonts.body,\n color: theme2.colors.text,\n backgroundColor: theme2.colors.background,\n padding: theme2.space[4],\n minHeight: \"100vh\"\n };\n const sectionStyle = {\n marginBottom: theme2.space[5],\n padding: theme2.space[4],\n backgroundColor: theme2.colors.surface || theme2.colors.backgroundSecondary,\n borderRadius: theme2.radii[2],\n border: `1px solid ${theme2.colors.border}`\n };\n const headingStyle = {\n fontFamily: theme2.fonts.heading,\n fontSize: theme2.fontSizes[5],\n fontWeight: theme2.fontWeights.heading,\n marginBottom: theme2.space[3],\n color: theme2.colors.primary\n };\n const subheadingStyle = {\n fontFamily: theme2.fonts.heading,\n fontSize: theme2.fontSizes[3],\n fontWeight: theme2.fontWeights.medium,\n marginBottom: theme2.space[2],\n marginTop: theme2.space[3],\n color: theme2.colors.text\n };\n return /* @__PURE__ */ React2.createElement(\"div\", {\n style: containerStyle\n }, title && /* @__PURE__ */ React2.createElement(\"h1\", {\n style: {\n ...headingStyle,\n fontSize: theme2.fontSizes[6],\n marginBottom: theme2.space[4]\n }\n }, title), sections.includes(\"colors\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Colors\"), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Primary Colors\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(200px, 1fr))\",\n gap: theme2.space[3],\n marginBottom: theme2.space[3]\n }\n }, [\"text\", \"background\", \"primary\", \"secondary\", \"accent\", \"muted\"].map((key) => {\n const color = theme2.colors[key];\n if (!color)\n return null;\n return /* @__PURE__ */ React2.createElement(\"div\", {\n key,\n style: {\n display: \"flex\",\n alignItems: \"center\",\n padding: theme2.space[2],\n backgroundColor: theme2.colors.backgroundLight || theme2.colors.backgroundTertiary,\n borderRadius: theme2.radii[1]\n }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 40,\n height: 40,\n backgroundColor: color,\n border: `1px solid ${theme2.colors.border}`,\n borderRadius: theme2.radii[1],\n marginRight: theme2.space[2]\n }\n }), /* @__PURE__ */ React2.createElement(\"div\", null, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n fontWeight: theme2.fontWeights.medium\n }\n }, key), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary\n }\n }, color)));\n })), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Status Colors\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(200px, 1fr))\",\n gap: theme2.space[3],\n marginBottom: theme2.space[3]\n }\n }, [\"success\", \"warning\", \"error\", \"info\"].map((key) => {\n const color = theme2.colors[key];\n if (!color)\n return null;\n return /* @__PURE__ */ React2.createElement(\"div\", {\n key,\n style: {\n display: \"flex\",\n alignItems: \"center\",\n padding: theme2.space[2],\n backgroundColor: theme2.colors.backgroundLight || theme2.colors.backgroundTertiary,\n borderRadius: theme2.radii[1]\n }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 40,\n height: 40,\n backgroundColor: color,\n border: `1px solid ${theme2.colors.border}`,\n borderRadius: theme2.radii[1],\n marginRight: theme2.space[2]\n }\n }), /* @__PURE__ */ React2.createElement(\"div\", null, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n fontWeight: theme2.fontWeights.medium\n }\n }, key), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary\n }\n }, color)));\n })), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Background Colors\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(200px, 1fr))\",\n gap: theme2.space[3]\n }\n }, [\"backgroundSecondary\", \"backgroundTertiary\", \"backgroundLight\", \"backgroundHover\", \"surface\"].map((key) => {\n const color = theme2.colors[key];\n if (!color)\n return null;\n return /* @__PURE__ */ React2.createElement(\"div\", {\n key,\n style: {\n padding: theme2.space[3],\n backgroundColor: color,\n border: `1px solid ${theme2.colors.border}`,\n borderRadius: theme2.radii[1]\n }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n fontWeight: theme2.fontWeights.medium\n }\n }, key), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary,\n marginTop: theme2.space[1]\n }\n }, color));\n }))), sections.includes(\"typography\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Typography\"), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Font Families\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: { marginBottom: theme2.space[4] }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.heading,\n fontSize: theme2.fontSizes[4],\n marginBottom: theme2.space[2]\n }\n }, \"Heading Font: \", showValues && /* @__PURE__ */ React2.createElement(\"span\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, \" \", theme2.fonts.heading)), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.body,\n fontSize: theme2.fontSizes[2],\n marginBottom: theme2.space[2]\n }\n }, \"Body Font: \", showValues && /* @__PURE__ */ React2.createElement(\"span\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, \" \", theme2.fonts.body)), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[2]\n }\n }, \"Monospace Font: \", showValues && /* @__PURE__ */ React2.createElement(\"span\", {\n style: {\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, \" \", theme2.fonts.monospace))), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Font Sizes\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: { marginBottom: theme2.space[4] }\n }, theme2.fontSizes.map((size, index) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: index,\n style: {\n fontSize: size,\n lineHeight: theme2.lineHeights.body,\n marginBottom: theme2.space[1]\n }\n }, \"Size \", index, \": Sample Text \", showValues && `(${size}px)`))), /* @__PURE__ */ React2.createElement(\"h3\", {\n style: subheadingStyle\n }, \"Font Weights\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fit, minmax(150px, 1fr))\",\n gap: theme2.space[2]\n }\n }, Object.entries(theme2.fontWeights).map(([name, weight]) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: name,\n style: {\n fontWeight: weight,\n fontSize: theme2.fontSizes[2]\n }\n }, name, \" \", showValues && `(${weight})`)))), sections.includes(\"spacing\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Spacing\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: { display: \"flex\", flexDirection: \"column\", gap: theme2.space[2] }\n }, theme2.space.map((space, index) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: index,\n style: { display: \"flex\", alignItems: \"center\" }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 60,\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, \"[\", index, \"]\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n height: 24,\n width: space,\n backgroundColor: theme2.colors.primary,\n borderRadius: theme2.radii[1]\n }\n }), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n marginLeft: theme2.space[2],\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[1],\n color: theme2.colors.textSecondary\n }\n }, space, \"px\"))))), sections.includes(\"radii\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Border Radii\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(100px, 1fr))\",\n gap: theme2.space[3]\n }\n }, theme2.radii.map((radius, index) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: index,\n style: { textAlign: \"center\" }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 80,\n height: 80,\n backgroundColor: theme2.colors.primary,\n borderRadius: radius,\n marginBottom: theme2.space[1],\n margin: \"0 auto\"\n }\n }), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary\n }\n }, \"[\", index, \"] \", showValues && `${radius}px`))))), sections.includes(\"shadows\") && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Shadows\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(150px, 1fr))\",\n gap: theme2.space[4]\n }\n }, theme2.shadows.map((shadow, index) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: index,\n style: { textAlign: \"center\" }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n width: 100,\n height: 100,\n backgroundColor: theme2.colors.background,\n boxShadow: shadow,\n borderRadius: theme2.radii[2],\n margin: \"0 auto\",\n marginBottom: theme2.space[2],\n border: `1px solid ${theme2.colors.border}`\n }\n }), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textSecondary\n }\n }, \"Shadow [\", index, \"]\"), showValues && /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n fontFamily: theme2.fonts.monospace,\n fontSize: theme2.fontSizes[0],\n color: theme2.colors.textMuted,\n marginTop: theme2.space[1]\n }\n }, shadow === \"none\" ? \"none\" : \"...\"))))), theme2.modes && Object.keys(theme2.modes).length > 0 && /* @__PURE__ */ React2.createElement(\"div\", {\n style: sectionStyle\n }, /* @__PURE__ */ React2.createElement(\"h2\", {\n style: headingStyle\n }, \"Available Modes\"), /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n display: \"flex\",\n gap: theme2.space[2],\n flexWrap: \"wrap\"\n }\n }, /* @__PURE__ */ React2.createElement(\"div\", {\n style: {\n padding: `${theme2.space[2]}px ${theme2.space[3]}px`,\n backgroundColor: theme2.colors.primary,\n color: \"#ffffff\",\n borderRadius: theme2.radii[2],\n fontFamily: theme2.fonts.body,\n fontSize: theme2.fontSizes[1]\n }\n }, \"default\"), Object.keys(theme2.modes).map((modeName) => /* @__PURE__ */ React2.createElement(\"div\", {\n key: modeName,\n style: {\n padding: `${theme2.space[2]}px ${theme2.space[3]}px`,\n backgroundColor: theme2.colors.secondary,\n color: theme2.colors.text,\n borderRadius: theme2.radii[2],\n fontFamily: theme2.fonts.body,\n fontSize: theme2.fontSizes[1]\n }\n }, modeName)))));\n};\n\n// src/index.ts\nvar theme = terminalTheme;\nfunction scaleThemeFonts(theme2, scale) {\n const currentScale = theme2.fontScale || 1;\n const effectiveScale = scale / currentScale;\n return {\n ...theme2,\n fontSizes: theme2.fontSizes.map((size) => Math.round(size * effectiveScale)),\n fontScale: scale\n };\n}\nfunction increaseFontScale(theme2) {\n const currentScale = theme2.fontScale || 1;\n const newScale = Math.min(currentScale * 1.1, 2);\n return scaleThemeFonts(theme2, newScale);\n}\nfunction decreaseFontScale(theme2) {\n const currentScale = theme2.fontScale || 1;\n const newScale = Math.max(currentScale * 0.9, 0.5);\n return scaleThemeFonts(theme2, newScale);\n}\nfunction resetFontScale(theme2) {\n return scaleThemeFonts(theme2, 1);\n}\nvar src_default = theme;\nexport {\n withTheme,\n useTheme,\n theme,\n terminalTheme,\n sx,\n slateTheme,\n scaleThemeFonts,\n responsive,\n resetFontScale,\n regalTheme,\n overrideColors,\n mergeThemes,\n matrixTheme,\n matrixMinimalTheme,\n makeTheme,\n landingPageTheme,\n landingPageLightTheme,\n increaseFontScale,\n glassmorphismTheme,\n getZIndex,\n getSpace,\n getShadow,\n getRadius,\n getMode,\n getFontSize,\n getColor,\n defaultTerminalTheme,\n defaultMarkdownTheme,\n defaultEditorTheme,\n src_default as default,\n decreaseFontScale,\n createStyle,\n addMode,\n ThemeShowcase,\n ThemeProvider\n};\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n};\n\nexport { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\", key: \"1u773s\" }],\n [\"path\", { d: \"M12 17h.01\", key: \"p32p05\" }]\n];\nconst CircleQuestionMark = createLucideIcon(\"circle-question-mark\", __iconNode);\n\nexport { __iconNode, CircleQuestionMark as default };\n//# sourceMappingURL=circle-question-mark.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z\",\n key: \"e79jfc\"\n }\n ],\n [\"circle\", { cx: \"13.5\", cy: \"6.5\", r: \".5\", fill: \"currentColor\", key: \"1okk4w\" }],\n [\"circle\", { cx: \"17.5\", cy: \"10.5\", r: \".5\", fill: \"currentColor\", key: \"f64h9f\" }],\n [\"circle\", { cx: \"6.5\", cy: \"12.5\", r: \".5\", fill: \"currentColor\", key: \"qy21gx\" }],\n [\"circle\", { cx: \"8.5\", cy: \"7.5\", r: \".5\", fill: \"currentColor\", key: \"fotxhn\" }]\n];\nconst Palette = createLucideIcon(\"palette\", __iconNode);\n\nexport { __iconNode, Palette as default };\n//# sourceMappingURL=palette.js.map\n","/**\n * @license lucide-react v0.552.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\", key: \"1357e3\" }],\n [\"path\", { d: \"M3 3v5h5\", key: \"1xhq8a\" }]\n];\nconst RotateCcw = createLucideIcon(\"rotate-ccw\", __iconNode);\n\nexport { __iconNode, RotateCcw as default };\n//# sourceMappingURL=rotate-ccw.js.map\n","import e,{useRef as r,useMemo as t,useEffect as n,useState as o,useCallback as a,useLayoutEffect as l}from\"react\";function u(){return(u=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function c(e,r){if(null==e)return{};var t,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r.indexOf(t=a[n])>=0||(o[t]=e[t]);return o}function i(e){var t=r(e),n=r(function(e){t.current&&t.current(e)});return t.current=e,n.current}var s=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e<r?r:e},f=function(e){return\"touches\"in e},v=function(e){return e&&e.ownerDocument.defaultView||self},d=function(e,r,t){var n=e.getBoundingClientRect(),o=f(r)?function(e,r){for(var t=0;t<e.length;t++)if(e[t].identifier===r)return e[t];return e[0]}(r.touches,t):r;return{left:s((o.pageX-(n.left+v(e).pageXOffset))/n.width),top:s((o.pageY-(n.top+v(e).pageYOffset))/n.height)}},h=function(e){!f(e)&&e.preventDefault()},m=e.memo(function(o){var a=o.onMove,l=o.onKey,s=c(o,[\"onMove\",\"onKey\"]),m=r(null),g=i(a),p=i(l),b=r(null),_=r(!1),x=t(function(){var e=function(e){h(e),(f(e)?e.touches.length>0:e.buttons>0)&&m.current?g(d(m.current,e,b.current)):t(!1)},r=function(){return t(!1)};function t(t){var n=_.current,o=v(m.current),a=t?o.addEventListener:o.removeEventListener;a(n?\"touchmove\":\"mousemove\",e),a(n?\"touchend\":\"mouseup\",r)}return[function(e){var r=e.nativeEvent,n=m.current;if(n&&(h(r),!function(e,r){return r&&!f(e)}(r,_.current)&&n)){if(f(r)){_.current=!0;var o=r.changedTouches||[];o.length&&(b.current=o[0].identifier)}n.focus(),g(d(n,r,b.current)),t(!0)}},function(e){var r=e.which||e.keyCode;r<37||r>40||(e.preventDefault(),p({left:39===r?.05:37===r?-.05:0,top:40===r?.05:38===r?-.05:0}))},t]},[p,g]),C=x[0],E=x[1],H=x[2];return n(function(){return H},[H]),e.createElement(\"div\",u({},s,{onTouchStart:C,onMouseDown:C,className:\"react-colorful__interactive\",ref:m,onKeyDown:E,tabIndex:0,role:\"slider\"}))}),g=function(e){return e.filter(Boolean).join(\" \")},p=function(r){var t=r.color,n=r.left,o=r.top,a=void 0===o?.5:o,l=g([\"react-colorful__pointer\",r.className]);return e.createElement(\"div\",{className:l,style:{top:100*a+\"%\",left:100*n+\"%\"}},e.createElement(\"div\",{className:\"react-colorful__pointer-fill\",style:{backgroundColor:t}}))},b=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=Math.pow(10,r)),Math.round(t*e)/t},_={grad:.9,turn:360,rad:360/(2*Math.PI)},x=function(e){return L(C(e))},C=function(e){return\"#\"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?b(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?b(parseInt(e.substring(6,8),16)/255,2):1}},E=function(e,r){return void 0===r&&(r=\"deg\"),Number(e)*(_[r]||1)},H=function(e){var r=/hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?N({h:E(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},M=H,N=function(e){var r=e.s,t=e.l;return{h:e.h,s:(r*=(t<50?t:100-t)/100)>0?2*r/(t+r)*100:0,v:t+r,a:e.a}},w=function(e){return K(I(e))},y=function(e){var r=e.s,t=e.v,n=e.a,o=(200-r)*t/100;return{h:b(e.h),s:b(o>0&&o<200?r*t/100/(o<=100?o:200-o)*100:0),l:b(o/2),a:b(n,2)}},q=function(e){var r=y(e);return\"hsl(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%)\"},k=function(e){var r=y(e);return\"hsla(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%, \"+r.a+\")\"},I=function(e){var r=e.h,t=e.s,n=e.v,o=e.a;r=r/360*6,t/=100,n/=100;var a=Math.floor(r),l=n*(1-t),u=n*(1-(r-a)*t),c=n*(1-(1-r+a)*t),i=a%6;return{r:b(255*[n,u,l,l,c,n][i]),g:b(255*[c,n,n,u,l,l][i]),b:b(255*[l,l,c,n,n,u][i]),a:b(o,2)}},O=function(e){var r=/hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?A({h:E(r[1],r[2]),s:Number(r[3]),v:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},j=O,z=function(e){var r=/rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?L({r:Number(r[1])/(r[2]?100/255:1),g:Number(r[3])/(r[4]?100/255:1),b:Number(r[5])/(r[6]?100/255:1),a:void 0===r[7]?1:Number(r[7])/(r[8]?100:1)}):{h:0,s:0,v:0,a:1}},B=z,D=function(e){var r=e.toString(16);return r.length<2?\"0\"+r:r},K=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=o<1?D(b(255*o)):\"\";return\"#\"+D(r)+D(t)+D(n)+a},L=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=Math.max(r,t,n),l=a-Math.min(r,t,n),u=l?a===r?(t-n)/l:a===t?2+(n-r)/l:4+(r-t)/l:0;return{h:b(60*(u<0?u+6:u)),s:b(a?l/a*100:0),v:b(a/255*100),a:o}},A=function(e){return{h:b(e.h),s:b(e.s),v:b(e.v),a:b(e.a,2)}},S=e.memo(function(r){var t=r.hue,n=r.onChange,o=g([\"react-colorful__hue\",r.className]);return e.createElement(\"div\",{className:o},e.createElement(m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:s(t+360*e.left,0,360)})},\"aria-label\":\"Hue\",\"aria-valuenow\":b(t),\"aria-valuemax\":\"360\",\"aria-valuemin\":\"0\"},e.createElement(p,{className:\"react-colorful__hue-pointer\",left:t/360,color:q({h:t,s:100,v:100,a:1})})))}),T=e.memo(function(r){var t=r.hsva,n=r.onChange,o={backgroundColor:q({h:t.h,s:100,v:100,a:1})};return e.createElement(\"div\",{className:\"react-colorful__saturation\",style:o},e.createElement(m,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:s(t.s+100*e.left,0,100),v:s(t.v-100*e.top,0,100)})},\"aria-label\":\"Color\",\"aria-valuetext\":\"Saturation \"+b(t.s)+\"%, Brightness \"+b(t.v)+\"%\"},e.createElement(p,{className:\"react-colorful__saturation-pointer\",top:1-t.v/100,left:t.s/100,color:q(t)})))}),F=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},P=function(e,r){return e.replace(/\\s/g,\"\")===r.replace(/\\s/g,\"\")},X=function(e,r){return e.toLowerCase()===r.toLowerCase()||F(C(e),C(r))};function Y(e,t,l){var u=i(l),c=o(function(){return e.toHsva(t)}),s=c[0],f=c[1],v=r({color:t,hsva:s});n(function(){if(!e.equal(t,v.current.color)){var r=e.toHsva(t);v.current={hsva:r,color:t},f(r)}},[t,e]),n(function(){var r;F(s,v.current.hsva)||e.equal(r=e.fromHsva(s),v.current.color)||(v.current={hsva:s,color:r},u(r))},[s,e,u]);var d=a(function(e){f(function(r){return Object.assign({},r,e)})},[]);return[s,d]}var R,V=\"undefined\"!=typeof window?l:n,$=function(){return R||(\"undefined\"!=typeof __webpack_nonce__?__webpack_nonce__:void 0)},G=function(e){R=e},J=new Map,Q=function(e){V(function(){var r=e.current?e.current.ownerDocument:document;if(void 0!==r&&!J.has(r)){var t=r.createElement(\"style\");t.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\\'data:image/svg+xml;charset=utf-8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill-opacity=\".05\"><path d=\"M8 0h8v8H8zM0 8h8v8H0z\"/></svg>\\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',J.set(r,t);var n=$();n&&t.setAttribute(\"nonce\",n),r.head.appendChild(t)}},[])},U=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h,className:\"react-colorful__last-control\"}))},W={defaultColor:\"000\",toHsva:x,fromHsva:function(e){return w({h:e.h,s:e.s,v:e.v,a:1})},equal:X},Z=function(r){return e.createElement(U,u({},r,{colorModel:W}))},ee=function(r){var t=r.className,n=r.hsva,o=r.onChange,a={backgroundImage:\"linear-gradient(90deg, \"+k(Object.assign({},n,{a:0}))+\", \"+k(Object.assign({},n,{a:1}))+\")\"},l=g([\"react-colorful__alpha\",t]),u=b(100*n.a);return e.createElement(\"div\",{className:l},e.createElement(\"div\",{className:\"react-colorful__alpha-gradient\",style:a}),e.createElement(m,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:s(n.a+e.left)})},\"aria-label\":\"Alpha\",\"aria-valuetext\":u+\"%\",\"aria-valuenow\":u,\"aria-valuemin\":\"0\",\"aria-valuemax\":\"100\"},e.createElement(p,{className:\"react-colorful__alpha-pointer\",left:n.a,color:k(n)})))},re=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h}),e.createElement(ee,{hsva:d,onChange:h,className:\"react-colorful__last-control\"}))},te={defaultColor:\"0001\",toHsva:x,fromHsva:w,equal:X},ne=function(r){return e.createElement(re,u({},r,{colorModel:te}))},oe={defaultColor:{h:0,s:0,l:0,a:1},toHsva:N,fromHsva:y,equal:F},ae=function(r){return e.createElement(re,u({},r,{colorModel:oe}))},le={defaultColor:\"hsla(0, 0%, 0%, 1)\",toHsva:H,fromHsva:k,equal:P},ue=function(r){return e.createElement(re,u({},r,{colorModel:le}))},ce={defaultColor:{h:0,s:0,l:0},toHsva:function(e){return N({h:e.h,s:e.s,l:e.l,a:1})},fromHsva:function(e){return{h:(r=y(e)).h,s:r.s,l:r.l};var r},equal:F},ie=function(r){return e.createElement(U,u({},r,{colorModel:ce}))},se={defaultColor:\"hsl(0, 0%, 0%)\",toHsva:M,fromHsva:q,equal:P},fe=function(r){return e.createElement(U,u({},r,{colorModel:se}))},ve={defaultColor:{h:0,s:0,v:0,a:1},toHsva:function(e){return e},fromHsva:A,equal:F},de=function(r){return e.createElement(re,u({},r,{colorModel:ve}))},he={defaultColor:\"hsva(0, 0%, 0%, 1)\",toHsva:O,fromHsva:function(e){var r=A(e);return\"hsva(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%, \"+r.a+\")\"},equal:P},me=function(r){return e.createElement(re,u({},r,{colorModel:he}))},ge={defaultColor:{h:0,s:0,v:0},toHsva:function(e){return{h:e.h,s:e.s,v:e.v,a:1}},fromHsva:function(e){var r=A(e);return{h:r.h,s:r.s,v:r.v}},equal:F},pe=function(r){return e.createElement(U,u({},r,{colorModel:ge}))},be={defaultColor:\"hsv(0, 0%, 0%)\",toHsva:j,fromHsva:function(e){var r=A(e);return\"hsv(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%)\"},equal:P},_e=function(r){return e.createElement(U,u({},r,{colorModel:be}))},xe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:L,fromHsva:I,equal:F},Ce=function(r){return e.createElement(re,u({},r,{colorModel:xe}))},Ee={defaultColor:\"rgba(0, 0, 0, 1)\",toHsva:z,fromHsva:function(e){var r=I(e);return\"rgba(\"+r.r+\", \"+r.g+\", \"+r.b+\", \"+r.a+\")\"},equal:P},He=function(r){return e.createElement(re,u({},r,{colorModel:Ee}))},Me={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return L({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(r=I(e)).r,g:r.g,b:r.b};var r},equal:F},Ne=function(r){return e.createElement(U,u({},r,{colorModel:Me}))},we={defaultColor:\"rgb(0, 0, 0)\",toHsva:B,fromHsva:function(e){var r=I(e);return\"rgb(\"+r.r+\", \"+r.g+\", \"+r.b+\")\"},equal:P},ye=function(r){return e.createElement(U,u({},r,{colorModel:we}))},qe=/^#?([0-9A-F]{3,8})$/i,ke=function(r){var t=r.color,l=void 0===t?\"\":t,s=r.onChange,f=r.onBlur,v=r.escape,d=r.validate,h=r.format,m=r.process,g=c(r,[\"color\",\"onChange\",\"onBlur\",\"escape\",\"validate\",\"format\",\"process\"]),p=o(function(){return v(l)}),b=p[0],_=p[1],x=i(s),C=i(f),E=a(function(e){var r=v(e.target.value);_(r),d(r)&&x(m?m(r):r)},[v,m,d,x]),H=a(function(e){d(e.target.value)||_(v(l)),C(e)},[l,v,d,C]);return n(function(){_(v(l))},[l,v]),e.createElement(\"input\",u({},g,{value:h?h(b):b,spellCheck:\"false\",onChange:E,onBlur:H}))},Ie=function(e){return\"#\"+e},Oe=function(r){var t=r.prefixed,n=r.alpha,o=c(r,[\"prefixed\",\"alpha\"]),l=a(function(e){return e.replace(/([^0-9A-F]+)/gi,\"\").substring(0,n?8:6)},[n]),i=a(function(e){return function(e,r){var t=qe.exec(e),n=t?t[1].length:0;return 3===n||6===n||!!r&&4===n||!!r&&8===n}(e,n)},[n]);return e.createElement(ke,u({},o,{escape:l,format:t?Ie:void 0,process:Ie,validate:i}))};export{ne as HexAlphaColorPicker,Oe as HexColorInput,Z as HexColorPicker,ie as HslColorPicker,fe as HslStringColorPicker,ae as HslaColorPicker,ue as HslaStringColorPicker,pe as HsvColorPicker,_e as HsvStringColorPicker,de as HsvaColorPicker,me as HsvaStringColorPicker,Ne as RgbColorPicker,ye as RgbStringColorPicker,Ce as RgbaColorPicker,He as RgbaStringColorPicker,G as setNonce};\n//# sourceMappingURL=index.module.js.map\n","import React, { useState, useRef, useEffect } from 'react';\nimport { HexColorPicker } from 'react-colorful';\nimport { useTheme } from '@principal-ade/industry-theme';\nimport { RotateCcw } from 'lucide-react';\n\ninterface ColorPickerInputProps {\n label: string;\n value: string;\n onChange: (color: string) => void;\n onReset?: () => void;\n defaultValue?: string;\n}\n\nexport const ColorPickerInput: React.FC<ColorPickerInputProps> = ({\n label,\n value,\n onChange,\n onReset,\n defaultValue,\n}) => {\n const { theme } = useTheme();\n const [showPicker, setShowPicker] = useState(false);\n const [inputValue, setInputValue] = useState(value);\n const pickerRef = useRef<HTMLDivElement>(null);\n\n // Sync input value when value prop changes\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n // Close picker when clicking outside\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n pickerRef.current &&\n !pickerRef.current.contains(event.target as Node)\n ) {\n setShowPicker(false);\n }\n };\n\n if (showPicker) {\n document.addEventListener('mousedown', handleClickOutside);\n return () =>\n document.removeEventListener('mousedown', handleClickOutside);\n }\n }, [showPicker]);\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newColor = e.target.value;\n setInputValue(newColor);\n\n // Only propagate valid complete hex colors\n if (/^#[0-9A-Fa-f]{6}$/.test(newColor)) {\n onChange(newColor);\n }\n };\n\n const handlePickerChange = (newColor: string) => {\n setInputValue(newColor);\n onChange(newColor);\n };\n\n // Ensure we always have a valid color for the picker\n const pickerColor = /^#[0-9A-Fa-f]{6}$/.test(value) ? value : '#000000';\n\n return (\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n marginBottom: '12px',\n position: 'relative',\n minWidth: 0,\n }}\n >\n <div\n style={{\n flex: '0 0 40%',\n maxWidth: '40%',\n fontSize: '13px',\n color: theme.colors.textSecondary,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {label}\n </div>\n\n {/* Color preview/button */}\n <div\n onClick={() => setShowPicker(!showPicker)}\n style={{\n flex: '0 0 auto',\n width: '32px',\n height: '32px',\n borderRadius: '6px',\n border: `2px solid ${theme.colors.border}`,\n backgroundColor: pickerColor,\n cursor: 'pointer',\n transition: 'transform 0.15s',\n boxShadow: `0 2px 4px rgba(0, 0, 0, 0.2)`,\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.transform = 'scale(1.1)';\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.transform = 'scale(1)';\n }}\n />\n\n {/* Hex input */}\n <input\n type=\"text\"\n value={inputValue}\n onChange={handleInputChange}\n placeholder=\"#000000\"\n style={{\n flex: '1 1 auto',\n minWidth: '90px',\n padding: '8px 10px',\n borderRadius: '6px',\n border: `1px solid ${theme.colors.border}`,\n backgroundColor: theme.colors.background,\n color: theme.colors.text,\n fontSize: '13px',\n fontFamily: 'monospace',\n boxSizing: 'border-box',\n }}\n />\n\n {/* Reset button */}\n {onReset && defaultValue && value !== defaultValue && (\n <button\n onClick={onReset}\n title=\"Reset to default\"\n style={{\n flex: '0 0 auto',\n padding: '8px',\n borderRadius: '6px',\n border: `1px solid ${theme.colors.border}`,\n backgroundColor: theme.colors.background,\n color: theme.colors.textSecondary,\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: 'all 0.15s',\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor =\n theme.colors.backgroundSecondary;\n e.currentTarget.style.color = theme.colors.text;\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = theme.colors.background;\n e.currentTarget.style.color = theme.colors.textSecondary;\n }}\n >\n <RotateCcw size={16} />\n </button>\n )}\n\n {/* Color picker popover */}\n {showPicker && (\n <div\n ref={pickerRef}\n style={{\n position: 'absolute',\n top: '100%',\n left: '0',\n marginTop: '8px',\n zIndex: 1000,\n padding: '12px',\n borderRadius: '12px',\n backgroundColor: theme.colors.backgroundSecondary,\n border: `1px solid ${theme.colors.border}`,\n boxShadow: `0 8px 24px rgba(0, 0, 0, 0.4)`,\n }}\n >\n <HexColorPicker color={pickerColor} onChange={handlePickerChange} />\n </div>\n )}\n </div>\n );\n};\n","import React, { useState } from 'react';\nimport { ThemeProvider, useTheme } from '@principal-ade/industry-theme';\nimport { Palette, HelpCircle } from 'lucide-react';\nimport type { PanelComponentProps } from '../types';\nimport { ColorPickerInput } from '../components/ColorPickerInput';\n\ninterface ColorConfig {\n label: string;\n path: string;\n}\n\n/**\n * HelpContent - Displays help information for the theme editor\n */\nconst HelpContent: React.FC = () => {\n const { theme } = useTheme();\n\n return (\n <div\n style={{\n maxWidth: '600px',\n margin: '0 auto',\n width: '100%',\n }}\n >\n <p\n style={{\n margin: '0 0 24px 0',\n fontSize: '15px',\n lineHeight: '1.6',\n color: theme.colors.text,\n }}\n >\n Customize the Industry theme colors to match your preferences. Changes will be saved automatically.\n </p>\n\n <div\n style={{\n padding: '20px',\n backgroundColor: theme.colors.backgroundSecondary,\n borderRadius: '8px',\n border: `1px solid ${theme.colors.border}`,\n }}\n >\n <h4\n style={{\n margin: '0 0 16px 0',\n fontSize: theme.fontSizes[3],\n color: theme.colors.text,\n fontWeight: 600,\n }}\n >\n How to Use\n </h4>\n <ul\n style={{\n margin: 0,\n paddingLeft: '20px',\n fontSize: '14px',\n color: theme.colors.textSecondary,\n lineHeight: '1.8',\n }}\n >\n <li>Click the color square to open the color picker</li>\n <li>Enter hex values directly in the input field</li>\n <li>Use the reset button to revert individual colors</li>\n <li>All changes are applied immediately</li>\n </ul>\n </div>\n </div>\n );\n};\n\nconst COLOR_GROUPS: Record<string, ColorConfig[]> = {\n 'Primary Colors': [\n { label: 'Primary', path: 'colors.primary' },\n { label: 'Secondary', path: 'colors.secondary' },\n { label: 'Accent', path: 'colors.accent' },\n ],\n 'Background Colors': [\n { label: 'BG Default', path: 'colors.background' },\n { label: 'BG Light', path: 'colors.backgroundLight' },\n { label: 'BG Dark', path: 'colors.backgroundDark' },\n { label: 'BG Secondary', path: 'colors.backgroundSecondary' },\n { label: 'BG Tertiary', path: 'colors.backgroundTertiary' },\n ],\n 'Text Colors': [\n { label: 'Text', path: 'colors.text' },\n { label: 'Text Secondary', path: 'colors.textSecondary' },\n { label: 'Text Tertiary', path: 'colors.textTertiary' },\n ],\n 'UI Colors': [\n { label: 'Border', path: 'colors.border' },\n { label: 'Border Light', path: 'colors.borderLight' },\n { label: 'Border Dark', path: 'colors.borderDark' },\n ],\n 'Status Colors': [\n { label: 'Success', path: 'colors.success' },\n { label: 'Warning', path: 'colors.warning' },\n { label: 'Error', path: 'colors.error' },\n { label: 'Info', path: 'colors.info' },\n ],\n};\n\n/**\n * ThemeEditorPanelContent - Internal component that uses theme\n */\nconst ThemeEditorPanelContent: React.FC<PanelComponentProps> = () => {\n const { theme } = useTheme();\n const [showHelp, setShowHelp] = useState(false);\n\n const handleColorChange = async (path: string, newValue: string) => {\n // TODO: Implement theme update via panel framework actions\n console.log(`Update ${path} to ${newValue}`);\n };\n\n const handleResetColor = async (path: string) => {\n // TODO: Implement reset via panel framework actions\n console.log(`Reset ${path}`);\n };\n\n const getColorValue = (path: string): string => {\n const parts = path.split('.');\n let value: any = theme;\n\n for (const part of parts) {\n if (value && typeof value === 'object' && part in value) {\n value = value[part];\n } else {\n return '#000000';\n }\n }\n\n return typeof value === 'string' ? value : '#000000';\n };\n\n return (\n <div\n style={{\n fontFamily: theme.fonts.body,\n height: '100%',\n display: 'flex',\n flexDirection: 'column',\n backgroundColor: theme.colors.background,\n color: theme.colors.text,\n overflow: 'hidden',\n position: 'relative',\n }}\n >\n {/* Header - Fixed */}\n <div\n style={{\n padding: '20px',\n borderBottom: `1px solid ${theme.colors.border}`,\n flex: '0 0 auto',\n }}\n >\n <div style={{ display: 'flex', alignItems: 'center', gap: '12px', justifyContent: 'space-between' }}>\n <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>\n <Palette size={24} color={theme.colors.primary} />\n <h2\n style={{\n margin: 0,\n fontSize: theme.fontSizes[4],\n color: theme.colors.text,\n }}\n >\n Theme Editor\n </h2>\n </div>\n\n {/* Help Button */}\n <button\n onClick={() => setShowHelp(!showHelp)}\n title=\"Help\"\n style={{\n padding: '8px',\n borderRadius: '6px',\n border: `1px solid ${theme.colors.border}`,\n backgroundColor: showHelp ? theme.colors.backgroundSecondary : theme.colors.background,\n color: theme.colors.text,\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: 'all 0.15s',\n }}\n onMouseEnter={(e) => {\n if (!showHelp) {\n e.currentTarget.style.backgroundColor = theme.colors.backgroundSecondary;\n }\n }}\n onMouseLeave={(e) => {\n if (!showHelp) {\n e.currentTarget.style.backgroundColor = theme.colors.background;\n }\n }}\n >\n <HelpCircle size={18} />\n </button>\n </div>\n </div>\n\n {/* Scrollable Content */}\n <div\n style={{\n flex: '1 1 auto',\n overflowY: 'auto',\n padding: '20px',\n display: 'flex',\n flexDirection: 'column',\n gap: '16px',\n }}\n >\n {showHelp ? (\n <HelpContent />\n ) : (\n /* Color Groups */\n <>\n {Object.entries(COLOR_GROUPS).map(([groupName, colors]) => (\n <section\n key={groupName}\n style={{\n padding: '16px',\n background: theme.colors.backgroundSecondary,\n borderRadius: theme.radii[2],\n border: `1px solid ${theme.colors.border}`,\n flex: '0 0 auto',\n }}\n >\n <h3\n style={{\n margin: '0 0 16px 0',\n fontSize: theme.fontSizes[3],\n color: theme.colors.text,\n fontWeight: 600,\n }}\n >\n {groupName}\n </h3>\n {colors.map((color) => (\n <ColorPickerInput\n key={color.path}\n label={color.label}\n value={getColorValue(color.path)}\n onChange={(newValue) => handleColorChange(color.path, newValue)}\n onReset={() => handleResetColor(color.path)}\n defaultValue={getColorValue(color.path)}\n />\n ))}\n </section>\n ))}\n </>\n )}\n </div>\n </div>\n );\n};\n\n/**\n * ThemeEditorPanel - A panel for customizing the Industry theme colors.\n *\n * This panel allows users to:\n * - Customize theme colors across different categories\n * - Preview changes in real-time\n * - Reset individual colors to defaults\n * - Save theme customizations\n */\nexport const ThemeEditorPanel: React.FC<PanelComponentProps> = (props) => {\n return (\n <ThemeProvider>\n <ThemeEditorPanelContent {...props} />\n </ThemeProvider>\n );\n};\n","/**\n * Theme Editor Panel Tools\n *\n * UTCP-compatible tools for the theme editor panel extension.\n * These tools can be invoked by AI agents and emit events that panels listen for.\n *\n * IMPORTANT: This file should NOT import any React components to ensure\n * it can be imported server-side without pulling in React dependencies.\n * Use the './tools' subpath export for server-safe imports.\n */\n\nimport type { PanelTool, PanelToolsMetadata } from '@principal-ade/utcp-panel-event';\n\n/**\n * Tool: Set Theme Color\n */\nexport const setThemeColorTool: PanelTool = {\n name: 'set_theme_color',\n description: 'Sets a specific color in the Industry theme',\n inputs: {\n type: 'object',\n properties: {\n colorKey: {\n type: 'string',\n description: 'The color key to set (e.g., \"primary\", \"secondary\", \"accent\", \"background\")',\n },\n colorValue: {\n type: 'string',\n description: 'The color value in hex format (e.g., \"#ff5500\")',\n },\n },\n required: ['colorKey', 'colorValue'],\n },\n outputs: {\n type: 'object',\n properties: {\n success: { type: 'boolean' },\n colorKey: { type: 'string' },\n colorValue: { type: 'string' },\n },\n },\n tags: ['theme', 'color', 'customization'],\n tool_call_template: {\n call_template_type: 'panel_event',\n event_type: 'industry-theme.theme-editor:set-color',\n },\n};\n\n/**\n * Tool: Reset Theme\n */\nexport const resetThemeTool: PanelTool = {\n name: 'reset_theme',\n description: 'Resets the theme to default Industry theme colors',\n inputs: {\n type: 'object',\n properties: {\n confirmReset: {\n type: 'boolean',\n description: 'Confirm the reset action',\n },\n },\n },\n outputs: {\n type: 'object',\n properties: {\n success: { type: 'boolean' },\n message: { type: 'string' },\n },\n },\n tags: ['theme', 'reset', 'default'],\n tool_call_template: {\n call_template_type: 'panel_event',\n event_type: 'industry-theme.theme-editor:reset-theme',\n },\n};\n\n/**\n * Tool: Apply Theme Preset\n */\nexport const applyThemePresetTool: PanelTool = {\n name: 'apply_theme_preset',\n description: 'Applies a predefined theme preset',\n inputs: {\n type: 'object',\n properties: {\n presetName: {\n type: 'string',\n description: 'The name of the preset to apply (e.g., \"dark\", \"light\", \"high-contrast\")',\n },\n },\n required: ['presetName'],\n },\n outputs: {\n type: 'object',\n properties: {\n success: { type: 'boolean' },\n appliedPreset: { type: 'string' },\n },\n },\n tags: ['theme', 'preset', 'customization'],\n tool_call_template: {\n call_template_type: 'panel_event',\n event_type: 'industry-theme.theme-editor:apply-preset',\n },\n};\n\n/**\n * Tool: Export Theme\n */\nexport const exportThemeTool: PanelTool = {\n name: 'export_theme',\n description: 'Exports the current theme configuration',\n inputs: {\n type: 'object',\n properties: {\n format: {\n type: 'string',\n enum: ['json', 'css', 'scss'],\n description: 'The export format',\n },\n },\n },\n outputs: {\n type: 'object',\n properties: {\n success: { type: 'boolean' },\n format: { type: 'string' },\n content: { type: 'string' },\n },\n },\n tags: ['theme', 'export', 'configuration'],\n tool_call_template: {\n call_template_type: 'panel_event',\n event_type: 'industry-theme.theme-editor:export-theme',\n },\n};\n\n/**\n * All tools exported as an array.\n */\nexport const themeEditorTools: PanelTool[] = [\n setThemeColorTool,\n resetThemeTool,\n applyThemePresetTool,\n exportThemeTool,\n];\n\n/**\n * Panel tools metadata for registration with PanelToolRegistry.\n */\nexport const themeEditorToolsMetadata: PanelToolsMetadata = {\n id: 'industry-theme.theme-editor',\n name: 'Theme Editor',\n description: 'Tools provided by the Industry Theme Editor panel extension',\n tools: themeEditorTools,\n};\n","import { ThemeEditorPanel } from './panels/ThemeEditorPanel';\nimport type { PanelDefinition, PanelContextValue } from './types';\nimport { themeEditorTools } from './tools';\n\n/**\n * Export array of panel definitions.\n * This is the required export for panel extensions.\n */\nexport const panels: PanelDefinition[] = [\n {\n metadata: {\n id: 'industry-theme.theme-editor',\n name: 'Theme Editor',\n icon: '🎨',\n version: '0.1.0',\n author: 'Principal ADE',\n description: 'Customize Industry theme colors and appearance',\n slices: [], // This panel doesn't need data slices\n tools: themeEditorTools,\n },\n component: ThemeEditorPanel,\n\n // Optional: Called when this specific panel is mounted\n onMount: async (context: PanelContextValue) => {\n // eslint-disable-next-line no-console\n console.log(\n 'Theme Editor Panel mounted',\n context.currentScope.repository?.path\n );\n },\n\n // Optional: Called when this specific panel is unmounted\n onUnmount: async (_context: PanelContextValue) => {\n // eslint-disable-next-line no-console\n console.log('Theme Editor Panel unmounting');\n },\n },\n];\n\n/**\n * Optional: Called once when the entire package is loaded.\n * Use this for package-level initialization.\n */\nexport const onPackageLoad = async () => {\n // eslint-disable-next-line no-console\n console.log('Panel package loaded - Theme Editor Panel Extension');\n};\n\n/**\n * Optional: Called once when the package is unloaded.\n * Use this for package-level cleanup.\n */\nexport const onPackageUnload = async () => {\n // eslint-disable-next-line no-console\n console.log('Panel package unloading - Theme Editor Panel Extension');\n};\n\n// Export tools for server-safe imports\nexport {\n themeEditorTools,\n themeEditorToolsMetadata,\n setThemeColorTool,\n resetThemeTool,\n applyThemePresetTool,\n exportThemeTool,\n} from './tools';\n"],"names":["theme","React","__iconNode","r","e","t","s","m","g","p","b","x","o","a","C","n","u","c","i","f","v","d","l","h","HexColorPicker","HelpCircle"],"mappings":";;AAyzBA,IAAI,gBAAgB;AAAA,EAClB,OAAO,CAAC,GAAG,GAAG,GAAG,IAAI,IAAI,IAAI,KAAK,KAAK,GAAG;AAAA,EAC1C,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAW;AAAA,EACf;AAAA,EACE,WAAW,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;AAAA,EAClD,WAAW;AAAA,EACX,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,UAAU;AAAA,EACd;AAAA,EACE,aAAa;AAAA,IACX,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,SAAS;AAAA,EACb;AAAA,EACE,aAAa,CAAC,SAAS,SAAS,UAAU,QAAQ;AAAA,EAClD,OAAO,CAAC,IAAI,IAAI,IAAI,KAAK,KAAK,KAAK,KAAK,MAAM,IAAI;AAAA,EAClD,OAAO,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,IAAI,EAAE;AAAA,EACjC,SAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACE,UAAU,CAAC,G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YAAY;AAEvC,UAAQ,IAAI,qDAAqD;AACnE;AAMO,MAAM,kBAAkB,YAAY;AAEzC,UAAQ,IAAI,wDAAwD;AACtE;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Theme Editor Panel Tools
3
+ *
4
+ * UTCP-compatible tools for the theme editor panel extension.
5
+ * These tools can be invoked by AI agents and emit events that panels listen for.
6
+ *
7
+ * IMPORTANT: This file should NOT import any React components to ensure
8
+ * it can be imported server-side without pulling in React dependencies.
9
+ * Use the './tools' subpath export for server-safe imports.
10
+ */
11
+ import type { PanelTool, PanelToolsMetadata } from '@principal-ade/utcp-panel-event';
12
+ /**
13
+ * Tool: Set Theme Color
14
+ */
15
+ export declare const setThemeColorTool: PanelTool;
16
+ /**
17
+ * Tool: Reset Theme
18
+ */
19
+ export declare const resetThemeTool: PanelTool;
20
+ /**
21
+ * Tool: Apply Theme Preset
22
+ */
23
+ export declare const applyThemePresetTool: PanelTool;
24
+ /**
25
+ * Tool: Export Theme
26
+ */
27
+ export declare const exportThemeTool: PanelTool;
28
+ /**
29
+ * All tools exported as an array.
30
+ */
31
+ export declare const themeEditorTools: PanelTool[];
32
+ /**
33
+ * Panel tools metadata for registration with PanelToolRegistry.
34
+ */
35
+ export declare const themeEditorToolsMetadata: PanelToolsMetadata;
36
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,SA8B/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,SAwB5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAyBlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SA0B7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,EAKvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,kBAKtC,CAAC"}
@@ -0,0 +1,130 @@
1
+ // src/tools/index.ts
2
+ var setThemeColorTool = {
3
+ name: "set_theme_color",
4
+ description: "Sets a specific color in the Industry theme",
5
+ inputs: {
6
+ type: "object",
7
+ properties: {
8
+ colorKey: {
9
+ type: "string",
10
+ description: 'The color key to set (e.g., "primary", "secondary", "accent", "background")'
11
+ },
12
+ colorValue: {
13
+ type: "string",
14
+ description: 'The color value in hex format (e.g., "#ff5500")'
15
+ }
16
+ },
17
+ required: ["colorKey", "colorValue"]
18
+ },
19
+ outputs: {
20
+ type: "object",
21
+ properties: {
22
+ success: { type: "boolean" },
23
+ colorKey: { type: "string" },
24
+ colorValue: { type: "string" }
25
+ }
26
+ },
27
+ tags: ["theme", "color", "customization"],
28
+ tool_call_template: {
29
+ call_template_type: "panel_event",
30
+ event_type: "industry-theme.theme-editor:set-color"
31
+ }
32
+ };
33
+ var resetThemeTool = {
34
+ name: "reset_theme",
35
+ description: "Resets the theme to default Industry theme colors",
36
+ inputs: {
37
+ type: "object",
38
+ properties: {
39
+ confirmReset: {
40
+ type: "boolean",
41
+ description: "Confirm the reset action"
42
+ }
43
+ }
44
+ },
45
+ outputs: {
46
+ type: "object",
47
+ properties: {
48
+ success: { type: "boolean" },
49
+ message: { type: "string" }
50
+ }
51
+ },
52
+ tags: ["theme", "reset", "default"],
53
+ tool_call_template: {
54
+ call_template_type: "panel_event",
55
+ event_type: "industry-theme.theme-editor:reset-theme"
56
+ }
57
+ };
58
+ var applyThemePresetTool = {
59
+ name: "apply_theme_preset",
60
+ description: "Applies a predefined theme preset",
61
+ inputs: {
62
+ type: "object",
63
+ properties: {
64
+ presetName: {
65
+ type: "string",
66
+ description: 'The name of the preset to apply (e.g., "dark", "light", "high-contrast")'
67
+ }
68
+ },
69
+ required: ["presetName"]
70
+ },
71
+ outputs: {
72
+ type: "object",
73
+ properties: {
74
+ success: { type: "boolean" },
75
+ appliedPreset: { type: "string" }
76
+ }
77
+ },
78
+ tags: ["theme", "preset", "customization"],
79
+ tool_call_template: {
80
+ call_template_type: "panel_event",
81
+ event_type: "industry-theme.theme-editor:apply-preset"
82
+ }
83
+ };
84
+ var exportThemeTool = {
85
+ name: "export_theme",
86
+ description: "Exports the current theme configuration",
87
+ inputs: {
88
+ type: "object",
89
+ properties: {
90
+ format: {
91
+ type: "string",
92
+ enum: ["json", "css", "scss"],
93
+ description: "The export format"
94
+ }
95
+ }
96
+ },
97
+ outputs: {
98
+ type: "object",
99
+ properties: {
100
+ success: { type: "boolean" },
101
+ format: { type: "string" },
102
+ content: { type: "string" }
103
+ }
104
+ },
105
+ tags: ["theme", "export", "configuration"],
106
+ tool_call_template: {
107
+ call_template_type: "panel_event",
108
+ event_type: "industry-theme.theme-editor:export-theme"
109
+ }
110
+ };
111
+ var themeEditorTools = [
112
+ setThemeColorTool,
113
+ resetThemeTool,
114
+ applyThemePresetTool,
115
+ exportThemeTool
116
+ ];
117
+ var themeEditorToolsMetadata = {
118
+ id: "industry-theme.theme-editor",
119
+ name: "Theme Editor",
120
+ description: "Tools provided by the Industry Theme Editor panel extension",
121
+ tools: themeEditorTools
122
+ };
123
+ export {
124
+ themeEditorToolsMetadata,
125
+ themeEditorTools,
126
+ setThemeColorTool,
127
+ resetThemeTool,
128
+ exportThemeTool,
129
+ applyThemePresetTool
130
+ };
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * Re-exports core types from @principal-ade/panel-framework-core
5
5
  */
6
- export type { DataSlice, WorkspaceMetadata, RepositoryMetadata, FileTreeSource, ActiveFileSlice, PanelEventType, PanelEvent, PanelEventEmitter, PanelActions, PanelContextValue, PanelComponentProps, PanelMetadata, PanelLifecycleHooks, PanelDefinition, PanelModule, PanelRegistryEntry, PanelLoader, PanelRegistryConfig, } from '@principal-ade/panel-framework-core';
6
+ export type { DataSlice, WorkspaceMetadata, RepositoryMetadata, FileTreeSource, ActiveFileSlice, PanelEventType, PanelEvent, PanelEventEmitter, PanelActions, PanelContextValue, PanelComponentProps, PanelMetadata, PanelLifecycleHooks, PanelDefinition, PanelModule, PanelRegistryEntry, PanelLoader, PanelRegistryConfig, PanelTool, PanelToolsMetadata, JsonSchema, PanelEventCallTemplate, } from '@principal-ade/panel-framework-core';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAEV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EAGf,cAAc,EACd,UAAU,EACV,iBAAiB,EAGjB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EAGnB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,WAAW,EAGX,kBAAkB,EAClB,WAAW,EACX,mBAAmB,GACpB,MAAM,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EAEV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe,EAGf,cAAc,EACd,UAAU,EACV,iBAAiB,EAGjB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EAGnB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,WAAW,EAGX,kBAAkB,EAClB,WAAW,EACX,mBAAmB,EAGnB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,sBAAsB,GACvB,MAAM,qCAAqC,CAAC"}
package/package.json CHANGED
@@ -1,19 +1,34 @@
1
1
  {
2
2
  "name": "@industry-theme/theme-editor-panel",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Theme editor panel for customizing the Industry theme appearance and styling",
5
5
  "type": "module",
6
6
  "main": "dist/panels.bundle.js",
7
7
  "module": "dist/panels.bundle.js",
8
8
  "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/panels.bundle.js",
13
+ "require": "./dist/panels.bundle.js",
14
+ "default": "./dist/panels.bundle.js"
15
+ },
16
+ "./tools": {
17
+ "types": "./dist/tools/index.d.ts",
18
+ "import": "./dist/tools.bundle.js",
19
+ "require": "./dist/tools.bundle.js",
20
+ "default": "./dist/tools.bundle.js"
21
+ }
22
+ },
9
23
  "keywords": [
10
24
  "panel-extension"
11
25
  ],
12
26
  "author": "Principal ADE",
13
27
  "license": "MIT",
14
28
  "scripts": {
15
- "build": "bun run clean && bun run build:panel && bun run build:types",
29
+ "build": "bun run clean && bun run build:panel && bun run build:tools && bun run build:types",
16
30
  "build:panel": "vite build",
31
+ "build:tools": "bun build ./src/tools/index.ts --outfile ./dist/tools.bundle.js --format esm --target browser",
17
32
  "build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly --declaration --declarationMap",
18
33
  "dev": "vite build --watch",
19
34
  "clean": "rm -rf dist",
@@ -37,23 +52,20 @@
37
52
  }
38
53
  },
39
54
  "dependencies": {
40
- "@principal-ade/industry-theme": "^0.1.2",
41
- "@principal-ade/panel-framework-core": "^0.1.2",
55
+ "@principal-ade/industry-theme": "^0.1.3",
56
+ "@principal-ade/panel-framework-core": "^0.1.5",
57
+ "@principal-ade/utcp-panel-event": "^0.1.0",
42
58
  "clsx": "^2.1.1",
43
59
  "lucide-react": "^0.552.0",
44
60
  "react-colorful": "^5.6.1"
45
61
  },
46
62
  "devDependencies": {
47
- "@chromatic-com/storybook": "^3.2.2",
63
+ "@chromatic-com/storybook": "^4.1.3",
48
64
  "@eslint/js": "^9.32.0",
49
- "@storybook/addon-essentials": "^8.5.0",
50
- "@storybook/addon-interactions": "^8.5.0",
51
- "@storybook/addon-links": "^8.5.0",
52
- "@storybook/addon-onboarding": "^8.5.0",
53
- "@storybook/blocks": "^8.5.0",
54
- "@storybook/react": "^8.5.0",
55
- "@storybook/react-vite": "^8.5.0",
56
- "@storybook/test": "^8.5.0",
65
+ "@storybook/addon-docs": "10.1.2",
66
+ "@storybook/addon-links": "10.1.2",
67
+ "@storybook/addon-onboarding": "10.1.2",
68
+ "@storybook/react-vite": "10.1.2",
57
69
  "@types/bun": "latest",
58
70
  "@types/node": "^22.15.26",
59
71
  "@types/react": "^19.0.0",
@@ -66,11 +78,11 @@
66
78
  "eslint-config-prettier": "^10.1.8",
67
79
  "eslint-plugin-react": "^7.37.2",
68
80
  "eslint-plugin-react-hooks": "^5.0.0",
69
- "eslint-plugin-storybook": "^0.11.1",
81
+ "eslint-plugin-storybook": "10.1.2",
70
82
  "prettier": "^3.6.2",
71
83
  "react": "^19.0.0",
72
84
  "react-dom": "^19.0.0",
73
- "storybook": "^8.5.0",
85
+ "storybook": "10.1.2",
74
86
  "typescript": "^5.0.4",
75
87
  "typescript-eslint": "^8.38.0",
76
88
  "vite": "^6.0.7"