@optilogic/core 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -351,7 +351,7 @@ var SelectContent = React20__namespace.forwardRef(({ className, children, positi
351
351
  {
352
352
  ref,
353
353
  className: cn(
354
- "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
354
+ "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-popover-border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
355
355
  position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
356
356
  className
357
357
  ),
@@ -581,11 +581,11 @@ var TooltipContent = React20__namespace.forwardRef(({ className, sideOffset = 6,
581
581
  "px-2.5 py-1.5 rounded-md",
582
582
  // Colors
583
583
  "bg-popover text-popover-foreground",
584
- "border border-border",
584
+ "border border-popover-border",
585
585
  // Typography
586
586
  "text-xs font-medium",
587
587
  // Shadow
588
- "shadow-md",
588
+ "shadow-lg",
589
589
  // Animation
590
590
  "animate-in fade-in-0 zoom-in-95",
591
591
  "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
@@ -645,7 +645,7 @@ var PopoverContent = React20__namespace.forwardRef(({ className, align = "center
645
645
  align,
646
646
  sideOffset,
647
647
  className: cn(
648
- "z-50 w-auto max-w-[90vw] rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-md outline-none",
648
+ "z-50 w-auto max-w-[90vw] rounded-md border border-popover-border bg-popover p-4 text-popover-foreground shadow-lg outline-none",
649
649
  // Animation
650
650
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
651
651
  "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
@@ -688,7 +688,7 @@ var DropdownMenuSubContent = React20__namespace.forwardRef(({ className, ...prop
688
688
  {
689
689
  ref,
690
690
  className: cn(
691
- "z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg",
691
+ "z-50 min-w-[8rem] overflow-hidden rounded-md border border-popover-border bg-popover p-1 text-popover-foreground shadow-lg",
692
692
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
693
693
  "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
694
694
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
@@ -706,7 +706,7 @@ var DropdownMenuContent = React20__namespace.forwardRef(({ className, sideOffset
706
706
  ref,
707
707
  sideOffset,
708
708
  className: cn(
709
- "z-50 min-w-[8rem] max-w-[90vw] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md",
709
+ "z-50 min-w-[8rem] max-w-[90vw] overflow-hidden rounded-md border border-popover-border bg-popover p-1 text-popover-foreground shadow-lg",
710
710
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
711
711
  "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
712
712
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
@@ -2760,12 +2760,17 @@ function Calendar({
2760
2760
  weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
2761
2761
  week: "flex w-full mt-2",
2762
2762
  day: cn(
2763
- "relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
2763
+ "relative p-0 text-center text-sm focus-within:relative focus-within:z-20",
2764
+ "[&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
2765
+ // Override the button's ghost text color when day is selected (data-selected is on the td, not the button)
2766
+ "[&[data-selected]>button]:bg-primary [&[data-selected]>button]:text-primary-foreground",
2767
+ "[&[data-selected]>button]:hover:bg-primary/90 [&[data-selected]>button]:hover:text-primary-foreground",
2768
+ "[&[data-selected]>button]:focus:bg-primary [&[data-selected]>button]:focus:text-primary-foreground",
2764
2769
  props.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
2765
2770
  ),
2766
2771
  day_button: cn(
2767
2772
  buttonVariants({ variant: "ghost" }),
2768
- "h-9 w-9 p-0 font-normal aria-selected:opacity-100"
2773
+ "h-9 w-9 p-0 font-normal"
2769
2774
  ),
2770
2775
  range_start: "day-range-start rounded-l-md",
2771
2776
  range_end: "day-range-end rounded-r-md",
@@ -5225,7 +5230,7 @@ function DataGrid({
5225
5230
  hoveredCell && /* @__PURE__ */ jsxRuntime.jsx(
5226
5231
  "div",
5227
5232
  {
5228
- className: "fixed z-[200] p-3 bg-popover text-popover-foreground border border-border rounded-md shadow-xl max-w-md break-words text-sm pointer-events-none",
5233
+ className: "fixed z-[200] p-3 bg-popover text-popover-foreground border border-popover-border rounded-md shadow-xl max-w-md break-words text-sm pointer-events-none",
5229
5234
  style: {
5230
5235
  left: `${hoveredCell.x}px`,
5231
5236
  top: `${hoveredCell.y}px`
@@ -5782,53 +5787,6 @@ function CopyButton({ content, className, size = "md" }) {
5782
5787
  }
5783
5788
 
5784
5789
  // src/theme/presets.ts
5785
- var GREEN_THEME = {
5786
- id: "green-theme",
5787
- name: "Green Theme",
5788
- description: "A green theme with natural, earthy tones",
5789
- author: "Leapfrog",
5790
- background: "#1a2820",
5791
- foreground: "#E6F5EC",
5792
- card: "#2d4038",
5793
- cardForeground: "#E6F5EC",
5794
- popover: "#243630",
5795
- popoverForeground: "#E6F5EC",
5796
- primary: "#6FCF97",
5797
- primaryForeground: "#1a2820",
5798
- accent: "#6FCF97",
5799
- accentForeground: "#1a2820",
5800
- secondary: "#1f3329",
5801
- secondaryForeground: "#E6F5EC",
5802
- muted: "#354840",
5803
- mutedForeground: "#9DB8A8",
5804
- destructive: "#EB5757",
5805
- destructiveForeground: "#E6F5EC",
5806
- success: "#6FCF97",
5807
- successForeground: "#1a2820",
5808
- warning: "#F2C94C",
5809
- warningForeground: "#1a2820",
5810
- chip: "#3a5045",
5811
- chipForeground: "#C5E3D1",
5812
- border: "#243630",
5813
- input: "#243630",
5814
- ring: "#6FCF97",
5815
- toggleTrack: "#354840",
5816
- toggleTrackForeground: "#E6F5EC",
5817
- inputHover: "#6FCF97",
5818
- chart1: "#6FCF97",
5819
- chart2: "#8FE3B0",
5820
- chart3: "#9DB8A8",
5821
- chart4: "#2d4038",
5822
- chart5: "#354840",
5823
- chart6: "#4CAF50",
5824
- chart7: "#81C784",
5825
- chart8: "#F2C94C",
5826
- chart9: "#EB5757",
5827
- chart10: "#56CCF2",
5828
- chart11: "#BB6BD9",
5829
- chart12: "#2D9CDB",
5830
- radius: "0.5rem"
5831
- };
5832
5790
  var OPTILOGIC_LEGACY_THEME = {
5833
5791
  id: "optilogic-legacy",
5834
5792
  name: "Optilogic Legacy",
@@ -5859,6 +5817,8 @@ var OPTILOGIC_LEGACY_THEME = {
5859
5817
  border: "#D0D0D0",
5860
5818
  input: "#D0D0D0",
5861
5819
  ring: "#5766F2",
5820
+ popoverBorder: "#D0D0D0",
5821
+ divider: "#D0D0D0",
5862
5822
  toggleTrack: "#D0D0D0",
5863
5823
  toggleTrackForeground: "#FFFFFF",
5864
5824
  inputHover: "#5766F2",
@@ -5876,443 +5836,211 @@ var OPTILOGIC_LEGACY_THEME = {
5876
5836
  chart12: "#E03997",
5877
5837
  radius: "0.5rem"
5878
5838
  };
5879
- var FUTURISTIC_THEME = {
5880
- id: "futuristic",
5881
- name: "Futuristic",
5882
- description: "Neon cyberpunk aesthetic with electric blues and purples",
5883
- author: "Leapfrog",
5884
- background: "#0a0e27",
5885
- foreground: "#e0e7ff",
5886
- card: "#1a1f3a",
5887
- cardForeground: "#e0e7ff",
5888
- popover: "#1a1f3a",
5889
- popoverForeground: "#e0e7ff",
5890
- primary: "#6366f1",
5891
- primaryForeground: "#ffffff",
5892
- accent: "#8b5cf6",
5893
- accentForeground: "#ffffff",
5894
- secondary: "#1e293b",
5895
- secondaryForeground: "#e0e7ff",
5896
- muted: "#1e293b",
5897
- mutedForeground: "#94a3b8",
5898
- destructive: "#ef4444",
5899
- destructiveForeground: "#ffffff",
5900
- success: "#10b981",
5901
- successForeground: "#ffffff",
5902
- warning: "#f59e0b",
5903
- warningForeground: "#ffffff",
5904
- chip: "#312e81",
5905
- chipForeground: "#c7d2fe",
5906
- border: "#1e293b",
5907
- input: "#1e293b",
5908
- ring: "#6366f1",
5909
- toggleTrack: "#334155",
5910
- toggleTrackForeground: "#e0e7ff",
5911
- inputHover: "#6366f1",
5912
- chart1: "#6366f1",
5913
- chart2: "#8b5cf6",
5914
- chart3: "#a855f7",
5915
- chart4: "#ec4899",
5916
- chart5: "#f43f5e",
5917
- chart6: "#06b6d4",
5918
- chart7: "#14b8a6",
5919
- chart8: "#f97316",
5920
- chart9: "#eab308",
5921
- chart10: "#22c55e",
5922
- chart11: "#0ea5e9",
5923
- chart12: "#f43f5e",
5924
- radius: "0.5rem"
5925
- };
5926
- var NATURE_THEME = {
5927
- id: "nature",
5928
- name: "Nature Inspired",
5929
- description: "Earthy greens and browns inspired by forests and meadows",
5930
- author: "Leapfrog",
5931
- background: "#1a2e1a",
5932
- foreground: "#e8f5e9",
5933
- card: "#2d4a2d",
5934
- cardForeground: "#e8f5e9",
5935
- popover: "#243824",
5936
- popoverForeground: "#e8f5e9",
5937
- primary: "#4caf50",
5938
- primaryForeground: "#1a2e1a",
5939
- accent: "#66bb6a",
5940
- accentForeground: "#1a2e1a",
5941
- secondary: "#2d4a2d",
5942
- secondaryForeground: "#e8f5e9",
5943
- muted: "#3d5a3d",
5944
- mutedForeground: "#a5d6a7",
5945
- destructive: "#e57373",
5946
- destructiveForeground: "#ffffff",
5947
- success: "#66bb6a",
5948
- successForeground: "#1a2e1a",
5949
- warning: "#ffb74d",
5950
- warningForeground: "#1a2e1a",
5951
- chip: "#3d5a3d",
5952
- chipForeground: "#c8e6c9",
5953
- border: "#243824",
5954
- input: "#243824",
5955
- ring: "#4caf50",
5956
- toggleTrack: "#3d5a3d",
5957
- toggleTrackForeground: "#e8f5e9",
5958
- inputHover: "#4caf50",
5959
- chart1: "#4caf50",
5960
- chart2: "#66bb6a",
5961
- chart3: "#81c784",
5962
- chart4: "#a5d6a7",
5963
- chart5: "#c8e6c9",
5964
- chart6: "#8bc34a",
5965
- chart7: "#cddc39",
5966
- chart8: "#ffb74d",
5967
- chart9: "#4db6ac",
5968
- chart10: "#7986cb",
5969
- chart11: "#e57373",
5970
- chart12: "#64b5f6",
5971
- radius: "0.5rem"
5972
- };
5973
- var SCIFI_THEME = {
5974
- id: "scifi",
5975
- name: "Sci-Fi",
5976
- description: "Deep space aesthetic with vibrant cyan and magenta accents",
5977
- author: "Leapfrog",
5978
- background: "#0d1117",
5979
- foreground: "#c9d1d9",
5980
- card: "#161b22",
5981
- cardForeground: "#c9d1d9",
5982
- popover: "#161b22",
5983
- popoverForeground: "#c9d1d9",
5984
- primary: "#00d9ff",
5985
- primaryForeground: "#0d1117",
5986
- accent: "#ff00ff",
5987
- accentForeground: "#ffffff",
5988
- secondary: "#1c2128",
5989
- secondaryForeground: "#c9d1d9",
5990
- muted: "#21262d",
5991
- mutedForeground: "#8b949e",
5992
- destructive: "#ff6b6b",
5993
- destructiveForeground: "#ffffff",
5994
- success: "#00ff88",
5995
- successForeground: "#0d1117",
5996
- warning: "#ffd93d",
5997
- warningForeground: "#0d1117",
5998
- chip: "#1c2128",
5999
- chipForeground: "#58a6ff",
6000
- border: "#30363d",
6001
- input: "#21262d",
6002
- ring: "#00d9ff",
6003
- toggleTrack: "#30363d",
6004
- toggleTrackForeground: "#c9d1d9",
6005
- inputHover: "#00d9ff",
6006
- chart1: "#00d9ff",
6007
- chart2: "#ff00ff",
6008
- chart3: "#00ff88",
6009
- chart4: "#ffd93d",
6010
- chart5: "#58a6ff",
6011
- chart6: "#ff6b6b",
6012
- chart7: "#4ecdc4",
6013
- chart8: "#a855f7",
6014
- chart9: "#fb923c",
6015
- chart10: "#38bdf8",
6016
- chart11: "#f472b6",
6017
- chart12: "#34d399",
6018
- radius: "0.5rem"
6019
- };
6020
- var OCEAN_THEME = {
6021
- id: "ocean",
6022
- name: "Ocean",
6023
- description: "Calming blues and teals inspired by the deep sea",
6024
- author: "Leapfrog",
6025
- background: "#0a1929",
6026
- foreground: "#e3f2fd",
6027
- card: "#132f4c",
6028
- cardForeground: "#e3f2fd",
6029
- popover: "#0f2540",
6030
- popoverForeground: "#e3f2fd",
6031
- primary: "#2196f3",
6032
- primaryForeground: "#ffffff",
6033
- accent: "#00bcd4",
6034
- accentForeground: "#0a1929",
6035
- secondary: "#1565c0",
6036
- secondaryForeground: "#ffffff",
6037
- muted: "#1e3a5f",
6038
- mutedForeground: "#90caf9",
6039
- destructive: "#f44336",
6040
- destructiveForeground: "#ffffff",
6041
- success: "#4caf50",
6042
- successForeground: "#ffffff",
6043
- warning: "#ff9800",
6044
- warningForeground: "#ffffff",
6045
- chip: "#1565c0",
6046
- chipForeground: "#bbdefb",
6047
- border: "#1e3a5f",
6048
- input: "#1e3a5f",
6049
- ring: "#2196f3",
6050
- toggleTrack: "#264a6e",
6051
- toggleTrackForeground: "#e3f2fd",
6052
- inputHover: "#2196f3",
6053
- chart1: "#2196f3",
6054
- chart2: "#00bcd4",
6055
- chart3: "#03a9f4",
6056
- chart4: "#0288d1",
6057
- chart5: "#0277bd",
6058
- chart6: "#26c6da",
6059
- chart7: "#42a5f5",
6060
- chart8: "#66bb6a",
6061
- chart9: "#ffb74d",
6062
- chart10: "#ef5350",
6063
- chart11: "#ab47bc",
6064
- chart12: "#78909c",
6065
- radius: "0.5rem"
6066
- };
6067
- var SUNSET_THEME = {
6068
- id: "sunset",
6069
- name: "Sunset",
6070
- description: "Warm oranges and purples like a beautiful sunset",
6071
- author: "Leapfrog",
6072
- background: "#1a0d1a",
6073
- foreground: "#ffe0e6",
6074
- card: "#2d1a2d",
6075
- cardForeground: "#ffe0e6",
6076
- popover: "#241424",
6077
- popoverForeground: "#ffe0e6",
6078
- primary: "#ff6b35",
6079
- primaryForeground: "#ffffff",
6080
- accent: "#c44569",
6081
- accentForeground: "#ffffff",
6082
- secondary: "#f7931e",
6083
- secondaryForeground: "#1a0d1a",
6084
- muted: "#3d2a3d",
6085
- mutedForeground: "#ffb3c1",
6086
- destructive: "#e63946",
6087
- destructiveForeground: "#ffffff",
6088
- success: "#06d6a0",
6089
- successForeground: "#1a0d1a",
6090
- warning: "#ffb703",
6091
- warningForeground: "#1a0d1a",
6092
- chip: "#3d2a3d",
6093
- chipForeground: "#ffb3c1",
6094
- border: "#241424",
6095
- input: "#241424",
6096
- ring: "#ff6b35",
6097
- toggleTrack: "#3d2a3d",
6098
- toggleTrackForeground: "#ffe0e6",
6099
- inputHover: "#ff6b35",
6100
- chart1: "#ff6b35",
6101
- chart2: "#c44569",
6102
- chart3: "#f7931e",
6103
- chart4: "#ffb703",
6104
- chart5: "#ff8c42",
6105
- chart6: "#06d6a0",
6106
- chart7: "#118ab2",
6107
- chart8: "#ef476f",
6108
- chart9: "#ffd166",
6109
- chart10: "#073b4c",
6110
- chart11: "#8338ec",
6111
- chart12: "#3a86ff",
6112
- radius: "0.5rem"
6113
- };
6114
- var FOREST_THEME = {
6115
- id: "forest",
6116
- name: "Forest",
6117
- description: "Deep greens and browns like an ancient forest",
6118
- author: "Leapfrog",
6119
- background: "#0d1b0d",
6120
- foreground: "#e8f5e9",
6121
- card: "#1a2e1a",
6122
- cardForeground: "#e8f5e9",
6123
- popover: "#152515",
6124
- popoverForeground: "#e8f5e9",
6125
- primary: "#2e7d32",
6126
- primaryForeground: "#ffffff",
6127
- accent: "#558b2f",
6128
- accentForeground: "#ffffff",
6129
- secondary: "#1b5e20",
6130
- secondaryForeground: "#e8f5e9",
6131
- muted: "#2d4a2d",
6132
- mutedForeground: "#a5d6a7",
6133
- destructive: "#c62828",
6134
- destructiveForeground: "#ffffff",
6135
- success: "#4caf50",
6136
- successForeground: "#ffffff",
6137
- warning: "#f57c00",
6138
- warningForeground: "#ffffff",
6139
- chip: "#2d4a2d",
6140
- chipForeground: "#c8e6c9",
6141
- border: "#1b5e20",
6142
- input: "#1a2e1a",
6143
- ring: "#2e7d32",
6144
- toggleTrack: "#2d4a2d",
6145
- toggleTrackForeground: "#e8f5e9",
6146
- inputHover: "#2e7d32",
6147
- chart1: "#2e7d32",
6148
- chart2: "#388e3c",
6149
- chart3: "#43a047",
6150
- chart4: "#66bb6a",
6151
- chart5: "#81c784",
6152
- chart6: "#a5d6a7",
6153
- chart7: "#c8e6c9",
6154
- chart8: "#ffb74d",
6155
- chart9: "#4db6ac",
6156
- chart10: "#7986cb",
6157
- chart11: "#e57373",
6158
- chart12: "#64b5f6",
5839
+ var OPTILOGIC_DARK_THEME = {
5840
+ id: "optilogic-dark",
5841
+ name: "Optilogic Dark",
5842
+ description: "Optilogic branded dark theme with signature green",
5843
+ author: "Optilogic",
5844
+ background: "#042926",
5845
+ foreground: "#E0E7E6",
5846
+ card: "#0A3F34",
5847
+ cardForeground: "#E0E7E6",
5848
+ popover: "#0A3F34",
5849
+ popoverForeground: "#E0E7E6",
5850
+ primary: "#23EF6A",
5851
+ primaryForeground: "#042926",
5852
+ accent: "#23EF6A",
5853
+ accentForeground: "#042926",
5854
+ secondary: "#0D4D3F",
5855
+ secondaryForeground: "#E0E7E6",
5856
+ muted: "#0D4D3F",
5857
+ mutedForeground: "#9CB5B0",
5858
+ destructive: "#EF4444",
5859
+ destructiveForeground: "#FFFFFF",
5860
+ success: "#23EF6A",
5861
+ successForeground: "#042926",
5862
+ warning: "#FBBF24",
5863
+ warningForeground: "#042926",
5864
+ chip: "#0D4D3F",
5865
+ chipForeground: "#A7D5CA",
5866
+ border: "#1A5C4C",
5867
+ input: "#1A5C4C",
5868
+ ring: "#23EF6A",
5869
+ popoverBorder: "#237A64",
5870
+ divider: "#1A5C4C",
5871
+ toggleTrack: "#1A5C4C",
5872
+ toggleTrackForeground: "#E0E7E6",
5873
+ inputHover: "#23EF6A",
5874
+ chart1: "#23EF6A",
5875
+ chart2: "#3B82F6",
5876
+ chart3: "#FBBF24",
5877
+ chart4: "#F97316",
5878
+ chart5: "#A78BFA",
5879
+ chart6: "#EF4444",
5880
+ chart7: "#06B6D4",
5881
+ chart8: "#EC4899",
5882
+ chart9: "#84CC16",
5883
+ chart10: "#14B8A6",
5884
+ chart11: "#F59E0B",
5885
+ chart12: "#8B5CF6",
6159
5886
  radius: "0.5rem"
6160
5887
  };
6161
- var CYBERPUNK_THEME = {
6162
- id: "cyberpunk",
6163
- name: "Cyberpunk",
6164
- description: "Neon pinks and cyans with high contrast",
6165
- author: "Leapfrog",
6166
- background: "#0a0a0f",
6167
- foreground: "#f0f0f0",
6168
- card: "#1a1a2e",
6169
- cardForeground: "#f0f0f0",
6170
- popover: "#16213e",
6171
- popoverForeground: "#f0f0f0",
6172
- primary: "#ff00ff",
6173
- primaryForeground: "#ffffff",
6174
- accent: "#00ffff",
6175
- accentForeground: "#0a0a0f",
6176
- secondary: "#16213e",
6177
- secondaryForeground: "#f0f0f0",
6178
- muted: "#1a1a2e",
6179
- mutedForeground: "#a0a0a0",
6180
- destructive: "#ff1744",
6181
- destructiveForeground: "#ffffff",
6182
- success: "#00ff88",
6183
- successForeground: "#0a0a0f",
6184
- warning: "#ffd700",
6185
- warningForeground: "#0a0a0f",
6186
- chip: "#16213e",
6187
- chipForeground: "#ff00ff",
6188
- border: "#1a1a2e",
6189
- input: "#16213e",
6190
- ring: "#ff00ff",
6191
- toggleTrack: "#2a2a4e",
6192
- toggleTrackForeground: "#f0f0f0",
6193
- inputHover: "#ff00ff",
6194
- chart1: "#ff00ff",
6195
- chart2: "#00ffff",
6196
- chart3: "#00ff88",
6197
- chart4: "#ffd700",
6198
- chart5: "#ff1744",
6199
- chart6: "#ff6b6b",
6200
- chart7: "#4ecdc4",
6201
- chart8: "#a855f7",
6202
- chart9: "#fb923c",
6203
- chart10: "#38bdf8",
6204
- chart11: "#84cc16",
6205
- chart12: "#f97316",
5888
+ var MODERN_LIGHT_THEME = {
5889
+ id: "modern-light",
5890
+ name: "Modern Light",
5891
+ description: "Clean and modern light theme with blue accents",
5892
+ author: "opti-ui",
5893
+ background: "#FFFFFF",
5894
+ foreground: "#1A1A1A",
5895
+ card: "#F8F9FA",
5896
+ cardForeground: "#1A1A1A",
5897
+ popover: "#FFFFFF",
5898
+ popoverForeground: "#1A1A1A",
5899
+ primary: "#2563EB",
5900
+ primaryForeground: "#FFFFFF",
5901
+ accent: "#E9ECEF",
5902
+ accentForeground: "#1A1A1A",
5903
+ secondary: "#F1F3F5",
5904
+ secondaryForeground: "#1A1A1A",
5905
+ muted: "#E9ECEF",
5906
+ mutedForeground: "#6C757D",
5907
+ destructive: "#DC3545",
5908
+ destructiveForeground: "#FFFFFF",
5909
+ success: "#28A745",
5910
+ successForeground: "#FFFFFF",
5911
+ warning: "#FFC107",
5912
+ warningForeground: "#1A1A1A",
5913
+ chip: "#E9ECEF",
5914
+ chipForeground: "#495057",
5915
+ border: "#DEE2E6",
5916
+ input: "#DEE2E6",
5917
+ ring: "#2563EB",
5918
+ popoverBorder: "#DEE2E6",
5919
+ divider: "#DEE2E6",
5920
+ toggleTrack: "#CED4DA",
5921
+ toggleTrackForeground: "#FFFFFF",
5922
+ inputHover: "#6C757D",
5923
+ chart1: "#2563EB",
5924
+ chart2: "#16A34A",
5925
+ chart3: "#EA580C",
5926
+ chart4: "#9333EA",
5927
+ chart5: "#DC2626",
5928
+ chart6: "#0891B2",
5929
+ chart7: "#CA8A04",
5930
+ chart8: "#DB2777",
5931
+ chart9: "#4F46E5",
5932
+ chart10: "#059669",
5933
+ chart11: "#D97706",
5934
+ chart12: "#7C3AED",
6206
5935
  radius: "0.5rem"
6207
5936
  };
6208
- var MINIMALIST_LIGHT_THEME = {
6209
- id: "minimalist-light",
6210
- name: "Minimalist Light",
6211
- description: "Clean and simple light theme with subtle grays",
6212
- author: "Leapfrog",
6213
- background: "#ffffff",
6214
- foreground: "#1a1a1a",
6215
- card: "#f8f9fa",
6216
- cardForeground: "#1a1a1a",
6217
- popover: "#ffffff",
6218
- popoverForeground: "#1a1a1a",
6219
- primary: "#000000",
6220
- primaryForeground: "#ffffff",
6221
- accent: "#e9ecef",
6222
- accentForeground: "#1a1a1a",
6223
- secondary: "#f1f3f5",
6224
- secondaryForeground: "#1a1a1a",
6225
- muted: "#e9ecef",
6226
- mutedForeground: "#6c757d",
6227
- destructive: "#dc3545",
6228
- destructiveForeground: "#ffffff",
6229
- success: "#28a745",
6230
- successForeground: "#ffffff",
6231
- warning: "#ffc107",
6232
- warningForeground: "#1a1a1a",
6233
- chip: "#e9ecef",
6234
- chipForeground: "#495057",
6235
- border: "#dee2e6",
6236
- input: "#dee2e6",
6237
- ring: "#000000",
6238
- toggleTrack: "#ced4da",
6239
- toggleTrackForeground: "#ffffff",
6240
- inputHover: "#6c757d",
6241
- chart1: "#000000",
6242
- chart2: "#6c757d",
6243
- chart3: "#adb5bd",
6244
- chart4: "#dee2e6",
6245
- chart5: "#e9ecef",
6246
- chart6: "#343a40",
6247
- chart7: "#495057",
6248
- chart8: "#868e96",
6249
- chart9: "#5c6bc0",
6250
- chart10: "#26a69a",
6251
- chart11: "#ef5350",
6252
- chart12: "#ffa726",
5937
+ var MINIMALIST_LIGHT_THEME = MODERN_LIGHT_THEME;
5938
+ var MODERN_DARK_THEME = {
5939
+ id: "modern-dark",
5940
+ name: "Modern Dark",
5941
+ description: "Clean, neutral dark theme with blue accents",
5942
+ author: "opti-ui",
5943
+ background: "#09090B",
5944
+ foreground: "#FAFAFA",
5945
+ card: "#18181B",
5946
+ cardForeground: "#FAFAFA",
5947
+ popover: "#18181B",
5948
+ popoverForeground: "#FAFAFA",
5949
+ primary: "#3B82F6",
5950
+ primaryForeground: "#FFFFFF",
5951
+ accent: "#27272A",
5952
+ accentForeground: "#FAFAFA",
5953
+ secondary: "#27272A",
5954
+ secondaryForeground: "#FAFAFA",
5955
+ muted: "#27272A",
5956
+ mutedForeground: "#A1A1AA",
5957
+ destructive: "#EF4444",
5958
+ destructiveForeground: "#FFFFFF",
5959
+ success: "#22C55E",
5960
+ successForeground: "#FFFFFF",
5961
+ warning: "#EAB308",
5962
+ warningForeground: "#09090B",
5963
+ chip: "#27272A",
5964
+ chipForeground: "#D4D4D8",
5965
+ border: "#3F3F46",
5966
+ input: "#3F3F46",
5967
+ ring: "#3B82F6",
5968
+ popoverBorder: "#52525B",
5969
+ divider: "#3F3F46",
5970
+ toggleTrack: "#3F3F46",
5971
+ toggleTrackForeground: "#FAFAFA",
5972
+ inputHover: "#3B82F6",
5973
+ chart1: "#3B82F6",
5974
+ chart2: "#22C55E",
5975
+ chart3: "#F59E0B",
5976
+ chart4: "#EF4444",
5977
+ chart5: "#A855F7",
5978
+ chart6: "#14B8A6",
5979
+ chart7: "#F97316",
5980
+ chart8: "#EC4899",
5981
+ chart9: "#0EA5E9",
5982
+ chart10: "#EAB308",
5983
+ chart11: "#10B981",
5984
+ chart12: "#C084FC",
6253
5985
  radius: "0.5rem"
6254
5986
  };
6255
5987
  var DARK_ELEGANT_THEME = {
6256
5988
  id: "dark-elegant",
6257
5989
  name: "Dark Elegant",
6258
5990
  description: "Sophisticated dark mode with refined colors",
6259
- author: "Leapfrog",
5991
+ author: "opti-ui",
6260
5992
  background: "#121212",
6261
- foreground: "#e0e0e0",
6262
- card: "#1e1e1e",
6263
- cardForeground: "#e0e0e0",
6264
- popover: "#1e1e1e",
6265
- popoverForeground: "#e0e0e0",
6266
- primary: "#bb86fc",
5993
+ foreground: "#E0E0E0",
5994
+ card: "#1E1E1E",
5995
+ cardForeground: "#E0E0E0",
5996
+ popover: "#1E1E1E",
5997
+ popoverForeground: "#E0E0E0",
5998
+ primary: "#BB86FC",
6267
5999
  primaryForeground: "#121212",
6268
- accent: "#03dac6",
6000
+ accent: "#03DAC6",
6269
6001
  accentForeground: "#121212",
6270
- secondary: "#2d2d2d",
6271
- secondaryForeground: "#e0e0e0",
6272
- muted: "#2d2d2d",
6273
- mutedForeground: "#9e9e9e",
6274
- destructive: "#cf6679",
6275
- destructiveForeground: "#ffffff",
6276
- success: "#4caf50",
6277
- successForeground: "#ffffff",
6278
- warning: "#ff9800",
6279
- warningForeground: "#ffffff",
6280
- chip: "#2d2d2d",
6281
- chipForeground: "#b39ddb",
6282
- border: "#2d2d2d",
6283
- input: "#1e1e1e",
6284
- ring: "#bb86fc",
6285
- toggleTrack: "#3d3d3d",
6286
- toggleTrackForeground: "#e0e0e0",
6287
- inputHover: "#bb86fc",
6288
- chart1: "#bb86fc",
6289
- chart2: "#03dac6",
6290
- chart3: "#4caf50",
6291
- chart4: "#ff9800",
6292
- chart5: "#cf6679",
6293
- chart6: "#64b5f6",
6294
- chart7: "#81c784",
6295
- chart8: "#ffb74d",
6296
- chart9: "#e57373",
6297
- chart10: "#7986cb",
6298
- chart11: "#4db6ac",
6299
- chart12: "#f06292",
6002
+ secondary: "#2D2D2D",
6003
+ secondaryForeground: "#E0E0E0",
6004
+ muted: "#2D2D2D",
6005
+ mutedForeground: "#9E9E9E",
6006
+ destructive: "#CF6679",
6007
+ destructiveForeground: "#FFFFFF",
6008
+ success: "#4CAF50",
6009
+ successForeground: "#FFFFFF",
6010
+ warning: "#FF9800",
6011
+ warningForeground: "#121212",
6012
+ chip: "#2D2D2D",
6013
+ chipForeground: "#B39DDB",
6014
+ border: "#404040",
6015
+ input: "#404040",
6016
+ ring: "#BB86FC",
6017
+ popoverBorder: "#525252",
6018
+ divider: "#404040",
6019
+ toggleTrack: "#404040",
6020
+ toggleTrackForeground: "#E0E0E0",
6021
+ inputHover: "#BB86FC",
6022
+ chart1: "#BB86FC",
6023
+ chart2: "#03DAC6",
6024
+ chart3: "#4CAF50",
6025
+ chart4: "#FF9800",
6026
+ chart5: "#CF6679",
6027
+ chart6: "#64B5F6",
6028
+ chart7: "#81C784",
6029
+ chart8: "#FFB74D",
6030
+ chart9: "#E57373",
6031
+ chart10: "#7986CB",
6032
+ chart11: "#4DB6AC",
6033
+ chart12: "#F06292",
6300
6034
  radius: "0.5rem"
6301
6035
  };
6302
- var PRESET_THEMES = [OPTILOGIC_LEGACY_THEME];
6303
- var ALL_THEMES = [
6036
+ var PRESET_THEMES = [
6304
6037
  OPTILOGIC_LEGACY_THEME,
6305
- FUTURISTIC_THEME,
6306
- NATURE_THEME,
6307
- SCIFI_THEME,
6308
- OCEAN_THEME,
6309
- SUNSET_THEME,
6310
- FOREST_THEME,
6311
- CYBERPUNK_THEME,
6312
- MINIMALIST_LIGHT_THEME,
6313
- DARK_ELEGANT_THEME,
6314
- GREEN_THEME
6038
+ OPTILOGIC_DARK_THEME,
6039
+ MODERN_LIGHT_THEME,
6040
+ MODERN_DARK_THEME,
6041
+ DARK_ELEGANT_THEME
6315
6042
  ];
6043
+ var ALL_THEMES = PRESET_THEMES;
6316
6044
  function getPresetTheme(id) {
6317
6045
  return ALL_THEMES.find((theme) => theme.id === id);
6318
6046
  }
@@ -6382,6 +6110,8 @@ function themeToHsl(theme) {
6382
6110
  border: hexToHsl(theme.border),
6383
6111
  input: hexToHsl(theme.input),
6384
6112
  ring: hexToHsl(theme.ring),
6113
+ popoverBorder: theme.popoverBorder ? hexToHsl(theme.popoverBorder) : void 0,
6114
+ divider: theme.divider ? hexToHsl(theme.divider) : void 0,
6385
6115
  toggleTrack: theme.toggleTrack ? hexToHsl(theme.toggleTrack) : void 0,
6386
6116
  toggleTrackForeground: theme.toggleTrackForeground ? hexToHsl(theme.toggleTrackForeground) : void 0,
6387
6117
  inputHover: theme.inputHover ? hexToHsl(theme.inputHover) : void 0,
@@ -6442,6 +6172,14 @@ function applyTheme(theme, targetElement) {
6442
6172
  element.style.setProperty("--border", hslTheme.border);
6443
6173
  element.style.setProperty("--input", hslTheme.input);
6444
6174
  element.style.setProperty("--ring", hslTheme.ring);
6175
+ element.style.setProperty(
6176
+ "--popover-border",
6177
+ hslTheme.popoverBorder ?? hslTheme.border
6178
+ );
6179
+ element.style.setProperty(
6180
+ "--divider",
6181
+ hslTheme.divider ?? hslTheme.border
6182
+ );
6445
6183
  element.style.setProperty(
6446
6184
  "--toggle-track",
6447
6185
  hslTheme.toggleTrack ?? hslTheme.muted
@@ -6566,6 +6304,8 @@ function areThemesEqual(theme1, theme2) {
6566
6304
  "border",
6567
6305
  "input",
6568
6306
  "ring",
6307
+ "popoverBorder",
6308
+ "divider",
6569
6309
  "toggleTrack",
6570
6310
  "toggleTrackForeground",
6571
6311
  "inputHover",
@@ -6890,7 +6630,7 @@ function MenuItem({ item, onClose, depth = 0 }) {
6890
6630
  {
6891
6631
  className: cn(
6892
6632
  "fixed z-[60] min-w-[180px] max-w-[280px]",
6893
- "rounded-md border border-border",
6633
+ "rounded-md border border-popover-border",
6894
6634
  "bg-popover text-popover-foreground",
6895
6635
  "shadow-lg",
6896
6636
  "animate-in fade-in-0 zoom-in-95",
@@ -6973,7 +6713,7 @@ function ContextMenu({
6973
6713
  ref: menuRef,
6974
6714
  className: cn(
6975
6715
  "fixed z-50 min-w-[180px] max-w-[280px]",
6976
- "rounded-md border border-border",
6716
+ "rounded-md border border-popover-border",
6977
6717
  "bg-popover text-popover-foreground",
6978
6718
  "shadow-lg",
6979
6719
  "animate-in fade-in-0 zoom-in-95",
@@ -7747,18 +7487,80 @@ function CsvRenderer({ content, className }) {
7747
7487
  ) });
7748
7488
  }
7749
7489
  CsvRenderer.displayName = "CsvRenderer";
7490
+ var CSP_POLICY = [
7491
+ "default-src 'none'",
7492
+ "script-src 'unsafe-inline'",
7493
+ "style-src 'unsafe-inline'",
7494
+ "img-src data: blob:"
7495
+ ].join("; ");
7496
+ var PERMISSIONS_POLICY = [
7497
+ "camera=()",
7498
+ "microphone=()",
7499
+ "geolocation=()",
7500
+ "payment=()",
7501
+ "usb=()",
7502
+ "display-capture=()",
7503
+ "fullscreen=()",
7504
+ "autoplay=()",
7505
+ "web-share=()",
7506
+ "screen-wake-lock=()",
7507
+ "xr-spatial-tracking=()",
7508
+ "magnetometer=()",
7509
+ "gyroscope=()",
7510
+ "accelerometer=()"
7511
+ ].join(", ");
7512
+ function buildSandboxedHtml(content) {
7513
+ return `<!DOCTYPE html>
7514
+ <html>
7515
+ <head>
7516
+ <meta http-equiv="Content-Security-Policy" content="${CSP_POLICY}">
7517
+ <script>
7518
+ // Neutralise APIs that the sandbox + CSP can't fully block.
7519
+ // This runs in <head> before any user content in <body>.
7520
+ // Uses Object.defineProperty to make overrides non-configurable
7521
+ // so user scripts cannot restore the original via prototype tricks.
7522
+ (function(){
7523
+ // postMessage: iframe can message parent even without allow-same-origin.
7524
+ // Kill it so content can't probe or spam any future parent listeners.
7525
+ // Also kill parent/top refs as an extra layer.
7526
+ var noop = function(){};
7527
+ try { Object.defineProperty(window, 'postMessage', { value: noop, writable: false, configurable: false }); } catch(e) {}
7528
+ try { Object.defineProperty(window, 'parent', { value: window, writable: false, configurable: false }); } catch(e) {}
7529
+ try { Object.defineProperty(window, 'top', { value: window, writable: false, configurable: false }); } catch(e) {}
7530
+ try { Object.defineProperty(window, 'opener', { value: null, writable: false, configurable: false }); } catch(e) {}
7531
+
7532
+ // RTCPeerConnection: not governed by CSP; could contact a STUN server
7533
+ // over UDP to leak the user's IP. Kill all browser-prefixed variants.
7534
+ var rtcNames = ['RTCPeerConnection', 'webkitRTCPeerConnection', 'mozRTCPeerConnection'];
7535
+ for (var i = 0; i < rtcNames.length; i++) {
7536
+ try { Object.defineProperty(window, rtcNames[i], { value: undefined, writable: false, configurable: false }); } catch(e) {}
7537
+ }
7538
+ })();
7539
+ </script>
7540
+ </head>
7541
+ <body>${content}</body>
7542
+ </html>`;
7543
+ }
7750
7544
  function HtmlRenderer({
7751
7545
  content,
7752
7546
  fileName,
7753
7547
  className
7754
7548
  }) {
7549
+ const srcDoc = React20__namespace.useMemo(
7550
+ () => buildSandboxedHtml(content ?? ""),
7551
+ [content]
7552
+ );
7553
+ const iframeProps = { csp: CSP_POLICY };
7755
7554
  return /* @__PURE__ */ jsxRuntime.jsx(
7756
7555
  "iframe",
7757
7556
  {
7758
- srcDoc: content ?? "",
7557
+ srcDoc,
7759
7558
  sandbox: "allow-scripts",
7760
7559
  title: fileName,
7761
- className: cn("h-full w-full border-0", className)
7560
+ referrerPolicy: "no-referrer",
7561
+ allow: PERMISSIONS_POLICY,
7562
+ className: cn("h-full w-full border-0", className),
7563
+ ...iframeProps
7762
7564
  }
7763
7565
  );
7764
7566
  }
@@ -8144,7 +7946,6 @@ exports.Board = Board;
8144
7946
  exports.BoardContent = BoardContent;
8145
7947
  exports.BoardHeader = BoardHeader;
8146
7948
  exports.Button = Button;
8147
- exports.CYBERPUNK_THEME = CYBERPUNK_THEME;
8148
7949
  exports.Calendar = Calendar;
8149
7950
  exports.Card = Card;
8150
7951
  exports.CardActions = CardActions;
@@ -8187,11 +7988,8 @@ exports.DropdownMenuSub = DropdownMenuSub;
8187
7988
  exports.DropdownMenuSubContent = DropdownMenuSubContent;
8188
7989
  exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
8189
7990
  exports.DropdownMenuTrigger = DropdownMenuTrigger;
8190
- exports.FOREST_THEME = FOREST_THEME;
8191
- exports.FUTURISTIC_THEME = FUTURISTIC_THEME;
8192
7991
  exports.FileView = FileView;
8193
7992
  exports.FilterPopover = FilterPopover;
8194
- exports.GREEN_THEME = GREEN_THEME;
8195
7993
  exports.HeaderCell = HeaderCell;
8196
7994
  exports.HtmlRenderer = HtmlRenderer;
8197
7995
  exports.IconButton = IconButton;
@@ -8200,11 +7998,12 @@ exports.Input = Input;
8200
7998
  exports.Label = Label;
8201
7999
  exports.LoadingSpinner = LoadingSpinner;
8202
8000
  exports.MINIMALIST_LIGHT_THEME = MINIMALIST_LIGHT_THEME;
8001
+ exports.MODERN_DARK_THEME = MODERN_DARK_THEME;
8002
+ exports.MODERN_LIGHT_THEME = MODERN_LIGHT_THEME;
8203
8003
  exports.MarkdownRenderer = MarkdownRenderer;
8204
8004
  exports.Modal = Modal;
8205
8005
  exports.ModalButton = ModalButton;
8206
- exports.NATURE_THEME = NATURE_THEME;
8207
- exports.OCEAN_THEME = OCEAN_THEME;
8006
+ exports.OPTILOGIC_DARK_THEME = OPTILOGIC_DARK_THEME;
8208
8007
  exports.OPTILOGIC_LEGACY_THEME = OPTILOGIC_LEGACY_THEME;
8209
8008
  exports.OptilogicLogo = OptilogicLogo;
8210
8009
  exports.OptilogicLogoWithText = OptilogicLogoWithText;
@@ -8217,8 +8016,6 @@ exports.PopoverTrigger = PopoverTrigger;
8217
8016
  exports.Progress = Progress;
8218
8017
  exports.ResizablePanel = ResizablePanel;
8219
8018
  exports.ResizeHandle = ResizeHandle;
8220
- exports.SCIFI_THEME = SCIFI_THEME;
8221
- exports.SUNSET_THEME = SUNSET_THEME;
8222
8019
  exports.Select = Select;
8223
8020
  exports.SelectContent = SelectContent;
8224
8021
  exports.SelectGroup = SelectGroup;