doodleui-react 0.6.0 → 0.6.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.cjs CHANGED
@@ -95,6 +95,9 @@ function toRoughOptions(props) {
95
95
  if (props.fill) {
96
96
  options.fill = props.fill;
97
97
  options.fillStyle = props.fillStyle ?? "hachure";
98
+ if (props.hachureGap !== void 0) options.hachureGap = props.hachureGap;
99
+ if (props.hachureAngle !== void 0) options.hachureAngle = props.hachureAngle;
100
+ if (props.fillWeight !== void 0) options.fillWeight = props.fillWeight;
98
101
  }
99
102
  return options;
100
103
  }
@@ -102,6 +105,10 @@ var DEFAULT_ROUGHNESS = 1.5;
102
105
  var DEFAULT_BOWING = 1;
103
106
  var DEFAULT_STROKE_WIDTH = 1.75;
104
107
  var DEFAULT_INK = "#1f1d1a";
108
+ var DEFAULT_DARK_INK = "#f3f4f6";
109
+ var DEFAULT_PAPER = "#f7f6f2";
110
+ var DEFAULT_DARK_PAPER = "#131923";
111
+ var DEFAULT_DARK_CARD_BG = "#131923";
105
112
  var DEFAULT_INSET = 3;
106
113
  var SKETCH_COLORS = {
107
114
  ink: DEFAULT_INK,
@@ -114,6 +121,19 @@ var SKETCH_COLORS = {
114
121
  error: "#c0392b",
115
122
  success: "#2d6a4f"
116
123
  };
124
+ var DARK_SKETCH_COLORS = {
125
+ ink: DEFAULT_DARK_INK,
126
+ accent: "#f87171",
127
+ accentFill: "rgba(248, 113, 113, 0.22)",
128
+ secondaryFill: "rgba(255, 255, 255, 0.08)",
129
+ paper: DEFAULT_DARK_PAPER,
130
+ cardBg: DEFAULT_DARK_CARD_BG,
131
+ shadow: "#000000",
132
+ info: "#60a5fa",
133
+ warning: "#fbbf24",
134
+ error: "#f87171",
135
+ success: "#34d399"
136
+ };
117
137
 
118
138
  // src/utils.ts
119
139
  function assignRef(ref, value) {
@@ -229,6 +249,9 @@ function RoughSvg({
229
249
  fillStyle,
230
250
  strokeWidth,
231
251
  fill,
252
+ hachureGap,
253
+ hachureAngle,
254
+ fillWeight,
232
255
  inset = DEFAULT_INSET,
233
256
  path,
234
257
  className,
@@ -252,7 +275,10 @@ function RoughSvg({
252
275
  bowing,
253
276
  fillStyle,
254
277
  strokeWidth,
255
- fill
278
+ fill,
279
+ hachureGap,
280
+ hachureAngle,
281
+ fillWeight
256
282
  });
257
283
  const x = inset;
258
284
  const y = inset;
@@ -288,6 +314,9 @@ function RoughSvg({
288
314
  fillStyle,
289
315
  strokeWidth,
290
316
  fill,
317
+ hachureGap,
318
+ hachureAngle,
319
+ fillWeight,
291
320
  inset,
292
321
  path
293
322
  ]);
@@ -325,16 +354,17 @@ var DoodleUIContext = react.createContext(null);
325
354
  function DoodleUIProvider({
326
355
  children,
327
356
  animate = true,
328
- forceAnimate = false
357
+ forceAnimate = false,
358
+ theme = "system"
329
359
  }) {
330
360
  const value = react.useMemo(
331
- () => ({ animate, forceAnimate }),
332
- [animate, forceAnimate]
361
+ () => ({ animate, forceAnimate, theme }),
362
+ [animate, forceAnimate, theme]
333
363
  );
334
364
  return /* @__PURE__ */ jsxRuntime.jsx(DoodleUIContext.Provider, { value, children });
335
365
  }
336
366
  function useDoodleUI() {
337
- return react.useContext(DoodleUIContext) ?? { animate: true, forceAnimate: false };
367
+ return react.useContext(DoodleUIContext) ?? { animate: true, forceAnimate: false, theme: "system" };
338
368
  }
339
369
 
340
370
  // src/animations/resolveAnimate.ts
@@ -492,6 +522,93 @@ function useDrawIn(pathRef, duration = DRAW_IN_DURATION_MS, enabled = true, repl
492
522
  };
493
523
  }, [pathRef, duration, enabled, replayKey, delay]);
494
524
  }
525
+ function checkIsDark() {
526
+ if (typeof window === "undefined" || typeof document === "undefined") {
527
+ return false;
528
+ }
529
+ const root = document.documentElement;
530
+ if (root.classList.contains("dark")) return true;
531
+ const dataTheme = root.getAttribute("data-theme");
532
+ if (dataTheme === "dark") return true;
533
+ if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
534
+ return true;
535
+ }
536
+ return false;
537
+ }
538
+ function useSketchTheme(sketchColorOverride) {
539
+ const doodleContext = useDoodleUI();
540
+ const contextTheme = doodleContext?.theme;
541
+ const [isClientDark, setIsClientDark] = react.useState(() => {
542
+ if (contextTheme === "dark") return true;
543
+ if (contextTheme === "light") return false;
544
+ return checkIsDark();
545
+ });
546
+ react.useEffect(() => {
547
+ if (contextTheme === "dark") {
548
+ setIsClientDark(true);
549
+ return;
550
+ }
551
+ if (contextTheme === "light") {
552
+ setIsClientDark(false);
553
+ return;
554
+ }
555
+ const update = () => {
556
+ setIsClientDark(checkIsDark());
557
+ };
558
+ update();
559
+ const mediaQuery = window.matchMedia?.("(prefers-color-scheme: dark)");
560
+ mediaQuery?.addEventListener?.("change", update);
561
+ const observer = new MutationObserver((mutations) => {
562
+ for (const m of mutations) {
563
+ if (m.attributeName === "class" || m.attributeName === "data-theme") {
564
+ update();
565
+ break;
566
+ }
567
+ }
568
+ });
569
+ observer.observe(document.documentElement, {
570
+ attributes: true,
571
+ attributeFilter: ["class", "data-theme"]
572
+ });
573
+ return () => {
574
+ mediaQuery?.removeEventListener?.("change", update);
575
+ observer.disconnect();
576
+ };
577
+ }, [contextTheme]);
578
+ const isDark = contextTheme === "dark" ? true : contextTheme === "light" ? false : isClientDark;
579
+ const baseInk = isDark ? DEFAULT_DARK_INK : DEFAULT_INK;
580
+ const ink = sketchColorOverride ?? baseInk;
581
+ if (isDark) {
582
+ return {
583
+ isDark: true,
584
+ ink,
585
+ paper: DEFAULT_DARK_PAPER,
586
+ cardBg: DEFAULT_DARK_CARD_BG,
587
+ shadow: "rgba(0, 0, 0, 0.45)",
588
+ accent: DARK_SKETCH_COLORS.accent,
589
+ accentFill: DARK_SKETCH_COLORS.accentFill,
590
+ secondaryFill: DARK_SKETCH_COLORS.secondaryFill,
591
+ info: DARK_SKETCH_COLORS.info,
592
+ warning: DARK_SKETCH_COLORS.warning,
593
+ error: DARK_SKETCH_COLORS.error,
594
+ success: DARK_SKETCH_COLORS.success
595
+ };
596
+ }
597
+ return {
598
+ isDark: false,
599
+ ink,
600
+ paper: DEFAULT_PAPER,
601
+ cardBg: DEFAULT_PAPER,
602
+ shadow: sketchColorOverride ?? DEFAULT_INK,
603
+ accent: SKETCH_COLORS.accent,
604
+ accentFill: SKETCH_COLORS.accentFill,
605
+ secondaryFill: SKETCH_COLORS.secondaryFill,
606
+ info: SKETCH_COLORS.info,
607
+ warning: SKETCH_COLORS.warning,
608
+ error: SKETCH_COLORS.error,
609
+ success: SKETCH_COLORS.success
610
+ };
611
+ }
495
612
  var SketchBox = react.forwardRef(
496
613
  function SketchBox2({
497
614
  children,
@@ -508,6 +625,9 @@ var SketchBox = react.forwardRef(
508
625
  sketchColor,
509
626
  bowing,
510
627
  strokeWidth,
628
+ hachureGap,
629
+ hachureAngle,
630
+ fillWeight,
511
631
  inset,
512
632
  path,
513
633
  animate,
@@ -516,8 +636,14 @@ var SketchBox = react.forwardRef(
516
636
  ...rest
517
637
  }, ref) {
518
638
  const rootRef = react.useRef(null);
639
+ const theme = useSketchTheme(sketchColor);
640
+ const resolvedInk = sketchColor ?? theme.ink;
519
641
  const shouldAnimate = useAnimate(animate);
520
642
  useDrawIn(rootRef, drawInDuration, shouldAnimate, drawInKey);
643
+ const hasExplicitFill = fill !== void 0;
644
+ const resolvedFill = hasExplicitFill ? fill : shadow ? theme.cardBg : void 0;
645
+ const resolvedFillStyle = fillStyle ?? (resolvedFill ? "solid" : "solid");
646
+ const isPatternedFill = Boolean(resolvedFill && resolvedFillStyle !== "solid");
521
647
  return /* @__PURE__ */ jsxRuntime.jsxs(
522
648
  "div",
523
649
  {
@@ -535,13 +661,31 @@ var SketchBox = react.forwardRef(
535
661
  shape,
536
662
  roughness: (roughness ?? 1.5) + 0.35,
537
663
  seed,
538
- sketchColor,
664
+ sketchColor: theme.isDark ? "rgba(0, 0, 0, 0.45)" : resolvedInk,
539
665
  bowing,
540
666
  fillStyle: "hachure",
541
- fill: sketchColor ?? "#1f1d1a",
667
+ fill: theme.isDark ? theme.shadow : resolvedInk ?? theme.ink,
542
668
  strokeWidth: 1,
669
+ hachureGap: 8,
543
670
  inset,
544
- style: { transform: "translate(5px, 6px)", opacity: 0.16 }
671
+ style: {
672
+ transform: "translate(5px, 6px)",
673
+ opacity: theme.isDark ? 0.35 : 0.16
674
+ }
675
+ }
676
+ ) : null,
677
+ isPatternedFill ? /* @__PURE__ */ jsxRuntime.jsx(
678
+ RoughSvg,
679
+ {
680
+ shape,
681
+ roughness,
682
+ seed,
683
+ sketchColor: "transparent",
684
+ bowing,
685
+ fillStyle: "solid",
686
+ fill: theme.cardBg,
687
+ strokeWidth: 0,
688
+ inset
545
689
  }
546
690
  ) : null,
547
691
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -550,11 +694,14 @@ var SketchBox = react.forwardRef(
550
694
  shape,
551
695
  roughness,
552
696
  seed,
553
- sketchColor,
697
+ sketchColor: resolvedInk,
554
698
  bowing,
555
- fillStyle: fill ? fillStyle : shadow ? "solid" : fillStyle,
556
- fill: fill ?? (shadow ? "#f7f6f2" : void 0),
699
+ fillStyle: resolvedFill ? resolvedFillStyle : void 0,
700
+ fill: resolvedFill,
557
701
  strokeWidth,
702
+ hachureGap: hachureGap ?? (isPatternedFill ? 10 : void 0),
703
+ hachureAngle,
704
+ fillWeight: fillWeight ?? (isPatternedFill ? 0.9 : void 0),
558
705
  inset,
559
706
  path
560
707
  }
@@ -567,6 +714,7 @@ var SketchBox = react.forwardRef(
567
714
  position: "relative",
568
715
  zIndex: 1,
569
716
  fontFamily: doodleUiFontFamily,
717
+ color: resolvedInk,
570
718
  ...contentStyle
571
719
  },
572
720
  children
@@ -599,6 +747,9 @@ var Button = react.forwardRef(
599
747
  bowing,
600
748
  fillStyle,
601
749
  strokeWidth,
750
+ hachureGap,
751
+ hachureAngle,
752
+ fillWeight,
602
753
  disabled,
603
754
  animate,
604
755
  onMouseEnter,
@@ -607,13 +758,15 @@ var Button = react.forwardRef(
607
758
  }, ref) {
608
759
  const rootRef = react.useRef(null);
609
760
  const [hovered, setHovered] = react.useState(false);
761
+ const theme = useSketchTheme(sketchColor);
610
762
  const shouldAnimate = useAnimate(animate);
611
763
  const resolvedSeed = useResolvedSeed(seed);
612
764
  const hoverSeed = deriveSeed(resolvedSeed, "hover");
613
765
  const sketchSeed = shouldAnimate && hovered && !disabled ? hoverSeed : resolvedSeed;
614
- const ink = sketchColor ?? SKETCH_COLORS.ink;
615
- const fill = variant === "primary" ? SKETCH_COLORS.accentFill : variant === "secondary" ? SKETCH_COLORS.secondaryFill : void 0;
616
- const stroke = variant === "ghost" && !hovered ? "transparent" : variant === "primary" ? sketchColor ?? SKETCH_COLORS.accent : ink;
766
+ const ink = sketchColor ?? theme.ink;
767
+ const fill = variant === "primary" ? theme.isDark ? sketchColor ? `${sketchColor}28` : theme.accentFill : theme.accentFill : variant === "secondary" ? theme.secondaryFill : hovered && variant === "ghost" ? theme.isDark ? "rgba(255,255,255,0.06)" : "rgba(31,29,26,0.05)" : void 0;
768
+ const stroke = variant === "ghost" && !hovered ? "transparent" : variant === "primary" ? sketchColor ?? theme.accent : ink;
769
+ const textColor = variant === "primary" ? sketchColor ?? (theme.isDark ? "#ffffff" : ink) : ink;
617
770
  useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
618
771
  return /* @__PURE__ */ jsxRuntime.jsxs(
619
772
  "button",
@@ -642,7 +795,7 @@ var Button = react.forwardRef(
642
795
  border: "none",
643
796
  background: "transparent",
644
797
  cursor: disabled ? "not-allowed" : "pointer",
645
- color: ink,
798
+ color: textColor,
646
799
  fontFamily: doodleUiFontFamily,
647
800
  fontWeight: doodleUiFontWeight(600),
648
801
  lineHeight: 1.2,
@@ -660,8 +813,11 @@ var Button = react.forwardRef(
660
813
  seed: sketchSeed,
661
814
  sketchColor: stroke,
662
815
  bowing,
663
- fillStyle: fillStyle ?? "hachure",
816
+ fillStyle: fillStyle ?? (fill ? "hachure" : void 0),
664
817
  fill,
818
+ hachureGap: hachureGap ?? 7,
819
+ hachureAngle,
820
+ fillWeight: fillWeight ?? 1,
665
821
  strokeWidth: !shouldAnimate && hovered ? (strokeWidth ?? 1.75) + 0.4 : strokeWidth
666
822
  }
667
823
  ),
@@ -681,6 +837,9 @@ var Input = react.forwardRef(function Input2({
681
837
  bowing,
682
838
  fillStyle,
683
839
  strokeWidth,
840
+ hachureGap,
841
+ hachureAngle,
842
+ fillWeight,
684
843
  id,
685
844
  onFocus,
686
845
  onBlur,
@@ -689,11 +848,12 @@ var Input = react.forwardRef(function Input2({
689
848
  }, ref) {
690
849
  const [focused, setFocused] = react.useState(false);
691
850
  const fieldRef = react.useRef(null);
851
+ const theme = useSketchTheme(sketchColor);
692
852
  const shouldAnimate = useAnimate(animate);
693
853
  const resolvedSeed = useResolvedSeed(seed);
694
854
  const focusSeed = deriveSeed(resolvedSeed, "focus");
695
855
  const sketchSeed = shouldAnimate && focused ? focusSeed : resolvedSeed;
696
- const ink = sketchColor ?? SKETCH_COLORS.ink;
856
+ const ink = sketchColor ?? theme.ink;
697
857
  const inputId = id;
698
858
  useDrawIn(fieldRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
699
859
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -726,9 +886,12 @@ var Input = react.forwardRef(function Input2({
726
886
  shape: "rectangle",
727
887
  roughness,
728
888
  seed: sketchSeed,
729
- sketchColor: focused ? SKETCH_COLORS.accent : ink,
889
+ sketchColor: focused ? sketchColor ?? theme.accent : ink,
730
890
  bowing,
731
891
  fillStyle,
892
+ hachureGap,
893
+ hachureAngle,
894
+ fillWeight,
732
895
  strokeWidth: focused && !shouldAnimate ? (strokeWidth ?? 1.75) + 0.35 : focused ? (strokeWidth ?? 1.75) + 0.2 : strokeWidth
733
896
  }
734
897
  ),
@@ -779,6 +942,9 @@ var Textarea = react.forwardRef(
779
942
  bowing,
780
943
  fillStyle,
781
944
  strokeWidth,
945
+ hachureGap,
946
+ hachureAngle,
947
+ fillWeight,
782
948
  id,
783
949
  rows = 4,
784
950
  onFocus,
@@ -788,11 +954,12 @@ var Textarea = react.forwardRef(
788
954
  }, ref) {
789
955
  const [focused, setFocused] = react.useState(false);
790
956
  const fieldRef = react.useRef(null);
957
+ const theme = useSketchTheme(sketchColor);
791
958
  const shouldAnimate = useAnimate(animate);
792
959
  const resolvedSeed = useResolvedSeed(seed);
793
960
  const focusSeed = deriveSeed(resolvedSeed, "focus");
794
961
  const sketchSeed = shouldAnimate && focused ? focusSeed : resolvedSeed;
795
- const ink = sketchColor ?? SKETCH_COLORS.ink;
962
+ const ink = sketchColor ?? theme.ink;
796
963
  useDrawIn(fieldRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
797
964
  return /* @__PURE__ */ jsxRuntime.jsxs(
798
965
  "label",
@@ -824,9 +991,12 @@ var Textarea = react.forwardRef(
824
991
  shape: "rectangle",
825
992
  roughness,
826
993
  seed: sketchSeed,
827
- sketchColor: focused ? SKETCH_COLORS.accent : ink,
994
+ sketchColor: focused ? sketchColor ?? theme.accent : ink,
828
995
  bowing,
829
996
  fillStyle,
997
+ hachureGap,
998
+ hachureAngle,
999
+ fillWeight,
830
1000
  strokeWidth: focused && !shouldAnimate ? (strokeWidth ?? 1.75) + 0.35 : focused ? (strokeWidth ?? 1.75) + 0.2 : strokeWidth
831
1001
  }
832
1002
  ),
@@ -856,8 +1026,7 @@ var Textarea = react.forwardRef(
856
1026
  color: ink,
857
1027
  fontFamily: doodleUiFontFamily,
858
1028
  fontSize: 15,
859
- lineHeight: 1.5,
860
- padding: "10px 12px",
1029
+ padding: "8px 12px",
861
1030
  resize: "vertical",
862
1031
  ...style
863
1032
  },
@@ -875,6 +1044,7 @@ var CHECK_PATH = "M 4.5 10.5 L 8.5 14.5 L 15.5 5.5";
875
1044
  function CheckMark({
876
1045
  roughness,
877
1046
  seed,
1047
+ sketchColor,
878
1048
  bowing,
879
1049
  strokeWidth,
880
1050
  shouldAnimate
@@ -893,7 +1063,7 @@ function CheckMark({
893
1063
  path: CHECK_PATH,
894
1064
  roughness: (roughness ?? 1.5) * 0.7,
895
1065
  seed,
896
- sketchColor: SKETCH_COLORS.accent,
1066
+ sketchColor,
897
1067
  bowing,
898
1068
  strokeWidth: (strokeWidth ?? 1.6) + 0.4,
899
1069
  inset: 0
@@ -907,12 +1077,16 @@ var Checkbox = react.forwardRef(
907
1077
  className,
908
1078
  style,
909
1079
  label,
1080
+ fill,
910
1081
  roughness,
911
1082
  seed,
912
1083
  sketchColor,
913
1084
  bowing,
914
1085
  fillStyle,
915
1086
  strokeWidth,
1087
+ hachureGap,
1088
+ hachureAngle,
1089
+ fillWeight,
916
1090
  checked,
917
1091
  defaultChecked,
918
1092
  onCheckedChange,
@@ -920,7 +1094,9 @@ var Checkbox = react.forwardRef(
920
1094
  animate,
921
1095
  ...rest
922
1096
  }, ref) {
923
- const ink = sketchColor ?? SKETCH_COLORS.ink;
1097
+ const theme = useSketchTheme(sketchColor);
1098
+ const ink = sketchColor ?? theme.ink;
1099
+ const accent = sketchColor ?? theme.accent;
924
1100
  const generatedId = react.useId();
925
1101
  const inputId = id ?? generatedId;
926
1102
  const boxRef = react.useRef(null);
@@ -936,6 +1112,7 @@ var Checkbox = react.forwardRef(
936
1112
  gap: 8,
937
1113
  cursor: "pointer",
938
1114
  userSelect: "none",
1115
+ color: ink,
939
1116
  ...style
940
1117
  },
941
1118
  children: [
@@ -972,8 +1149,12 @@ var Checkbox = react.forwardRef(
972
1149
  seed,
973
1150
  sketchColor: ink,
974
1151
  bowing,
975
- fillStyle,
1152
+ fillStyle: fillStyle ?? (fill ? "solid" : void 0),
1153
+ fill,
976
1154
  strokeWidth: strokeWidth ?? 1.6,
1155
+ hachureGap,
1156
+ hachureAngle,
1157
+ fillWeight,
977
1158
  inset: 1.5
978
1159
  }
979
1160
  )
@@ -992,6 +1173,7 @@ var Checkbox = react.forwardRef(
992
1173
  {
993
1174
  roughness,
994
1175
  seed,
1176
+ sketchColor: accent,
995
1177
  bowing,
996
1178
  strokeWidth,
997
1179
  shouldAnimate
@@ -1006,7 +1188,7 @@ var Checkbox = react.forwardRef(
1006
1188
  "label",
1007
1189
  {
1008
1190
  htmlFor: inputId,
1009
- style: { fontSize: 15, cursor: "pointer", fontFamily: doodleUiFontFamily },
1191
+ style: { fontSize: 15, cursor: "pointer", fontFamily: doodleUiFontFamily, color: ink },
1010
1192
  children: label
1011
1193
  }
1012
1194
  ) : null
@@ -1038,6 +1220,7 @@ var SIZE = 20;
1038
1220
  function RadioDot({
1039
1221
  roughness,
1040
1222
  seed,
1223
+ sketchColor,
1041
1224
  bowing,
1042
1225
  shouldAnimate
1043
1226
  }) {
@@ -1071,8 +1254,8 @@ function RadioDot({
1071
1254
  shape: "ellipse",
1072
1255
  roughness: (roughness ?? 1.5) + 0.2,
1073
1256
  seed,
1074
- sketchColor: SKETCH_COLORS.accent,
1075
- fill: SKETCH_COLORS.accent,
1257
+ sketchColor,
1258
+ fill: sketchColor,
1076
1259
  fillStyle: "solid",
1077
1260
  bowing,
1078
1261
  strokeWidth: 1,
@@ -1086,17 +1269,23 @@ var Radio = react.forwardRef(function Radio2({
1086
1269
  className,
1087
1270
  style,
1088
1271
  label,
1272
+ fill,
1089
1273
  roughness,
1090
1274
  seed,
1091
1275
  sketchColor,
1092
1276
  bowing,
1093
1277
  fillStyle,
1094
1278
  strokeWidth,
1279
+ hachureGap,
1280
+ hachureAngle,
1281
+ fillWeight,
1095
1282
  id,
1096
1283
  animate,
1097
1284
  ...rest
1098
1285
  }, ref) {
1099
- const ink = sketchColor ?? SKETCH_COLORS.ink;
1286
+ const theme = useSketchTheme(sketchColor);
1287
+ const ink = sketchColor ?? theme.ink;
1288
+ const accent = sketchColor ?? theme.accent;
1100
1289
  const generatedId = react.useId();
1101
1290
  const inputId = id ?? generatedId;
1102
1291
  const ringRef = react.useRef(null);
@@ -1112,6 +1301,7 @@ var Radio = react.forwardRef(function Radio2({
1112
1301
  gap: 8,
1113
1302
  cursor: "pointer",
1114
1303
  userSelect: "none",
1304
+ color: ink,
1115
1305
  ...style
1116
1306
  },
1117
1307
  children: [
@@ -1146,8 +1336,12 @@ var Radio = react.forwardRef(function Radio2({
1146
1336
  seed,
1147
1337
  sketchColor: ink,
1148
1338
  bowing,
1149
- fillStyle,
1339
+ fillStyle: fillStyle ?? (fill ? "solid" : void 0),
1340
+ fill,
1150
1341
  strokeWidth: strokeWidth ?? 1.6,
1342
+ hachureGap,
1343
+ hachureAngle,
1344
+ fillWeight,
1151
1345
  inset: 1.5
1152
1346
  }
1153
1347
  )
@@ -1166,6 +1360,7 @@ var Radio = react.forwardRef(function Radio2({
1166
1360
  {
1167
1361
  roughness,
1168
1362
  seed,
1363
+ sketchColor: accent,
1169
1364
  bowing,
1170
1365
  shouldAnimate
1171
1366
  }
@@ -1179,7 +1374,7 @@ var Radio = react.forwardRef(function Radio2({
1179
1374
  "label",
1180
1375
  {
1181
1376
  htmlFor: inputId,
1182
- style: { fontSize: 15, cursor: "pointer", fontFamily: doodleUiFontFamily },
1377
+ style: { fontSize: 15, cursor: "pointer", fontFamily: doodleUiFontFamily, color: ink },
1183
1378
  children: label
1184
1379
  }
1185
1380
  ) : null
@@ -1201,18 +1396,26 @@ var Card = react.forwardRef(function Card2({
1201
1396
  bowing,
1202
1397
  fillStyle,
1203
1398
  strokeWidth,
1399
+ hachureGap,
1400
+ hachureAngle,
1401
+ fillWeight,
1204
1402
  animate,
1205
1403
  ...rest
1206
1404
  }, ref) {
1405
+ const theme = useSketchTheme(sketchColor);
1406
+ const ink = sketchColor ?? theme.ink;
1207
1407
  const boxProps = {
1208
1408
  shadow,
1209
1409
  fill,
1210
1410
  roughness,
1211
1411
  seed,
1212
- sketchColor: sketchColor ?? SKETCH_COLORS.ink,
1412
+ sketchColor: ink,
1213
1413
  bowing,
1214
1414
  fillStyle,
1215
1415
  strokeWidth,
1416
+ hachureGap,
1417
+ hachureAngle,
1418
+ fillWeight,
1216
1419
  animate
1217
1420
  };
1218
1421
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1220,7 +1423,10 @@ var Card = react.forwardRef(function Card2({
1220
1423
  {
1221
1424
  ref,
1222
1425
  className: cn(className),
1223
- style,
1426
+ style: {
1427
+ color: ink,
1428
+ ...style
1429
+ },
1224
1430
  contentStyle: { padding: "16px 18px" },
1225
1431
  ...boxProps,
1226
1432
  ...rest,
@@ -1231,13 +1437,14 @@ var Card = react.forwardRef(function Card2({
1231
1437
  style: {
1232
1438
  fontWeight: doodleUiFontWeight(700),
1233
1439
  fontSize: 16,
1234
- marginBottom: 10
1440
+ marginBottom: 10,
1441
+ color: ink
1235
1442
  },
1236
1443
  children: title
1237
1444
  }
1238
1445
  ) : null,
1239
1446
  children,
1240
- footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 14, fontSize: 13, opacity: 0.8 }, children: footer }) : null
1447
+ footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginTop: 14, fontSize: 13, opacity: 0.8, color: ink }, children: footer }) : null
1241
1448
  ]
1242
1449
  }
1243
1450
  );
@@ -1253,11 +1460,15 @@ var Badge = react.forwardRef(function Badge2({
1253
1460
  bowing,
1254
1461
  fillStyle,
1255
1462
  strokeWidth,
1463
+ hachureGap,
1464
+ hachureAngle,
1465
+ fillWeight,
1256
1466
  animate,
1257
1467
  ...rest
1258
1468
  }, ref) {
1259
- const ink = variant === "accent" ? sketchColor ?? SKETCH_COLORS.accent : sketchColor ?? SKETCH_COLORS.ink;
1260
- const fill = variant === "accent" ? SKETCH_COLORS.accentFill : variant === "outline" ? void 0 : SKETCH_COLORS.secondaryFill;
1469
+ const theme = useSketchTheme(sketchColor);
1470
+ const ink = variant === "accent" ? sketchColor ?? theme.accent : sketchColor ?? theme.ink;
1471
+ const fill = variant === "accent" ? theme.isDark ? sketchColor ? `${sketchColor}25` : theme.accentFill : theme.accentFill : variant === "outline" ? void 0 : theme.secondaryFill;
1261
1472
  return /* @__PURE__ */ jsxRuntime.jsx(
1262
1473
  SketchBox,
1263
1474
  {
@@ -1272,10 +1483,14 @@ var Badge = react.forwardRef(function Badge2({
1272
1483
  fontSize: 12,
1273
1484
  fontWeight: doodleUiFontWeight(650),
1274
1485
  lineHeight: 1.4,
1275
- letterSpacing: "0.01em"
1486
+ letterSpacing: "0.01em",
1487
+ color: ink
1276
1488
  },
1277
1489
  fill,
1278
- fillStyle: fillStyle ?? "hachure",
1490
+ fillStyle: fillStyle ?? (fill ? "hachure" : void 0),
1491
+ hachureGap: hachureGap ?? 6,
1492
+ hachureAngle,
1493
+ fillWeight: fillWeight ?? 0.9,
1279
1494
  roughness,
1280
1495
  seed,
1281
1496
  sketchColor: ink,
@@ -1287,35 +1502,42 @@ var Badge = react.forwardRef(function Badge2({
1287
1502
  }
1288
1503
  );
1289
1504
  });
1290
- var VARIANT_COLOR = {
1291
- info: SKETCH_COLORS.info,
1292
- warning: SKETCH_COLORS.warning,
1293
- error: SKETCH_COLORS.error,
1294
- success: SKETCH_COLORS.success
1295
- };
1296
- var VARIANT_FILL = {
1505
+ var LIGHT_VARIANT_FILL = {
1297
1506
  info: "#d2deec",
1298
1507
  warning: "#f3e2c0",
1299
1508
  error: "#f3d0cc",
1300
1509
  success: "#d3e8dc"
1301
1510
  };
1511
+ var DARK_VARIANT_FILL = {
1512
+ info: "rgba(96, 165, 250, 0.16)",
1513
+ warning: "rgba(251, 191, 36, 0.16)",
1514
+ error: "rgba(248, 113, 113, 0.16)",
1515
+ success: "rgba(52, 211, 153, 0.16)"
1516
+ };
1302
1517
  var Alert = react.forwardRef(function Alert2({
1303
1518
  children,
1304
1519
  className,
1305
1520
  style,
1306
1521
  variant = "info",
1307
1522
  title,
1523
+ fill,
1308
1524
  roughness,
1309
1525
  seed,
1310
1526
  sketchColor,
1311
1527
  bowing,
1312
1528
  fillStyle,
1313
1529
  strokeWidth,
1530
+ hachureGap,
1531
+ hachureAngle,
1532
+ fillWeight,
1314
1533
  role = "status",
1315
1534
  animate,
1316
1535
  ...rest
1317
1536
  }, ref) {
1318
- const color = sketchColor ?? VARIANT_COLOR[variant];
1537
+ const theme = useSketchTheme(sketchColor);
1538
+ const color = sketchColor ?? theme[variant];
1539
+ const defaultFill = theme.isDark ? DARK_VARIANT_FILL[variant] : LIGHT_VARIANT_FILL[variant];
1540
+ const resolvedFill = fill ?? defaultFill;
1319
1541
  return /* @__PURE__ */ jsxRuntime.jsxs(
1320
1542
  SketchBox,
1321
1543
  {
@@ -1323,14 +1545,17 @@ var Alert = react.forwardRef(function Alert2({
1323
1545
  role,
1324
1546
  className: cn(className),
1325
1547
  style: { color, ...style },
1326
- contentStyle: { padding: "12px 16px" },
1548
+ contentStyle: { padding: "12px 16px", color: theme.ink },
1327
1549
  roughness,
1328
1550
  seed,
1329
1551
  sketchColor: color,
1330
1552
  bowing,
1331
1553
  fillStyle: fillStyle ?? "hachure",
1332
- fill: VARIANT_FILL[variant],
1554
+ fill: resolvedFill,
1333
1555
  strokeWidth,
1556
+ hachureGap: hachureGap ?? 9,
1557
+ hachureAngle,
1558
+ fillWeight: fillWeight ?? 0.85,
1334
1559
  animate,
1335
1560
  drawInDuration: DRAW_IN_ALERT_MS,
1336
1561
  ...rest,
@@ -1341,12 +1566,13 @@ var Alert = react.forwardRef(function Alert2({
1341
1566
  style: {
1342
1567
  fontWeight: doodleUiFontWeight(700),
1343
1568
  marginBottom: 4,
1344
- fontSize: 15
1569
+ fontSize: 15,
1570
+ color
1345
1571
  },
1346
1572
  children: title
1347
1573
  }
1348
1574
  ) : null,
1349
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, lineHeight: 1.5, color: SKETCH_COLORS.ink }, children })
1575
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 14, lineHeight: 1.5, color: theme.ink }, children })
1350
1576
  ]
1351
1577
  }
1352
1578
  );
@@ -1360,15 +1586,20 @@ function Modal({
1360
1586
  description,
1361
1587
  children,
1362
1588
  className,
1589
+ fill,
1363
1590
  roughness,
1364
1591
  seed,
1365
1592
  sketchColor,
1366
1593
  bowing,
1367
1594
  fillStyle,
1368
1595
  strokeWidth,
1596
+ hachureGap,
1597
+ hachureAngle,
1598
+ fillWeight,
1369
1599
  animate
1370
1600
  }) {
1371
- const ink = sketchColor ?? SKETCH_COLORS.ink;
1601
+ const theme = useSketchTheme(sketchColor);
1602
+ const ink = sketchColor ?? theme.ink;
1372
1603
  const [uncontrolled, setUncontrolled] = react.useState(defaultOpen === true);
1373
1604
  const isOpen = open ?? uncontrolled;
1374
1605
  const shouldAnimate = useAnimate(animate);
@@ -1389,7 +1620,7 @@ function Modal({
1389
1620
  style: {
1390
1621
  position: "fixed",
1391
1622
  inset: 0,
1392
- background: "rgba(31, 29, 26, 0.38)",
1623
+ background: theme.isDark ? "rgba(0, 0, 0, 0.65)" : "rgba(31, 29, 26, 0.38)",
1393
1624
  zIndex: 70
1394
1625
  }
1395
1626
  }
@@ -1418,7 +1649,8 @@ function Modal({
1418
1649
  style: {
1419
1650
  width: "min(480px, calc(100vw - 32px))",
1420
1651
  outline: "none",
1421
- pointerEvents: "auto"
1652
+ pointerEvents: "auto",
1653
+ color: ink
1422
1654
  },
1423
1655
  children: /* @__PURE__ */ jsxRuntime.jsxs(
1424
1656
  SketchBox,
@@ -1428,11 +1660,14 @@ function Modal({
1428
1660
  sketchColor: ink,
1429
1661
  bowing,
1430
1662
  fillStyle: fillStyle ?? "solid",
1431
- fill: "#f7f6f2",
1663
+ fill: fill ?? theme.paper,
1432
1664
  strokeWidth: strokeWidth ?? 2,
1665
+ hachureGap,
1666
+ hachureAngle,
1667
+ fillWeight,
1433
1668
  shadow: true,
1434
1669
  animate,
1435
- contentStyle: { padding: "20px 22px 18px" },
1670
+ contentStyle: { padding: "20px 22px 18px", color: ink },
1436
1671
  children: [
1437
1672
  /* @__PURE__ */ jsxRuntime.jsxs(
1438
1673
  "div",
@@ -1475,12 +1710,10 @@ function Modal({
1475
1710
  {
1476
1711
  variant: "ghost",
1477
1712
  size: "sm",
1478
- roughness,
1479
- seed,
1480
1713
  sketchColor: ink,
1481
- animate,
1482
- "aria-label": "Close",
1483
- children: "Close"
1714
+ "aria-label": "Close dialog",
1715
+ style: { padding: "2px 8px", minHeight: 26 },
1716
+ children: "\u2715"
1484
1717
  }
1485
1718
  ) })
1486
1719
  ]
@@ -1490,11 +1723,13 @@ function Modal({
1490
1723
  Dialog__namespace.Description,
1491
1724
  {
1492
1725
  style: {
1493
- margin: "0 0 14px",
1726
+ margin: 0,
1727
+ marginBottom: 14,
1494
1728
  fontSize: 14,
1495
- lineHeight: 1.5,
1496
- color: ink,
1497
- opacity: 0.8
1729
+ lineHeight: 1.4,
1730
+ opacity: 0.78,
1731
+ fontFamily: doodleUiFontFamily,
1732
+ color: ink
1498
1733
  },
1499
1734
  children: description
1500
1735
  }
@@ -1525,10 +1760,15 @@ var Divider = react.forwardRef(
1525
1760
  sketchColor,
1526
1761
  bowing,
1527
1762
  strokeWidth,
1763
+ hachureGap,
1764
+ hachureAngle,
1765
+ fillWeight,
1528
1766
  animate,
1529
1767
  ...rest
1530
1768
  }, ref) {
1531
1769
  const rootRef = react.useRef(null);
1770
+ const theme = useSketchTheme(sketchColor);
1771
+ const ink = sketchColor ?? theme.ink;
1532
1772
  const shouldAnimate = useAnimate(animate);
1533
1773
  const horizontal = orientation === "horizontal";
1534
1774
  useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate);
@@ -1556,9 +1796,12 @@ var Divider = react.forwardRef(
1556
1796
  shape: horizontal ? "line" : "line-vertical",
1557
1797
  roughness: roughness ?? 1.8,
1558
1798
  seed,
1559
- sketchColor: sketchColor ?? SKETCH_COLORS.ink,
1799
+ sketchColor: ink,
1560
1800
  bowing: bowing ?? 2,
1561
1801
  strokeWidth: strokeWidth ?? 1.5,
1802
+ hachureGap,
1803
+ hachureAngle,
1804
+ fillWeight,
1562
1805
  inset: 4
1563
1806
  }
1564
1807
  )
@@ -1578,12 +1821,16 @@ var Progress = react.forwardRef(
1578
1821
  bowing,
1579
1822
  fillStyle,
1580
1823
  strokeWidth,
1824
+ hachureGap,
1825
+ fillWeight,
1581
1826
  animate,
1582
1827
  ...rest
1583
1828
  }, ref) {
1584
1829
  const rootRef = react.useRef(null);
1585
1830
  const trackRef = react.useRef(null);
1586
- const ink = sketchColor ?? SKETCH_COLORS.accent;
1831
+ const theme = useSketchTheme(sketchColor);
1832
+ const ink = sketchColor ?? theme.accent;
1833
+ const trackInk = sketchColor ?? (theme.isDark ? "rgba(243, 244, 246, 0.45)" : theme.ink);
1587
1834
  const clamped = Math.min(max, Math.max(0, value));
1588
1835
  const percent = max === 0 ? 0 : clamped / max * 100;
1589
1836
  const shouldAnimate = useAnimate(animate);
@@ -1623,7 +1870,7 @@ var Progress = react.forwardRef(
1623
1870
  shape: "rectangle",
1624
1871
  roughness,
1625
1872
  seed: resolvedSeed,
1626
- sketchColor: SKETCH_COLORS.ink,
1873
+ sketchColor: trackInk,
1627
1874
  bowing,
1628
1875
  strokeWidth: strokeWidth ?? 1.5,
1629
1876
  inset: 2
@@ -1654,6 +1901,8 @@ var Progress = react.forwardRef(
1654
1901
  fillStyle: fillStyle ?? "hachure",
1655
1902
  bowing,
1656
1903
  strokeWidth: 1.1,
1904
+ hachureGap: hachureGap ?? 5,
1905
+ fillWeight: fillWeight ?? 1.2,
1657
1906
  inset: 1
1658
1907
  }
1659
1908
  )
@@ -1671,15 +1920,20 @@ function Tooltip({
1671
1920
  side = "top",
1672
1921
  delayDuration = 200,
1673
1922
  className,
1923
+ fill,
1674
1924
  roughness,
1675
1925
  seed,
1676
1926
  sketchColor,
1677
1927
  bowing,
1678
1928
  fillStyle,
1679
1929
  strokeWidth,
1930
+ hachureGap,
1931
+ hachureAngle,
1932
+ fillWeight,
1680
1933
  animate
1681
1934
  }) {
1682
- const ink = sketchColor ?? SKETCH_COLORS.ink;
1935
+ const theme = useSketchTheme(sketchColor);
1936
+ const ink = sketchColor ?? theme.ink;
1683
1937
  return /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { delayDuration, children: [
1684
1938
  /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { asChild: true, children }),
1685
1939
  /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -1697,8 +1951,11 @@ function Tooltip({
1697
1951
  sketchColor: ink,
1698
1952
  bowing,
1699
1953
  fillStyle: fillStyle ?? "solid",
1700
- fill: "#f7f6f2",
1954
+ fill: fill ?? theme.paper,
1701
1955
  strokeWidth: strokeWidth ?? 1.4,
1956
+ hachureGap,
1957
+ hachureAngle,
1958
+ fillWeight,
1702
1959
  animate,
1703
1960
  drawInDuration: DRAW_IN_TOOLTIP_MS,
1704
1961
  contentStyle: {
@@ -1733,12 +1990,16 @@ function Select({
1733
1990
  placeholder = "Select\u2026",
1734
1991
  className,
1735
1992
  style,
1993
+ fill,
1736
1994
  roughness,
1737
1995
  seed,
1738
1996
  sketchColor,
1739
1997
  bowing,
1740
1998
  fillStyle,
1741
1999
  strokeWidth,
2000
+ hachureGap,
2001
+ hachureAngle,
2002
+ fillWeight,
1742
2003
  value,
1743
2004
  defaultValue,
1744
2005
  onValueChange,
@@ -1750,7 +2011,8 @@ function Select({
1750
2011
  const selectedValue = value ?? uncontrolled;
1751
2012
  const selectedLabel = options.find((option) => option.value === selectedValue)?.label;
1752
2013
  const resolvedSeed = useResolvedSeed(seed);
1753
- const ink = sketchColor ?? SKETCH_COLORS.ink;
2014
+ const theme = useSketchTheme(sketchColor);
2015
+ const ink = sketchColor ?? theme.ink;
1754
2016
  return /* @__PURE__ */ jsxRuntime.jsx(
1755
2017
  SelectSketchContext.Provider,
1756
2018
  {
@@ -1761,8 +2023,13 @@ function Select({
1761
2023
  bowing,
1762
2024
  fillStyle,
1763
2025
  strokeWidth,
2026
+ hachureGap,
2027
+ hachureAngle,
2028
+ fillWeight,
1764
2029
  resolvedSeed,
1765
2030
  ink,
2031
+ paper: fill ?? theme.paper,
2032
+ accent: theme.accent,
1766
2033
  selectedValue,
1767
2034
  selectedLabel,
1768
2035
  placeholder,
@@ -1848,7 +2115,7 @@ var SelectTrigger = react.forwardRef(
1848
2115
  shape: "rectangle",
1849
2116
  roughness: sketch.roughness,
1850
2117
  seed: sketch.resolvedSeed,
1851
- sketchColor: openish ? SKETCH_COLORS.accent : sketch.ink,
2118
+ sketchColor: openish ? sketch.accent : sketch.ink,
1852
2119
  bowing: sketch.bowing,
1853
2120
  fillStyle: sketch.fillStyle,
1854
2121
  strokeWidth: openish ? (sketch.strokeWidth ?? 1.75) + 0.35 : sketch.strokeWidth
@@ -1899,7 +2166,7 @@ var SelectTrigger = react.forwardRef(
1899
2166
  }
1900
2167
  );
1901
2168
  var SelectContent = react.forwardRef(
1902
- function SelectContent2({ className, style, children, ...rest }, ref) {
2169
+ function SelectContent2({ className, style, children, fill, ...rest }, ref) {
1903
2170
  const sketch = useSelectSketch();
1904
2171
  return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1905
2172
  SelectPrimitive__namespace.Content,
@@ -1912,6 +2179,7 @@ var SelectContent = react.forwardRef(
1912
2179
  zIndex: 80,
1913
2180
  outline: "none",
1914
2181
  minWidth: "var(--radix-select-trigger-width)",
2182
+ color: sketch.ink,
1915
2183
  ...style
1916
2184
  },
1917
2185
  ...rest,
@@ -1923,10 +2191,13 @@ var SelectContent = react.forwardRef(
1923
2191
  sketchColor: sketch.ink,
1924
2192
  bowing: sketch.bowing,
1925
2193
  fillStyle: sketch.fillStyle ?? "solid",
1926
- fill: "#f7f6f2",
2194
+ fill: fill ?? sketch.paper,
1927
2195
  strokeWidth: sketch.strokeWidth ?? 1.5,
2196
+ hachureGap: sketch.hachureGap,
2197
+ hachureAngle: sketch.hachureAngle,
2198
+ fillWeight: sketch.fillWeight,
1928
2199
  animate: sketch.animate,
1929
- contentStyle: { padding: "6px 4px" },
2200
+ contentStyle: { padding: "6px 4px", color: sketch.ink },
1930
2201
  children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Viewport, { children })
1931
2202
  }
1932
2203
  )
@@ -1972,7 +2243,7 @@ var SelectItem = react.forwardRef(
1972
2243
  shape: "line",
1973
2244
  roughness: (sketch.roughness ?? 1.5) + 0.4,
1974
2245
  seed: sketch.resolvedSeed,
1975
- sketchColor: selected ? SKETCH_COLORS.accent : sketch.ink,
2246
+ sketchColor: selected ? sketch.accent : sketch.ink,
1976
2247
  bowing: sketch.bowing ?? 1.6,
1977
2248
  strokeWidth: selected ? 1.8 : 1.3,
1978
2249
  inset: UNDERLINE_INSET,
@@ -2021,7 +2292,10 @@ var Switch = react.forwardRef(
2021
2292
  }, ref) {
2022
2293
  const [uncontrolled, setUncontrolled] = react.useState(defaultChecked === true);
2023
2294
  const isOn = checked ?? uncontrolled;
2024
- const ink = sketchColor ?? SKETCH_COLORS.ink;
2295
+ const theme = useSketchTheme(sketchColor);
2296
+ const ink = sketchColor ?? theme.ink;
2297
+ const activeColor = sketchColor ?? theme.accent;
2298
+ const activeFill = theme.isDark ? sketchColor ? `${sketchColor}25` : theme.accentFill : theme.accentFill;
2025
2299
  const resolvedSeed = useResolvedSeed(seed);
2026
2300
  const shouldAnimate = useAnimate(animate);
2027
2301
  const trackRef = react.useRef(null);
@@ -2037,6 +2311,7 @@ var Switch = react.forwardRef(
2037
2311
  gap: 8,
2038
2312
  cursor: "pointer",
2039
2313
  userSelect: "none",
2314
+ color: ink,
2040
2315
  ...style
2041
2316
  },
2042
2317
  children: [
@@ -2075,10 +2350,10 @@ var Switch = react.forwardRef(
2075
2350
  shape: "rectangle",
2076
2351
  roughness,
2077
2352
  seed: trackSeed,
2078
- sketchColor: isOn ? SKETCH_COLORS.accent : ink,
2353
+ sketchColor: isOn ? activeColor : ink,
2079
2354
  bowing: bowing ?? 1.4,
2080
2355
  fillStyle: fillStyle ?? (isOn ? "hachure" : void 0),
2081
- fill: isOn ? SKETCH_COLORS.accentFill : void 0,
2356
+ fill: isOn ? activeFill : void 0,
2082
2357
  strokeWidth: strokeWidth ?? 1.6,
2083
2358
  inset: 1.5
2084
2359
  }
@@ -2106,8 +2381,8 @@ var Switch = react.forwardRef(
2106
2381
  shape: "ellipse",
2107
2382
  roughness: (roughness ?? 1.5) * 0.85,
2108
2383
  seed: deriveSeed(resolvedSeed, "thumb"),
2109
- sketchColor: isOn ? SKETCH_COLORS.accent : ink,
2110
- fill: "#f7f6f2",
2384
+ sketchColor: isOn ? activeColor : ink,
2385
+ fill: theme.paper,
2111
2386
  fillStyle: "solid",
2112
2387
  bowing,
2113
2388
  strokeWidth: (strokeWidth ?? 1.5) + 0.2,
@@ -2126,7 +2401,8 @@ var Switch = react.forwardRef(
2126
2401
  style: {
2127
2402
  fontSize: 15,
2128
2403
  cursor: "pointer",
2129
- fontFamily: doodleUiFontFamily
2404
+ fontFamily: doodleUiFontFamily,
2405
+ color: ink
2130
2406
  },
2131
2407
  children: label
2132
2408
  }
@@ -2163,7 +2439,9 @@ var Tabs = react.forwardRef(function Tabs2({
2163
2439
  const [uncontrolled, setUncontrolled] = react.useState(defaultValue);
2164
2440
  const current = value ?? uncontrolled;
2165
2441
  const resolvedSeed = useResolvedSeed(seed);
2166
- const ink = sketchColor ?? SKETCH_COLORS.ink;
2442
+ const theme = useSketchTheme(sketchColor);
2443
+ const ink = sketchColor ?? theme.ink;
2444
+ const accent = sketchColor ?? theme.accent;
2167
2445
  const shouldAnimate = useAnimate(animate);
2168
2446
  return /* @__PURE__ */ jsxRuntime.jsx(
2169
2447
  TabsSketchContext.Provider,
@@ -2177,6 +2455,7 @@ var Tabs = react.forwardRef(function Tabs2({
2177
2455
  strokeWidth,
2178
2456
  resolvedSeed,
2179
2457
  ink,
2458
+ accent,
2180
2459
  current,
2181
2460
  shouldAnimate
2182
2461
  },
@@ -2226,7 +2505,7 @@ function TabUnderline({
2226
2505
  shape: "line",
2227
2506
  roughness: (sketch.roughness ?? 1.5) + 0.35,
2228
2507
  seed,
2229
- sketchColor: SKETCH_COLORS.accent,
2508
+ sketchColor: sketch.accent,
2230
2509
  bowing: sketch.bowing ?? 1.8,
2231
2510
  strokeWidth: (sketch.strokeWidth ?? 1.75) + 0.4,
2232
2511
  inset: 2
@@ -2309,7 +2588,7 @@ var Tab = react.forwardRef(function Tab2({ className, style, children, value, ..
2309
2588
  fontFamily: doodleUiFontFamily,
2310
2589
  fontSize: 15,
2311
2590
  fontWeight: active ? doodleUiFontWeight(650) : doodleUiFontWeight(400),
2312
- color: sketch.ink,
2591
+ color: active ? sketch.accent : sketch.ink,
2313
2592
  outline: "none",
2314
2593
  ...style
2315
2594
  },
@@ -2407,7 +2686,8 @@ var Table = react.forwardRef(function Table2({
2407
2686
  const tableRef = react.useRef(null);
2408
2687
  const [lines, setLines] = react.useState([]);
2409
2688
  const resolvedSeed = useResolvedSeed(seed);
2410
- const ink = sketchColor ?? SKETCH_COLORS.ink;
2689
+ const theme = useSketchTheme(sketchColor);
2690
+ const ink = sketchColor ?? theme.ink;
2411
2691
  const shouldAnimate = useAnimate(animate);
2412
2692
  react.useLayoutEffect(() => {
2413
2693
  const wrapper = wrapperRef.current;
@@ -2580,18 +2860,18 @@ var TableCell = react.forwardRef(
2580
2860
  );
2581
2861
  }
2582
2862
  );
2583
- var VARIANT_COLOR2 = {
2584
- info: SKETCH_COLORS.info,
2585
- warning: SKETCH_COLORS.warning,
2586
- error: SKETCH_COLORS.error,
2587
- success: SKETCH_COLORS.success
2588
- };
2589
- var VARIANT_FILL2 = {
2863
+ var LIGHT_VARIANT_FILL2 = {
2590
2864
  info: "#d2deec",
2591
2865
  warning: "#f3e2c0",
2592
2866
  error: "#f3d0cc",
2593
2867
  success: "#d3e8dc"
2594
2868
  };
2869
+ var DARK_VARIANT_FILL2 = {
2870
+ info: "rgba(96, 165, 250, 0.16)",
2871
+ warning: "rgba(251, 191, 36, 0.16)",
2872
+ error: "rgba(248, 113, 113, 0.16)",
2873
+ success: "rgba(52, 211, 153, 0.16)"
2874
+ };
2595
2875
  var POSITION_STYLE = {
2596
2876
  "top-left": { top: 16, left: 16 },
2597
2877
  "top-right": { top: 16, right: 16 },
@@ -2643,6 +2923,7 @@ function Toast({
2643
2923
  title,
2644
2924
  children,
2645
2925
  variant = "info",
2926
+ fill,
2646
2927
  duration,
2647
2928
  className,
2648
2929
  style,
@@ -2652,6 +2933,9 @@ function Toast({
2652
2933
  bowing,
2653
2934
  fillStyle,
2654
2935
  strokeWidth,
2936
+ hachureGap,
2937
+ hachureAngle,
2938
+ fillWeight,
2655
2939
  animate
2656
2940
  }) {
2657
2941
  const position = react.useContext(ToastPositionContext);
@@ -2659,7 +2943,10 @@ function Toast({
2659
2943
  const [uncontrolled, setUncontrolled] = react.useState(defaultOpen ?? false);
2660
2944
  const isOpen = open ?? uncontrolled;
2661
2945
  const shouldAnimate = useAnimate(animate);
2662
- const color = sketchColor ?? VARIANT_COLOR2[variant];
2946
+ const theme = useSketchTheme(sketchColor);
2947
+ const color = sketchColor ?? theme[variant];
2948
+ const defaultFill = theme.isDark ? DARK_VARIANT_FILL2[variant] : LIGHT_VARIANT_FILL2[variant];
2949
+ const resolvedFill = fill ?? defaultFill;
2663
2950
  const offset = fromTop ? -14 : 14;
2664
2951
  function handleOpenChange(next) {
2665
2952
  setUncontrolled(next);
@@ -2694,11 +2981,14 @@ function Toast({
2694
2981
  sketchColor: color,
2695
2982
  bowing,
2696
2983
  fillStyle: fillStyle ?? "hachure",
2697
- fill: VARIANT_FILL2[variant],
2984
+ fill: resolvedFill,
2698
2985
  strokeWidth: strokeWidth ?? 1.7,
2986
+ hachureGap: hachureGap ?? 9,
2987
+ hachureAngle,
2988
+ fillWeight: fillWeight ?? 0.85,
2699
2989
  shadow: true,
2700
2990
  animate,
2701
- contentStyle: { padding: "12px 16px" },
2991
+ contentStyle: { padding: "12px 16px", color: theme.ink },
2702
2992
  children: [
2703
2993
  title ? /* @__PURE__ */ jsxRuntime.jsx(
2704
2994
  ToastPrimitive__namespace.Title,
@@ -2722,7 +3012,7 @@ function Toast({
2722
3012
  fontSize: 14,
2723
3013
  lineHeight: 1.5,
2724
3014
  fontFamily: doodleUiFontFamily,
2725
- color: SKETCH_COLORS.ink
3015
+ color: theme.ink
2726
3016
  },
2727
3017
  children
2728
3018
  }
@@ -2767,19 +3057,26 @@ var Accordion = react.forwardRef(
2767
3057
  sketchColor,
2768
3058
  bowing,
2769
3059
  fillStyle,
2770
- strokeWidth
3060
+ strokeWidth,
3061
+ hachureGap,
3062
+ hachureAngle,
3063
+ fillWeight
2771
3064
  }, ref) {
2772
3065
  const resolvedSeed = useResolvedSeed(seed);
2773
- const ink = sketchColor ?? SKETCH_COLORS.ink;
3066
+ const theme = useSketchTheme(sketchColor);
3067
+ const ink = sketchColor ?? theme.ink;
2774
3068
  const [uncontrolled, setUncontrolled] = react.useState(defaultValue ?? (type === "multiple" ? [] : void 0));
2775
3069
  const openValue = value ?? uncontrolled;
2776
3070
  const sketchValue = {
2777
3071
  roughness,
2778
3072
  seed: resolvedSeed,
2779
- sketchColor,
3073
+ sketchColor: ink,
2780
3074
  bowing,
2781
3075
  fillStyle,
2782
3076
  strokeWidth,
3077
+ hachureGap,
3078
+ hachureAngle,
3079
+ fillWeight,
2783
3080
  resolvedSeed,
2784
3081
  ink,
2785
3082
  openValue
@@ -2942,11 +3239,6 @@ var AccordionContent = react.forwardRef(function AccordionContent2({ className,
2942
3239
  }
2943
3240
  );
2944
3241
  });
2945
- var STATUS_COLOR = {
2946
- online: SKETCH_COLORS.success,
2947
- offline: "#8a8680",
2948
- busy: SKETCH_COLORS.accent
2949
- };
2950
3242
  var Avatar = react.forwardRef(
2951
3243
  function Avatar2({
2952
3244
  className,
@@ -2957,18 +3249,28 @@ var Avatar = react.forwardRef(
2957
3249
  size = 40,
2958
3250
  shape = "circle",
2959
3251
  status,
3252
+ fill,
2960
3253
  roughness,
2961
3254
  seed,
2962
3255
  sketchColor,
2963
3256
  bowing,
2964
3257
  fillStyle,
2965
3258
  strokeWidth,
3259
+ hachureGap,
3260
+ hachureAngle,
3261
+ fillWeight,
2966
3262
  ...rest
2967
3263
  }, ref) {
2968
- const ink = sketchColor ?? SKETCH_COLORS.ink;
3264
+ const theme = useSketchTheme(sketchColor);
3265
+ const ink = sketchColor ?? theme.ink;
2969
3266
  const resolvedSeed = useResolvedSeed(seed);
2970
3267
  const roughShape = shape === "circle" ? "ellipse" : "rectangle";
2971
3268
  const badge = 12;
3269
+ const statusColors = {
3270
+ online: theme.success,
3271
+ offline: theme.isDark ? "#9ca3af" : "#8a8680",
3272
+ busy: theme.accent
3273
+ };
2972
3274
  const rootStyle = {
2973
3275
  position: "relative",
2974
3276
  display: "inline-flex",
@@ -2995,8 +3297,11 @@ var Avatar = react.forwardRef(
2995
3297
  sketchColor: ink,
2996
3298
  bowing,
2997
3299
  fillStyle: fillStyle ?? "solid",
2998
- fill: "#f7f6f2",
3300
+ fill: fill ?? theme.paper,
2999
3301
  strokeWidth: strokeWidth ?? 1.6,
3302
+ hachureGap,
3303
+ hachureAngle,
3304
+ fillWeight,
3000
3305
  inset: 1.5
3001
3306
  }
3002
3307
  ),
@@ -3040,7 +3345,7 @@ var Avatar = react.forwardRef(
3040
3345
  fontWeight: doodleUiFontWeight(650),
3041
3346
  fontSize: Math.max(12, size * 0.36),
3042
3347
  color: ink,
3043
- background: SKETCH_COLORS.secondaryFill
3348
+ background: theme.secondaryFill
3044
3349
  },
3045
3350
  children: fallback
3046
3351
  }
@@ -3065,8 +3370,8 @@ var Avatar = react.forwardRef(
3065
3370
  shape: "ellipse",
3066
3371
  roughness: (roughness ?? 1.5) * 0.8,
3067
3372
  seed: deriveSeed(resolvedSeed, "status"),
3068
- sketchColor: STATUS_COLOR[status],
3069
- fill: STATUS_COLOR[status],
3373
+ sketchColor: statusColors[status],
3374
+ fill: statusColors[status],
3070
3375
  fillStyle: "solid",
3071
3376
  bowing,
3072
3377
  strokeWidth: 1,
@@ -3083,16 +3388,23 @@ var Avatar = react.forwardRef(
3083
3388
  var Slider = react.forwardRef(function Slider2({
3084
3389
  className,
3085
3390
  style,
3391
+ fill,
3086
3392
  roughness,
3087
3393
  seed,
3088
3394
  sketchColor,
3089
3395
  bowing,
3090
3396
  fillStyle,
3091
3397
  strokeWidth,
3398
+ hachureGap,
3399
+ hachureAngle,
3400
+ fillWeight,
3092
3401
  thumbShape = "circle",
3093
3402
  ...rest
3094
3403
  }, ref) {
3095
- const ink = sketchColor ?? SKETCH_COLORS.ink;
3404
+ const theme = useSketchTheme(sketchColor);
3405
+ const ink = sketchColor ?? theme.ink;
3406
+ const accent = sketchColor ?? theme.accent;
3407
+ const trackInk = sketchColor ?? (theme.isDark ? "rgba(243, 244, 246, 0.4)" : theme.ink);
3096
3408
  const resolvedSeed = useResolvedSeed(seed);
3097
3409
  return /* @__PURE__ */ jsxRuntime.jsxs(
3098
3410
  SliderPrimitive__namespace.Root,
@@ -3107,6 +3419,7 @@ var Slider = react.forwardRef(function Slider2({
3107
3419
  height: 28,
3108
3420
  userSelect: "none",
3109
3421
  touchAction: "none",
3422
+ color: ink,
3110
3423
  ...style
3111
3424
  },
3112
3425
  ...rest,
@@ -3126,7 +3439,7 @@ var Slider = react.forwardRef(function Slider2({
3126
3439
  shape: "line",
3127
3440
  roughness: roughness ?? 1.8,
3128
3441
  seed: resolvedSeed,
3129
- sketchColor: ink,
3442
+ sketchColor: trackInk,
3130
3443
  bowing: bowing ?? 2,
3131
3444
  strokeWidth: strokeWidth ?? 1.6,
3132
3445
  inset: 4
@@ -3146,7 +3459,7 @@ var Slider = react.forwardRef(function Slider2({
3146
3459
  shape: "line",
3147
3460
  roughness: (roughness ?? 1.5) + 0.4,
3148
3461
  seed: deriveSeed(resolvedSeed, "range"),
3149
- sketchColor: SKETCH_COLORS.accent,
3462
+ sketchColor: accent,
3150
3463
  bowing: bowing ?? 1.6,
3151
3464
  strokeWidth: (strokeWidth ?? 1.6) + 0.6,
3152
3465
  inset: 4
@@ -3174,11 +3487,14 @@ var Slider = react.forwardRef(function Slider2({
3174
3487
  shape: thumbShape === "square" ? "rectangle" : "ellipse",
3175
3488
  roughness: (roughness ?? 1.5) * 0.85,
3176
3489
  seed: deriveSeed(resolvedSeed, "thumb"),
3177
- sketchColor: SKETCH_COLORS.accent,
3178
- fill: "#f7f6f2",
3490
+ sketchColor: accent,
3491
+ fill: fill ?? theme.paper,
3179
3492
  fillStyle: fillStyle ?? "solid",
3180
3493
  bowing,
3181
3494
  strokeWidth: (strokeWidth ?? 1.5) + 0.3,
3495
+ hachureGap,
3496
+ hachureAngle,
3497
+ fillWeight,
3182
3498
  inset: 1
3183
3499
  }
3184
3500
  )
@@ -3217,7 +3533,10 @@ var Pagination = react.forwardRef(
3217
3533
  strokeWidth,
3218
3534
  ...rest
3219
3535
  }, ref) {
3220
- const ink = sketchColor ?? SKETCH_COLORS.ink;
3536
+ const theme = useSketchTheme(sketchColor);
3537
+ const ink = sketchColor ?? theme.ink;
3538
+ const accent = sketchColor ?? theme.accent;
3539
+ const accentFill = theme.isDark ? sketchColor ? `${sketchColor}25` : theme.accentFill : theme.accentFill;
3221
3540
  const resolvedSeed = useResolvedSeed(seed);
3222
3541
  const items = pageItems(page, count);
3223
3542
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3230,6 +3549,7 @@ var Pagination = react.forwardRef(
3230
3549
  display: "inline-flex",
3231
3550
  alignItems: "center",
3232
3551
  gap: 4,
3552
+ color: ink,
3233
3553
  ...style
3234
3554
  },
3235
3555
  ...rest,
@@ -3243,6 +3563,9 @@ var Pagination = react.forwardRef(
3243
3563
  roughness,
3244
3564
  seed: deriveSeed(resolvedSeed, "prev"),
3245
3565
  ink,
3566
+ accent,
3567
+ accentFill,
3568
+ isDark: theme.isDark,
3246
3569
  bowing,
3247
3570
  strokeWidth,
3248
3571
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", width: 16, height: 16, display: "block" }, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -3282,6 +3605,9 @@ var Pagination = react.forwardRef(
3282
3605
  roughness,
3283
3606
  seed: deriveSeed(resolvedSeed, `page-${item}`),
3284
3607
  ink,
3608
+ accent,
3609
+ accentFill,
3610
+ isDark: theme.isDark,
3285
3611
  bowing,
3286
3612
  strokeWidth,
3287
3613
  children: item
@@ -3298,6 +3624,9 @@ var Pagination = react.forwardRef(
3298
3624
  roughness,
3299
3625
  seed: deriveSeed(resolvedSeed, "next"),
3300
3626
  ink,
3627
+ accent,
3628
+ accentFill,
3629
+ isDark: theme.isDark,
3301
3630
  bowing,
3302
3631
  strokeWidth,
3303
3632
  children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", width: 16, height: 16, display: "block" }, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -3328,10 +3657,15 @@ function PageButton({
3328
3657
  roughness,
3329
3658
  seed,
3330
3659
  ink,
3660
+ accent,
3661
+ accentFill,
3662
+ isDark,
3331
3663
  bowing,
3332
3664
  strokeWidth,
3333
3665
  ...rest
3334
3666
  }) {
3667
+ const activeColor = accent ?? ink;
3668
+ const textColor = active ? isDark ? "#ffffff" : activeColor : ink;
3335
3669
  return /* @__PURE__ */ jsxRuntime.jsxs(
3336
3670
  "button",
3337
3671
  {
@@ -3346,7 +3680,7 @@ function PageButton({
3346
3680
  border: "none",
3347
3681
  background: "transparent",
3348
3682
  cursor: disabled ? "not-allowed" : "pointer",
3349
- color: ink,
3683
+ color: textColor,
3350
3684
  fontFamily: doodleUiFontFamily,
3351
3685
  fontWeight: active ? doodleUiFontWeight(700) : doodleUiFontWeight(400),
3352
3686
  fontSize: 14,
@@ -3362,9 +3696,9 @@ function PageButton({
3362
3696
  shape: "ellipse",
3363
3697
  roughness,
3364
3698
  seed,
3365
- sketchColor: active ? SKETCH_COLORS.accent : ink,
3699
+ sketchColor: active ? activeColor : ink,
3366
3700
  bowing,
3367
- fill: active ? SKETCH_COLORS.accentFill : void 0,
3701
+ fill: active ? accentFill : void 0,
3368
3702
  fillStyle: active ? "hachure" : void 0,
3369
3703
  strokeWidth: active ? (strokeWidth ?? 1.6) + 0.3 : strokeWidth ?? 1.4,
3370
3704
  inset: 1.5
@@ -3376,7 +3710,7 @@ function PageButton({
3376
3710
  shape: "ellipse",
3377
3711
  roughness: (roughness ?? 1.5) + 0.45,
3378
3712
  seed,
3379
- sketchColor: SKETCH_COLORS.accent,
3713
+ sketchColor: activeColor,
3380
3714
  bowing: bowing ?? 1.6,
3381
3715
  strokeWidth: 1.1,
3382
3716
  inset: -1.5,
@@ -3409,9 +3743,13 @@ var Breadcrumb = react.forwardRef(
3409
3743
  sketchColor,
3410
3744
  bowing,
3411
3745
  strokeWidth,
3746
+ hachureGap,
3747
+ hachureAngle,
3748
+ fillWeight,
3412
3749
  ...rest
3413
3750
  }, ref) {
3414
- const ink = sketchColor ?? SKETCH_COLORS.ink;
3751
+ const theme = useSketchTheme(sketchColor);
3752
+ const ink = sketchColor ?? theme.ink;
3415
3753
  const resolvedSeed = useResolvedSeed(seed);
3416
3754
  const items = react.Children.toArray(children).filter(react.isValidElement);
3417
3755
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3420,9 +3758,12 @@ var Breadcrumb = react.forwardRef(
3420
3758
  value: {
3421
3759
  roughness,
3422
3760
  seed: resolvedSeed,
3423
- sketchColor,
3761
+ sketchColor: ink,
3424
3762
  bowing,
3425
3763
  strokeWidth,
3764
+ hachureGap,
3765
+ hachureAngle,
3766
+ fillWeight,
3426
3767
  resolvedSeed,
3427
3768
  ink,
3428
3769
  separator
@@ -3561,11 +3902,15 @@ var Skeleton = react.forwardRef(
3561
3902
  bowing,
3562
3903
  fillStyle,
3563
3904
  strokeWidth,
3905
+ hachureGap,
3906
+ hachureAngle,
3907
+ fillWeight,
3564
3908
  ...rest
3565
3909
  }, ref) {
3566
3910
  const base = useResolvedSeed(seed);
3567
3911
  const [tick, setTick] = react.useState(0);
3568
- const ink = sketchColor ?? SKETCH_COLORS.ink;
3912
+ const theme = useSketchTheme(sketchColor);
3913
+ const ink = sketchColor ?? theme.ink;
3569
3914
  react.useEffect(() => {
3570
3915
  if (!pulse) return;
3571
3916
  const id = window.setInterval(() => {
@@ -3602,6 +3947,9 @@ var Skeleton = react.forwardRef(
3602
3947
  fillStyle: fillStyle ?? "hachure",
3603
3948
  bowing: bowing ?? 1.6,
3604
3949
  strokeWidth: strokeWidth ?? 1.1,
3950
+ hachureGap,
3951
+ hachureAngle,
3952
+ fillWeight,
3605
3953
  inset: 2,
3606
3954
  style: { opacity: 0.28 }
3607
3955
  }
@@ -3622,15 +3970,21 @@ var Stepper = react.forwardRef(
3622
3970
  steps,
3623
3971
  current = 0,
3624
3972
  orientation = "horizontal",
3973
+ fill,
3625
3974
  roughness,
3626
3975
  seed,
3627
3976
  sketchColor,
3628
3977
  bowing,
3629
3978
  fillStyle,
3630
3979
  strokeWidth,
3980
+ hachureGap,
3981
+ hachureAngle,
3982
+ fillWeight,
3631
3983
  ...rest
3632
3984
  }, ref) {
3633
- const ink = sketchColor ?? SKETCH_COLORS.ink;
3985
+ const theme = useSketchTheme(sketchColor);
3986
+ const ink = sketchColor ?? theme.ink;
3987
+ const accent = sketchColor ?? theme.accent;
3634
3988
  const resolvedSeed = useResolvedSeed(seed);
3635
3989
  const items = normalizeSteps(steps);
3636
3990
  const horizontal = orientation === "horizontal";
@@ -3644,13 +3998,15 @@ var Stepper = react.forwardRef(
3644
3998
  display: "flex",
3645
3999
  flexDirection: horizontal ? "row" : "column",
3646
4000
  alignItems: horizontal ? "flex-start" : "stretch",
4001
+ color: ink,
3647
4002
  ...style
3648
4003
  },
3649
4004
  ...rest,
3650
4005
  children: items.map((step, index) => {
3651
4006
  const complete = index < current;
3652
4007
  const active = index === current;
3653
- const markerColor = complete || active ? SKETCH_COLORS.accent : ink;
4008
+ const markerColor = complete || active ? accent : ink;
4009
+ const completeFill = theme.isDark ? sketchColor ? `${sketchColor}25` : theme.accentFill : theme.accentFill;
3654
4010
  return /* @__PURE__ */ jsxRuntime.jsxs(
3655
4011
  "div",
3656
4012
  {
@@ -3698,10 +4054,13 @@ var Stepper = react.forwardRef(
3698
4054
  roughness,
3699
4055
  seed: deriveSeed(resolvedSeed, `step-${index}`),
3700
4056
  sketchColor: markerColor,
3701
- fill: complete ? SKETCH_COLORS.accentFill : active ? "#f7f6f2" : void 0,
4057
+ fill: complete ? completeFill : active ? fill ?? theme.paper : void 0,
3702
4058
  fillStyle: complete || active ? fillStyle ?? "hachure" : void 0,
3703
4059
  bowing,
3704
4060
  strokeWidth: active ? (strokeWidth ?? 1.6) + 0.4 : strokeWidth ?? 1.5,
4061
+ hachureGap,
4062
+ hachureAngle,
4063
+ fillWeight,
3705
4064
  inset: 1.5
3706
4065
  }
3707
4066
  ),
@@ -3726,7 +4085,7 @@ var Stepper = react.forwardRef(
3726
4085
  shape: horizontal ? "line" : "line-vertical",
3727
4086
  roughness: (roughness ?? 1.5) + 0.3,
3728
4087
  seed: deriveSeed(resolvedSeed, `connector-${index}`),
3729
- sketchColor: complete ? SKETCH_COLORS.accent : ink,
4088
+ sketchColor: complete ? accent : theme.isDark ? "rgba(243, 244, 246, 0.35)" : ink,
3730
4089
  bowing: bowing ?? 2,
3731
4090
  strokeWidth: strokeWidth ?? 1.4,
3732
4091
  inset: 2
@@ -3774,10 +4133,14 @@ var Label2 = react.forwardRef(function Label3({
3774
4133
  sketchColor,
3775
4134
  bowing,
3776
4135
  strokeWidth,
4136
+ hachureGap,
4137
+ hachureAngle,
4138
+ fillWeight,
3777
4139
  animate,
3778
4140
  ...rest
3779
4141
  }, ref) {
3780
- const ink = sketchColor ?? SKETCH_COLORS.ink;
4142
+ const theme = useSketchTheme(sketchColor);
4143
+ const ink = sketchColor ?? theme.ink;
3781
4144
  const resolvedSeed = useResolvedSeed(seed);
3782
4145
  const shouldAnimate = useAnimate(animate);
3783
4146
  const markRef = react.useRef(null);
@@ -3813,11 +4176,14 @@ var Label2 = react.forwardRef(function Label3({
3813
4176
  shape: "ellipse",
3814
4177
  roughness: (roughness ?? 1.5) * 0.9,
3815
4178
  seed: resolvedSeed,
3816
- sketchColor: SKETCH_COLORS.accent,
4179
+ sketchColor: theme.accent,
3817
4180
  bowing,
3818
4181
  fillStyle: "solid",
3819
- fill: SKETCH_COLORS.accent,
4182
+ fill: theme.accent,
3820
4183
  strokeWidth: strokeWidth ?? 1.2,
4184
+ hachureGap,
4185
+ hachureAngle,
4186
+ fillWeight,
3821
4187
  inset: 1
3822
4188
  }
3823
4189
  )
@@ -3853,10 +4219,14 @@ var Collapsible = react.forwardRef(
3853
4219
  bowing,
3854
4220
  fillStyle,
3855
4221
  strokeWidth,
4222
+ hachureGap,
4223
+ hachureAngle,
4224
+ fillWeight,
3856
4225
  ...rest
3857
4226
  }, ref) {
3858
4227
  const resolvedSeed = useResolvedSeed(seed);
3859
- const ink = sketchColor ?? SKETCH_COLORS.ink;
4228
+ const theme = useSketchTheme(sketchColor);
4229
+ const ink = sketchColor ?? theme.ink;
3860
4230
  const [uncontrolled, setUncontrolled] = react.useState(defaultOpen ?? false);
3861
4231
  const isOpen = open ?? uncontrolled;
3862
4232
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3865,10 +4235,13 @@ var Collapsible = react.forwardRef(
3865
4235
  value: {
3866
4236
  roughness,
3867
4237
  seed: resolvedSeed,
3868
- sketchColor,
4238
+ sketchColor: ink,
3869
4239
  bowing,
3870
4240
  fillStyle,
3871
4241
  strokeWidth,
4242
+ hachureGap,
4243
+ hachureAngle,
4244
+ fillWeight,
3872
4245
  resolvedSeed,
3873
4246
  ink,
3874
4247
  open: isOpen
@@ -3983,17 +4356,22 @@ function usePopoverSketch() {
3983
4356
  }
3984
4357
  function Popover({
3985
4358
  children,
4359
+ fill,
3986
4360
  roughness,
3987
4361
  seed,
3988
4362
  sketchColor,
3989
4363
  bowing,
3990
4364
  fillStyle,
3991
4365
  strokeWidth,
4366
+ hachureGap,
4367
+ hachureAngle,
4368
+ fillWeight,
3992
4369
  animate,
3993
4370
  ...rest
3994
4371
  }) {
3995
4372
  const resolvedSeed = useResolvedSeed(seed);
3996
- const ink = sketchColor ?? SKETCH_COLORS.ink;
4373
+ const theme = useSketchTheme(sketchColor);
4374
+ const ink = sketchColor ?? theme.ink;
3997
4375
  return /* @__PURE__ */ jsxRuntime.jsx(
3998
4376
  PopoverSketchContext.Provider,
3999
4377
  {
@@ -4004,8 +4382,12 @@ function Popover({
4004
4382
  bowing,
4005
4383
  fillStyle,
4006
4384
  strokeWidth,
4385
+ hachureGap,
4386
+ hachureAngle,
4387
+ fillWeight,
4007
4388
  resolvedSeed,
4008
4389
  ink,
4390
+ paper: fill ?? theme.paper,
4009
4391
  animate
4010
4392
  },
4011
4393
  children: /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { ...rest, children })
@@ -4016,7 +4398,7 @@ var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
4016
4398
  var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
4017
4399
  var PopoverClose = PopoverPrimitive__namespace.Close;
4018
4400
  var PopoverContent = react.forwardRef(
4019
- function PopoverContent2({ className, style, children, sideOffset = 8, ...rest }, ref) {
4401
+ function PopoverContent2({ className, style, children, fill, sideOffset = 8, ...rest }, ref) {
4020
4402
  const sketch = usePopoverSketch();
4021
4403
  return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
4022
4404
  PopoverPrimitive__namespace.Content,
@@ -4024,7 +4406,7 @@ var PopoverContent = react.forwardRef(
4024
4406
  ref,
4025
4407
  sideOffset,
4026
4408
  className: cn(className),
4027
- style: { zIndex: 80, outline: "none", ...style },
4409
+ style: { zIndex: 80, outline: "none", color: sketch.ink, ...style },
4028
4410
  ...rest,
4029
4411
  children: /* @__PURE__ */ jsxRuntime.jsx(
4030
4412
  SketchBox,
@@ -4034,11 +4416,14 @@ var PopoverContent = react.forwardRef(
4034
4416
  sketchColor: sketch.ink,
4035
4417
  bowing: sketch.bowing,
4036
4418
  fillStyle: sketch.fillStyle ?? "solid",
4037
- fill: "#f7f6f2",
4419
+ fill: fill ?? sketch.paper,
4038
4420
  strokeWidth: sketch.strokeWidth ?? 1.5,
4421
+ hachureGap: sketch.hachureGap,
4422
+ hachureAngle: sketch.hachureAngle,
4423
+ fillWeight: sketch.fillWeight,
4039
4424
  shadow: true,
4040
4425
  animate: sketch.animate,
4041
- contentStyle: { padding: "14px 16px", minWidth: 200 },
4426
+ contentStyle: { padding: "14px 16px", minWidth: 200, color: sketch.ink },
4042
4427
  children
4043
4428
  }
4044
4429
  )
@@ -4046,12 +4431,9 @@ var PopoverContent = react.forwardRef(
4046
4431
  ) });
4047
4432
  }
4048
4433
  );
4049
- var PopoverArrow = react.forwardRef(
4050
- function PopoverArrow2(props, ref) {
4051
- const sketch = usePopoverSketch();
4052
- return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Arrow, { ref, fill: sketch.ink, ...props });
4053
- }
4054
- );
4434
+ function PopoverArrow(props) {
4435
+ return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Arrow, { ...props });
4436
+ }
4055
4437
  var DropdownMenuSketchContext = react.createContext(null);
4056
4438
  function useDropdownMenuSketch() {
4057
4439
  const ctx = react.useContext(DropdownMenuSketchContext);
@@ -4064,17 +4446,22 @@ function useDropdownMenuSketch() {
4064
4446
  }
4065
4447
  function DropdownMenu({
4066
4448
  children,
4449
+ fill,
4067
4450
  roughness,
4068
4451
  seed,
4069
4452
  sketchColor,
4070
4453
  bowing,
4071
4454
  fillStyle,
4072
4455
  strokeWidth,
4456
+ hachureGap,
4457
+ hachureAngle,
4458
+ fillWeight,
4073
4459
  animate,
4074
4460
  ...rest
4075
4461
  }) {
4076
4462
  const resolvedSeed = useResolvedSeed(seed);
4077
- const ink = sketchColor ?? SKETCH_COLORS.ink;
4463
+ const theme = useSketchTheme(sketchColor);
4464
+ const ink = sketchColor ?? theme.ink;
4078
4465
  return /* @__PURE__ */ jsxRuntime.jsx(
4079
4466
  DropdownMenuSketchContext.Provider,
4080
4467
  {
@@ -4085,8 +4472,13 @@ function DropdownMenu({
4085
4472
  bowing,
4086
4473
  fillStyle,
4087
4474
  strokeWidth,
4475
+ hachureGap,
4476
+ hachureAngle,
4477
+ fillWeight,
4088
4478
  resolvedSeed,
4089
4479
  ink,
4480
+ paper: fill ?? theme.paper,
4481
+ accent: theme.accent,
4090
4482
  animate
4091
4483
  },
4092
4484
  children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { ...rest, children })
@@ -4097,7 +4489,7 @@ var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
4097
4489
  var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
4098
4490
  var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
4099
4491
  var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
4100
- var DropdownMenuContent = react.forwardRef(function DropdownMenuContent2({ className, style, children, sideOffset = 6, align = "start", ...rest }, ref) {
4492
+ var DropdownMenuContent = react.forwardRef(function DropdownMenuContent2({ className, style, children, fill, sideOffset = 6, align = "start", ...rest }, ref) {
4101
4493
  const sketch = useDropdownMenuSketch();
4102
4494
  return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
4103
4495
  DropdownMenuPrimitive__namespace.Content,
@@ -4106,7 +4498,7 @@ var DropdownMenuContent = react.forwardRef(function DropdownMenuContent2({ class
4106
4498
  sideOffset,
4107
4499
  align,
4108
4500
  className: cn(className),
4109
- style: { zIndex: 80, outline: "none", minWidth: 180, ...style },
4501
+ style: { zIndex: 80, outline: "none", minWidth: 180, color: sketch.ink, ...style },
4110
4502
  ...rest,
4111
4503
  children: /* @__PURE__ */ jsxRuntime.jsx(
4112
4504
  SketchBox,
@@ -4116,11 +4508,14 @@ var DropdownMenuContent = react.forwardRef(function DropdownMenuContent2({ class
4116
4508
  sketchColor: sketch.ink,
4117
4509
  bowing: sketch.bowing,
4118
4510
  fillStyle: sketch.fillStyle ?? "solid",
4119
- fill: "#f7f6f2",
4511
+ fill: fill ?? sketch.paper,
4120
4512
  strokeWidth: sketch.strokeWidth ?? 1.5,
4513
+ hachureGap: sketch.hachureGap,
4514
+ hachureAngle: sketch.hachureAngle,
4515
+ fillWeight: sketch.fillWeight,
4121
4516
  shadow: true,
4122
4517
  animate: sketch.animate,
4123
- contentStyle: { padding: "6px 4px" },
4518
+ contentStyle: { padding: "6px 4px", color: sketch.ink },
4124
4519
  children
4125
4520
  }
4126
4521
  )
@@ -4235,7 +4630,7 @@ var DropdownMenuCheckboxItem = react.forwardRef(function DropdownMenuCheckboxIte
4235
4630
  path: CHECK_PATH2,
4236
4631
  roughness: (sketch.roughness ?? 1.5) * 0.7,
4237
4632
  seed: deriveSeed(sketch.resolvedSeed, "checkbox-mark"),
4238
- sketchColor: SKETCH_COLORS.accent,
4633
+ sketchColor: sketch.accent,
4239
4634
  bowing: sketch.bowing,
4240
4635
  strokeWidth: 1.6,
4241
4636
  inset: 0
@@ -4303,10 +4698,10 @@ var DropdownMenuRadioItem = react.forwardRef(function DropdownMenuRadioItem2({ c
4303
4698
  shape: "ellipse",
4304
4699
  roughness: (sketch.roughness ?? 1.5) * 0.8,
4305
4700
  seed: deriveSeed(sketch.resolvedSeed, "radio-mark"),
4306
- sketchColor: SKETCH_COLORS.accent,
4701
+ sketchColor: sketch.accent,
4307
4702
  bowing: sketch.bowing,
4308
4703
  fillStyle: "solid",
4309
- fill: SKETCH_COLORS.accent,
4704
+ fill: sketch.accent,
4310
4705
  strokeWidth: 1.2,
4311
4706
  inset: 0
4312
4707
  }
@@ -4381,17 +4776,22 @@ function Dialog2({
4381
4776
  open,
4382
4777
  defaultOpen,
4383
4778
  onOpenChange,
4779
+ fill,
4384
4780
  roughness,
4385
4781
  seed,
4386
4782
  sketchColor,
4387
4783
  bowing,
4388
4784
  fillStyle,
4389
4785
  strokeWidth,
4786
+ hachureGap,
4787
+ hachureAngle,
4788
+ fillWeight,
4390
4789
  animate,
4391
4790
  ...rest
4392
4791
  }) {
4393
4792
  const resolvedSeed = useResolvedSeed(seed);
4394
- const ink = sketchColor ?? SKETCH_COLORS.ink;
4793
+ const theme = useSketchTheme(sketchColor);
4794
+ const ink = sketchColor ?? theme.ink;
4395
4795
  const [uncontrolled, setUncontrolled] = react.useState(defaultOpen === true);
4396
4796
  const isOpen = open ?? uncontrolled;
4397
4797
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -4404,8 +4804,13 @@ function Dialog2({
4404
4804
  bowing,
4405
4805
  fillStyle,
4406
4806
  strokeWidth,
4807
+ hachureGap,
4808
+ hachureAngle,
4809
+ fillWeight,
4407
4810
  resolvedSeed,
4408
4811
  ink,
4812
+ paper: fill ?? theme.paper,
4813
+ isDark: theme.isDark,
4409
4814
  animate,
4410
4815
  open: isOpen
4411
4816
  },
@@ -4441,7 +4846,7 @@ var DialogOverlay = react.forwardRef(
4441
4846
  style: {
4442
4847
  position: "fixed",
4443
4848
  inset: 0,
4444
- background: "rgba(31, 29, 26, 0.38)",
4849
+ background: sketch.isDark ? "rgba(0, 0, 0, 0.65)" : "rgba(31, 29, 26, 0.38)",
4445
4850
  zIndex: 70,
4446
4851
  ...style
4447
4852
  }
@@ -4450,7 +4855,7 @@ var DialogOverlay = react.forwardRef(
4450
4855
  }
4451
4856
  );
4452
4857
  var DialogContent = react.forwardRef(
4453
- function DialogContent2({ className, style, contentStyle, children, ...rest }, ref) {
4858
+ function DialogContent2({ className, style, contentStyle, fill, children, ...rest }, ref) {
4454
4859
  const sketch = useDialogSketch();
4455
4860
  const shouldAnimate = useAnimate(sketch.animate);
4456
4861
  return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: sketch.open ? /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { forceMount: true, children: [
@@ -4480,6 +4885,7 @@ var DialogContent = react.forwardRef(
4480
4885
  width: "min(420px, calc(100vw - 32px))",
4481
4886
  outline: "none",
4482
4887
  pointerEvents: "auto",
4888
+ color: sketch.ink,
4483
4889
  ...style
4484
4890
  },
4485
4891
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -4490,10 +4896,13 @@ var DialogContent = react.forwardRef(
4490
4896
  sketchColor: sketch.ink,
4491
4897
  bowing: sketch.bowing,
4492
4898
  fillStyle: sketch.fillStyle ?? "solid",
4493
- fill: "#f7f6f2",
4899
+ fill: fill ?? sketch.paper,
4494
4900
  strokeWidth: sketch.strokeWidth ?? 2,
4901
+ hachureGap: sketch.hachureGap,
4902
+ hachureAngle: sketch.hachureAngle,
4903
+ fillWeight: sketch.fillWeight,
4495
4904
  animate: sketch.animate,
4496
- contentStyle: { padding: 20, ...contentStyle },
4905
+ contentStyle: { padding: 20, color: sketch.ink, ...contentStyle },
4497
4906
  children
4498
4907
  }
4499
4908
  )
@@ -4590,17 +4999,22 @@ function AlertDialog({
4590
4999
  open,
4591
5000
  defaultOpen,
4592
5001
  onOpenChange,
5002
+ fill,
4593
5003
  roughness,
4594
5004
  seed,
4595
5005
  sketchColor,
4596
5006
  bowing,
4597
5007
  fillStyle,
4598
5008
  strokeWidth,
5009
+ hachureGap,
5010
+ hachureAngle,
5011
+ fillWeight,
4599
5012
  animate,
4600
5013
  ...rest
4601
5014
  }) {
4602
5015
  const resolvedSeed = useResolvedSeed(seed);
4603
- const ink = sketchColor ?? SKETCH_COLORS.ink;
5016
+ const theme = useSketchTheme(sketchColor);
5017
+ const ink = sketchColor ?? theme.ink;
4604
5018
  const [uncontrolled, setUncontrolled] = react.useState(defaultOpen === true);
4605
5019
  const isOpen = open ?? uncontrolled;
4606
5020
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -4613,8 +5027,13 @@ function AlertDialog({
4613
5027
  bowing,
4614
5028
  fillStyle,
4615
5029
  strokeWidth,
5030
+ hachureGap,
5031
+ hachureAngle,
5032
+ fillWeight,
4616
5033
  resolvedSeed,
4617
5034
  ink,
5035
+ paper: fill ?? theme.paper,
5036
+ isDark: theme.isDark,
4618
5037
  animate,
4619
5038
  open: isOpen
4620
5039
  },
@@ -4648,14 +5067,14 @@ var AlertDialogOverlay = react.forwardRef(function AlertDialogOverlay2({ style,
4648
5067
  style: {
4649
5068
  position: "fixed",
4650
5069
  inset: 0,
4651
- background: "rgba(31, 29, 26, 0.38)",
5070
+ background: sketch.isDark ? "rgba(0, 0, 0, 0.65)" : "rgba(31, 29, 26, 0.38)",
4652
5071
  zIndex: 70,
4653
5072
  ...style
4654
5073
  }
4655
5074
  }
4656
5075
  ) });
4657
5076
  });
4658
- var AlertDialogContent = react.forwardRef(function AlertDialogContent2({ className, style, contentStyle, children, ...rest }, ref) {
5077
+ var AlertDialogContent = react.forwardRef(function AlertDialogContent2({ className, style, contentStyle, fill, children, ...rest }, ref) {
4659
5078
  const sketch = useAlertDialogSketch();
4660
5079
  const shouldAnimate = useAnimate(sketch.animate);
4661
5080
  return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: sketch.open ? /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPrimitive__namespace.Portal, { forceMount: true, children: [
@@ -4685,6 +5104,7 @@ var AlertDialogContent = react.forwardRef(function AlertDialogContent2({ classNa
4685
5104
  width: "min(420px, calc(100vw - 32px))",
4686
5105
  outline: "none",
4687
5106
  pointerEvents: "auto",
5107
+ color: sketch.ink,
4688
5108
  ...style
4689
5109
  },
4690
5110
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -4695,10 +5115,13 @@ var AlertDialogContent = react.forwardRef(function AlertDialogContent2({ classNa
4695
5115
  sketchColor: sketch.ink,
4696
5116
  bowing: sketch.bowing,
4697
5117
  fillStyle: sketch.fillStyle ?? "solid",
4698
- fill: "#f7f6f2",
5118
+ fill: fill ?? sketch.paper,
4699
5119
  strokeWidth: sketch.strokeWidth ?? 2,
5120
+ hachureGap: sketch.hachureGap,
5121
+ hachureAngle: sketch.hachureAngle,
5122
+ fillWeight: sketch.fillWeight,
4700
5123
  animate: sketch.animate,
4701
- contentStyle: { padding: 20, ...contentStyle },
5124
+ contentStyle: { padding: 20, color: sketch.ink, ...contentStyle },
4702
5125
  children
4703
5126
  }
4704
5127
  )
@@ -4840,11 +5263,15 @@ var Command = react.forwardRef(
4840
5263
  bowing,
4841
5264
  fillStyle,
4842
5265
  strokeWidth,
5266
+ hachureGap,
5267
+ hachureAngle,
5268
+ fillWeight,
4843
5269
  animate,
4844
5270
  ...rest
4845
5271
  }, ref) {
4846
5272
  const resolvedSeed = useResolvedSeed(seed);
4847
- const ink = sketchColor ?? SKETCH_COLORS.ink;
5273
+ const theme = useSketchTheme(sketchColor);
5274
+ const ink = sketchColor ?? theme.ink;
4848
5275
  return /* @__PURE__ */ jsxRuntime.jsx(
4849
5276
  CommandSketchContext.Provider,
4850
5277
  {
@@ -4855,24 +5282,31 @@ var Command = react.forwardRef(
4855
5282
  bowing,
4856
5283
  fillStyle,
4857
5284
  strokeWidth,
5285
+ hachureGap,
5286
+ hachureAngle,
5287
+ fillWeight,
4858
5288
  resolvedSeed,
4859
5289
  ink,
5290
+ paper: theme.paper,
4860
5291
  animate
4861
5292
  },
4862
5293
  children: /* @__PURE__ */ jsxRuntime.jsx(
4863
5294
  SketchBox,
4864
5295
  {
4865
5296
  className: cn(className),
4866
- style,
5297
+ style: { color: ink, ...style },
4867
5298
  roughness,
4868
5299
  seed: resolvedSeed,
4869
5300
  sketchColor: ink,
4870
5301
  bowing,
4871
5302
  fillStyle: fillStyle ?? "solid",
4872
- fill: "#f7f6f2",
5303
+ fill: theme.paper,
4873
5304
  strokeWidth: strokeWidth ?? 1.5,
5305
+ hachureGap,
5306
+ hachureAngle,
5307
+ fillWeight,
4874
5308
  animate,
4875
- contentStyle: { padding: 0, display: "flex", flexDirection: "column" },
5309
+ contentStyle: { padding: 0, display: "flex", flexDirection: "column", color: ink },
4876
5310
  children: /* @__PURE__ */ jsxRuntime.jsx(cmdk.Command, { ref, ...rest, children })
4877
5311
  }
4878
5312
  )
@@ -5093,6 +5527,9 @@ function Combobox({
5093
5527
  bowing,
5094
5528
  fillStyle,
5095
5529
  strokeWidth,
5530
+ hachureGap,
5531
+ hachureAngle,
5532
+ fillWeight,
5096
5533
  animate,
5097
5534
  "aria-label": ariaLabel
5098
5535
  }) {
@@ -5102,7 +5539,8 @@ function Combobox({
5102
5539
  const selectedOption = options.find(
5103
5540
  (option) => option.value === selectedValue
5104
5541
  );
5105
- const ink = sketchColor ?? SKETCH_COLORS.ink;
5542
+ const theme = useSketchTheme(sketchColor);
5543
+ const ink = sketchColor ?? theme.ink;
5106
5544
  const resolvedSeed = useResolvedSeed(seed);
5107
5545
  const shouldAnimate = useAnimate(animate);
5108
5546
  const triggerRef = react.useRef(null);
@@ -5152,9 +5590,12 @@ function Combobox({
5152
5590
  shape: "rectangle",
5153
5591
  roughness,
5154
5592
  seed: resolvedSeed,
5155
- sketchColor: open ? SKETCH_COLORS.accent : ink,
5593
+ sketchColor: open ? theme.accent : ink,
5156
5594
  bowing,
5157
5595
  fillStyle,
5596
+ hachureGap,
5597
+ hachureAngle,
5598
+ fillWeight,
5158
5599
  strokeWidth: open ? (strokeWidth ?? 1.75) + 0.35 : strokeWidth
5159
5600
  }
5160
5601
  ),
@@ -5213,6 +5654,9 @@ function Combobox({
5213
5654
  bowing,
5214
5655
  fillStyle,
5215
5656
  strokeWidth,
5657
+ hachureGap,
5658
+ hachureAngle,
5659
+ fillWeight,
5216
5660
  animate,
5217
5661
  children: [
5218
5662
  /* @__PURE__ */ jsxRuntime.jsx(CommandInput, { placeholder: searchPlaceholder }),
@@ -5240,16 +5684,21 @@ var Kbd = react.forwardRef(function Kbd2({
5240
5684
  children,
5241
5685
  className,
5242
5686
  style,
5687
+ fill,
5243
5688
  roughness,
5244
5689
  seed,
5245
5690
  sketchColor,
5246
5691
  bowing,
5247
5692
  fillStyle,
5248
5693
  strokeWidth,
5694
+ hachureGap,
5695
+ hachureAngle,
5696
+ fillWeight,
5249
5697
  animate,
5250
5698
  ...rest
5251
5699
  }, ref) {
5252
- const ink = sketchColor ?? SKETCH_COLORS.ink;
5700
+ const theme = useSketchTheme(sketchColor);
5701
+ const ink = sketchColor ?? theme.ink;
5253
5702
  return /* @__PURE__ */ jsxRuntime.jsx(
5254
5703
  SketchBox,
5255
5704
  {
@@ -5257,6 +5706,7 @@ var Kbd = react.forwardRef(function Kbd2({
5257
5706
  style: {
5258
5707
  display: "inline-flex",
5259
5708
  verticalAlign: "middle",
5709
+ color: ink,
5260
5710
  ...style
5261
5711
  },
5262
5712
  contentStyle: {
@@ -5264,10 +5714,14 @@ var Kbd = react.forwardRef(function Kbd2({
5264
5714
  fontSize: 11,
5265
5715
  fontFamily: doodleUiFontFamily,
5266
5716
  lineHeight: 1.35,
5267
- letterSpacing: "0.04em"
5717
+ letterSpacing: "0.04em",
5718
+ color: ink
5268
5719
  },
5269
- fill: SKETCH_COLORS.secondaryFill,
5720
+ fill: fill ?? theme.secondaryFill,
5270
5721
  fillStyle: fillStyle ?? "hachure",
5722
+ hachureGap: hachureGap ?? 6,
5723
+ hachureAngle,
5724
+ fillWeight: fillWeight ?? 0.8,
5271
5725
  roughness,
5272
5726
  seed,
5273
5727
  sketchColor: ink,
@@ -5314,7 +5768,8 @@ var Spinner = react.forwardRef(
5314
5768
  }, ref) {
5315
5769
  const px = SIZE_PX[size];
5316
5770
  const resolvedSeed = useResolvedSeed(seed);
5317
- const ink = sketchColor ?? SKETCH_COLORS.ink;
5771
+ const theme = useSketchTheme(sketchColor);
5772
+ const ink = sketchColor ?? theme.ink;
5318
5773
  const shouldSpin = useAnimate(animate);
5319
5774
  const boxStyle = {
5320
5775
  position: "relative",
@@ -5382,6 +5837,9 @@ var Toggle = react.forwardRef(
5382
5837
  bowing,
5383
5838
  fillStyle,
5384
5839
  strokeWidth,
5840
+ hachureGap,
5841
+ hachureAngle,
5842
+ fillWeight,
5385
5843
  pressed,
5386
5844
  defaultPressed,
5387
5845
  onPressedChange,
@@ -5393,7 +5851,10 @@ var Toggle = react.forwardRef(
5393
5851
  const rootRef = react.useRef(null);
5394
5852
  const [uncontrolled, setUncontrolled] = react.useState(defaultPressed === true);
5395
5853
  const isPressed = pressed ?? uncontrolled;
5396
- const ink = sketchColor ?? SKETCH_COLORS.ink;
5854
+ const theme = useSketchTheme(sketchColor);
5855
+ const ink = sketchColor ?? theme.ink;
5856
+ const accent = sketchColor ?? theme.accent;
5857
+ const accentFill = theme.isDark ? sketchColor ? `${sketchColor}25` : theme.accentFill : theme.accentFill;
5397
5858
  const resolvedSeed = useResolvedSeed(seed);
5398
5859
  const shouldAnimate = useAnimate(animate);
5399
5860
  const pressSeed = deriveSeed(resolvedSeed, isPressed ? "on" : "off");
@@ -5422,7 +5883,7 @@ var Toggle = react.forwardRef(
5422
5883
  border: "none",
5423
5884
  background: "transparent",
5424
5885
  cursor: disabled ? "not-allowed" : "pointer",
5425
- color: ink,
5886
+ color: isPressed ? theme.isDark ? "#ffffff" : accent : ink,
5426
5887
  fontFamily: doodleUiFontFamily,
5427
5888
  fontWeight: doodleUiFontWeight(600),
5428
5889
  opacity: disabled ? 0.45 : 1,
@@ -5438,11 +5899,14 @@ var Toggle = react.forwardRef(
5438
5899
  shape: "rectangle",
5439
5900
  roughness,
5440
5901
  seed: sketchSeed,
5441
- sketchColor: isPressed ? SKETCH_COLORS.accent : ink,
5902
+ sketchColor: isPressed ? accent : ink,
5442
5903
  bowing,
5443
5904
  fillStyle: fillStyle ?? "hachure",
5444
- fill: isPressed ? SKETCH_COLORS.accentFill : void 0,
5445
- strokeWidth: strokeWidth ?? 1.6
5905
+ fill: isPressed ? accentFill : void 0,
5906
+ strokeWidth: strokeWidth ?? 1.6,
5907
+ hachureGap: hachureGap ?? 7,
5908
+ hachureAngle,
5909
+ fillWeight: fillWeight ?? 1
5446
5910
  }
5447
5911
  ),
5448
5912
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
@@ -5468,13 +5932,19 @@ function ToggleGroup(props) {
5468
5932
  bowing,
5469
5933
  fillStyle,
5470
5934
  strokeWidth,
5935
+ hachureGap,
5936
+ hachureAngle,
5937
+ fillWeight,
5471
5938
  size = "md",
5472
5939
  animate,
5473
5940
  type = "single",
5474
5941
  ...rest
5475
5942
  } = props;
5476
5943
  const resolvedSeed = useResolvedSeed(seed);
5477
- const ink = sketchColor ?? SKETCH_COLORS.ink;
5944
+ const theme = useSketchTheme(sketchColor);
5945
+ const ink = sketchColor ?? theme.ink;
5946
+ const accent = sketchColor ?? theme.accent;
5947
+ const accentFill = theme.isDark ? sketchColor ? `${sketchColor}25` : theme.accentFill : theme.accentFill;
5478
5948
  const rootStyle = { display: "inline-flex", gap: 6, flexWrap: "wrap" };
5479
5949
  return /* @__PURE__ */ jsxRuntime.jsx(
5480
5950
  ToggleGroupSketchContext.Provider,
@@ -5486,8 +5956,14 @@ function ToggleGroup(props) {
5486
5956
  bowing,
5487
5957
  fillStyle,
5488
5958
  strokeWidth,
5959
+ hachureGap,
5960
+ hachureAngle,
5961
+ fillWeight,
5489
5962
  resolvedSeed,
5490
5963
  ink,
5964
+ accent,
5965
+ accentFill,
5966
+ isDark: theme.isDark,
5491
5967
  animate,
5492
5968
  size
5493
5969
  },
@@ -5536,6 +6012,7 @@ var ToggleGroupItem = react.forwardRef(function ToggleGroupItem2({ className, st
5536
6012
  return () => obs.disconnect();
5537
6013
  }, [value]);
5538
6014
  useDrawIn(rootRef, DRAW_IN_DURATION_MS, shouldAnimate, sketchSeed);
6015
+ const textColor = pressed ? sketch.isDark ? "#ffffff" : sketch.accent : sketch.ink;
5539
6016
  return /* @__PURE__ */ jsxRuntime.jsxs(
5540
6017
  ToggleGroupPrimitive__namespace.Item,
5541
6018
  {
@@ -5554,7 +6031,7 @@ var ToggleGroupItem = react.forwardRef(function ToggleGroupItem2({ className, st
5554
6031
  border: "none",
5555
6032
  background: "transparent",
5556
6033
  cursor: disabled ? "not-allowed" : "pointer",
5557
- color: sketch.ink,
6034
+ color: textColor,
5558
6035
  fontFamily: doodleUiFontFamily,
5559
6036
  fontWeight: doodleUiFontWeight(600),
5560
6037
  opacity: disabled ? 0.45 : 1,
@@ -5570,11 +6047,14 @@ var ToggleGroupItem = react.forwardRef(function ToggleGroupItem2({ className, st
5570
6047
  shape: "rectangle",
5571
6048
  roughness: sketch.roughness,
5572
6049
  seed: sketchSeed,
5573
- sketchColor: pressed ? SKETCH_COLORS.accent : sketch.ink,
6050
+ sketchColor: pressed ? sketch.accent : sketch.ink,
5574
6051
  bowing: sketch.bowing,
5575
6052
  fillStyle: sketch.fillStyle ?? "hachure",
5576
- fill: pressed ? SKETCH_COLORS.accentFill : void 0,
5577
- strokeWidth: sketch.strokeWidth ?? 1.6
6053
+ fill: pressed ? sketch.accentFill : void 0,
6054
+ strokeWidth: sketch.strokeWidth ?? 1.6,
6055
+ hachureGap: sketch.hachureGap ?? 7,
6056
+ hachureAngle: sketch.hachureAngle,
6057
+ fillWeight: sketch.fillWeight ?? 1
5578
6058
  }
5579
6059
  ),
5580
6060
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1 }, children })
@@ -5600,13 +6080,17 @@ function InputGroup({
5600
6080
  bowing,
5601
6081
  fillStyle,
5602
6082
  strokeWidth,
6083
+ hachureGap,
6084
+ hachureAngle,
6085
+ fillWeight,
5603
6086
  animate,
5604
6087
  onFocus,
5605
6088
  onBlur,
5606
6089
  ...rest
5607
6090
  }) {
5608
6091
  const resolvedSeed = useResolvedSeed(seed);
5609
- const ink = sketchColor ?? SKETCH_COLORS.ink;
6092
+ const theme = useSketchTheme(sketchColor);
6093
+ const ink = sketchColor ?? theme.ink;
5610
6094
  const [focused, setFocused] = react.useState(false);
5611
6095
  const shouldAnimate = useAnimate(animate);
5612
6096
  const focusSeed = deriveSeed(resolvedSeed, "focus");
@@ -5617,12 +6101,16 @@ function InputGroup({
5617
6101
  value: {
5618
6102
  roughness,
5619
6103
  seed: resolvedSeed,
5620
- sketchColor,
6104
+ sketchColor: ink,
5621
6105
  bowing,
5622
6106
  fillStyle,
5623
6107
  strokeWidth,
6108
+ hachureGap,
6109
+ hachureAngle,
6110
+ fillWeight,
5624
6111
  resolvedSeed,
5625
6112
  ink,
6113
+ accent: theme.accent,
5626
6114
  animate,
5627
6115
  focused,
5628
6116
  setFocused
@@ -5648,10 +6136,13 @@ function InputGroup({
5648
6136
  {
5649
6137
  roughness,
5650
6138
  seed: sketchSeed,
5651
- sketchColor: focused ? SKETCH_COLORS.accent : ink,
6139
+ sketchColor: focused ? theme.accent : ink,
5652
6140
  bowing,
5653
6141
  fillStyle,
5654
6142
  strokeWidth: focused && !shouldAnimate ? (strokeWidth ?? 1.75) + 0.35 : strokeWidth,
6143
+ hachureGap,
6144
+ hachureAngle,
6145
+ fillWeight,
5655
6146
  animate,
5656
6147
  drawInKey: sketchSeed,
5657
6148
  contentStyle: {
@@ -5751,24 +6242,35 @@ var InputOTP = react.forwardRef(
5751
6242
  bowing,
5752
6243
  fillStyle,
5753
6244
  strokeWidth,
6245
+ hachureGap,
6246
+ hachureAngle,
6247
+ fillWeight,
6248
+ fill,
5754
6249
  animate,
5755
6250
  children,
5756
6251
  ...rest
5757
6252
  }, ref) {
5758
6253
  const resolvedSeed = useResolvedSeed(seed);
5759
- const ink = sketchColor ?? SKETCH_COLORS.ink;
6254
+ const theme = useSketchTheme(sketchColor);
6255
+ const ink = sketchColor ?? theme.ink;
5760
6256
  return /* @__PURE__ */ jsxRuntime.jsx(
5761
6257
  InputOTPSketchContext.Provider,
5762
6258
  {
5763
6259
  value: {
5764
6260
  roughness,
5765
6261
  seed: resolvedSeed,
5766
- sketchColor,
6262
+ sketchColor: ink,
5767
6263
  bowing,
5768
6264
  fillStyle,
5769
6265
  strokeWidth,
6266
+ hachureGap,
6267
+ hachureAngle,
6268
+ fillWeight,
6269
+ fill,
5770
6270
  resolvedSeed,
5771
6271
  ink,
6272
+ accent: theme.accent,
6273
+ paper: theme.paper,
5772
6274
  animate
5773
6275
  },
5774
6276
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -5845,9 +6347,13 @@ var InputOTPSlot = react.forwardRef(
5845
6347
  shape: "rectangle",
5846
6348
  roughness: sketch.roughness,
5847
6349
  seed: slotSeed,
5848
- sketchColor: isActive ? SKETCH_COLORS.accent : sketch.ink,
6350
+ sketchColor: isActive ? sketch.accent : sketch.ink,
5849
6351
  bowing: sketch.bowing,
5850
6352
  fillStyle: sketch.fillStyle,
6353
+ fill: sketch.fill,
6354
+ hachureGap: sketch.hachureGap,
6355
+ hachureAngle: sketch.hachureAngle,
6356
+ fillWeight: sketch.fillWeight,
5851
6357
  strokeWidth: isActive ? (sketch.strokeWidth ?? 1.75) + 0.15 : sketch.strokeWidth
5852
6358
  }
5853
6359
  ),
@@ -5907,17 +6413,22 @@ var ScrollArea = react.forwardRef(function ScrollArea2({
5907
6413
  className,
5908
6414
  style,
5909
6415
  children,
6416
+ fill,
5910
6417
  roughness,
5911
6418
  seed,
5912
6419
  sketchColor,
5913
6420
  bowing,
5914
6421
  fillStyle,
5915
6422
  strokeWidth,
6423
+ hachureGap,
6424
+ hachureAngle,
6425
+ fillWeight,
5916
6426
  animate,
5917
6427
  ...rest
5918
6428
  }, ref) {
5919
6429
  const resolvedSeed = useResolvedSeed(seed);
5920
- const ink = sketchColor ?? SKETCH_COLORS.ink;
6430
+ const theme = useSketchTheme(sketchColor);
6431
+ const ink = sketchColor ?? theme.ink;
5921
6432
  return /* @__PURE__ */ jsxRuntime.jsx(
5922
6433
  ScrollAreaSketchContext.Provider,
5923
6434
  {
@@ -5928,8 +6439,12 @@ var ScrollArea = react.forwardRef(function ScrollArea2({
5928
6439
  bowing,
5929
6440
  fillStyle,
5930
6441
  strokeWidth,
6442
+ hachureGap,
6443
+ hachureAngle,
6444
+ fillWeight,
5931
6445
  resolvedSeed,
5932
6446
  ink,
6447
+ paper: fill ?? theme.paper,
5933
6448
  animate
5934
6449
  },
5935
6450
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -5937,7 +6452,7 @@ var ScrollArea = react.forwardRef(function ScrollArea2({
5937
6452
  {
5938
6453
  ref,
5939
6454
  className: cn(className),
5940
- style: { position: "relative", overflow: "hidden", ...style },
6455
+ style: { position: "relative", overflow: "hidden", color: ink, ...style },
5941
6456
  ...rest,
5942
6457
  children: /* @__PURE__ */ jsxRuntime.jsx(
5943
6458
  SketchBox,
@@ -5947,10 +6462,13 @@ var ScrollArea = react.forwardRef(function ScrollArea2({
5947
6462
  sketchColor: ink,
5948
6463
  bowing,
5949
6464
  fillStyle: fillStyle ?? "solid",
5950
- fill: "#f7f6f2",
6465
+ fill: fill ?? theme.paper,
5951
6466
  strokeWidth: strokeWidth ?? 1.5,
6467
+ hachureGap,
6468
+ hachureAngle,
6469
+ fillWeight,
5952
6470
  animate,
5953
- contentStyle: { padding: 0, height: "100%" },
6471
+ contentStyle: { padding: 0, height: "100%", color: ink },
5954
6472
  style: { height: "100%" },
5955
6473
  children
5956
6474
  }
@@ -6039,7 +6557,8 @@ function ResizableHandle({
6039
6557
  ...rest
6040
6558
  }) {
6041
6559
  const resolvedSeed = useResolvedSeed(seed);
6042
- const ink = sketchColor ?? SKETCH_COLORS.ink;
6560
+ const theme = useSketchTheme(sketchColor);
6561
+ const ink = sketchColor ?? theme.ink;
6043
6562
  const handleSeed = deriveSeed(resolvedSeed, "handle");
6044
6563
  const base = {
6045
6564
  position: "relative",
@@ -6113,17 +6632,22 @@ function useHoverCardSketch() {
6113
6632
  }
6114
6633
  function HoverCard({
6115
6634
  children,
6635
+ fill,
6116
6636
  roughness,
6117
6637
  seed,
6118
6638
  sketchColor,
6119
6639
  bowing,
6120
6640
  fillStyle,
6121
6641
  strokeWidth,
6642
+ hachureGap,
6643
+ hachureAngle,
6644
+ fillWeight,
6122
6645
  animate,
6123
6646
  ...rest
6124
6647
  }) {
6125
6648
  const resolvedSeed = useResolvedSeed(seed);
6126
- const ink = sketchColor ?? SKETCH_COLORS.ink;
6649
+ const theme = useSketchTheme(sketchColor);
6650
+ const ink = sketchColor ?? theme.ink;
6127
6651
  return /* @__PURE__ */ jsxRuntime.jsx(
6128
6652
  HoverCardSketchContext.Provider,
6129
6653
  {
@@ -6134,8 +6658,12 @@ function HoverCard({
6134
6658
  bowing,
6135
6659
  fillStyle,
6136
6660
  strokeWidth,
6661
+ hachureGap,
6662
+ hachureAngle,
6663
+ fillWeight,
6137
6664
  resolvedSeed,
6138
6665
  ink,
6666
+ paper: fill ?? theme.paper,
6139
6667
  animate
6140
6668
  },
6141
6669
  children: /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Root, { ...rest, children })
@@ -6143,7 +6671,7 @@ function HoverCard({
6143
6671
  );
6144
6672
  }
6145
6673
  var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
6146
- var HoverCardContent = react.forwardRef(function HoverCardContent2({ className, style, children, sideOffset = 6, align = "center", ...rest }, ref) {
6674
+ var HoverCardContent = react.forwardRef(function HoverCardContent2({ className, style, children, fill, sideOffset = 6, align = "center", ...rest }, ref) {
6147
6675
  const sketch = useHoverCardSketch();
6148
6676
  return /* @__PURE__ */ jsxRuntime.jsx(HoverCardPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6149
6677
  HoverCardPrimitive__namespace.Content,
@@ -6152,7 +6680,7 @@ var HoverCardContent = react.forwardRef(function HoverCardContent2({ className,
6152
6680
  sideOffset,
6153
6681
  align,
6154
6682
  className: cn(className),
6155
- style: { zIndex: 75, outline: "none", ...style },
6683
+ style: { zIndex: 75, outline: "none", color: sketch.ink, ...style },
6156
6684
  ...rest,
6157
6685
  children: /* @__PURE__ */ jsxRuntime.jsx(
6158
6686
  SketchBox,
@@ -6162,11 +6690,14 @@ var HoverCardContent = react.forwardRef(function HoverCardContent2({ className,
6162
6690
  sketchColor: sketch.ink,
6163
6691
  bowing: sketch.bowing,
6164
6692
  fillStyle: sketch.fillStyle ?? "solid",
6165
- fill: "#f7f6f2",
6693
+ fill: fill ?? sketch.paper,
6166
6694
  strokeWidth: sketch.strokeWidth ?? 1.5,
6695
+ hachureGap: sketch.hachureGap,
6696
+ hachureAngle: sketch.hachureAngle,
6697
+ fillWeight: sketch.fillWeight,
6167
6698
  shadow: true,
6168
6699
  animate: sketch.animate,
6169
- contentStyle: { padding: 14, maxWidth: 320, fontSize: 14 },
6700
+ contentStyle: { padding: 14, maxWidth: 320, fontSize: 14, color: sketch.ink },
6170
6701
  children
6171
6702
  }
6172
6703
  )
@@ -6186,17 +6717,22 @@ function useContextMenuSketch() {
6186
6717
  }
6187
6718
  function ContextMenu({
6188
6719
  children,
6720
+ fill,
6189
6721
  roughness,
6190
6722
  seed,
6191
6723
  sketchColor,
6192
6724
  bowing,
6193
6725
  fillStyle,
6194
6726
  strokeWidth,
6727
+ hachureGap,
6728
+ hachureAngle,
6729
+ fillWeight,
6195
6730
  animate,
6196
6731
  ...rest
6197
6732
  }) {
6198
6733
  const resolvedSeed = useResolvedSeed(seed);
6199
- const ink = sketchColor ?? SKETCH_COLORS.ink;
6734
+ const theme = useSketchTheme(sketchColor);
6735
+ const ink = sketchColor ?? theme.ink;
6200
6736
  return /* @__PURE__ */ jsxRuntime.jsx(
6201
6737
  ContextMenuSketchContext.Provider,
6202
6738
  {
@@ -6207,8 +6743,13 @@ function ContextMenu({
6207
6743
  bowing,
6208
6744
  fillStyle,
6209
6745
  strokeWidth,
6746
+ hachureGap,
6747
+ hachureAngle,
6748
+ fillWeight,
6210
6749
  resolvedSeed,
6211
6750
  ink,
6751
+ paper: fill ?? theme.paper,
6752
+ accent: theme.accent,
6212
6753
  animate
6213
6754
  },
6214
6755
  children: /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Root, { ...rest, children })
@@ -6219,14 +6760,14 @@ var ContextMenuTrigger = ContextMenuPrimitive__namespace.Trigger;
6219
6760
  var ContextMenuGroup = ContextMenuPrimitive__namespace.Group;
6220
6761
  var ContextMenuRadioGroup = ContextMenuPrimitive__namespace.RadioGroup;
6221
6762
  var ContextMenuSub = ContextMenuPrimitive__namespace.Sub;
6222
- var ContextMenuContent = react.forwardRef(function ContextMenuContent2({ className, style, children, ...rest }, ref) {
6763
+ var ContextMenuContent = react.forwardRef(function ContextMenuContent2({ className, style, children, fill, ...rest }, ref) {
6223
6764
  const sketch = useContextMenuSketch();
6224
6765
  return /* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6225
6766
  ContextMenuPrimitive__namespace.Content,
6226
6767
  {
6227
6768
  ref,
6228
6769
  className: cn(className),
6229
- style: { zIndex: 80, outline: "none", minWidth: 180, ...style },
6770
+ style: { zIndex: 80, outline: "none", minWidth: 180, color: sketch.ink, ...style },
6230
6771
  ...rest,
6231
6772
  children: /* @__PURE__ */ jsxRuntime.jsx(
6232
6773
  SketchBox,
@@ -6236,11 +6777,14 @@ var ContextMenuContent = react.forwardRef(function ContextMenuContent2({ classNa
6236
6777
  sketchColor: sketch.ink,
6237
6778
  bowing: sketch.bowing,
6238
6779
  fillStyle: sketch.fillStyle ?? "solid",
6239
- fill: "#f7f6f2",
6780
+ fill: fill ?? sketch.paper,
6240
6781
  strokeWidth: sketch.strokeWidth ?? 1.5,
6782
+ hachureGap: sketch.hachureGap,
6783
+ hachureAngle: sketch.hachureAngle,
6784
+ fillWeight: sketch.fillWeight,
6241
6785
  shadow: true,
6242
6786
  animate: sketch.animate,
6243
- contentStyle: { padding: "6px 4px" },
6787
+ contentStyle: { padding: "6px 4px", color: sketch.ink },
6244
6788
  children
6245
6789
  }
6246
6790
  )
@@ -6355,7 +6899,7 @@ var ContextMenuCheckboxItem = react.forwardRef(function ContextMenuCheckboxItem2
6355
6899
  path: CHECK_PATH3,
6356
6900
  roughness: (sketch.roughness ?? 1.5) * 0.7,
6357
6901
  seed: deriveSeed(sketch.resolvedSeed, "checkbox-mark"),
6358
- sketchColor: SKETCH_COLORS.accent,
6902
+ sketchColor: sketch.accent,
6359
6903
  bowing: sketch.bowing,
6360
6904
  strokeWidth: 1.6,
6361
6905
  inset: 0
@@ -6423,10 +6967,10 @@ var ContextMenuRadioItem = react.forwardRef(function ContextMenuRadioItem2({ cla
6423
6967
  shape: "ellipse",
6424
6968
  roughness: (sketch.roughness ?? 1.5) * 0.8,
6425
6969
  seed: deriveSeed(sketch.resolvedSeed, "radio-mark"),
6426
- sketchColor: SKETCH_COLORS.accent,
6970
+ sketchColor: sketch.accent,
6427
6971
  bowing: sketch.bowing,
6428
6972
  fillStyle: "solid",
6429
- fill: SKETCH_COLORS.accent,
6973
+ fill: sketch.accent,
6430
6974
  strokeWidth: 1.2,
6431
6975
  inset: 0
6432
6976
  }
@@ -6496,17 +7040,22 @@ function useNavigationMenuSketch() {
6496
7040
  }
6497
7041
  function NavigationMenu({
6498
7042
  children,
7043
+ fill,
6499
7044
  roughness,
6500
7045
  seed,
6501
7046
  sketchColor,
6502
7047
  bowing,
6503
7048
  fillStyle,
6504
7049
  strokeWidth,
7050
+ hachureGap,
7051
+ hachureAngle,
7052
+ fillWeight,
6505
7053
  animate,
6506
7054
  ...rest
6507
7055
  }) {
6508
7056
  const resolvedSeed = useResolvedSeed(seed);
6509
- const ink = sketchColor ?? SKETCH_COLORS.ink;
7057
+ const theme = useSketchTheme(sketchColor);
7058
+ const ink = sketchColor ?? theme.ink;
6510
7059
  return /* @__PURE__ */ jsxRuntime.jsx(
6511
7060
  NavigationMenuSketchContext.Provider,
6512
7061
  {
@@ -6517,8 +7066,12 @@ function NavigationMenu({
6517
7066
  bowing,
6518
7067
  fillStyle,
6519
7068
  strokeWidth,
7069
+ hachureGap,
7070
+ hachureAngle,
7071
+ fillWeight,
6520
7072
  resolvedSeed,
6521
7073
  ink,
7074
+ paper: fill ?? theme.paper,
6522
7075
  animate
6523
7076
  },
6524
7077
  children: /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenuPrimitive__namespace.Root, { ...rest, children: [
@@ -6573,14 +7126,14 @@ var NavigationMenuTrigger = react.forwardRef(function NavigationMenuTrigger2({ c
6573
7126
  }
6574
7127
  );
6575
7128
  });
6576
- var NavigationMenuContent = react.forwardRef(function NavigationMenuContent2({ className, style, children, ...rest }, ref) {
7129
+ var NavigationMenuContent = react.forwardRef(function NavigationMenuContent2({ className, style, children, fill, ...rest }, ref) {
6577
7130
  const sketch = useNavigationMenuSketch();
6578
7131
  return /* @__PURE__ */ jsxRuntime.jsx(
6579
7132
  NavigationMenuPrimitive__namespace.Content,
6580
7133
  {
6581
7134
  ref,
6582
7135
  className: cn(className),
6583
- style: { outline: "none", ...style },
7136
+ style: { outline: "none", color: sketch.ink, ...style },
6584
7137
  ...rest,
6585
7138
  children: /* @__PURE__ */ jsxRuntime.jsx(
6586
7139
  SketchBox,
@@ -6590,11 +7143,14 @@ var NavigationMenuContent = react.forwardRef(function NavigationMenuContent2({ c
6590
7143
  sketchColor: sketch.ink,
6591
7144
  bowing: sketch.bowing,
6592
7145
  fillStyle: sketch.fillStyle ?? "solid",
6593
- fill: "#f7f6f2",
7146
+ fill: fill ?? sketch.paper,
6594
7147
  strokeWidth: sketch.strokeWidth ?? 1.5,
7148
+ hachureGap: sketch.hachureGap,
7149
+ hachureAngle: sketch.hachureAngle,
7150
+ fillWeight: sketch.fillWeight,
6595
7151
  shadow: true,
6596
7152
  animate: sketch.animate,
6597
- contentStyle: { padding: 12, minWidth: 200 },
7153
+ contentStyle: { padding: 12, minWidth: 200, color: sketch.ink },
6598
7154
  children
6599
7155
  }
6600
7156
  )
@@ -6696,17 +7252,22 @@ function Menubar({
6696
7252
  children,
6697
7253
  className,
6698
7254
  style,
7255
+ fill,
6699
7256
  roughness,
6700
7257
  seed,
6701
7258
  sketchColor,
6702
7259
  bowing,
6703
7260
  fillStyle,
6704
7261
  strokeWidth,
7262
+ hachureGap,
7263
+ hachureAngle,
7264
+ fillWeight,
6705
7265
  animate,
6706
7266
  ...rest
6707
7267
  }) {
6708
7268
  const resolvedSeed = useResolvedSeed(seed);
6709
- const ink = sketchColor ?? SKETCH_COLORS.ink;
7269
+ const theme = useSketchTheme(sketchColor);
7270
+ const ink = sketchColor ?? theme.ink;
6710
7271
  return /* @__PURE__ */ jsxRuntime.jsx(
6711
7272
  MenubarSketchContext.Provider,
6712
7273
  {
@@ -6717,8 +7278,12 @@ function Menubar({
6717
7278
  bowing,
6718
7279
  fillStyle,
6719
7280
  strokeWidth,
7281
+ hachureGap,
7282
+ hachureAngle,
7283
+ fillWeight,
6720
7284
  resolvedSeed,
6721
7285
  ink,
7286
+ paper: fill ?? theme.paper,
6722
7287
  animate
6723
7288
  },
6724
7289
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -6763,7 +7328,7 @@ var MenubarTrigger = react.forwardRef(function MenubarTrigger2({ className, styl
6763
7328
  }
6764
7329
  );
6765
7330
  });
6766
- var MenubarContent = react.forwardRef(function MenubarContent2({ className, style, children, align = "start", sideOffset = 6, ...rest }, ref) {
7331
+ var MenubarContent = react.forwardRef(function MenubarContent2({ className, style, children, fill, align = "start", sideOffset = 6, ...rest }, ref) {
6767
7332
  const sketch = useMenubarSketch();
6768
7333
  return /* @__PURE__ */ jsxRuntime.jsx(MenubarPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
6769
7334
  MenubarPrimitive__namespace.Content,
@@ -6772,7 +7337,7 @@ var MenubarContent = react.forwardRef(function MenubarContent2({ className, styl
6772
7337
  align,
6773
7338
  sideOffset,
6774
7339
  className: cn(className),
6775
- style: { zIndex: 80, outline: "none", minWidth: 180, ...style },
7340
+ style: { zIndex: 80, outline: "none", minWidth: 180, color: sketch.ink, ...style },
6776
7341
  ...rest,
6777
7342
  children: /* @__PURE__ */ jsxRuntime.jsx(
6778
7343
  SketchBox,
@@ -6782,11 +7347,14 @@ var MenubarContent = react.forwardRef(function MenubarContent2({ className, styl
6782
7347
  sketchColor: sketch.ink,
6783
7348
  bowing: sketch.bowing,
6784
7349
  fillStyle: sketch.fillStyle ?? "solid",
6785
- fill: "#f7f6f2",
7350
+ fill: fill ?? sketch.paper,
6786
7351
  strokeWidth: sketch.strokeWidth ?? 1.5,
7352
+ hachureGap: sketch.hachureGap,
7353
+ hachureAngle: sketch.hachureAngle,
7354
+ fillWeight: sketch.fillWeight,
6787
7355
  shadow: true,
6788
7356
  animate: sketch.animate,
6789
- contentStyle: { padding: "6px 4px" },
7357
+ contentStyle: { padding: "6px 4px", color: sketch.ink },
6790
7358
  children
6791
7359
  }
6792
7360
  )
@@ -6925,17 +7493,22 @@ function SlidingPanelRoot({
6925
7493
  defaultOpen,
6926
7494
  onOpenChange,
6927
7495
  side = "right",
7496
+ fill,
6928
7497
  roughness,
6929
7498
  seed,
6930
7499
  sketchColor,
6931
7500
  bowing,
6932
7501
  fillStyle,
6933
7502
  strokeWidth,
7503
+ hachureGap,
7504
+ hachureAngle,
7505
+ fillWeight,
6934
7506
  animate,
6935
7507
  ...rest
6936
7508
  }) {
6937
7509
  const resolvedSeed = useResolvedSeed(seed);
6938
- const ink = sketchColor ?? SKETCH_COLORS.ink;
7510
+ const theme = useSketchTheme(sketchColor);
7511
+ const ink = sketchColor ?? theme.ink;
6939
7512
  const [uncontrolled, setUncontrolled] = react.useState(defaultOpen === true);
6940
7513
  const isOpen = open ?? uncontrolled;
6941
7514
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -6948,8 +7521,13 @@ function SlidingPanelRoot({
6948
7521
  bowing,
6949
7522
  fillStyle,
6950
7523
  strokeWidth,
7524
+ hachureGap,
7525
+ hachureAngle,
7526
+ fillWeight,
6951
7527
  resolvedSeed,
6952
7528
  ink,
7529
+ paper: fill ?? theme.paper,
7530
+ isDark: theme.isDark,
6953
7531
  animate,
6954
7532
  open: isOpen,
6955
7533
  side
@@ -7027,14 +7605,14 @@ var SlidingPanelOverlay = react.forwardRef(function SlidingPanelOverlay2({ style
7027
7605
  style: {
7028
7606
  position: "fixed",
7029
7607
  inset: 0,
7030
- background: "rgba(31, 29, 26, 0.38)",
7608
+ background: sketch.isDark ? "rgba(0, 0, 0, 0.65)" : "rgba(31, 29, 26, 0.38)",
7031
7609
  zIndex: 70,
7032
7610
  ...style
7033
7611
  }
7034
7612
  }
7035
7613
  ) });
7036
7614
  });
7037
- var SlidingPanelContent = react.forwardRef(function SlidingPanelContent2({ className, style, contentStyle, children, chrome, ...rest }, ref) {
7615
+ var SlidingPanelContent = react.forwardRef(function SlidingPanelContent2({ className, style, contentStyle, fill, children, chrome, ...rest }, ref) {
7038
7616
  const sketch = useSlidingPanelSketch();
7039
7617
  const shouldAnimate = useAnimate(sketch.animate);
7040
7618
  const variants = slideVariants(sketch.side, shouldAnimate);
@@ -7065,8 +7643,11 @@ var SlidingPanelContent = react.forwardRef(function SlidingPanelContent2({ class
7065
7643
  sketchColor: sketch.ink,
7066
7644
  bowing: sketch.bowing,
7067
7645
  fillStyle: sketch.fillStyle ?? "solid",
7068
- fill: "#f7f6f2",
7646
+ fill: fill ?? sketch.paper,
7069
7647
  strokeWidth: sketch.strokeWidth ?? 2,
7648
+ hachureGap: sketch.hachureGap,
7649
+ hachureAngle: sketch.hachureAngle,
7650
+ fillWeight: sketch.fillWeight,
7070
7651
  animate: sketch.animate,
7071
7652
  contentStyle: {
7072
7653
  padding: 20,
@@ -7074,6 +7655,7 @@ var SlidingPanelContent = react.forwardRef(function SlidingPanelContent2({ class
7074
7655
  boxSizing: "border-box",
7075
7656
  display: "flex",
7076
7657
  flexDirection: "column",
7658
+ color: sketch.ink,
7077
7659
  ...contentStyle
7078
7660
  },
7079
7661
  style: { height: "100%" },
@@ -7205,7 +7787,7 @@ var DrawerHandle = react.forwardRef(
7205
7787
  shape: "line",
7206
7788
  roughness: (sketch.roughness ?? 1.5) + 0.3,
7207
7789
  seed: deriveSeed(sketch.resolvedSeed, "drawer-handle"),
7208
- sketchColor: sketch.sketchColor ?? SKETCH_COLORS.ink,
7790
+ sketchColor: sketch.sketchColor ?? sketch.ink,
7209
7791
  bowing: sketch.bowing ?? 1.6,
7210
7792
  strokeWidth: 2.4,
7211
7793
  width: 48,
@@ -7241,14 +7823,20 @@ function AspectRatio({
7241
7823
  className,
7242
7824
  style,
7243
7825
  children,
7826
+ fill,
7244
7827
  roughness,
7245
7828
  seed,
7246
7829
  sketchColor,
7247
7830
  bowing,
7248
7831
  fillStyle,
7249
7832
  strokeWidth,
7833
+ hachureGap,
7834
+ hachureAngle,
7835
+ fillWeight,
7250
7836
  animate
7251
7837
  }) {
7838
+ const theme = useSketchTheme(sketchColor);
7839
+ const ink = sketchColor ?? theme.ink;
7252
7840
  const inner = /* @__PURE__ */ jsxRuntime.jsx(
7253
7841
  AspectRatioPrimitive__namespace.Root,
7254
7842
  {
@@ -7257,6 +7845,7 @@ function AspectRatio({
7257
7845
  style: {
7258
7846
  width: "100%",
7259
7847
  overflow: "hidden",
7848
+ color: ink,
7260
7849
  ...style
7261
7850
  },
7262
7851
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", height: "100%" }, children })
@@ -7269,13 +7858,16 @@ function AspectRatio({
7269
7858
  SketchBox,
7270
7859
  {
7271
7860
  className: cn(className),
7272
- style: { width: "100%", ...style },
7273
- contentStyle: { padding: 0, width: "100%" },
7274
- fill: SKETCH_COLORS.paper,
7275
- fillStyle: fillStyle ?? "hachure",
7861
+ style: { width: "100%", color: ink, ...style },
7862
+ contentStyle: { padding: 0, width: "100%", color: ink },
7863
+ fill: fill ?? theme.paper,
7864
+ fillStyle: fillStyle ?? "solid",
7865
+ hachureGap,
7866
+ hachureAngle,
7867
+ fillWeight,
7276
7868
  roughness,
7277
7869
  seed,
7278
- sketchColor,
7870
+ sketchColor: ink,
7279
7871
  bowing,
7280
7872
  strokeWidth,
7281
7873
  animate,
@@ -7290,12 +7882,16 @@ var NativeSelect = react.forwardRef(
7290
7882
  style,
7291
7883
  options,
7292
7884
  children,
7885
+ fill,
7293
7886
  roughness,
7294
7887
  seed,
7295
7888
  sketchColor,
7296
7889
  bowing,
7297
7890
  fillStyle,
7298
7891
  strokeWidth,
7892
+ hachureGap,
7893
+ hachureAngle,
7894
+ fillWeight,
7299
7895
  animate,
7300
7896
  disabled,
7301
7897
  ...rest
@@ -7303,7 +7899,8 @@ var NativeSelect = react.forwardRef(
7303
7899
  const fieldRef = react.useRef(null);
7304
7900
  const shouldAnimate = useAnimate(animate);
7305
7901
  const resolvedSeed = useResolvedSeed(seed);
7306
- const ink = sketchColor ?? SKETCH_COLORS.ink;
7902
+ const theme = useSketchTheme(sketchColor);
7903
+ const ink = sketchColor ?? theme.ink;
7307
7904
  useDrawIn(fieldRef, DRAW_IN_DURATION_MS, shouldAnimate);
7308
7905
  return /* @__PURE__ */ jsxRuntime.jsx(
7309
7906
  "span",
@@ -7314,6 +7911,7 @@ var NativeSelect = react.forwardRef(
7314
7911
  display: "block",
7315
7912
  width: "100%",
7316
7913
  opacity: disabled ? 0.6 : 1,
7914
+ color: ink,
7317
7915
  ...style
7318
7916
  },
7319
7917
  children: /* @__PURE__ */ jsxRuntime.jsxs("span", { ref: fieldRef, style: { position: "relative", display: "block" }, children: [
@@ -7325,9 +7923,12 @@ var NativeSelect = react.forwardRef(
7325
7923
  seed: resolvedSeed,
7326
7924
  sketchColor: ink,
7327
7925
  bowing,
7328
- fillStyle,
7329
- fill: SKETCH_COLORS.paper,
7330
- strokeWidth
7926
+ fillStyle: fillStyle ?? "solid",
7927
+ fill: fill ?? theme.paper,
7928
+ strokeWidth,
7929
+ hachureGap,
7930
+ hachureAngle,
7931
+ fillWeight
7331
7932
  }
7332
7933
  ),
7333
7934
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7400,7 +8001,8 @@ var NativeSelect = react.forwardRef(
7400
8001
  var EmptyContext = react.createContext(null);
7401
8002
  function useEmptyInk() {
7402
8003
  const ctx = react.useContext(EmptyContext);
7403
- return ctx?.ink ?? SKETCH_COLORS.ink;
8004
+ const theme = useSketchTheme();
8005
+ return ctx?.ink ?? theme.ink;
7404
8006
  }
7405
8007
  var emptyContentStyle = {
7406
8008
  display: "flex",
@@ -7418,22 +8020,27 @@ var Empty = react.forwardRef(function Empty2({
7418
8020
  style,
7419
8021
  children,
7420
8022
  bordered = true,
8023
+ fill,
7421
8024
  roughness,
7422
8025
  seed,
7423
8026
  sketchColor,
7424
8027
  bowing,
7425
8028
  fillStyle,
7426
8029
  strokeWidth,
8030
+ hachureGap,
8031
+ hachureAngle,
8032
+ fillWeight,
7427
8033
  animate,
7428
8034
  ...rest
7429
8035
  }, ref) {
7430
- const ink = sketchColor ?? SKETCH_COLORS.ink;
8036
+ const theme = useSketchTheme(sketchColor);
8037
+ const ink = sketchColor ?? theme.ink;
7431
8038
  const inner = /* @__PURE__ */ jsxRuntime.jsx(EmptyContext.Provider, { value: { ink }, children: /* @__PURE__ */ jsxRuntime.jsx(
7432
8039
  "div",
7433
8040
  {
7434
8041
  ref: bordered ? void 0 : ref,
7435
8042
  className: cn(className),
7436
- style: { ...emptyContentStyle, ...style },
8043
+ style: { ...emptyContentStyle, color: ink, ...style },
7437
8044
  ...bordered ? {} : rest,
7438
8045
  children
7439
8046
  }
@@ -7446,13 +8053,16 @@ var Empty = react.forwardRef(function Empty2({
7446
8053
  {
7447
8054
  ref,
7448
8055
  className: cn(className),
7449
- style: { width: "100%", ...style },
7450
- contentStyle: emptyContentStyle,
7451
- fill: SKETCH_COLORS.secondaryFill,
8056
+ style: { width: "100%", color: ink, ...style },
8057
+ contentStyle: { ...emptyContentStyle, color: ink },
8058
+ fill: fill ?? theme.secondaryFill,
7452
8059
  fillStyle: fillStyle ?? "hachure",
8060
+ hachureGap: hachureGap ?? 8,
8061
+ hachureAngle,
8062
+ fillWeight: fillWeight ?? 0.85,
7453
8063
  roughness,
7454
8064
  seed,
7455
- sketchColor,
8065
+ sketchColor: ink,
7456
8066
  bowing,
7457
8067
  strokeWidth,
7458
8068
  animate,
@@ -7604,6 +8214,7 @@ function FieldDescription({
7604
8214
  ...rest
7605
8215
  }) {
7606
8216
  const { descriptionId } = useField();
8217
+ const theme = useSketchTheme();
7607
8218
  return /* @__PURE__ */ jsxRuntime.jsx(
7608
8219
  "p",
7609
8220
  {
@@ -7614,7 +8225,7 @@ function FieldDescription({
7614
8225
  fontFamily: doodleUiFontFamily,
7615
8226
  fontSize: 12,
7616
8227
  lineHeight: 1.45,
7617
- color: SKETCH_COLORS.ink,
8228
+ color: theme.ink,
7618
8229
  opacity: 0.75,
7619
8230
  ...style
7620
8231
  },
@@ -7630,6 +8241,7 @@ function FieldError({
7630
8241
  ...rest
7631
8242
  }) {
7632
8243
  const { error, errorId } = useField();
8244
+ const theme = useSketchTheme();
7633
8245
  const message = children ?? error;
7634
8246
  if (!message) return null;
7635
8247
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -7643,7 +8255,7 @@ function FieldError({
7643
8255
  fontFamily: doodleUiFontFamily,
7644
8256
  fontSize: 12,
7645
8257
  lineHeight: 1.45,
7646
- color: SKETCH_COLORS.error,
8258
+ color: theme.error,
7647
8259
  ...style
7648
8260
  },
7649
8261
  ...rest,
@@ -7689,7 +8301,10 @@ var Heading = react.forwardRef(
7689
8301
  ...rest
7690
8302
  }, ref) {
7691
8303
  const Tag = `h${level}`;
7692
- const ink = sketchColor ?? SKETCH_COLORS.ink;
8304
+ const theme = useSketchTheme(sketchColor);
8305
+ const ink = sketchColor ?? theme.ink;
8306
+ const accentColor = sketchColor ?? theme.accent;
8307
+ const accentFill = theme.isDark ? sketchColor ? `${sketchColor}25` : theme.accentFill : theme.accentFill;
7693
8308
  const resolvedSeed = useResolvedSeed(seed);
7694
8309
  const shouldAnimate = useAnimate(animate);
7695
8310
  const accentRef = react.useRef(null);
@@ -7732,8 +8347,8 @@ var Heading = react.forwardRef(
7732
8347
  shape: "rectangle",
7733
8348
  roughness,
7734
8349
  seed: resolvedSeed,
7735
- sketchColor: SKETCH_COLORS.accent,
7736
- fill: SKETCH_COLORS.accentFill,
8350
+ sketchColor: accentColor,
8351
+ fill: accentFill,
7737
8352
  fillStyle: "solid",
7738
8353
  bowing,
7739
8354
  strokeWidth: strokeWidth ?? 1.2
@@ -7762,7 +8377,7 @@ var Heading = react.forwardRef(
7762
8377
  path: "M 2 4 Q 40 1 80 5 T 160 3",
7763
8378
  roughness,
7764
8379
  seed: resolvedSeed,
7765
- sketchColor: ink,
8380
+ sketchColor: accentColor,
7766
8381
  bowing,
7767
8382
  strokeWidth: strokeWidth ?? 1.5
7768
8383
  }
@@ -7775,6 +8390,7 @@ var Heading = react.forwardRef(
7775
8390
  }
7776
8391
  );
7777
8392
  var Text = react.forwardRef(function Text2({ variant = "body", className, style, children, ...rest }, ref) {
8393
+ const theme = useSketchTheme();
7778
8394
  const sizes = { body: 14, lead: 17, muted: 13 };
7779
8395
  const opacity = variant === "muted" ? 0.75 : 1;
7780
8396
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -7788,7 +8404,7 @@ var Text = react.forwardRef(function Text2({ variant = "body", className, style,
7788
8404
  fontSize: sizes[variant],
7789
8405
  fontWeight: doodleUiFontWeight(variant === "lead" ? 500 : 400),
7790
8406
  lineHeight: 1.55,
7791
- color: SKETCH_COLORS.ink,
8407
+ color: theme.ink,
7792
8408
  opacity,
7793
8409
  ...style
7794
8410
  },
@@ -7811,7 +8427,9 @@ var Blockquote = react.forwardRef(
7811
8427
  animate,
7812
8428
  ...rest
7813
8429
  }, ref) {
7814
- const ink = sketchColor ?? SKETCH_COLORS.ink;
8430
+ const theme = useSketchTheme(sketchColor);
8431
+ const ink = sketchColor ?? theme.ink;
8432
+ const accent = sketchColor ?? theme.accent;
7815
8433
  const resolvedSeed = useResolvedSeed(seed);
7816
8434
  const shouldAnimate = useAnimate(animate);
7817
8435
  const ruleRef = react.useRef(null);
@@ -7847,7 +8465,7 @@ var Blockquote = react.forwardRef(
7847
8465
  shape: "line-vertical",
7848
8466
  roughness,
7849
8467
  seed: resolvedSeed,
7850
- sketchColor: ink,
8468
+ sketchColor: accent,
7851
8469
  bowing,
7852
8470
  strokeWidth: strokeWidth ?? 2
7853
8471
  }
@@ -7865,33 +8483,42 @@ var InlineCode = react.forwardRef(
7865
8483
  className,
7866
8484
  style,
7867
8485
  children,
8486
+ fill,
7868
8487
  roughness,
7869
8488
  seed,
7870
8489
  sketchColor,
7871
8490
  bowing,
7872
8491
  fillStyle,
7873
8492
  strokeWidth,
8493
+ hachureGap,
8494
+ hachureAngle,
8495
+ fillWeight,
7874
8496
  animate,
7875
8497
  ...rest
7876
8498
  }, ref) {
7877
- const ink = sketchColor ?? SKETCH_COLORS.ink;
8499
+ const theme = useSketchTheme(sketchColor);
8500
+ const ink = sketchColor ?? theme.ink;
7878
8501
  return /* @__PURE__ */ jsxRuntime.jsx(
7879
8502
  SketchBox,
7880
8503
  {
7881
8504
  className: cn(className),
7882
- style: { display: "inline-flex", verticalAlign: "baseline", ...style },
8505
+ style: { display: "inline-flex", verticalAlign: "baseline", color: ink, ...style },
7883
8506
  contentStyle: {
7884
8507
  padding: "1px 6px",
7885
8508
  fontSize: "0.9em",
7886
- fontFamily: "ui-monospace, monospace"
8509
+ fontFamily: "ui-monospace, monospace",
8510
+ color: ink
7887
8511
  },
7888
- fill: SKETCH_COLORS.paper,
7889
- fillStyle: fillStyle ?? "hachure",
8512
+ fill: fill ?? theme.paper,
8513
+ fillStyle: fillStyle ?? "solid",
7890
8514
  roughness,
7891
8515
  seed,
7892
8516
  sketchColor: ink,
7893
8517
  bowing,
7894
8518
  strokeWidth: strokeWidth ?? 1.2,
8519
+ hachureGap,
8520
+ hachureAngle,
8521
+ fillWeight,
7895
8522
  animate,
7896
8523
  ...rest,
7897
8524
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -7917,6 +8544,7 @@ var Highlight = react.forwardRef(
7917
8544
  className,
7918
8545
  style,
7919
8546
  children,
8547
+ fill,
7920
8548
  roughness,
7921
8549
  seed,
7922
8550
  sketchColor,
@@ -7926,6 +8554,9 @@ var Highlight = react.forwardRef(
7926
8554
  ...rest
7927
8555
  }, ref) {
7928
8556
  const resolvedSeed = useResolvedSeed(seed);
8557
+ const theme = useSketchTheme(sketchColor);
8558
+ const accent = sketchColor ?? theme.accent;
8559
+ const accentFill = fill ?? (theme.isDark ? sketchColor ? `${sketchColor}25` : theme.accentFill : theme.accentFill);
7929
8560
  const shouldAnimate = useAnimate(animate);
7930
8561
  const markRef = react.useRef(null);
7931
8562
  useDrawIn(markRef, DRAW_IN_MARK_MS, shouldAnimate);
@@ -7956,8 +8587,8 @@ var Highlight = react.forwardRef(
7956
8587
  shape: "rectangle",
7957
8588
  roughness,
7958
8589
  seed: resolvedSeed,
7959
- sketchColor: sketchColor ?? SKETCH_COLORS.accent,
7960
- fill: SKETCH_COLORS.accentFill,
8590
+ sketchColor: accent,
8591
+ fill: accentFill,
7961
8592
  fillStyle: "solid",
7962
8593
  bowing,
7963
8594
  strokeWidth: strokeWidth ?? 1
@@ -8008,7 +8639,9 @@ function SidebarProvider({
8008
8639
  const toggleCollapsed = react.useCallback(() => {
8009
8640
  setCollapsed((c) => !c);
8010
8641
  }, []);
8011
- const ink = sketchColor ?? SKETCH_COLORS.ink;
8642
+ const theme = useSketchTheme(sketchColor);
8643
+ const ink = sketchColor ?? theme.ink;
8644
+ const paper = theme.paper;
8012
8645
  const value = react.useMemo(
8013
8646
  () => ({
8014
8647
  open,
@@ -8016,7 +8649,8 @@ function SidebarProvider({
8016
8649
  collapsed,
8017
8650
  toggleCollapsed,
8018
8651
  ink,
8019
- sketch: { roughness, seed, sketchColor, bowing, strokeWidth }
8652
+ paper,
8653
+ sketch: { roughness, seed, sketchColor: ink, bowing, strokeWidth }
8020
8654
  }),
8021
8655
  [
8022
8656
  open,
@@ -8024,17 +8658,17 @@ function SidebarProvider({
8024
8658
  collapsed,
8025
8659
  toggleCollapsed,
8026
8660
  ink,
8661
+ paper,
8027
8662
  roughness,
8028
8663
  seed,
8029
- sketchColor,
8030
8664
  bowing,
8031
8665
  strokeWidth
8032
8666
  ]
8033
8667
  );
8034
8668
  return /* @__PURE__ */ jsxRuntime.jsx(SidebarContext.Provider, { value, children });
8035
8669
  }
8036
- var Sidebar = react.forwardRef(function Sidebar2({ className, style, children, side = "left", ...rest }, ref) {
8037
- const { open, collapsed, sketch } = useSidebar();
8670
+ var Sidebar = react.forwardRef(function Sidebar2({ className, style, children, fill, side = "left", ...rest }, ref) {
8671
+ const { open, collapsed, ink, paper, sketch } = useSidebar();
8038
8672
  const resolvedSeed = useResolvedSeed(sketch.seed);
8039
8673
  const width = collapsed ? SIDEBAR_WIDTH_COLLAPSED : SIDEBAR_WIDTH;
8040
8674
  if (!open) {
@@ -8053,7 +8687,8 @@ var Sidebar = react.forwardRef(function Sidebar2({ className, style, children, s
8053
8687
  transition: "width 200ms ease",
8054
8688
  display: "flex",
8055
8689
  flexDirection: "column",
8056
- background: SKETCH_COLORS.paper,
8690
+ background: fill ?? paper,
8691
+ color: ink,
8057
8692
  ...style
8058
8693
  },
8059
8694
  "data-side": side,
@@ -8078,7 +8713,7 @@ var Sidebar = react.forwardRef(function Sidebar2({ className, style, children, s
8078
8713
  shape: "line-vertical",
8079
8714
  roughness: sketch.roughness,
8080
8715
  seed: resolvedSeed,
8081
- sketchColor: sketch.sketchColor ?? SKETCH_COLORS.ink,
8716
+ sketchColor: sketch.sketchColor ?? ink,
8082
8717
  bowing: sketch.bowing,
8083
8718
  strokeWidth: sketch.strokeWidth ?? 1.5
8084
8719
  }
@@ -8095,14 +8730,14 @@ function SidebarHeader({
8095
8730
  children,
8096
8731
  ...rest
8097
8732
  }) {
8098
- const { collapsed } = useSidebar();
8733
+ const { collapsed, ink } = useSidebar();
8099
8734
  return /* @__PURE__ */ jsxRuntime.jsx(
8100
8735
  "div",
8101
8736
  {
8102
8737
  className: cn(className),
8103
8738
  style: {
8104
8739
  padding: collapsed ? "12px 8px" : "16px 14px",
8105
- borderBottom: `1px solid ${SKETCH_COLORS.ink}22`,
8740
+ borderBottom: `1px solid ${ink}22`,
8106
8741
  ...style
8107
8742
  },
8108
8743
  ...rest,
@@ -8137,13 +8772,14 @@ function SidebarFooter({
8137
8772
  children,
8138
8773
  ...rest
8139
8774
  }) {
8775
+ const { ink } = useSidebar();
8140
8776
  return /* @__PURE__ */ jsxRuntime.jsx(
8141
8777
  "div",
8142
8778
  {
8143
8779
  className: cn(className),
8144
8780
  style: {
8145
8781
  padding: "12px 10px",
8146
- borderTop: `1px solid ${SKETCH_COLORS.ink}22`,
8782
+ borderTop: `1px solid ${ink}22`,
8147
8783
  ...style
8148
8784
  },
8149
8785
  ...rest,
@@ -8300,12 +8936,16 @@ function Carousel({
8300
8936
  style,
8301
8937
  children,
8302
8938
  setApi,
8939
+ fill,
8303
8940
  roughness,
8304
8941
  seed,
8305
8942
  sketchColor,
8306
8943
  bowing,
8307
8944
  strokeWidth,
8308
8945
  fillStyle,
8946
+ hachureGap,
8947
+ hachureAngle,
8948
+ fillWeight,
8309
8949
  animate
8310
8950
  }) {
8311
8951
  const [emblaRef, api] = useEmblaCarousel__default.default(
@@ -8317,6 +8957,9 @@ function Carousel({
8317
8957
  );
8318
8958
  const [canScrollPrev, setCanScrollPrev] = react.useState(false);
8319
8959
  const [canScrollNext, setCanScrollNext] = react.useState(false);
8960
+ const theme = useSketchTheme(sketchColor);
8961
+ const ink = sketchColor ?? theme.ink;
8962
+ const paper = fill ?? theme.paper;
8320
8963
  const scrollPrev = react.useCallback(() => api?.scrollPrev(), [api]);
8321
8964
  const scrollNext = react.useCallback(() => api?.scrollNext(), [api]);
8322
8965
  const onSelect = react.useCallback(() => {
@@ -8366,11 +9009,16 @@ function Carousel({
8366
9009
  sketch: {
8367
9010
  roughness,
8368
9011
  seed,
8369
- sketchColor,
9012
+ sketchColor: ink,
8370
9013
  bowing,
8371
9014
  strokeWidth,
8372
9015
  fillStyle,
8373
- animate
9016
+ hachureGap,
9017
+ hachureAngle,
9018
+ fillWeight,
9019
+ animate,
9020
+ paper,
9021
+ ink
8374
9022
  },
8375
9023
  bordered
8376
9024
  };
@@ -8385,6 +9033,8 @@ function Carousel({
8385
9033
  style: {
8386
9034
  position: "relative",
8387
9035
  width: "100%",
9036
+ outline: "none",
9037
+ color: ink,
8388
9038
  ...style
8389
9039
  },
8390
9040
  children
@@ -8416,15 +9066,18 @@ var CarouselContent = react.forwardRef(
8416
9066
  return /* @__PURE__ */ jsxRuntime.jsx(
8417
9067
  SketchBox,
8418
9068
  {
8419
- fill: SKETCH_COLORS.paper,
8420
- fillStyle: sketch.fillStyle ?? "hachure",
9069
+ fill: sketch.paper,
9070
+ fillStyle: sketch.fillStyle ?? "solid",
8421
9071
  roughness: sketch.roughness,
8422
9072
  seed: sketch.seed,
8423
9073
  sketchColor: sketch.sketchColor,
8424
9074
  bowing: sketch.bowing,
8425
9075
  strokeWidth: sketch.strokeWidth,
9076
+ hachureGap: sketch.hachureGap,
9077
+ hachureAngle: sketch.hachureAngle,
9078
+ fillWeight: sketch.fillWeight,
8426
9079
  animate: sketch.animate,
8427
- contentStyle: { padding: 8 },
9080
+ contentStyle: { padding: 8, color: sketch.ink },
8428
9081
  children: viewport
8429
9082
  }
8430
9083
  );
@@ -8467,7 +9120,7 @@ var CarouselArrow = react.forwardRef(function CarouselArrow2({ className, style,
8467
9120
  orientation
8468
9121
  } = useCarousel();
8469
9122
  const resolvedSeed = useResolvedSeed(sketch.seed);
8470
- const ink = sketch.sketchColor ?? SKETCH_COLORS.ink;
9123
+ const ink = sketch.sketchColor ?? sketch.ink;
8471
9124
  const isPrev = direction === "prev";
8472
9125
  const disabled = isPrev ? !canScrollPrev : !canScrollNext;
8473
9126
  const shouldAnimate = useAnimate(sketch.animate);
@@ -8520,7 +9173,7 @@ var CarouselArrow = react.forwardRef(function CarouselArrow2({ className, style,
8520
9173
  seed: sketchSeed,
8521
9174
  sketchColor: ink,
8522
9175
  bowing: sketch.bowing,
8523
- fill: SKETCH_COLORS.paper,
9176
+ fill: sketch.paper,
8524
9177
  fillStyle: "solid",
8525
9178
  strokeWidth: sketch.strokeWidth ?? 1.5,
8526
9179
  inset: 1.5
@@ -8618,8 +9271,13 @@ exports.ContextMenuRadioItem = ContextMenuRadioItem;
8618
9271
  exports.ContextMenuSeparator = ContextMenuSeparator;
8619
9272
  exports.ContextMenuSub = ContextMenuSub;
8620
9273
  exports.ContextMenuTrigger = ContextMenuTrigger;
9274
+ exports.DARK_SKETCH_COLORS = DARK_SKETCH_COLORS;
8621
9275
  exports.DEFAULT_BOWING = DEFAULT_BOWING;
9276
+ exports.DEFAULT_DARK_CARD_BG = DEFAULT_DARK_CARD_BG;
9277
+ exports.DEFAULT_DARK_INK = DEFAULT_DARK_INK;
9278
+ exports.DEFAULT_DARK_PAPER = DEFAULT_DARK_PAPER;
8622
9279
  exports.DEFAULT_INK = DEFAULT_INK;
9280
+ exports.DEFAULT_PAPER = DEFAULT_PAPER;
8623
9281
  exports.DEFAULT_ROUGHNESS = DEFAULT_ROUGHNESS;
8624
9282
  exports.DEFAULT_STROKE_WIDTH = DEFAULT_STROKE_WIDTH;
8625
9283
  exports.DRAW_IN_ALERT_MS = DRAW_IN_ALERT_MS;
@@ -8805,5 +9463,6 @@ exports.useDrawIn = useDrawIn;
8805
9463
  exports.useResolvedSeed = useResolvedSeed;
8806
9464
  exports.useSidebar = useSidebar;
8807
9465
  exports.useSketchSeed = useSketchSeed;
9466
+ exports.useSketchTheme = useSketchTheme;
8808
9467
  //# sourceMappingURL=index.cjs.map
8809
9468
  //# sourceMappingURL=index.cjs.map