@svgrid/enterprise 2.0.1 → 2.0.2
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/cdn/svgrid-enterprise.svelte-external.js +1855 -2461
- package/dist/node/studio.js +20 -616
- package/package.json +3 -3
- package/src/SvGridEditPanel.svelte +1 -0
- package/src/studio/themes.ts +55 -172
package/dist/node/studio.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defaultThemePreset, getThemePreset, resolveThemeTokens as resolveThemeTokens$1, themePresets } from "@svgrid/grid/themes";
|
|
1
2
|
//#region src/schema.ts
|
|
2
3
|
/** `first_name` / `firstName` / `first-name` -> `First Name`. */
|
|
3
4
|
function titleCase$1(field) {
|
|
@@ -3817,629 +3818,32 @@ function isProjectValid(project) {
|
|
|
3817
3818
|
}
|
|
3818
3819
|
//#endregion
|
|
3819
3820
|
//#region src/studio/themes.ts
|
|
3821
|
+
/**
|
|
3822
|
+
* The Studio look-and-feel themes: a `ProjectTheme`-aware wrapper around
|
|
3823
|
+
* `@svgrid/grid`'s built-in design-system presets (shadcn/ui, Tailwind,
|
|
3824
|
+
* Material 3, Excel, Fluent 2, ...) - the single source of truth for these
|
|
3825
|
+
* tokens, also used directly (as plain CSS) by app code that isn't going
|
|
3826
|
+
* through Studio's project model.
|
|
3827
|
+
*
|
|
3828
|
+
* Picking a preset (and a light/dark mode) restyles the WHOLE generated app -
|
|
3829
|
+
* shell, grids, charts, KPIs, forms - not just the accent.
|
|
3830
|
+
*
|
|
3831
|
+
* Pure + node-safe (studio subtree): plain data + helpers, so the same tokens
|
|
3832
|
+
* drive the browser preview and the emitted `+layout.svelte` / `app.css`.
|
|
3833
|
+
*/
|
|
3820
3834
|
/** The built-in Studio themes, in gallery order (default first). */
|
|
3821
|
-
var studioThemes =
|
|
3822
|
-
{
|
|
3823
|
-
id: "shadcn",
|
|
3824
|
-
name: "shadcn/ui",
|
|
3825
|
-
radius: 6,
|
|
3826
|
-
font: "ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif",
|
|
3827
|
-
light: {
|
|
3828
|
-
bg: "#ffffff",
|
|
3829
|
-
fg: "#09090b",
|
|
3830
|
-
muted: "#71717a",
|
|
3831
|
-
border: "#e4e4e7",
|
|
3832
|
-
headerBg: "#fafafa",
|
|
3833
|
-
headerFg: "#71717a",
|
|
3834
|
-
accent: "#18181b",
|
|
3835
|
-
rowAlt: "#ffffff",
|
|
3836
|
-
rowHover: "#f4f4f5",
|
|
3837
|
-
selectionBg: "#f4f4f5"
|
|
3838
|
-
},
|
|
3839
|
-
dark: {
|
|
3840
|
-
bg: "#0a0a0a",
|
|
3841
|
-
fg: "#fafafa",
|
|
3842
|
-
muted: "#a1a1aa",
|
|
3843
|
-
border: "#27272a",
|
|
3844
|
-
headerBg: "#18181b",
|
|
3845
|
-
headerFg: "#a1a1aa",
|
|
3846
|
-
accent: "#fafafa",
|
|
3847
|
-
rowAlt: "#0a0a0a",
|
|
3848
|
-
rowHover: "#18181b",
|
|
3849
|
-
selectionBg: "#27272a"
|
|
3850
|
-
}
|
|
3851
|
-
},
|
|
3852
|
-
{
|
|
3853
|
-
id: "tailwind",
|
|
3854
|
-
name: "Tailwind",
|
|
3855
|
-
radius: 6,
|
|
3856
|
-
font: "Inter, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", sans-serif",
|
|
3857
|
-
light: {
|
|
3858
|
-
bg: "#ffffff",
|
|
3859
|
-
fg: "#0f172a",
|
|
3860
|
-
muted: "#64748b",
|
|
3861
|
-
border: "#e2e8f0",
|
|
3862
|
-
headerBg: "#f8fafc",
|
|
3863
|
-
headerFg: "#0f172a",
|
|
3864
|
-
accent: "#4f46e5",
|
|
3865
|
-
rowAlt: "#ffffff",
|
|
3866
|
-
rowHover: "#f1f5f9",
|
|
3867
|
-
selectionBg: "#e0e7ff"
|
|
3868
|
-
},
|
|
3869
|
-
dark: {
|
|
3870
|
-
bg: "#0f172a",
|
|
3871
|
-
fg: "#f8fafc",
|
|
3872
|
-
muted: "#94a3b8",
|
|
3873
|
-
border: "#334155",
|
|
3874
|
-
headerBg: "#1e293b",
|
|
3875
|
-
headerFg: "#f8fafc",
|
|
3876
|
-
accent: "#818cf8",
|
|
3877
|
-
rowAlt: "#0f172a",
|
|
3878
|
-
rowHover: "#1e293b",
|
|
3879
|
-
selectionBg: "#312e81"
|
|
3880
|
-
}
|
|
3881
|
-
},
|
|
3882
|
-
{
|
|
3883
|
-
id: "material",
|
|
3884
|
-
name: "Material 3",
|
|
3885
|
-
radius: 8,
|
|
3886
|
-
font: "\"Roboto Flex\", Roboto, \"Segoe UI\", system-ui, sans-serif",
|
|
3887
|
-
light: {
|
|
3888
|
-
bg: "#fef7ff",
|
|
3889
|
-
fg: "#1d1b20",
|
|
3890
|
-
muted: "#49454f",
|
|
3891
|
-
border: "#cac4d0",
|
|
3892
|
-
headerBg: "#f3edf7",
|
|
3893
|
-
headerFg: "#1d1b20",
|
|
3894
|
-
accent: "#6750a4",
|
|
3895
|
-
rowAlt: "#fffbfe",
|
|
3896
|
-
rowHover: "#ece6f0",
|
|
3897
|
-
selectionBg: "#e8def8"
|
|
3898
|
-
},
|
|
3899
|
-
dark: {
|
|
3900
|
-
bg: "#141218",
|
|
3901
|
-
fg: "#e6e0e9",
|
|
3902
|
-
muted: "#cac4d0",
|
|
3903
|
-
border: "#49454f",
|
|
3904
|
-
headerBg: "#211f26",
|
|
3905
|
-
headerFg: "#e6e0e9",
|
|
3906
|
-
accent: "#d0bcff",
|
|
3907
|
-
rowAlt: "#141218",
|
|
3908
|
-
rowHover: "#2b2930",
|
|
3909
|
-
selectionBg: "#4a4458"
|
|
3910
|
-
}
|
|
3911
|
-
},
|
|
3912
|
-
{
|
|
3913
|
-
id: "excel",
|
|
3914
|
-
name: "Excel",
|
|
3915
|
-
radius: 0,
|
|
3916
|
-
font: "\"Aptos\", \"Segoe UI\", Calibri, Arial, sans-serif",
|
|
3917
|
-
light: {
|
|
3918
|
-
bg: "#ffffff",
|
|
3919
|
-
fg: "#323130",
|
|
3920
|
-
muted: "#605e5c",
|
|
3921
|
-
border: "#d2d0ce",
|
|
3922
|
-
headerBg: "#f3f2f1",
|
|
3923
|
-
headerFg: "#444444",
|
|
3924
|
-
accent: "#107c41",
|
|
3925
|
-
rowAlt: "#ffffff",
|
|
3926
|
-
rowHover: "#edebe9",
|
|
3927
|
-
selectionBg: "rgba(16, 124, 65, 0.10)"
|
|
3928
|
-
},
|
|
3929
|
-
dark: {
|
|
3930
|
-
bg: "#1b1a19",
|
|
3931
|
-
fg: "#f3f2f1",
|
|
3932
|
-
muted: "#c8c6c4",
|
|
3933
|
-
border: "#3b3a39",
|
|
3934
|
-
headerBg: "#252423",
|
|
3935
|
-
headerFg: "#c8c6c4",
|
|
3936
|
-
accent: "#58c188",
|
|
3937
|
-
rowAlt: "#1b1a19",
|
|
3938
|
-
rowHover: "#323130",
|
|
3939
|
-
selectionBg: "rgba(88, 193, 136, 0.16)"
|
|
3940
|
-
}
|
|
3941
|
-
},
|
|
3942
|
-
{
|
|
3943
|
-
id: "fluent",
|
|
3944
|
-
name: "Fluent 2",
|
|
3945
|
-
radius: 4,
|
|
3946
|
-
font: "\"Segoe UI Variable\", \"Segoe UI\", system-ui, sans-serif",
|
|
3947
|
-
light: {
|
|
3948
|
-
bg: "#ffffff",
|
|
3949
|
-
fg: "#242424",
|
|
3950
|
-
muted: "#616161",
|
|
3951
|
-
border: "#e0e0e0",
|
|
3952
|
-
headerBg: "#f5f5f5",
|
|
3953
|
-
headerFg: "#242424",
|
|
3954
|
-
accent: "#0f6cbd",
|
|
3955
|
-
rowAlt: "#fafafa",
|
|
3956
|
-
rowHover: "#f0f0f0",
|
|
3957
|
-
selectionBg: "#ebebeb"
|
|
3958
|
-
},
|
|
3959
|
-
dark: {
|
|
3960
|
-
bg: "#1f1f1f",
|
|
3961
|
-
fg: "#ffffff",
|
|
3962
|
-
muted: "#d6d6d6",
|
|
3963
|
-
border: "#666666",
|
|
3964
|
-
headerBg: "#141414",
|
|
3965
|
-
headerFg: "#ffffff",
|
|
3966
|
-
accent: "#479ef5",
|
|
3967
|
-
rowAlt: "#1a1a1a",
|
|
3968
|
-
rowHover: "#3d3d3d",
|
|
3969
|
-
selectionBg: "#383838"
|
|
3970
|
-
}
|
|
3971
|
-
},
|
|
3972
|
-
{
|
|
3973
|
-
id: "carbon",
|
|
3974
|
-
name: "Carbon",
|
|
3975
|
-
radius: 0,
|
|
3976
|
-
font: "\"IBM Plex Sans\", \"Helvetica Neue\", Arial, sans-serif",
|
|
3977
|
-
light: {
|
|
3978
|
-
bg: "#ffffff",
|
|
3979
|
-
fg: "#161616",
|
|
3980
|
-
muted: "#525252",
|
|
3981
|
-
border: "#e0e0e0",
|
|
3982
|
-
headerBg: "#e0e0e0",
|
|
3983
|
-
headerFg: "#161616",
|
|
3984
|
-
accent: "#0f62fe",
|
|
3985
|
-
rowAlt: "#f4f4f4",
|
|
3986
|
-
rowHover: "#e8e8e8",
|
|
3987
|
-
selectionBg: "#d0e2ff"
|
|
3988
|
-
},
|
|
3989
|
-
dark: {
|
|
3990
|
-
bg: "#161616",
|
|
3991
|
-
fg: "#f4f4f4",
|
|
3992
|
-
muted: "#c6c6c6",
|
|
3993
|
-
border: "#393939",
|
|
3994
|
-
headerBg: "#393939",
|
|
3995
|
-
headerFg: "#f4f4f4",
|
|
3996
|
-
accent: "#78a9ff",
|
|
3997
|
-
rowAlt: "#262626",
|
|
3998
|
-
rowHover: "#333333",
|
|
3999
|
-
selectionBg: "#393939"
|
|
4000
|
-
}
|
|
4001
|
-
},
|
|
4002
|
-
{
|
|
4003
|
-
id: "sap",
|
|
4004
|
-
name: "SAP Fiori",
|
|
4005
|
-
radius: 6,
|
|
4006
|
-
font: "\"72\", \"72full\", \"Arial\", sans-serif",
|
|
4007
|
-
light: {
|
|
4008
|
-
bg: "#f5f6f7",
|
|
4009
|
-
fg: "#131e29",
|
|
4010
|
-
muted: "#556b82",
|
|
4011
|
-
border: "#e5e5e5",
|
|
4012
|
-
headerBg: "#ffffff",
|
|
4013
|
-
headerFg: "#131e29",
|
|
4014
|
-
accent: "#0070f2",
|
|
4015
|
-
rowAlt: "#f5f6f7",
|
|
4016
|
-
rowHover: "#eaecee",
|
|
4017
|
-
selectionBg: "#ebf8ff"
|
|
4018
|
-
},
|
|
4019
|
-
dark: {
|
|
4020
|
-
bg: "#12171c",
|
|
4021
|
-
fg: "#f5f6f7",
|
|
4022
|
-
muted: "#8396a8",
|
|
4023
|
-
border: "#2e3742",
|
|
4024
|
-
headerBg: "#1d232a",
|
|
4025
|
-
headerFg: "#f5f6f7",
|
|
4026
|
-
accent: "#4db1ff",
|
|
4027
|
-
rowAlt: "#12171c",
|
|
4028
|
-
rowHover: "#222b35",
|
|
4029
|
-
selectionBg: "#1d2d3e"
|
|
4030
|
-
}
|
|
4031
|
-
},
|
|
4032
|
-
{
|
|
4033
|
-
id: "salesforce",
|
|
4034
|
-
name: "Salesforce",
|
|
4035
|
-
radius: 4,
|
|
4036
|
-
font: "\"Salesforce Sans\", \"SF Pro\", Helvetica, Arial, sans-serif",
|
|
4037
|
-
light: {
|
|
4038
|
-
bg: "#ffffff",
|
|
4039
|
-
fg: "#181818",
|
|
4040
|
-
muted: "#757575",
|
|
4041
|
-
border: "#c9c9c9",
|
|
4042
|
-
headerBg: "#f3f3f3",
|
|
4043
|
-
headerFg: "#181818",
|
|
4044
|
-
accent: "#0176d3",
|
|
4045
|
-
rowAlt: "#ffffff",
|
|
4046
|
-
rowHover: "#f3f3f3",
|
|
4047
|
-
selectionBg: "#ecebea"
|
|
4048
|
-
},
|
|
4049
|
-
dark: {
|
|
4050
|
-
bg: "#181818",
|
|
4051
|
-
fg: "#ffffff",
|
|
4052
|
-
muted: "#c9c9c9",
|
|
4053
|
-
border: "#3e3e3c",
|
|
4054
|
-
headerBg: "#2e2e2e",
|
|
4055
|
-
headerFg: "#ffffff",
|
|
4056
|
-
accent: "#1b96ff",
|
|
4057
|
-
rowAlt: "#181818",
|
|
4058
|
-
rowHover: "#2e2e2e",
|
|
4059
|
-
selectionBg: "#1e4d8e"
|
|
4060
|
-
}
|
|
4061
|
-
},
|
|
4062
|
-
{
|
|
4063
|
-
id: "atlassian",
|
|
4064
|
-
name: "Atlassian",
|
|
4065
|
-
radius: 3,
|
|
4066
|
-
font: "\"Charlie Display\", \"Atlassian Sans\", -apple-system, \"Segoe UI\", sans-serif",
|
|
4067
|
-
light: {
|
|
4068
|
-
bg: "#ffffff",
|
|
4069
|
-
fg: "#172b4d",
|
|
4070
|
-
muted: "#44546f",
|
|
4071
|
-
border: "#dcdfe4",
|
|
4072
|
-
headerBg: "#fafbfc",
|
|
4073
|
-
headerFg: "#44546f",
|
|
4074
|
-
accent: "#0c66e4",
|
|
4075
|
-
rowAlt: "#ffffff",
|
|
4076
|
-
rowHover: "#f1f2f4",
|
|
4077
|
-
selectionBg: "#e9f2ff"
|
|
4078
|
-
},
|
|
4079
|
-
dark: {
|
|
4080
|
-
bg: "#1d2125",
|
|
4081
|
-
fg: "#b6c2cf",
|
|
4082
|
-
muted: "#8590a2",
|
|
4083
|
-
border: "#38414a",
|
|
4084
|
-
headerBg: "#22272b",
|
|
4085
|
-
headerFg: "#8590a2",
|
|
4086
|
-
accent: "#579dff",
|
|
4087
|
-
rowAlt: "#1d2125",
|
|
4088
|
-
rowHover: "#2c333a",
|
|
4089
|
-
selectionBg: "#09326c"
|
|
4090
|
-
}
|
|
4091
|
-
},
|
|
4092
|
-
{
|
|
4093
|
-
id: "github",
|
|
4094
|
-
name: "GitHub",
|
|
4095
|
-
radius: 6,
|
|
4096
|
-
font: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif",
|
|
4097
|
-
light: {
|
|
4098
|
-
bg: "#ffffff",
|
|
4099
|
-
fg: "#1f2328",
|
|
4100
|
-
muted: "#59636e",
|
|
4101
|
-
border: "#d1d9e0",
|
|
4102
|
-
headerBg: "#f6f8fa",
|
|
4103
|
-
headerFg: "#59636e",
|
|
4104
|
-
accent: "#0969da",
|
|
4105
|
-
rowAlt: "#ffffff",
|
|
4106
|
-
rowHover: "#f6f8fa",
|
|
4107
|
-
selectionBg: "#ddf4ff"
|
|
4108
|
-
},
|
|
4109
|
-
dark: {
|
|
4110
|
-
bg: "#0d1117",
|
|
4111
|
-
fg: "#f0f6fc",
|
|
4112
|
-
muted: "#9198a1",
|
|
4113
|
-
border: "#3d444d",
|
|
4114
|
-
headerBg: "#151b23",
|
|
4115
|
-
headerFg: "#9198a1",
|
|
4116
|
-
accent: "#4493f8",
|
|
4117
|
-
rowAlt: "#0d1117",
|
|
4118
|
-
rowHover: "#151b23",
|
|
4119
|
-
selectionBg: "rgba(56, 139, 253, 0.10)"
|
|
4120
|
-
}
|
|
4121
|
-
},
|
|
4122
|
-
{
|
|
4123
|
-
id: "antd",
|
|
4124
|
-
name: "Ant Design",
|
|
4125
|
-
radius: 6,
|
|
4126
|
-
font: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"PingFang SC\", sans-serif",
|
|
4127
|
-
light: {
|
|
4128
|
-
bg: "#ffffff",
|
|
4129
|
-
fg: "rgba(0, 0, 0, 0.88)",
|
|
4130
|
-
muted: "rgba(0, 0, 0, 0.65)",
|
|
4131
|
-
border: "#d9d9d9",
|
|
4132
|
-
headerBg: "#fafafa",
|
|
4133
|
-
headerFg: "rgba(0, 0, 0, 0.88)",
|
|
4134
|
-
accent: "#1677ff",
|
|
4135
|
-
rowAlt: "#ffffff",
|
|
4136
|
-
rowHover: "#f5f5f5",
|
|
4137
|
-
selectionBg: "#e6f4ff"
|
|
4138
|
-
},
|
|
4139
|
-
dark: {
|
|
4140
|
-
bg: "#141414",
|
|
4141
|
-
fg: "rgba(255, 255, 255, 0.85)",
|
|
4142
|
-
muted: "rgba(255, 255, 255, 0.65)",
|
|
4143
|
-
border: "#424242",
|
|
4144
|
-
headerBg: "#1f1f1f",
|
|
4145
|
-
headerFg: "rgba(255, 255, 255, 0.85)",
|
|
4146
|
-
accent: "#177ddc",
|
|
4147
|
-
rowAlt: "#141414",
|
|
4148
|
-
rowHover: "#262626",
|
|
4149
|
-
selectionBg: "#111a2c"
|
|
4150
|
-
}
|
|
4151
|
-
},
|
|
4152
|
-
{
|
|
4153
|
-
id: "ag-alpine",
|
|
4154
|
-
name: "Alpine",
|
|
4155
|
-
radius: 3,
|
|
4156
|
-
font: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
|
|
4157
|
-
light: {
|
|
4158
|
-
bg: "#ffffff",
|
|
4159
|
-
fg: "#181d1f",
|
|
4160
|
-
muted: "rgba(24, 29, 31, 0.5)",
|
|
4161
|
-
border: "#babfc7",
|
|
4162
|
-
headerBg: "#f8f8f8",
|
|
4163
|
-
headerFg: "#181d1f",
|
|
4164
|
-
accent: "#2196f3",
|
|
4165
|
-
rowAlt: "#fcfcfc",
|
|
4166
|
-
rowHover: "rgba(33, 150, 243, 0.1)",
|
|
4167
|
-
selectionBg: "rgba(33, 150, 243, 0.3)"
|
|
4168
|
-
},
|
|
4169
|
-
dark: {
|
|
4170
|
-
bg: "#181d1f",
|
|
4171
|
-
fg: "#ffffff",
|
|
4172
|
-
muted: "rgba(255, 255, 255, 0.5)",
|
|
4173
|
-
border: "#68686e",
|
|
4174
|
-
headerBg: "#222628",
|
|
4175
|
-
headerFg: "#ffffff",
|
|
4176
|
-
accent: "#2196f3",
|
|
4177
|
-
rowAlt: "#222628",
|
|
4178
|
-
rowHover: "rgba(33, 150, 243, 0.1)",
|
|
4179
|
-
selectionBg: "rgba(33, 150, 243, 0.3)"
|
|
4180
|
-
}
|
|
4181
|
-
},
|
|
4182
|
-
{
|
|
4183
|
-
id: "bootstrap",
|
|
4184
|
-
name: "Bootstrap 5",
|
|
4185
|
-
radius: 6,
|
|
4186
|
-
font: "system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
|
|
4187
|
-
light: {
|
|
4188
|
-
bg: "#ffffff",
|
|
4189
|
-
fg: "#212529",
|
|
4190
|
-
muted: "#6c757d",
|
|
4191
|
-
border: "#dee2e6",
|
|
4192
|
-
headerBg: "#f8f9fa",
|
|
4193
|
-
headerFg: "#212529",
|
|
4194
|
-
accent: "#0d6efd",
|
|
4195
|
-
rowAlt: "#fcfcfd",
|
|
4196
|
-
rowHover: "#f2f2f2",
|
|
4197
|
-
selectionBg: "#cfe2ff"
|
|
4198
|
-
},
|
|
4199
|
-
dark: {
|
|
4200
|
-
bg: "#212529",
|
|
4201
|
-
fg: "#dee2e6",
|
|
4202
|
-
muted: "#adb5bd",
|
|
4203
|
-
border: "#495057",
|
|
4204
|
-
headerBg: "#2b3035",
|
|
4205
|
-
headerFg: "#dee2e6",
|
|
4206
|
-
accent: "#0d6efd",
|
|
4207
|
-
rowAlt: "#25292e",
|
|
4208
|
-
rowHover: "#2c3034",
|
|
4209
|
-
selectionBg: "#031633"
|
|
4210
|
-
}
|
|
4211
|
-
},
|
|
4212
|
-
{
|
|
4213
|
-
id: "vercel",
|
|
4214
|
-
name: "Vercel",
|
|
4215
|
-
radius: 6,
|
|
4216
|
-
font: "\"Geist\", \"Geist Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
|
|
4217
|
-
light: {
|
|
4218
|
-
bg: "#ffffff",
|
|
4219
|
-
fg: "#000000",
|
|
4220
|
-
muted: "#666666",
|
|
4221
|
-
border: "#eaeaea",
|
|
4222
|
-
headerBg: "#fafafa",
|
|
4223
|
-
headerFg: "#666666",
|
|
4224
|
-
accent: "#0070f3",
|
|
4225
|
-
rowAlt: "#fafafa",
|
|
4226
|
-
rowHover: "#f5f5f5",
|
|
4227
|
-
selectionBg: "#e8f0fe"
|
|
4228
|
-
},
|
|
4229
|
-
dark: {
|
|
4230
|
-
bg: "#000000",
|
|
4231
|
-
fg: "#ffffff",
|
|
4232
|
-
muted: "#888888",
|
|
4233
|
-
border: "#333333",
|
|
4234
|
-
headerBg: "#111111",
|
|
4235
|
-
headerFg: "#888888",
|
|
4236
|
-
accent: "#3291ff",
|
|
4237
|
-
rowAlt: "#0a0a0a",
|
|
4238
|
-
rowHover: "#1a1a1a",
|
|
4239
|
-
selectionBg: "#0d2847"
|
|
4240
|
-
}
|
|
4241
|
-
},
|
|
4242
|
-
{
|
|
4243
|
-
id: "linear",
|
|
4244
|
-
name: "Linear",
|
|
4245
|
-
radius: 6,
|
|
4246
|
-
font: "\"Inter Variable\", \"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif",
|
|
4247
|
-
light: {
|
|
4248
|
-
bg: "#ffffff",
|
|
4249
|
-
fg: "#282a30",
|
|
4250
|
-
muted: "#6b6f76",
|
|
4251
|
-
border: "#e9e9eb",
|
|
4252
|
-
headerBg: "#f7f8f8",
|
|
4253
|
-
headerFg: "#6b6f76",
|
|
4254
|
-
accent: "#5e6ad2",
|
|
4255
|
-
rowAlt: "#fbfbfc",
|
|
4256
|
-
rowHover: "#f4f4f5",
|
|
4257
|
-
selectionBg: "#e8eafd"
|
|
4258
|
-
},
|
|
4259
|
-
dark: {
|
|
4260
|
-
bg: "#08090a",
|
|
4261
|
-
fg: "#f7f8f8",
|
|
4262
|
-
muted: "#8a8f98",
|
|
4263
|
-
border: "#23252a",
|
|
4264
|
-
headerBg: "#0f1011",
|
|
4265
|
-
headerFg: "#8a8f98",
|
|
4266
|
-
accent: "#5e6ad2",
|
|
4267
|
-
rowAlt: "#0f1011",
|
|
4268
|
-
rowHover: "#1a1b1e",
|
|
4269
|
-
selectionBg: "#2a2d4a"
|
|
4270
|
-
}
|
|
4271
|
-
},
|
|
4272
|
-
{
|
|
4273
|
-
id: "notion",
|
|
4274
|
-
name: "Notion",
|
|
4275
|
-
radius: 4,
|
|
4276
|
-
font: "ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif",
|
|
4277
|
-
light: {
|
|
4278
|
-
bg: "#ffffff",
|
|
4279
|
-
fg: "#37352f",
|
|
4280
|
-
muted: "#787774",
|
|
4281
|
-
border: "#e9e9e7",
|
|
4282
|
-
headerBg: "#f7f6f3",
|
|
4283
|
-
headerFg: "#787774",
|
|
4284
|
-
accent: "#2383e2",
|
|
4285
|
-
rowAlt: "#fbfbfa",
|
|
4286
|
-
rowHover: "#f1f1ef",
|
|
4287
|
-
selectionBg: "#d9eaf7"
|
|
4288
|
-
},
|
|
4289
|
-
dark: {
|
|
4290
|
-
bg: "#191919",
|
|
4291
|
-
fg: "#d4d4d4",
|
|
4292
|
-
muted: "#9b9b9b",
|
|
4293
|
-
border: "#2f2f2f",
|
|
4294
|
-
headerBg: "#202020",
|
|
4295
|
-
headerFg: "#9b9b9b",
|
|
4296
|
-
accent: "#529cca",
|
|
4297
|
-
rowAlt: "#1c1c1c",
|
|
4298
|
-
rowHover: "#252525",
|
|
4299
|
-
selectionBg: "#20415c"
|
|
4300
|
-
}
|
|
4301
|
-
},
|
|
4302
|
-
{
|
|
4303
|
-
id: "nord",
|
|
4304
|
-
name: "Nord",
|
|
4305
|
-
radius: 4,
|
|
4306
|
-
font: "\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
|
|
4307
|
-
light: {
|
|
4308
|
-
bg: "#eceff4",
|
|
4309
|
-
fg: "#2e3440",
|
|
4310
|
-
muted: "#4c566a",
|
|
4311
|
-
border: "#d8dee9",
|
|
4312
|
-
headerBg: "#e5e9f0",
|
|
4313
|
-
headerFg: "#2e3440",
|
|
4314
|
-
accent: "#5e81ac",
|
|
4315
|
-
rowAlt: "#e5e9f0",
|
|
4316
|
-
rowHover: "#dde3ec",
|
|
4317
|
-
selectionBg: "#d8dee9"
|
|
4318
|
-
},
|
|
4319
|
-
dark: {
|
|
4320
|
-
bg: "#2e3440",
|
|
4321
|
-
fg: "#d8dee9",
|
|
4322
|
-
muted: "#4c566a",
|
|
4323
|
-
border: "#434c5e",
|
|
4324
|
-
headerBg: "#3b4252",
|
|
4325
|
-
headerFg: "#e5e9f0",
|
|
4326
|
-
accent: "#88c0d0",
|
|
4327
|
-
rowAlt: "#333b48",
|
|
4328
|
-
rowHover: "#3b4252",
|
|
4329
|
-
selectionBg: "#434c5e"
|
|
4330
|
-
}
|
|
4331
|
-
},
|
|
4332
|
-
{
|
|
4333
|
-
id: "dracula",
|
|
4334
|
-
name: "Dracula",
|
|
4335
|
-
radius: 6,
|
|
4336
|
-
font: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
|
|
4337
|
-
light: {
|
|
4338
|
-
bg: "#fffbeb",
|
|
4339
|
-
fg: "#1f1f1f",
|
|
4340
|
-
muted: "#6c664b",
|
|
4341
|
-
border: "#dedccf",
|
|
4342
|
-
headerBg: "#ece9df",
|
|
4343
|
-
headerFg: "#1f1f1f",
|
|
4344
|
-
accent: "#644ac9",
|
|
4345
|
-
rowAlt: "#fffdf5",
|
|
4346
|
-
rowHover: "#f2efe3",
|
|
4347
|
-
selectionBg: "#cfcfde"
|
|
4348
|
-
},
|
|
4349
|
-
dark: {
|
|
4350
|
-
bg: "#282a36",
|
|
4351
|
-
fg: "#f8f8f2",
|
|
4352
|
-
muted: "#6272a4",
|
|
4353
|
-
border: "#44475a",
|
|
4354
|
-
headerBg: "#21222c",
|
|
4355
|
-
headerFg: "#f8f8f2",
|
|
4356
|
-
accent: "#bd93f9",
|
|
4357
|
-
rowAlt: "#2d2f3b",
|
|
4358
|
-
rowHover: "#343746",
|
|
4359
|
-
selectionBg: "#44475a"
|
|
4360
|
-
}
|
|
4361
|
-
},
|
|
4362
|
-
{
|
|
4363
|
-
id: "catppuccin",
|
|
4364
|
-
name: "Catppuccin",
|
|
4365
|
-
radius: 8,
|
|
4366
|
-
font: "\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
|
|
4367
|
-
light: {
|
|
4368
|
-
bg: "#eff1f5",
|
|
4369
|
-
fg: "#4c4f69",
|
|
4370
|
-
muted: "#6c6f85",
|
|
4371
|
-
border: "#ccd0da",
|
|
4372
|
-
headerBg: "#e6e9ef",
|
|
4373
|
-
headerFg: "#4c4f69",
|
|
4374
|
-
accent: "#8839ef",
|
|
4375
|
-
rowAlt: "#e6e9ef",
|
|
4376
|
-
rowHover: "#dce0e8",
|
|
4377
|
-
selectionBg: "#dce0e8"
|
|
4378
|
-
},
|
|
4379
|
-
dark: {
|
|
4380
|
-
bg: "#1e1e2e",
|
|
4381
|
-
fg: "#cdd6f4",
|
|
4382
|
-
muted: "#a6adc8",
|
|
4383
|
-
border: "#313244",
|
|
4384
|
-
headerBg: "#181825",
|
|
4385
|
-
headerFg: "#cdd6f4",
|
|
4386
|
-
accent: "#cba6f7",
|
|
4387
|
-
rowAlt: "#1a1a28",
|
|
4388
|
-
rowHover: "#313244",
|
|
4389
|
-
selectionBg: "#45475a"
|
|
4390
|
-
}
|
|
4391
|
-
}
|
|
4392
|
-
];
|
|
3835
|
+
var studioThemes = themePresets;
|
|
4393
3836
|
/** The default theme (used when a project has no `preset`). */
|
|
4394
|
-
var defaultStudioTheme =
|
|
3837
|
+
var defaultStudioTheme = defaultThemePreset;
|
|
4395
3838
|
/** Look up a theme by id. */
|
|
4396
|
-
var getStudioTheme = (id) =>
|
|
4397
|
-
/**
|
|
4398
|
-
|
|
4399
|
-
const m = /^#?([0-9a-f]{6})$/i.exec(accent.trim());
|
|
4400
|
-
if (!m) return "#ffffff";
|
|
4401
|
-
const n = parseInt(m[1], 16);
|
|
4402
|
-
const r = n >> 16 & 255, g = n >> 8 & 255, b = n & 255;
|
|
4403
|
-
return (.299 * r + .587 * g + .114 * b) / 255 > .6 ? "#18181b" : "#ffffff";
|
|
4404
|
-
}
|
|
3839
|
+
var getStudioTheme = (id) => getThemePreset(id);
|
|
3840
|
+
/** True when the project's theme is rendering in dark mode. */
|
|
3841
|
+
var isDarkTheme = (theme) => theme?.mode === "dark";
|
|
4405
3842
|
/** Resolve the effective `--sg-*` tokens for a project theme: the chosen preset
|
|
4406
3843
|
* (default if none) in the chosen mode, with the accent override applied. */
|
|
4407
3844
|
function resolveThemeTokens(theme) {
|
|
4408
|
-
|
|
4409
|
-
const p = preset[theme?.mode === "dark" ? "dark" : "light"];
|
|
4410
|
-
const accent = theme?.accent || p.accent;
|
|
4411
|
-
return {
|
|
4412
|
-
"--sg-bg": p.bg,
|
|
4413
|
-
"--sg-fg": p.fg,
|
|
4414
|
-
"--sg-muted": p.muted,
|
|
4415
|
-
"--sg-border": p.border,
|
|
4416
|
-
"--sg-header-bg": p.headerBg,
|
|
4417
|
-
"--sg-header-fg": p.headerFg,
|
|
4418
|
-
"--sg-bg-subtle": p.headerBg,
|
|
4419
|
-
"--sg-row-alt-bg": p.rowAlt,
|
|
4420
|
-
"--sg-row-hover-bg": p.rowHover,
|
|
4421
|
-
"--sg-selection-bg": p.selectionBg,
|
|
4422
|
-
"--sg-input-bg": p.bg,
|
|
4423
|
-
"--sg-input-border": p.border,
|
|
4424
|
-
"--sg-accent": accent,
|
|
4425
|
-
"--sg-on-accent": onAccent(accent),
|
|
4426
|
-
"--sg-radius": `${preset.radius}px`,
|
|
4427
|
-
"--sg-font": preset.font,
|
|
4428
|
-
"--sg-scrollbar-bg": p.headerBg,
|
|
4429
|
-
"--sg-scrollbar-border": p.border,
|
|
4430
|
-
"--sg-scrollbar-thumb": p.muted,
|
|
4431
|
-
"--sg-scrollbar-thumb-hover": p.fg,
|
|
4432
|
-
"--sg-scrollbar-thumb-active": p.fg,
|
|
4433
|
-
"--sg-scrollbar-arrow": p.muted,
|
|
4434
|
-
"--sg-scrollbar-arrow-hover": p.fg,
|
|
4435
|
-
"--sg-scrollbar-arrow-hover-bg": p.rowHover,
|
|
4436
|
-
"--sg-scrollbar-arrow-active": p.fg,
|
|
4437
|
-
"--sg-scrollbar-arrow-active-bg": p.selectionBg,
|
|
4438
|
-
"--sg-scrollbar-arrow-disabled": p.border
|
|
4439
|
-
};
|
|
3845
|
+
return resolveThemeTokens$1(getStudioTheme(theme?.preset) ?? defaultStudioTheme, theme?.mode === "dark" ? "dark" : "light", theme?.accent);
|
|
4440
3846
|
}
|
|
4441
|
-
/** True when the project's theme is rendering in dark mode. */
|
|
4442
|
-
var isDarkTheme = (theme) => theme?.mode === "dark";
|
|
4443
3847
|
/** An inline `style` string (`--sg-x: y; ...; color-scheme; font-family`) for previews. */
|
|
4444
3848
|
function themeStyleString(theme) {
|
|
4445
3849
|
const tokens = resolveThemeTokens(theme);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svgrid/enterprise",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Pro feature pack for sv-grid: data export (Excel, PDF, CSV, TSV, HTML), import (xlsx, CSV, TSV, JSON), pivot table + designer, AI assistant (BYO model), and printing. Requires a paid license key.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "jQWidgets <sales@jqwidgets.com>",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"svelte": "^5.0.0",
|
|
65
65
|
"jszip": "^3.10.0",
|
|
66
66
|
"pdfmake": "^0.2.0",
|
|
67
|
-
"@svgrid/grid": "^2.
|
|
67
|
+
"@svgrid/grid": "^2.1.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependenciesMeta": {
|
|
70
70
|
"jszip": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"svelte": "^5.55.5",
|
|
82
82
|
"typescript": "6.0.3",
|
|
83
83
|
"vite": "^8.0.10",
|
|
84
|
-
"@svgrid/grid": "^2.
|
|
84
|
+
"@svgrid/grid": "^2.1.0"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"test": "vitest run",
|