pxengine 0.1.44 → 0.1.46
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/config/tailwind-preset.js +155 -0
- package/dist/index.cjs +37 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -46
- package/dist/index.d.ts +87 -46
- package/dist/index.mjs +35 -0
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @pxengine/ui Tailwind Preset
|
|
3
|
+
*
|
|
4
|
+
* This file allows consumers of the @pxengine/ui library to easily inherit
|
|
5
|
+
* the custom theme, colors, and animations required for the components.
|
|
6
|
+
*
|
|
7
|
+
* Usage in tailwind.config.js:
|
|
8
|
+
* presets: [require("@pxengine/ui/config/tailwind-preset")]
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
theme: {
|
|
13
|
+
container: {
|
|
14
|
+
center: true,
|
|
15
|
+
padding: "2rem",
|
|
16
|
+
screens: {
|
|
17
|
+
"2xl": "1400px",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
extend: {
|
|
21
|
+
fontFamily: {
|
|
22
|
+
sans: ["Inter", "system-ui", "sans-serif"],
|
|
23
|
+
noto: ["Noto Sans", "system-ui", "sans-serif"],
|
|
24
|
+
grotesk: ["Space Grotesk", "system-ui", "sans-serif"],
|
|
25
|
+
roboto: ["Roboto", "system-ui", "sans-serif"],
|
|
26
|
+
},
|
|
27
|
+
colors: {
|
|
28
|
+
border: "hsl(var(--border))",
|
|
29
|
+
input: "hsl(var(--input))",
|
|
30
|
+
ring: "hsl(var(--ring))",
|
|
31
|
+
background: "hsl(var(--background))",
|
|
32
|
+
foreground: "hsl(var(--foreground))",
|
|
33
|
+
primary: {
|
|
34
|
+
DEFAULT: "hsl(var(--primary))",
|
|
35
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
36
|
+
},
|
|
37
|
+
secondary: {
|
|
38
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
39
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
40
|
+
},
|
|
41
|
+
interactive: {
|
|
42
|
+
DEFAULT: "var(--interactive)",
|
|
43
|
+
foreground: "var(--interactive-foreground)",
|
|
44
|
+
},
|
|
45
|
+
destructive: {
|
|
46
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
47
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
48
|
+
},
|
|
49
|
+
muted: {
|
|
50
|
+
DEFAULT: "hsl(var(--muted))",
|
|
51
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
52
|
+
},
|
|
53
|
+
accent: {
|
|
54
|
+
DEFAULT: "hsl(var(--accent))",
|
|
55
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
56
|
+
},
|
|
57
|
+
popover: {
|
|
58
|
+
DEFAULT: "hsl(var(--popover))",
|
|
59
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
60
|
+
},
|
|
61
|
+
card: {
|
|
62
|
+
DEFAULT: "hsl(var(--card))",
|
|
63
|
+
foreground: "hsl(var(--card-foreground))",
|
|
64
|
+
},
|
|
65
|
+
// Custom PXEngine colors
|
|
66
|
+
gray25: "var(--gray25)",
|
|
67
|
+
gray50: "var(--gray50)",
|
|
68
|
+
gray100: "var(--gray100)",
|
|
69
|
+
gray200: "var(--gray200)",
|
|
70
|
+
gray300: "var(--gray300)",
|
|
71
|
+
gray400: "var(--gray400)",
|
|
72
|
+
gray500: "var(--gray500)",
|
|
73
|
+
gray600: "var(--gray600)",
|
|
74
|
+
gray700: "var(--gray700)",
|
|
75
|
+
gray800: "var(--gray800)",
|
|
76
|
+
gray900: "var(--gray900)",
|
|
77
|
+
txtColor: "var(--txtColor)",
|
|
78
|
+
samepurple200: "#988cff",
|
|
79
|
+
purple100: "var(--purple100)",
|
|
80
|
+
purple200: "var(--purple200)",
|
|
81
|
+
purple500: "var(--purple500)",
|
|
82
|
+
purpleText: "var(--purple-text)",
|
|
83
|
+
purple50: "var(--purple50)",
|
|
84
|
+
purple20: "var(--purple20)",
|
|
85
|
+
purpleBorder2: "var(--purpleBorder2)",
|
|
86
|
+
purpleTextHover: "var(--purple-text-hover)",
|
|
87
|
+
purpleBorder: "var(--purple-border)",
|
|
88
|
+
green500: "var(--green500)",
|
|
89
|
+
grayPill: "var(--grayPill)",
|
|
90
|
+
sliderFill: "var(--slider-fill)",
|
|
91
|
+
sliderUnfill: "var(--slider-unfill)",
|
|
92
|
+
sliderButton: "var(--slider-button)",
|
|
93
|
+
lightSuccess: "#17C653",
|
|
94
|
+
lightWarning: "#DFA000",
|
|
95
|
+
success: "#5cb85c",
|
|
96
|
+
warningcolor: "var(--warning-color)",
|
|
97
|
+
label: "#071437",
|
|
98
|
+
paperBackground: "var(--paperBackground)",
|
|
99
|
+
darkModeCoal: "#0D0E12",
|
|
100
|
+
tutorialBorder: "var(--tutorialBorder)",
|
|
101
|
+
tutorialBg: "var(--tutorialBg)",
|
|
102
|
+
tutorialText: "var(--tutorialText)",
|
|
103
|
+
greenBackground: "var(--greenBackground)",
|
|
104
|
+
greenText: "var(--greenText)",
|
|
105
|
+
orangeBackground: "var(--orangeBackground)",
|
|
106
|
+
orangeText: "var(--orangeText)",
|
|
107
|
+
redBackground: "var(--redBackground)",
|
|
108
|
+
redText: "var(--redText)",
|
|
109
|
+
chart1: "var(--chart-1)",
|
|
110
|
+
chart2: "var(--chart-2)",
|
|
111
|
+
chart3: "var(--chart-3)",
|
|
112
|
+
chart4: "var(--chart-4)",
|
|
113
|
+
chart5: "var(--chart-5)",
|
|
114
|
+
primaryText: "var(--primaryText)",
|
|
115
|
+
primaryDark2: "var(--primaryDark2)",
|
|
116
|
+
purple200Dark: "var(--purple200Dark)",
|
|
117
|
+
purple20Dark: "var(--purple20Dark)",
|
|
118
|
+
purpleText1: "var(--purple-text-1)",
|
|
119
|
+
textPlaceholder: "var(--textPlaceholder)",
|
|
120
|
+
textSecondary: "var(--textSecondary)",
|
|
121
|
+
interactionBg: "var(--interaction-bg)",
|
|
122
|
+
purpleLight: "var(--purpleLight)",
|
|
123
|
+
purpleText2: "var(--purple-text-2)",
|
|
124
|
+
green100: "#dcfce7",
|
|
125
|
+
// Landing page colors
|
|
126
|
+
landingDarkestBlue: "var(--landing-darkest-blue)",
|
|
127
|
+
landingBlue: "var(--landing-blue)",
|
|
128
|
+
landingPurple: "var(--landing-purple)",
|
|
129
|
+
landingTextParagraph: "var(--landing-text-paragraph)",
|
|
130
|
+
landingTextHeading: "var(--landing-text-heading)",
|
|
131
|
+
landingBorderMain: "var(--landing-border-main)",
|
|
132
|
+
},
|
|
133
|
+
borderRadius: {
|
|
134
|
+
lg: "var(--radius)",
|
|
135
|
+
md: "calc(var(--radius) - 2px)",
|
|
136
|
+
sm: "calc(var(--radius) - 4px)",
|
|
137
|
+
},
|
|
138
|
+
keyframes: {
|
|
139
|
+
"accordion-down": {
|
|
140
|
+
from: { height: "0" },
|
|
141
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
142
|
+
},
|
|
143
|
+
"accordion-up": {
|
|
144
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
145
|
+
to: { height: "0" },
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
animation: {
|
|
149
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
150
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
plugins: [require("tailwindcss-animate")],
|
|
155
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -307,6 +307,8 @@ __export(index_exports, {
|
|
|
307
307
|
VideoAtom: () => VideoAtom,
|
|
308
308
|
WorkflowVisualizer: () => WorkflowVisualizer,
|
|
309
309
|
cn: () => cn,
|
|
310
|
+
generateFieldsFromData: () => generateFieldsFromData,
|
|
311
|
+
generateFieldsFromPropDefinitions: () => generateFieldsFromPropDefinitions,
|
|
310
312
|
useCreatorWidgetPolling: () => useCreatorWidgetPolling
|
|
311
313
|
});
|
|
312
314
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -34953,6 +34955,39 @@ function generateFieldsFromData(data) {
|
|
|
34953
34955
|
return config;
|
|
34954
34956
|
});
|
|
34955
34957
|
}
|
|
34958
|
+
function generateFieldsFromPropDefinitions(propDefs, data) {
|
|
34959
|
+
if (!propDefs || !Array.isArray(propDefs)) return [];
|
|
34960
|
+
return propDefs.filter((def) => def.editable === true).map((def) => {
|
|
34961
|
+
const value = data?.[def.name];
|
|
34962
|
+
const editType = def.editConfig?.editFieldType || inferFieldType(value);
|
|
34963
|
+
const config = {
|
|
34964
|
+
key: def.name,
|
|
34965
|
+
label: def.description || normalizeLabel(def.name),
|
|
34966
|
+
type: editType
|
|
34967
|
+
};
|
|
34968
|
+
if (def.editConfig?.placeholder) {
|
|
34969
|
+
config.placeholder = def.editConfig.placeholder;
|
|
34970
|
+
}
|
|
34971
|
+
if (def.editConfig?.options) {
|
|
34972
|
+
config.options = def.editConfig.options;
|
|
34973
|
+
}
|
|
34974
|
+
if (def.editConfig?.sliderConfig) {
|
|
34975
|
+
config.sliderConfig = {
|
|
34976
|
+
min: def.editConfig.sliderConfig.min,
|
|
34977
|
+
max: def.editConfig.sliderConfig.max,
|
|
34978
|
+
step: def.editConfig.sliderConfig.step
|
|
34979
|
+
};
|
|
34980
|
+
}
|
|
34981
|
+
if (def.editConfig?.numberConfig) {
|
|
34982
|
+
config.numberConfig = {
|
|
34983
|
+
min: def.editConfig.numberConfig.min,
|
|
34984
|
+
max: def.editConfig.numberConfig.max,
|
|
34985
|
+
step: def.editConfig.numberConfig.step
|
|
34986
|
+
};
|
|
34987
|
+
}
|
|
34988
|
+
return config;
|
|
34989
|
+
});
|
|
34990
|
+
}
|
|
34956
34991
|
|
|
34957
34992
|
// src/molecules/creator-discovery/SearchSpecCard/CustomFieldRenderers.tsx
|
|
34958
34993
|
var import_react59 = require("react");
|
|
@@ -40945,6 +40980,8 @@ var PXEngineRenderer = ({
|
|
|
40945
40980
|
VideoAtom,
|
|
40946
40981
|
WorkflowVisualizer,
|
|
40947
40982
|
cn,
|
|
40983
|
+
generateFieldsFromData,
|
|
40984
|
+
generateFieldsFromPropDefinitions,
|
|
40948
40985
|
useCreatorWidgetPolling
|
|
40949
40986
|
});
|
|
40950
40987
|
/*! Bundled license information:
|