@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 +285 -488
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -34
- package/dist/index.d.ts +50 -34
- package/dist/index.js +283 -481
- package/dist/index.js.map +1 -1
- package/dist/styles.css +84 -80
- package/dist/tailwind-preset.cjs +1 -0
- package/dist/tailwind-preset.cjs.map +1 -1
- package/dist/tailwind-preset.js +1 -0
- package/dist/tailwind-preset.js.map +1 -1
- package/package.json +1 -1
- package/src/components/calendar.tsx +7 -2
- package/src/components/context-menu.tsx +2 -2
- package/src/components/data-grid/DataGrid.tsx +1 -1
- package/src/components/dropdown-menu.tsx +2 -2
- package/src/components/file-view/components/HtmlRenderer.tsx +108 -2
- package/src/components/popover.tsx +1 -1
- package/src/components/select.tsx +1 -1
- package/src/components/tooltip.tsx +2 -2
- package/src/index.ts +3 -8
- package/src/styles.css +84 -80
- package/src/tailwind-preset.ts +1 -0
- package/src/theme/index.ts +3 -8
- package/src/theme/presets.ts +211 -497
- package/src/theme/types.ts +10 -0
- package/src/theme/utils.ts +24 -0
package/dist/index.js
CHANGED
|
@@ -314,7 +314,7 @@ var SelectContent = React20.forwardRef(({ className, children, position = "poppe
|
|
|
314
314
|
{
|
|
315
315
|
ref,
|
|
316
316
|
className: cn(
|
|
317
|
-
"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-
|
|
317
|
+
"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]",
|
|
318
318
|
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",
|
|
319
319
|
className
|
|
320
320
|
),
|
|
@@ -544,11 +544,11 @@ var TooltipContent = React20.forwardRef(({ className, sideOffset = 6, ...props }
|
|
|
544
544
|
"px-2.5 py-1.5 rounded-md",
|
|
545
545
|
// Colors
|
|
546
546
|
"bg-popover text-popover-foreground",
|
|
547
|
-
"border border-border",
|
|
547
|
+
"border border-popover-border",
|
|
548
548
|
// Typography
|
|
549
549
|
"text-xs font-medium",
|
|
550
550
|
// Shadow
|
|
551
|
-
"shadow-
|
|
551
|
+
"shadow-lg",
|
|
552
552
|
// Animation
|
|
553
553
|
"animate-in fade-in-0 zoom-in-95",
|
|
554
554
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
@@ -608,7 +608,7 @@ var PopoverContent = React20.forwardRef(({ className, align = "center", sideOffs
|
|
|
608
608
|
align,
|
|
609
609
|
sideOffset,
|
|
610
610
|
className: cn(
|
|
611
|
-
"z-50 w-auto max-w-[90vw] rounded-md border border-border bg-popover p-4 text-popover-foreground shadow-
|
|
611
|
+
"z-50 w-auto max-w-[90vw] rounded-md border border-popover-border bg-popover p-4 text-popover-foreground shadow-lg outline-none",
|
|
612
612
|
// Animation
|
|
613
613
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
614
614
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -651,7 +651,7 @@ var DropdownMenuSubContent = React20.forwardRef(({ className, ...props }, ref) =
|
|
|
651
651
|
{
|
|
652
652
|
ref,
|
|
653
653
|
className: cn(
|
|
654
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
654
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-popover-border bg-popover p-1 text-popover-foreground shadow-lg",
|
|
655
655
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
656
656
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
657
657
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -669,7 +669,7 @@ var DropdownMenuContent = React20.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
669
669
|
ref,
|
|
670
670
|
sideOffset,
|
|
671
671
|
className: cn(
|
|
672
|
-
"z-50 min-w-[8rem] max-w-[90vw] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-
|
|
672
|
+
"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",
|
|
673
673
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
674
674
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
675
675
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -2723,12 +2723,17 @@ function Calendar({
|
|
|
2723
2723
|
weekday: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
2724
2724
|
week: "flex w-full mt-2",
|
|
2725
2725
|
day: cn(
|
|
2726
|
-
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20
|
|
2726
|
+
"relative p-0 text-center text-sm focus-within:relative focus-within:z-20",
|
|
2727
|
+
"[&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
2728
|
+
// Override the button's ghost text color when day is selected (data-selected is on the td, not the button)
|
|
2729
|
+
"[&[data-selected]>button]:bg-primary [&[data-selected]>button]:text-primary-foreground",
|
|
2730
|
+
"[&[data-selected]>button]:hover:bg-primary/90 [&[data-selected]>button]:hover:text-primary-foreground",
|
|
2731
|
+
"[&[data-selected]>button]:focus:bg-primary [&[data-selected]>button]:focus:text-primary-foreground",
|
|
2727
2732
|
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"
|
|
2728
2733
|
),
|
|
2729
2734
|
day_button: cn(
|
|
2730
2735
|
buttonVariants({ variant: "ghost" }),
|
|
2731
|
-
"h-9 w-9 p-0 font-normal
|
|
2736
|
+
"h-9 w-9 p-0 font-normal"
|
|
2732
2737
|
),
|
|
2733
2738
|
range_start: "day-range-start rounded-l-md",
|
|
2734
2739
|
range_end: "day-range-end rounded-r-md",
|
|
@@ -5188,7 +5193,7 @@ function DataGrid({
|
|
|
5188
5193
|
hoveredCell && /* @__PURE__ */ jsx(
|
|
5189
5194
|
"div",
|
|
5190
5195
|
{
|
|
5191
|
-
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",
|
|
5196
|
+
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",
|
|
5192
5197
|
style: {
|
|
5193
5198
|
left: `${hoveredCell.x}px`,
|
|
5194
5199
|
top: `${hoveredCell.y}px`
|
|
@@ -5745,53 +5750,6 @@ function CopyButton({ content, className, size = "md" }) {
|
|
|
5745
5750
|
}
|
|
5746
5751
|
|
|
5747
5752
|
// src/theme/presets.ts
|
|
5748
|
-
var GREEN_THEME = {
|
|
5749
|
-
id: "green-theme",
|
|
5750
|
-
name: "Green Theme",
|
|
5751
|
-
description: "A green theme with natural, earthy tones",
|
|
5752
|
-
author: "Leapfrog",
|
|
5753
|
-
background: "#1a2820",
|
|
5754
|
-
foreground: "#E6F5EC",
|
|
5755
|
-
card: "#2d4038",
|
|
5756
|
-
cardForeground: "#E6F5EC",
|
|
5757
|
-
popover: "#243630",
|
|
5758
|
-
popoverForeground: "#E6F5EC",
|
|
5759
|
-
primary: "#6FCF97",
|
|
5760
|
-
primaryForeground: "#1a2820",
|
|
5761
|
-
accent: "#6FCF97",
|
|
5762
|
-
accentForeground: "#1a2820",
|
|
5763
|
-
secondary: "#1f3329",
|
|
5764
|
-
secondaryForeground: "#E6F5EC",
|
|
5765
|
-
muted: "#354840",
|
|
5766
|
-
mutedForeground: "#9DB8A8",
|
|
5767
|
-
destructive: "#EB5757",
|
|
5768
|
-
destructiveForeground: "#E6F5EC",
|
|
5769
|
-
success: "#6FCF97",
|
|
5770
|
-
successForeground: "#1a2820",
|
|
5771
|
-
warning: "#F2C94C",
|
|
5772
|
-
warningForeground: "#1a2820",
|
|
5773
|
-
chip: "#3a5045",
|
|
5774
|
-
chipForeground: "#C5E3D1",
|
|
5775
|
-
border: "#243630",
|
|
5776
|
-
input: "#243630",
|
|
5777
|
-
ring: "#6FCF97",
|
|
5778
|
-
toggleTrack: "#354840",
|
|
5779
|
-
toggleTrackForeground: "#E6F5EC",
|
|
5780
|
-
inputHover: "#6FCF97",
|
|
5781
|
-
chart1: "#6FCF97",
|
|
5782
|
-
chart2: "#8FE3B0",
|
|
5783
|
-
chart3: "#9DB8A8",
|
|
5784
|
-
chart4: "#2d4038",
|
|
5785
|
-
chart5: "#354840",
|
|
5786
|
-
chart6: "#4CAF50",
|
|
5787
|
-
chart7: "#81C784",
|
|
5788
|
-
chart8: "#F2C94C",
|
|
5789
|
-
chart9: "#EB5757",
|
|
5790
|
-
chart10: "#56CCF2",
|
|
5791
|
-
chart11: "#BB6BD9",
|
|
5792
|
-
chart12: "#2D9CDB",
|
|
5793
|
-
radius: "0.5rem"
|
|
5794
|
-
};
|
|
5795
5753
|
var OPTILOGIC_LEGACY_THEME = {
|
|
5796
5754
|
id: "optilogic-legacy",
|
|
5797
5755
|
name: "Optilogic Legacy",
|
|
@@ -5822,6 +5780,8 @@ var OPTILOGIC_LEGACY_THEME = {
|
|
|
5822
5780
|
border: "#D0D0D0",
|
|
5823
5781
|
input: "#D0D0D0",
|
|
5824
5782
|
ring: "#5766F2",
|
|
5783
|
+
popoverBorder: "#D0D0D0",
|
|
5784
|
+
divider: "#D0D0D0",
|
|
5825
5785
|
toggleTrack: "#D0D0D0",
|
|
5826
5786
|
toggleTrackForeground: "#FFFFFF",
|
|
5827
5787
|
inputHover: "#5766F2",
|
|
@@ -5839,443 +5799,211 @@ var OPTILOGIC_LEGACY_THEME = {
|
|
|
5839
5799
|
chart12: "#E03997",
|
|
5840
5800
|
radius: "0.5rem"
|
|
5841
5801
|
};
|
|
5842
|
-
var
|
|
5843
|
-
id: "
|
|
5844
|
-
name: "
|
|
5845
|
-
description: "
|
|
5846
|
-
author: "
|
|
5847
|
-
background: "#
|
|
5848
|
-
foreground: "#
|
|
5849
|
-
card: "#
|
|
5850
|
-
cardForeground: "#
|
|
5851
|
-
popover: "#
|
|
5852
|
-
popoverForeground: "#
|
|
5853
|
-
primary: "#
|
|
5854
|
-
primaryForeground: "#
|
|
5855
|
-
accent: "#
|
|
5856
|
-
accentForeground: "#
|
|
5857
|
-
secondary: "#
|
|
5858
|
-
secondaryForeground: "#
|
|
5859
|
-
muted: "#
|
|
5860
|
-
mutedForeground: "#
|
|
5861
|
-
destructive: "#
|
|
5862
|
-
destructiveForeground: "#
|
|
5863
|
-
success: "#
|
|
5864
|
-
successForeground: "#
|
|
5865
|
-
warning: "#
|
|
5866
|
-
warningForeground: "#
|
|
5867
|
-
chip: "#
|
|
5868
|
-
chipForeground: "#
|
|
5869
|
-
border: "#
|
|
5870
|
-
input: "#
|
|
5871
|
-
ring: "#
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
var NATURE_THEME = {
|
|
5890
|
-
id: "nature",
|
|
5891
|
-
name: "Nature Inspired",
|
|
5892
|
-
description: "Earthy greens and browns inspired by forests and meadows",
|
|
5893
|
-
author: "Leapfrog",
|
|
5894
|
-
background: "#1a2e1a",
|
|
5895
|
-
foreground: "#e8f5e9",
|
|
5896
|
-
card: "#2d4a2d",
|
|
5897
|
-
cardForeground: "#e8f5e9",
|
|
5898
|
-
popover: "#243824",
|
|
5899
|
-
popoverForeground: "#e8f5e9",
|
|
5900
|
-
primary: "#4caf50",
|
|
5901
|
-
primaryForeground: "#1a2e1a",
|
|
5902
|
-
accent: "#66bb6a",
|
|
5903
|
-
accentForeground: "#1a2e1a",
|
|
5904
|
-
secondary: "#2d4a2d",
|
|
5905
|
-
secondaryForeground: "#e8f5e9",
|
|
5906
|
-
muted: "#3d5a3d",
|
|
5907
|
-
mutedForeground: "#a5d6a7",
|
|
5908
|
-
destructive: "#e57373",
|
|
5909
|
-
destructiveForeground: "#ffffff",
|
|
5910
|
-
success: "#66bb6a",
|
|
5911
|
-
successForeground: "#1a2e1a",
|
|
5912
|
-
warning: "#ffb74d",
|
|
5913
|
-
warningForeground: "#1a2e1a",
|
|
5914
|
-
chip: "#3d5a3d",
|
|
5915
|
-
chipForeground: "#c8e6c9",
|
|
5916
|
-
border: "#243824",
|
|
5917
|
-
input: "#243824",
|
|
5918
|
-
ring: "#4caf50",
|
|
5919
|
-
toggleTrack: "#3d5a3d",
|
|
5920
|
-
toggleTrackForeground: "#e8f5e9",
|
|
5921
|
-
inputHover: "#4caf50",
|
|
5922
|
-
chart1: "#4caf50",
|
|
5923
|
-
chart2: "#66bb6a",
|
|
5924
|
-
chart3: "#81c784",
|
|
5925
|
-
chart4: "#a5d6a7",
|
|
5926
|
-
chart5: "#c8e6c9",
|
|
5927
|
-
chart6: "#8bc34a",
|
|
5928
|
-
chart7: "#cddc39",
|
|
5929
|
-
chart8: "#ffb74d",
|
|
5930
|
-
chart9: "#4db6ac",
|
|
5931
|
-
chart10: "#7986cb",
|
|
5932
|
-
chart11: "#e57373",
|
|
5933
|
-
chart12: "#64b5f6",
|
|
5934
|
-
radius: "0.5rem"
|
|
5935
|
-
};
|
|
5936
|
-
var SCIFI_THEME = {
|
|
5937
|
-
id: "scifi",
|
|
5938
|
-
name: "Sci-Fi",
|
|
5939
|
-
description: "Deep space aesthetic with vibrant cyan and magenta accents",
|
|
5940
|
-
author: "Leapfrog",
|
|
5941
|
-
background: "#0d1117",
|
|
5942
|
-
foreground: "#c9d1d9",
|
|
5943
|
-
card: "#161b22",
|
|
5944
|
-
cardForeground: "#c9d1d9",
|
|
5945
|
-
popover: "#161b22",
|
|
5946
|
-
popoverForeground: "#c9d1d9",
|
|
5947
|
-
primary: "#00d9ff",
|
|
5948
|
-
primaryForeground: "#0d1117",
|
|
5949
|
-
accent: "#ff00ff",
|
|
5950
|
-
accentForeground: "#ffffff",
|
|
5951
|
-
secondary: "#1c2128",
|
|
5952
|
-
secondaryForeground: "#c9d1d9",
|
|
5953
|
-
muted: "#21262d",
|
|
5954
|
-
mutedForeground: "#8b949e",
|
|
5955
|
-
destructive: "#ff6b6b",
|
|
5956
|
-
destructiveForeground: "#ffffff",
|
|
5957
|
-
success: "#00ff88",
|
|
5958
|
-
successForeground: "#0d1117",
|
|
5959
|
-
warning: "#ffd93d",
|
|
5960
|
-
warningForeground: "#0d1117",
|
|
5961
|
-
chip: "#1c2128",
|
|
5962
|
-
chipForeground: "#58a6ff",
|
|
5963
|
-
border: "#30363d",
|
|
5964
|
-
input: "#21262d",
|
|
5965
|
-
ring: "#00d9ff",
|
|
5966
|
-
toggleTrack: "#30363d",
|
|
5967
|
-
toggleTrackForeground: "#c9d1d9",
|
|
5968
|
-
inputHover: "#00d9ff",
|
|
5969
|
-
chart1: "#00d9ff",
|
|
5970
|
-
chart2: "#ff00ff",
|
|
5971
|
-
chart3: "#00ff88",
|
|
5972
|
-
chart4: "#ffd93d",
|
|
5973
|
-
chart5: "#58a6ff",
|
|
5974
|
-
chart6: "#ff6b6b",
|
|
5975
|
-
chart7: "#4ecdc4",
|
|
5976
|
-
chart8: "#a855f7",
|
|
5977
|
-
chart9: "#fb923c",
|
|
5978
|
-
chart10: "#38bdf8",
|
|
5979
|
-
chart11: "#f472b6",
|
|
5980
|
-
chart12: "#34d399",
|
|
5981
|
-
radius: "0.5rem"
|
|
5982
|
-
};
|
|
5983
|
-
var OCEAN_THEME = {
|
|
5984
|
-
id: "ocean",
|
|
5985
|
-
name: "Ocean",
|
|
5986
|
-
description: "Calming blues and teals inspired by the deep sea",
|
|
5987
|
-
author: "Leapfrog",
|
|
5988
|
-
background: "#0a1929",
|
|
5989
|
-
foreground: "#e3f2fd",
|
|
5990
|
-
card: "#132f4c",
|
|
5991
|
-
cardForeground: "#e3f2fd",
|
|
5992
|
-
popover: "#0f2540",
|
|
5993
|
-
popoverForeground: "#e3f2fd",
|
|
5994
|
-
primary: "#2196f3",
|
|
5995
|
-
primaryForeground: "#ffffff",
|
|
5996
|
-
accent: "#00bcd4",
|
|
5997
|
-
accentForeground: "#0a1929",
|
|
5998
|
-
secondary: "#1565c0",
|
|
5999
|
-
secondaryForeground: "#ffffff",
|
|
6000
|
-
muted: "#1e3a5f",
|
|
6001
|
-
mutedForeground: "#90caf9",
|
|
6002
|
-
destructive: "#f44336",
|
|
6003
|
-
destructiveForeground: "#ffffff",
|
|
6004
|
-
success: "#4caf50",
|
|
6005
|
-
successForeground: "#ffffff",
|
|
6006
|
-
warning: "#ff9800",
|
|
6007
|
-
warningForeground: "#ffffff",
|
|
6008
|
-
chip: "#1565c0",
|
|
6009
|
-
chipForeground: "#bbdefb",
|
|
6010
|
-
border: "#1e3a5f",
|
|
6011
|
-
input: "#1e3a5f",
|
|
6012
|
-
ring: "#2196f3",
|
|
6013
|
-
toggleTrack: "#264a6e",
|
|
6014
|
-
toggleTrackForeground: "#e3f2fd",
|
|
6015
|
-
inputHover: "#2196f3",
|
|
6016
|
-
chart1: "#2196f3",
|
|
6017
|
-
chart2: "#00bcd4",
|
|
6018
|
-
chart3: "#03a9f4",
|
|
6019
|
-
chart4: "#0288d1",
|
|
6020
|
-
chart5: "#0277bd",
|
|
6021
|
-
chart6: "#26c6da",
|
|
6022
|
-
chart7: "#42a5f5",
|
|
6023
|
-
chart8: "#66bb6a",
|
|
6024
|
-
chart9: "#ffb74d",
|
|
6025
|
-
chart10: "#ef5350",
|
|
6026
|
-
chart11: "#ab47bc",
|
|
6027
|
-
chart12: "#78909c",
|
|
6028
|
-
radius: "0.5rem"
|
|
6029
|
-
};
|
|
6030
|
-
var SUNSET_THEME = {
|
|
6031
|
-
id: "sunset",
|
|
6032
|
-
name: "Sunset",
|
|
6033
|
-
description: "Warm oranges and purples like a beautiful sunset",
|
|
6034
|
-
author: "Leapfrog",
|
|
6035
|
-
background: "#1a0d1a",
|
|
6036
|
-
foreground: "#ffe0e6",
|
|
6037
|
-
card: "#2d1a2d",
|
|
6038
|
-
cardForeground: "#ffe0e6",
|
|
6039
|
-
popover: "#241424",
|
|
6040
|
-
popoverForeground: "#ffe0e6",
|
|
6041
|
-
primary: "#ff6b35",
|
|
6042
|
-
primaryForeground: "#ffffff",
|
|
6043
|
-
accent: "#c44569",
|
|
6044
|
-
accentForeground: "#ffffff",
|
|
6045
|
-
secondary: "#f7931e",
|
|
6046
|
-
secondaryForeground: "#1a0d1a",
|
|
6047
|
-
muted: "#3d2a3d",
|
|
6048
|
-
mutedForeground: "#ffb3c1",
|
|
6049
|
-
destructive: "#e63946",
|
|
6050
|
-
destructiveForeground: "#ffffff",
|
|
6051
|
-
success: "#06d6a0",
|
|
6052
|
-
successForeground: "#1a0d1a",
|
|
6053
|
-
warning: "#ffb703",
|
|
6054
|
-
warningForeground: "#1a0d1a",
|
|
6055
|
-
chip: "#3d2a3d",
|
|
6056
|
-
chipForeground: "#ffb3c1",
|
|
6057
|
-
border: "#241424",
|
|
6058
|
-
input: "#241424",
|
|
6059
|
-
ring: "#ff6b35",
|
|
6060
|
-
toggleTrack: "#3d2a3d",
|
|
6061
|
-
toggleTrackForeground: "#ffe0e6",
|
|
6062
|
-
inputHover: "#ff6b35",
|
|
6063
|
-
chart1: "#ff6b35",
|
|
6064
|
-
chart2: "#c44569",
|
|
6065
|
-
chart3: "#f7931e",
|
|
6066
|
-
chart4: "#ffb703",
|
|
6067
|
-
chart5: "#ff8c42",
|
|
6068
|
-
chart6: "#06d6a0",
|
|
6069
|
-
chart7: "#118ab2",
|
|
6070
|
-
chart8: "#ef476f",
|
|
6071
|
-
chart9: "#ffd166",
|
|
6072
|
-
chart10: "#073b4c",
|
|
6073
|
-
chart11: "#8338ec",
|
|
6074
|
-
chart12: "#3a86ff",
|
|
6075
|
-
radius: "0.5rem"
|
|
6076
|
-
};
|
|
6077
|
-
var FOREST_THEME = {
|
|
6078
|
-
id: "forest",
|
|
6079
|
-
name: "Forest",
|
|
6080
|
-
description: "Deep greens and browns like an ancient forest",
|
|
6081
|
-
author: "Leapfrog",
|
|
6082
|
-
background: "#0d1b0d",
|
|
6083
|
-
foreground: "#e8f5e9",
|
|
6084
|
-
card: "#1a2e1a",
|
|
6085
|
-
cardForeground: "#e8f5e9",
|
|
6086
|
-
popover: "#152515",
|
|
6087
|
-
popoverForeground: "#e8f5e9",
|
|
6088
|
-
primary: "#2e7d32",
|
|
6089
|
-
primaryForeground: "#ffffff",
|
|
6090
|
-
accent: "#558b2f",
|
|
6091
|
-
accentForeground: "#ffffff",
|
|
6092
|
-
secondary: "#1b5e20",
|
|
6093
|
-
secondaryForeground: "#e8f5e9",
|
|
6094
|
-
muted: "#2d4a2d",
|
|
6095
|
-
mutedForeground: "#a5d6a7",
|
|
6096
|
-
destructive: "#c62828",
|
|
6097
|
-
destructiveForeground: "#ffffff",
|
|
6098
|
-
success: "#4caf50",
|
|
6099
|
-
successForeground: "#ffffff",
|
|
6100
|
-
warning: "#f57c00",
|
|
6101
|
-
warningForeground: "#ffffff",
|
|
6102
|
-
chip: "#2d4a2d",
|
|
6103
|
-
chipForeground: "#c8e6c9",
|
|
6104
|
-
border: "#1b5e20",
|
|
6105
|
-
input: "#1a2e1a",
|
|
6106
|
-
ring: "#2e7d32",
|
|
6107
|
-
toggleTrack: "#2d4a2d",
|
|
6108
|
-
toggleTrackForeground: "#e8f5e9",
|
|
6109
|
-
inputHover: "#2e7d32",
|
|
6110
|
-
chart1: "#2e7d32",
|
|
6111
|
-
chart2: "#388e3c",
|
|
6112
|
-
chart3: "#43a047",
|
|
6113
|
-
chart4: "#66bb6a",
|
|
6114
|
-
chart5: "#81c784",
|
|
6115
|
-
chart6: "#a5d6a7",
|
|
6116
|
-
chart7: "#c8e6c9",
|
|
6117
|
-
chart8: "#ffb74d",
|
|
6118
|
-
chart9: "#4db6ac",
|
|
6119
|
-
chart10: "#7986cb",
|
|
6120
|
-
chart11: "#e57373",
|
|
6121
|
-
chart12: "#64b5f6",
|
|
5802
|
+
var OPTILOGIC_DARK_THEME = {
|
|
5803
|
+
id: "optilogic-dark",
|
|
5804
|
+
name: "Optilogic Dark",
|
|
5805
|
+
description: "Optilogic branded dark theme with signature green",
|
|
5806
|
+
author: "Optilogic",
|
|
5807
|
+
background: "#042926",
|
|
5808
|
+
foreground: "#E0E7E6",
|
|
5809
|
+
card: "#0A3F34",
|
|
5810
|
+
cardForeground: "#E0E7E6",
|
|
5811
|
+
popover: "#0A3F34",
|
|
5812
|
+
popoverForeground: "#E0E7E6",
|
|
5813
|
+
primary: "#23EF6A",
|
|
5814
|
+
primaryForeground: "#042926",
|
|
5815
|
+
accent: "#23EF6A",
|
|
5816
|
+
accentForeground: "#042926",
|
|
5817
|
+
secondary: "#0D4D3F",
|
|
5818
|
+
secondaryForeground: "#E0E7E6",
|
|
5819
|
+
muted: "#0D4D3F",
|
|
5820
|
+
mutedForeground: "#9CB5B0",
|
|
5821
|
+
destructive: "#EF4444",
|
|
5822
|
+
destructiveForeground: "#FFFFFF",
|
|
5823
|
+
success: "#23EF6A",
|
|
5824
|
+
successForeground: "#042926",
|
|
5825
|
+
warning: "#FBBF24",
|
|
5826
|
+
warningForeground: "#042926",
|
|
5827
|
+
chip: "#0D4D3F",
|
|
5828
|
+
chipForeground: "#A7D5CA",
|
|
5829
|
+
border: "#1A5C4C",
|
|
5830
|
+
input: "#1A5C4C",
|
|
5831
|
+
ring: "#23EF6A",
|
|
5832
|
+
popoverBorder: "#237A64",
|
|
5833
|
+
divider: "#1A5C4C",
|
|
5834
|
+
toggleTrack: "#1A5C4C",
|
|
5835
|
+
toggleTrackForeground: "#E0E7E6",
|
|
5836
|
+
inputHover: "#23EF6A",
|
|
5837
|
+
chart1: "#23EF6A",
|
|
5838
|
+
chart2: "#3B82F6",
|
|
5839
|
+
chart3: "#FBBF24",
|
|
5840
|
+
chart4: "#F97316",
|
|
5841
|
+
chart5: "#A78BFA",
|
|
5842
|
+
chart6: "#EF4444",
|
|
5843
|
+
chart7: "#06B6D4",
|
|
5844
|
+
chart8: "#EC4899",
|
|
5845
|
+
chart9: "#84CC16",
|
|
5846
|
+
chart10: "#14B8A6",
|
|
5847
|
+
chart11: "#F59E0B",
|
|
5848
|
+
chart12: "#8B5CF6",
|
|
6122
5849
|
radius: "0.5rem"
|
|
6123
5850
|
};
|
|
6124
|
-
var
|
|
6125
|
-
id: "
|
|
6126
|
-
name: "
|
|
6127
|
-
description: "
|
|
6128
|
-
author: "
|
|
6129
|
-
background: "#
|
|
6130
|
-
foreground: "#
|
|
6131
|
-
card: "#
|
|
6132
|
-
cardForeground: "#
|
|
6133
|
-
popover: "#
|
|
6134
|
-
popoverForeground: "#
|
|
6135
|
-
primary: "#
|
|
6136
|
-
primaryForeground: "#
|
|
6137
|
-
accent: "#
|
|
6138
|
-
accentForeground: "#
|
|
6139
|
-
secondary: "#
|
|
6140
|
-
secondaryForeground: "#
|
|
6141
|
-
muted: "#
|
|
6142
|
-
mutedForeground: "#
|
|
6143
|
-
destructive: "#
|
|
6144
|
-
destructiveForeground: "#
|
|
6145
|
-
success: "#
|
|
6146
|
-
successForeground: "#
|
|
6147
|
-
warning: "#
|
|
6148
|
-
warningForeground: "#
|
|
6149
|
-
chip: "#
|
|
6150
|
-
chipForeground: "#
|
|
6151
|
-
border: "#
|
|
6152
|
-
input: "#
|
|
6153
|
-
ring: "#
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
5851
|
+
var MODERN_LIGHT_THEME = {
|
|
5852
|
+
id: "modern-light",
|
|
5853
|
+
name: "Modern Light",
|
|
5854
|
+
description: "Clean and modern light theme with blue accents",
|
|
5855
|
+
author: "opti-ui",
|
|
5856
|
+
background: "#FFFFFF",
|
|
5857
|
+
foreground: "#1A1A1A",
|
|
5858
|
+
card: "#F8F9FA",
|
|
5859
|
+
cardForeground: "#1A1A1A",
|
|
5860
|
+
popover: "#FFFFFF",
|
|
5861
|
+
popoverForeground: "#1A1A1A",
|
|
5862
|
+
primary: "#2563EB",
|
|
5863
|
+
primaryForeground: "#FFFFFF",
|
|
5864
|
+
accent: "#E9ECEF",
|
|
5865
|
+
accentForeground: "#1A1A1A",
|
|
5866
|
+
secondary: "#F1F3F5",
|
|
5867
|
+
secondaryForeground: "#1A1A1A",
|
|
5868
|
+
muted: "#E9ECEF",
|
|
5869
|
+
mutedForeground: "#6C757D",
|
|
5870
|
+
destructive: "#DC3545",
|
|
5871
|
+
destructiveForeground: "#FFFFFF",
|
|
5872
|
+
success: "#28A745",
|
|
5873
|
+
successForeground: "#FFFFFF",
|
|
5874
|
+
warning: "#FFC107",
|
|
5875
|
+
warningForeground: "#1A1A1A",
|
|
5876
|
+
chip: "#E9ECEF",
|
|
5877
|
+
chipForeground: "#495057",
|
|
5878
|
+
border: "#DEE2E6",
|
|
5879
|
+
input: "#DEE2E6",
|
|
5880
|
+
ring: "#2563EB",
|
|
5881
|
+
popoverBorder: "#DEE2E6",
|
|
5882
|
+
divider: "#DEE2E6",
|
|
5883
|
+
toggleTrack: "#CED4DA",
|
|
5884
|
+
toggleTrackForeground: "#FFFFFF",
|
|
5885
|
+
inputHover: "#6C757D",
|
|
5886
|
+
chart1: "#2563EB",
|
|
5887
|
+
chart2: "#16A34A",
|
|
5888
|
+
chart3: "#EA580C",
|
|
5889
|
+
chart4: "#9333EA",
|
|
5890
|
+
chart5: "#DC2626",
|
|
5891
|
+
chart6: "#0891B2",
|
|
5892
|
+
chart7: "#CA8A04",
|
|
5893
|
+
chart8: "#DB2777",
|
|
5894
|
+
chart9: "#4F46E5",
|
|
5895
|
+
chart10: "#059669",
|
|
5896
|
+
chart11: "#D97706",
|
|
5897
|
+
chart12: "#7C3AED",
|
|
6169
5898
|
radius: "0.5rem"
|
|
6170
5899
|
};
|
|
6171
|
-
var MINIMALIST_LIGHT_THEME =
|
|
6172
|
-
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
5900
|
+
var MINIMALIST_LIGHT_THEME = MODERN_LIGHT_THEME;
|
|
5901
|
+
var MODERN_DARK_THEME = {
|
|
5902
|
+
id: "modern-dark",
|
|
5903
|
+
name: "Modern Dark",
|
|
5904
|
+
description: "Clean, neutral dark theme with blue accents",
|
|
5905
|
+
author: "opti-ui",
|
|
5906
|
+
background: "#09090B",
|
|
5907
|
+
foreground: "#FAFAFA",
|
|
5908
|
+
card: "#18181B",
|
|
5909
|
+
cardForeground: "#FAFAFA",
|
|
5910
|
+
popover: "#18181B",
|
|
5911
|
+
popoverForeground: "#FAFAFA",
|
|
5912
|
+
primary: "#3B82F6",
|
|
5913
|
+
primaryForeground: "#FFFFFF",
|
|
5914
|
+
accent: "#27272A",
|
|
5915
|
+
accentForeground: "#FAFAFA",
|
|
5916
|
+
secondary: "#27272A",
|
|
5917
|
+
secondaryForeground: "#FAFAFA",
|
|
5918
|
+
muted: "#27272A",
|
|
5919
|
+
mutedForeground: "#A1A1AA",
|
|
5920
|
+
destructive: "#EF4444",
|
|
5921
|
+
destructiveForeground: "#FFFFFF",
|
|
5922
|
+
success: "#22C55E",
|
|
5923
|
+
successForeground: "#FFFFFF",
|
|
5924
|
+
warning: "#EAB308",
|
|
5925
|
+
warningForeground: "#09090B",
|
|
5926
|
+
chip: "#27272A",
|
|
5927
|
+
chipForeground: "#D4D4D8",
|
|
5928
|
+
border: "#3F3F46",
|
|
5929
|
+
input: "#3F3F46",
|
|
5930
|
+
ring: "#3B82F6",
|
|
5931
|
+
popoverBorder: "#52525B",
|
|
5932
|
+
divider: "#3F3F46",
|
|
5933
|
+
toggleTrack: "#3F3F46",
|
|
5934
|
+
toggleTrackForeground: "#FAFAFA",
|
|
5935
|
+
inputHover: "#3B82F6",
|
|
5936
|
+
chart1: "#3B82F6",
|
|
5937
|
+
chart2: "#22C55E",
|
|
5938
|
+
chart3: "#F59E0B",
|
|
5939
|
+
chart4: "#EF4444",
|
|
5940
|
+
chart5: "#A855F7",
|
|
5941
|
+
chart6: "#14B8A6",
|
|
5942
|
+
chart7: "#F97316",
|
|
5943
|
+
chart8: "#EC4899",
|
|
5944
|
+
chart9: "#0EA5E9",
|
|
5945
|
+
chart10: "#EAB308",
|
|
5946
|
+
chart11: "#10B981",
|
|
5947
|
+
chart12: "#C084FC",
|
|
6216
5948
|
radius: "0.5rem"
|
|
6217
5949
|
};
|
|
6218
5950
|
var DARK_ELEGANT_THEME = {
|
|
6219
5951
|
id: "dark-elegant",
|
|
6220
5952
|
name: "Dark Elegant",
|
|
6221
5953
|
description: "Sophisticated dark mode with refined colors",
|
|
6222
|
-
author: "
|
|
5954
|
+
author: "opti-ui",
|
|
6223
5955
|
background: "#121212",
|
|
6224
|
-
foreground: "#
|
|
6225
|
-
card: "#
|
|
6226
|
-
cardForeground: "#
|
|
6227
|
-
popover: "#
|
|
6228
|
-
popoverForeground: "#
|
|
6229
|
-
primary: "#
|
|
5956
|
+
foreground: "#E0E0E0",
|
|
5957
|
+
card: "#1E1E1E",
|
|
5958
|
+
cardForeground: "#E0E0E0",
|
|
5959
|
+
popover: "#1E1E1E",
|
|
5960
|
+
popoverForeground: "#E0E0E0",
|
|
5961
|
+
primary: "#BB86FC",
|
|
6230
5962
|
primaryForeground: "#121212",
|
|
6231
|
-
accent: "#
|
|
5963
|
+
accent: "#03DAC6",
|
|
6232
5964
|
accentForeground: "#121212",
|
|
6233
|
-
secondary: "#
|
|
6234
|
-
secondaryForeground: "#
|
|
6235
|
-
muted: "#
|
|
6236
|
-
mutedForeground: "#
|
|
6237
|
-
destructive: "#
|
|
6238
|
-
destructiveForeground: "#
|
|
6239
|
-
success: "#
|
|
6240
|
-
successForeground: "#
|
|
6241
|
-
warning: "#
|
|
6242
|
-
warningForeground: "#
|
|
6243
|
-
chip: "#
|
|
6244
|
-
chipForeground: "#
|
|
6245
|
-
border: "#
|
|
6246
|
-
input: "#
|
|
6247
|
-
ring: "#
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
5965
|
+
secondary: "#2D2D2D",
|
|
5966
|
+
secondaryForeground: "#E0E0E0",
|
|
5967
|
+
muted: "#2D2D2D",
|
|
5968
|
+
mutedForeground: "#9E9E9E",
|
|
5969
|
+
destructive: "#CF6679",
|
|
5970
|
+
destructiveForeground: "#FFFFFF",
|
|
5971
|
+
success: "#4CAF50",
|
|
5972
|
+
successForeground: "#FFFFFF",
|
|
5973
|
+
warning: "#FF9800",
|
|
5974
|
+
warningForeground: "#121212",
|
|
5975
|
+
chip: "#2D2D2D",
|
|
5976
|
+
chipForeground: "#B39DDB",
|
|
5977
|
+
border: "#404040",
|
|
5978
|
+
input: "#404040",
|
|
5979
|
+
ring: "#BB86FC",
|
|
5980
|
+
popoverBorder: "#525252",
|
|
5981
|
+
divider: "#404040",
|
|
5982
|
+
toggleTrack: "#404040",
|
|
5983
|
+
toggleTrackForeground: "#E0E0E0",
|
|
5984
|
+
inputHover: "#BB86FC",
|
|
5985
|
+
chart1: "#BB86FC",
|
|
5986
|
+
chart2: "#03DAC6",
|
|
5987
|
+
chart3: "#4CAF50",
|
|
5988
|
+
chart4: "#FF9800",
|
|
5989
|
+
chart5: "#CF6679",
|
|
5990
|
+
chart6: "#64B5F6",
|
|
5991
|
+
chart7: "#81C784",
|
|
5992
|
+
chart8: "#FFB74D",
|
|
5993
|
+
chart9: "#E57373",
|
|
5994
|
+
chart10: "#7986CB",
|
|
5995
|
+
chart11: "#4DB6AC",
|
|
5996
|
+
chart12: "#F06292",
|
|
6263
5997
|
radius: "0.5rem"
|
|
6264
5998
|
};
|
|
6265
|
-
var PRESET_THEMES = [
|
|
6266
|
-
var ALL_THEMES = [
|
|
5999
|
+
var PRESET_THEMES = [
|
|
6267
6000
|
OPTILOGIC_LEGACY_THEME,
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
SUNSET_THEME,
|
|
6273
|
-
FOREST_THEME,
|
|
6274
|
-
CYBERPUNK_THEME,
|
|
6275
|
-
MINIMALIST_LIGHT_THEME,
|
|
6276
|
-
DARK_ELEGANT_THEME,
|
|
6277
|
-
GREEN_THEME
|
|
6001
|
+
OPTILOGIC_DARK_THEME,
|
|
6002
|
+
MODERN_LIGHT_THEME,
|
|
6003
|
+
MODERN_DARK_THEME,
|
|
6004
|
+
DARK_ELEGANT_THEME
|
|
6278
6005
|
];
|
|
6006
|
+
var ALL_THEMES = PRESET_THEMES;
|
|
6279
6007
|
function getPresetTheme(id) {
|
|
6280
6008
|
return ALL_THEMES.find((theme) => theme.id === id);
|
|
6281
6009
|
}
|
|
@@ -6345,6 +6073,8 @@ function themeToHsl(theme) {
|
|
|
6345
6073
|
border: hexToHsl(theme.border),
|
|
6346
6074
|
input: hexToHsl(theme.input),
|
|
6347
6075
|
ring: hexToHsl(theme.ring),
|
|
6076
|
+
popoverBorder: theme.popoverBorder ? hexToHsl(theme.popoverBorder) : void 0,
|
|
6077
|
+
divider: theme.divider ? hexToHsl(theme.divider) : void 0,
|
|
6348
6078
|
toggleTrack: theme.toggleTrack ? hexToHsl(theme.toggleTrack) : void 0,
|
|
6349
6079
|
toggleTrackForeground: theme.toggleTrackForeground ? hexToHsl(theme.toggleTrackForeground) : void 0,
|
|
6350
6080
|
inputHover: theme.inputHover ? hexToHsl(theme.inputHover) : void 0,
|
|
@@ -6405,6 +6135,14 @@ function applyTheme(theme, targetElement) {
|
|
|
6405
6135
|
element.style.setProperty("--border", hslTheme.border);
|
|
6406
6136
|
element.style.setProperty("--input", hslTheme.input);
|
|
6407
6137
|
element.style.setProperty("--ring", hslTheme.ring);
|
|
6138
|
+
element.style.setProperty(
|
|
6139
|
+
"--popover-border",
|
|
6140
|
+
hslTheme.popoverBorder ?? hslTheme.border
|
|
6141
|
+
);
|
|
6142
|
+
element.style.setProperty(
|
|
6143
|
+
"--divider",
|
|
6144
|
+
hslTheme.divider ?? hslTheme.border
|
|
6145
|
+
);
|
|
6408
6146
|
element.style.setProperty(
|
|
6409
6147
|
"--toggle-track",
|
|
6410
6148
|
hslTheme.toggleTrack ?? hslTheme.muted
|
|
@@ -6529,6 +6267,8 @@ function areThemesEqual(theme1, theme2) {
|
|
|
6529
6267
|
"border",
|
|
6530
6268
|
"input",
|
|
6531
6269
|
"ring",
|
|
6270
|
+
"popoverBorder",
|
|
6271
|
+
"divider",
|
|
6532
6272
|
"toggleTrack",
|
|
6533
6273
|
"toggleTrackForeground",
|
|
6534
6274
|
"inputHover",
|
|
@@ -6853,7 +6593,7 @@ function MenuItem({ item, onClose, depth = 0 }) {
|
|
|
6853
6593
|
{
|
|
6854
6594
|
className: cn(
|
|
6855
6595
|
"fixed z-[60] min-w-[180px] max-w-[280px]",
|
|
6856
|
-
"rounded-md border border-border",
|
|
6596
|
+
"rounded-md border border-popover-border",
|
|
6857
6597
|
"bg-popover text-popover-foreground",
|
|
6858
6598
|
"shadow-lg",
|
|
6859
6599
|
"animate-in fade-in-0 zoom-in-95",
|
|
@@ -6936,7 +6676,7 @@ function ContextMenu({
|
|
|
6936
6676
|
ref: menuRef,
|
|
6937
6677
|
className: cn(
|
|
6938
6678
|
"fixed z-50 min-w-[180px] max-w-[280px]",
|
|
6939
|
-
"rounded-md border border-border",
|
|
6679
|
+
"rounded-md border border-popover-border",
|
|
6940
6680
|
"bg-popover text-popover-foreground",
|
|
6941
6681
|
"shadow-lg",
|
|
6942
6682
|
"animate-in fade-in-0 zoom-in-95",
|
|
@@ -7710,18 +7450,80 @@ function CsvRenderer({ content, className }) {
|
|
|
7710
7450
|
) });
|
|
7711
7451
|
}
|
|
7712
7452
|
CsvRenderer.displayName = "CsvRenderer";
|
|
7453
|
+
var CSP_POLICY = [
|
|
7454
|
+
"default-src 'none'",
|
|
7455
|
+
"script-src 'unsafe-inline'",
|
|
7456
|
+
"style-src 'unsafe-inline'",
|
|
7457
|
+
"img-src data: blob:"
|
|
7458
|
+
].join("; ");
|
|
7459
|
+
var PERMISSIONS_POLICY = [
|
|
7460
|
+
"camera=()",
|
|
7461
|
+
"microphone=()",
|
|
7462
|
+
"geolocation=()",
|
|
7463
|
+
"payment=()",
|
|
7464
|
+
"usb=()",
|
|
7465
|
+
"display-capture=()",
|
|
7466
|
+
"fullscreen=()",
|
|
7467
|
+
"autoplay=()",
|
|
7468
|
+
"web-share=()",
|
|
7469
|
+
"screen-wake-lock=()",
|
|
7470
|
+
"xr-spatial-tracking=()",
|
|
7471
|
+
"magnetometer=()",
|
|
7472
|
+
"gyroscope=()",
|
|
7473
|
+
"accelerometer=()"
|
|
7474
|
+
].join(", ");
|
|
7475
|
+
function buildSandboxedHtml(content) {
|
|
7476
|
+
return `<!DOCTYPE html>
|
|
7477
|
+
<html>
|
|
7478
|
+
<head>
|
|
7479
|
+
<meta http-equiv="Content-Security-Policy" content="${CSP_POLICY}">
|
|
7480
|
+
<script>
|
|
7481
|
+
// Neutralise APIs that the sandbox + CSP can't fully block.
|
|
7482
|
+
// This runs in <head> before any user content in <body>.
|
|
7483
|
+
// Uses Object.defineProperty to make overrides non-configurable
|
|
7484
|
+
// so user scripts cannot restore the original via prototype tricks.
|
|
7485
|
+
(function(){
|
|
7486
|
+
// postMessage: iframe can message parent even without allow-same-origin.
|
|
7487
|
+
// Kill it so content can't probe or spam any future parent listeners.
|
|
7488
|
+
// Also kill parent/top refs as an extra layer.
|
|
7489
|
+
var noop = function(){};
|
|
7490
|
+
try { Object.defineProperty(window, 'postMessage', { value: noop, writable: false, configurable: false }); } catch(e) {}
|
|
7491
|
+
try { Object.defineProperty(window, 'parent', { value: window, writable: false, configurable: false }); } catch(e) {}
|
|
7492
|
+
try { Object.defineProperty(window, 'top', { value: window, writable: false, configurable: false }); } catch(e) {}
|
|
7493
|
+
try { Object.defineProperty(window, 'opener', { value: null, writable: false, configurable: false }); } catch(e) {}
|
|
7494
|
+
|
|
7495
|
+
// RTCPeerConnection: not governed by CSP; could contact a STUN server
|
|
7496
|
+
// over UDP to leak the user's IP. Kill all browser-prefixed variants.
|
|
7497
|
+
var rtcNames = ['RTCPeerConnection', 'webkitRTCPeerConnection', 'mozRTCPeerConnection'];
|
|
7498
|
+
for (var i = 0; i < rtcNames.length; i++) {
|
|
7499
|
+
try { Object.defineProperty(window, rtcNames[i], { value: undefined, writable: false, configurable: false }); } catch(e) {}
|
|
7500
|
+
}
|
|
7501
|
+
})();
|
|
7502
|
+
</script>
|
|
7503
|
+
</head>
|
|
7504
|
+
<body>${content}</body>
|
|
7505
|
+
</html>`;
|
|
7506
|
+
}
|
|
7713
7507
|
function HtmlRenderer({
|
|
7714
7508
|
content,
|
|
7715
7509
|
fileName,
|
|
7716
7510
|
className
|
|
7717
7511
|
}) {
|
|
7512
|
+
const srcDoc = React20.useMemo(
|
|
7513
|
+
() => buildSandboxedHtml(content ?? ""),
|
|
7514
|
+
[content]
|
|
7515
|
+
);
|
|
7516
|
+
const iframeProps = { csp: CSP_POLICY };
|
|
7718
7517
|
return /* @__PURE__ */ jsx(
|
|
7719
7518
|
"iframe",
|
|
7720
7519
|
{
|
|
7721
|
-
srcDoc
|
|
7520
|
+
srcDoc,
|
|
7722
7521
|
sandbox: "allow-scripts",
|
|
7723
7522
|
title: fileName,
|
|
7724
|
-
|
|
7523
|
+
referrerPolicy: "no-referrer",
|
|
7524
|
+
allow: PERMISSIONS_POLICY,
|
|
7525
|
+
className: cn("h-full w-full border-0", className),
|
|
7526
|
+
...iframeProps
|
|
7725
7527
|
}
|
|
7726
7528
|
);
|
|
7727
7529
|
}
|
|
@@ -8085,6 +7887,6 @@ var DataStarIcon = forwardRef(
|
|
|
8085
7887
|
);
|
|
8086
7888
|
DataStarIcon.displayName = "DataStarIcon";
|
|
8087
7889
|
|
|
8088
|
-
export { ALL_THEMES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, Badge, Board, BoardContent, BoardHeader, Button,
|
|
7890
|
+
export { ALL_THEMES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, Badge, Board, BoardContent, BoardHeader, Button, Calendar, Card, CardActions, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardImage, CardList, CardTitle, CellEditor, Checkbox, Chip, CodeRenderer, ConfirmationModal, ContextMenu, CopyButton, CosmicFrogIcon, CsvRenderer, DARK_ELEGANT_THEME, DEFAULT_RENDERERS, DataGrid, DataStarIcon, DataTable, DatePicker, DatePickerInput, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileView, FilterPopover, HeaderCell, HtmlRenderer, IconButton, ImageRenderer, Input, Label, LoadingSpinner, MINIMALIST_LIGHT_THEME, MODERN_DARK_THEME, MODERN_LIGHT_THEME, MarkdownRenderer, Modal, ModalButton, OPTILOGIC_DARK_THEME, OPTILOGIC_LEGACY_THEME, OptilogicLogo, OptilogicLogoWithText, PRESET_THEMES, PlainTextRenderer, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ResizablePanel, ResizeHandle, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, Separator, Skeleton, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemePicker, Toaster, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, detectContentType, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getFileExtension, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, isTextContentType, isUrlContentType, labelVariants, loadingSpinnerVariants, mergeRenderers, resolveRenderer, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContentType, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
|
|
8089
7891
|
//# sourceMappingURL=index.js.map
|
|
8090
7892
|
//# sourceMappingURL=index.js.map
|