@roxyapi/ui-react 0.1.1 → 0.1.3
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/AGENTS.md +2 -2
- package/LICENSE +21 -0
- package/README.md +499 -0
- package/dist/components/biorhythm-chart.d.ts +8 -5
- package/dist/components/biorhythm-chart.d.ts.map +1 -1
- package/dist/components/biorhythm-chart.js +35 -9
- package/dist/components/biorhythm-chart.js.map +2 -2
- package/dist/components/compatibility-card.d.ts +8 -5
- package/dist/components/compatibility-card.d.ts.map +1 -1
- package/dist/components/compatibility-card.js +35 -9
- package/dist/components/compatibility-card.js.map +2 -2
- package/dist/components/dasha-timeline.d.ts +8 -5
- package/dist/components/dasha-timeline.d.ts.map +1 -1
- package/dist/components/dasha-timeline.js +35 -9
- package/dist/components/dasha-timeline.js.map +2 -2
- package/dist/components/data.d.ts +6 -4
- package/dist/components/data.d.ts.map +1 -1
- package/dist/components/data.js +35 -9
- package/dist/components/data.js.map +2 -2
- package/dist/components/dosha-card.d.ts +8 -5
- package/dist/components/dosha-card.d.ts.map +1 -1
- package/dist/components/dosha-card.js +35 -9
- package/dist/components/dosha-card.js.map +2 -2
- package/dist/components/endpoint-form.d.ts +20 -4
- package/dist/components/endpoint-form.d.ts.map +1 -1
- package/dist/components/endpoint-form.js +59 -9
- package/dist/components/endpoint-form.js.map +2 -2
- package/dist/components/guna-milan.d.ts +8 -5
- package/dist/components/guna-milan.d.ts.map +1 -1
- package/dist/components/guna-milan.js +35 -9
- package/dist/components/guna-milan.js.map +2 -2
- package/dist/components/hexagram.d.ts +8 -5
- package/dist/components/hexagram.d.ts.map +1 -1
- package/dist/components/hexagram.js +35 -9
- package/dist/components/hexagram.js.map +2 -2
- package/dist/components/horoscope-card.d.ts +8 -5
- package/dist/components/horoscope-card.d.ts.map +1 -1
- package/dist/components/horoscope-card.js +35 -9
- package/dist/components/horoscope-card.js.map +2 -2
- package/dist/components/kp-planets-table.d.ts +8 -5
- package/dist/components/kp-planets-table.d.ts.map +1 -1
- package/dist/components/kp-planets-table.js +35 -9
- package/dist/components/kp-planets-table.js.map +2 -2
- package/dist/components/location-search.d.ts +22 -4
- package/dist/components/location-search.d.ts.map +1 -1
- package/dist/components/location-search.js +51 -9
- package/dist/components/location-search.js.map +2 -2
- package/dist/components/moon-phase.d.ts +8 -5
- package/dist/components/moon-phase.d.ts.map +1 -1
- package/dist/components/moon-phase.js +35 -9
- package/dist/components/moon-phase.js.map +2 -2
- package/dist/components/natal-chart.d.ts +8 -5
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js +35 -9
- package/dist/components/natal-chart.js.map +2 -2
- package/dist/components/numerology-card.d.ts +8 -5
- package/dist/components/numerology-card.d.ts.map +1 -1
- package/dist/components/numerology-card.js +35 -9
- package/dist/components/numerology-card.js.map +2 -2
- package/dist/components/panchang-table.d.ts +8 -5
- package/dist/components/panchang-table.d.ts.map +1 -1
- package/dist/components/panchang-table.js +35 -9
- package/dist/components/panchang-table.js.map +2 -2
- package/dist/components/synastry-chart.d.ts +15 -5
- package/dist/components/synastry-chart.d.ts.map +1 -1
- package/dist/components/synastry-chart.js +35 -9
- package/dist/components/synastry-chart.js.map +2 -2
- package/dist/components/tarot-card.d.ts +8 -5
- package/dist/components/tarot-card.d.ts.map +1 -1
- package/dist/components/tarot-card.js +35 -9
- package/dist/components/tarot-card.js.map +2 -2
- package/dist/components/tarot-spread.d.ts +8 -5
- package/dist/components/tarot-spread.d.ts.map +1 -1
- package/dist/components/tarot-spread.js +35 -9
- package/dist/components/tarot-spread.js.map +2 -2
- package/dist/components/vedic-kundli.d.ts +8 -5
- package/dist/components/vedic-kundli.d.ts.map +1 -1
- package/dist/components/vedic-kundli.js +35 -9
- package/dist/components/vedic-kundli.js.map +2 -2
- package/dist/index.cjs +545 -99
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +20 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +545 -99
- package/dist/index.js.map +2 -2
- package/dist/load-ui.d.ts +2 -0
- package/dist/load-ui.d.ts.map +1 -1
- package/dist/load-ui.js +13 -4
- package/dist/load-ui.js.map +2 -2
- package/package.json +29 -7
- package/src/components/biorhythm-chart.d.ts +0 -12
- package/src/components/biorhythm-chart.d.ts.map +0 -1
- package/src/components/biorhythm-chart.tsx +0 -35
- package/src/components/compatibility-card.d.ts +0 -12
- package/src/components/compatibility-card.d.ts.map +0 -1
- package/src/components/compatibility-card.tsx +0 -35
- package/src/components/dasha-timeline.d.ts +0 -12
- package/src/components/dasha-timeline.d.ts.map +0 -1
- package/src/components/dasha-timeline.tsx +0 -35
- package/src/components/data.d.ts +0 -11
- package/src/components/data.d.ts.map +0 -1
- package/src/components/data.tsx +0 -35
- package/src/components/dosha-card.d.ts +0 -12
- package/src/components/dosha-card.d.ts.map +0 -1
- package/src/components/dosha-card.tsx +0 -35
- package/src/components/endpoint-form.d.ts +0 -12
- package/src/components/endpoint-form.d.ts.map +0 -1
- package/src/components/endpoint-form.tsx +0 -35
- package/src/components/guna-milan.d.ts +0 -12
- package/src/components/guna-milan.d.ts.map +0 -1
- package/src/components/guna-milan.tsx +0 -35
- package/src/components/hexagram.d.ts +0 -12
- package/src/components/hexagram.d.ts.map +0 -1
- package/src/components/hexagram.tsx +0 -35
- package/src/components/horoscope-card.d.ts +0 -12
- package/src/components/horoscope-card.d.ts.map +0 -1
- package/src/components/horoscope-card.tsx +0 -35
- package/src/components/kp-planets-table.d.ts +0 -12
- package/src/components/kp-planets-table.d.ts.map +0 -1
- package/src/components/kp-planets-table.tsx +0 -35
- package/src/components/location-search.d.ts +0 -12
- package/src/components/location-search.d.ts.map +0 -1
- package/src/components/location-search.tsx +0 -35
- package/src/components/moon-phase.d.ts +0 -12
- package/src/components/moon-phase.d.ts.map +0 -1
- package/src/components/moon-phase.tsx +0 -35
- package/src/components/natal-chart.d.ts +0 -12
- package/src/components/natal-chart.d.ts.map +0 -1
- package/src/components/natal-chart.tsx +0 -35
- package/src/components/numerology-card.d.ts +0 -12
- package/src/components/numerology-card.d.ts.map +0 -1
- package/src/components/numerology-card.tsx +0 -35
- package/src/components/panchang-table.d.ts +0 -12
- package/src/components/panchang-table.d.ts.map +0 -1
- package/src/components/panchang-table.tsx +0 -35
- package/src/components/synastry-chart.d.ts +0 -12
- package/src/components/synastry-chart.d.ts.map +0 -1
- package/src/components/synastry-chart.tsx +0 -35
- package/src/components/tarot-card.d.ts +0 -12
- package/src/components/tarot-card.d.ts.map +0 -1
- package/src/components/tarot-card.tsx +0 -35
- package/src/components/tarot-spread.d.ts +0 -12
- package/src/components/tarot-spread.d.ts.map +0 -1
- package/src/components/tarot-spread.tsx +0 -35
- package/src/components/vedic-kundli.d.ts +0 -12
- package/src/components/vedic-kundli.d.ts.map +0 -1
- package/src/components/vedic-kundli.tsx +0 -35
- package/src/index.d.ts +0 -21
- package/src/index.d.ts.map +0 -1
- package/src/index.ts +0 -20
- package/src/load-ui.d.ts +0 -2
- package/src/load-ui.d.ts.map +0 -1
- package/src/load-ui.ts +0 -41
package/dist/index.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
// packages/ui-react/src/load-ui.ts
|
|
2
2
|
var SCRIPT_ID = "roxyapi-ui-loader";
|
|
3
|
-
var
|
|
3
|
+
var CDN_BASE_LATEST = "https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn";
|
|
4
|
+
var CDN_BASE_PREFIX = "https://cdn.jsdelivr.net/npm/@roxyapi/ui@";
|
|
5
|
+
var CDN_BASE_SUFFIX = "/dist/cdn";
|
|
4
6
|
var loaded = null;
|
|
5
|
-
function
|
|
7
|
+
function buildBase(version) {
|
|
8
|
+
if (!version || version === "latest") return CDN_BASE_LATEST;
|
|
9
|
+
return `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;
|
|
10
|
+
}
|
|
11
|
+
function ensureScriptLoaded(version = "latest") {
|
|
6
12
|
if (typeof document === "undefined") return Promise.resolve();
|
|
7
13
|
if (loaded) return loaded;
|
|
8
14
|
loaded = new Promise((resolve, reject) => {
|
|
9
|
-
const
|
|
10
|
-
const url = `${CDN_BASE.replace("@0", "@" + major)}/roxy-ui.js`;
|
|
15
|
+
const url = `${buildBase(version)}/roxy-ui.js`;
|
|
11
16
|
let existing = document.getElementById(SCRIPT_ID);
|
|
12
17
|
if (existing) {
|
|
13
18
|
if (existing.dataset.loaded === "true") {
|
|
@@ -32,482 +37,923 @@ function ensureScriptLoaded(version = "0.1.0") {
|
|
|
32
37
|
});
|
|
33
38
|
return loaded;
|
|
34
39
|
}
|
|
40
|
+
var ROXY_UI_VERSION = "0.1.3";
|
|
35
41
|
|
|
36
42
|
// packages/ui-react/src/components/natal-chart.tsx
|
|
37
43
|
import * as React from "react";
|
|
38
44
|
var RoxyNatalChart = React.forwardRef(
|
|
39
|
-
function RoxyNatalChart2({ data, ...rest }, ref) {
|
|
45
|
+
function RoxyNatalChart2({ data, className, style, ...rest }, ref) {
|
|
40
46
|
const internal = React.useRef(null);
|
|
41
|
-
React.useImperativeHandle(
|
|
47
|
+
React.useImperativeHandle(
|
|
48
|
+
ref,
|
|
49
|
+
() => internal.current,
|
|
50
|
+
[]
|
|
51
|
+
);
|
|
42
52
|
const [loaded2, setLoaded] = React.useState(false);
|
|
53
|
+
const [error, setError] = React.useState(null);
|
|
43
54
|
React.useEffect(() => {
|
|
44
55
|
let active = true;
|
|
45
56
|
ensureScriptLoaded().then(() => {
|
|
46
57
|
if (active) setLoaded(true);
|
|
58
|
+
}).catch((err) => {
|
|
59
|
+
if (!active) return;
|
|
60
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
47
61
|
});
|
|
48
62
|
return () => {
|
|
49
63
|
active = false;
|
|
50
64
|
};
|
|
51
65
|
}, []);
|
|
52
66
|
React.useEffect(() => {
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
const el = internal.current;
|
|
68
|
+
if (el && data !== void 0) {
|
|
69
|
+
el.data = data;
|
|
55
70
|
}
|
|
56
71
|
}, [data, loaded2]);
|
|
57
|
-
|
|
72
|
+
if (error) {
|
|
73
|
+
return React.createElement(
|
|
74
|
+
"div",
|
|
75
|
+
{ role: "alert", className, style },
|
|
76
|
+
`Roxy UI script load failed: ${error.message}`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return React.createElement("roxy-natal-chart", {
|
|
80
|
+
ref: internal,
|
|
81
|
+
className,
|
|
82
|
+
style,
|
|
83
|
+
...rest
|
|
84
|
+
});
|
|
58
85
|
}
|
|
59
86
|
);
|
|
60
87
|
|
|
61
88
|
// packages/ui-react/src/components/horoscope-card.tsx
|
|
62
89
|
import * as React2 from "react";
|
|
63
90
|
var RoxyHoroscopeCard = React2.forwardRef(
|
|
64
|
-
function RoxyHoroscopeCard2({ data, ...rest }, ref) {
|
|
91
|
+
function RoxyHoroscopeCard2({ data, className, style, ...rest }, ref) {
|
|
65
92
|
const internal = React2.useRef(null);
|
|
66
|
-
React2.useImperativeHandle(
|
|
93
|
+
React2.useImperativeHandle(
|
|
94
|
+
ref,
|
|
95
|
+
() => internal.current,
|
|
96
|
+
[]
|
|
97
|
+
);
|
|
67
98
|
const [loaded2, setLoaded] = React2.useState(false);
|
|
99
|
+
const [error, setError] = React2.useState(null);
|
|
68
100
|
React2.useEffect(() => {
|
|
69
101
|
let active = true;
|
|
70
102
|
ensureScriptLoaded().then(() => {
|
|
71
103
|
if (active) setLoaded(true);
|
|
104
|
+
}).catch((err) => {
|
|
105
|
+
if (!active) return;
|
|
106
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
72
107
|
});
|
|
73
108
|
return () => {
|
|
74
109
|
active = false;
|
|
75
110
|
};
|
|
76
111
|
}, []);
|
|
77
112
|
React2.useEffect(() => {
|
|
78
|
-
|
|
79
|
-
|
|
113
|
+
const el = internal.current;
|
|
114
|
+
if (el && data !== void 0) {
|
|
115
|
+
el.data = data;
|
|
80
116
|
}
|
|
81
117
|
}, [data, loaded2]);
|
|
82
|
-
|
|
118
|
+
if (error) {
|
|
119
|
+
return React2.createElement(
|
|
120
|
+
"div",
|
|
121
|
+
{ role: "alert", className, style },
|
|
122
|
+
`Roxy UI script load failed: ${error.message}`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
return React2.createElement("roxy-horoscope-card", {
|
|
126
|
+
ref: internal,
|
|
127
|
+
className,
|
|
128
|
+
style,
|
|
129
|
+
...rest
|
|
130
|
+
});
|
|
83
131
|
}
|
|
84
132
|
);
|
|
85
133
|
|
|
86
134
|
// packages/ui-react/src/components/synastry-chart.tsx
|
|
87
135
|
import * as React3 from "react";
|
|
88
136
|
var RoxySynastryChart = React3.forwardRef(
|
|
89
|
-
function RoxySynastryChart2({ data, ...rest }, ref) {
|
|
137
|
+
function RoxySynastryChart2({ data, className, style, ...rest }, ref) {
|
|
90
138
|
const internal = React3.useRef(null);
|
|
91
|
-
React3.useImperativeHandle(
|
|
139
|
+
React3.useImperativeHandle(
|
|
140
|
+
ref,
|
|
141
|
+
() => internal.current,
|
|
142
|
+
[]
|
|
143
|
+
);
|
|
92
144
|
const [loaded2, setLoaded] = React3.useState(false);
|
|
145
|
+
const [error, setError] = React3.useState(null);
|
|
93
146
|
React3.useEffect(() => {
|
|
94
147
|
let active = true;
|
|
95
148
|
ensureScriptLoaded().then(() => {
|
|
96
149
|
if (active) setLoaded(true);
|
|
150
|
+
}).catch((err) => {
|
|
151
|
+
if (!active) return;
|
|
152
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
97
153
|
});
|
|
98
154
|
return () => {
|
|
99
155
|
active = false;
|
|
100
156
|
};
|
|
101
157
|
}, []);
|
|
102
158
|
React3.useEffect(() => {
|
|
103
|
-
|
|
104
|
-
|
|
159
|
+
const el = internal.current;
|
|
160
|
+
if (el && data !== void 0) {
|
|
161
|
+
el.data = data;
|
|
105
162
|
}
|
|
106
163
|
}, [data, loaded2]);
|
|
107
|
-
|
|
164
|
+
if (error) {
|
|
165
|
+
return React3.createElement(
|
|
166
|
+
"div",
|
|
167
|
+
{ role: "alert", className, style },
|
|
168
|
+
`Roxy UI script load failed: ${error.message}`
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
return React3.createElement("roxy-synastry-chart", {
|
|
172
|
+
ref: internal,
|
|
173
|
+
className,
|
|
174
|
+
style,
|
|
175
|
+
...rest
|
|
176
|
+
});
|
|
108
177
|
}
|
|
109
178
|
);
|
|
110
179
|
|
|
111
180
|
// packages/ui-react/src/components/compatibility-card.tsx
|
|
112
181
|
import * as React4 from "react";
|
|
113
182
|
var RoxyCompatibilityCard = React4.forwardRef(
|
|
114
|
-
function RoxyCompatibilityCard2({ data, ...rest }, ref) {
|
|
183
|
+
function RoxyCompatibilityCard2({ data, className, style, ...rest }, ref) {
|
|
115
184
|
const internal = React4.useRef(null);
|
|
116
|
-
React4.useImperativeHandle(
|
|
185
|
+
React4.useImperativeHandle(
|
|
186
|
+
ref,
|
|
187
|
+
() => internal.current,
|
|
188
|
+
[]
|
|
189
|
+
);
|
|
117
190
|
const [loaded2, setLoaded] = React4.useState(false);
|
|
191
|
+
const [error, setError] = React4.useState(null);
|
|
118
192
|
React4.useEffect(() => {
|
|
119
193
|
let active = true;
|
|
120
194
|
ensureScriptLoaded().then(() => {
|
|
121
195
|
if (active) setLoaded(true);
|
|
196
|
+
}).catch((err) => {
|
|
197
|
+
if (!active) return;
|
|
198
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
122
199
|
});
|
|
123
200
|
return () => {
|
|
124
201
|
active = false;
|
|
125
202
|
};
|
|
126
203
|
}, []);
|
|
127
204
|
React4.useEffect(() => {
|
|
128
|
-
|
|
129
|
-
|
|
205
|
+
const el = internal.current;
|
|
206
|
+
if (el && data !== void 0) {
|
|
207
|
+
el.data = data;
|
|
130
208
|
}
|
|
131
209
|
}, [data, loaded2]);
|
|
132
|
-
|
|
210
|
+
if (error) {
|
|
211
|
+
return React4.createElement(
|
|
212
|
+
"div",
|
|
213
|
+
{ role: "alert", className, style },
|
|
214
|
+
`Roxy UI script load failed: ${error.message}`
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
return React4.createElement("roxy-compatibility-card", {
|
|
218
|
+
ref: internal,
|
|
219
|
+
className,
|
|
220
|
+
style,
|
|
221
|
+
...rest
|
|
222
|
+
});
|
|
133
223
|
}
|
|
134
224
|
);
|
|
135
225
|
|
|
136
226
|
// packages/ui-react/src/components/moon-phase.tsx
|
|
137
227
|
import * as React5 from "react";
|
|
138
228
|
var RoxyMoonPhase = React5.forwardRef(
|
|
139
|
-
function RoxyMoonPhase2({ data, ...rest }, ref) {
|
|
229
|
+
function RoxyMoonPhase2({ data, className, style, ...rest }, ref) {
|
|
140
230
|
const internal = React5.useRef(null);
|
|
141
|
-
React5.useImperativeHandle(
|
|
231
|
+
React5.useImperativeHandle(
|
|
232
|
+
ref,
|
|
233
|
+
() => internal.current,
|
|
234
|
+
[]
|
|
235
|
+
);
|
|
142
236
|
const [loaded2, setLoaded] = React5.useState(false);
|
|
237
|
+
const [error, setError] = React5.useState(null);
|
|
143
238
|
React5.useEffect(() => {
|
|
144
239
|
let active = true;
|
|
145
240
|
ensureScriptLoaded().then(() => {
|
|
146
241
|
if (active) setLoaded(true);
|
|
242
|
+
}).catch((err) => {
|
|
243
|
+
if (!active) return;
|
|
244
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
147
245
|
});
|
|
148
246
|
return () => {
|
|
149
247
|
active = false;
|
|
150
248
|
};
|
|
151
249
|
}, []);
|
|
152
250
|
React5.useEffect(() => {
|
|
153
|
-
|
|
154
|
-
|
|
251
|
+
const el = internal.current;
|
|
252
|
+
if (el && data !== void 0) {
|
|
253
|
+
el.data = data;
|
|
155
254
|
}
|
|
156
255
|
}, [data, loaded2]);
|
|
157
|
-
|
|
256
|
+
if (error) {
|
|
257
|
+
return React5.createElement(
|
|
258
|
+
"div",
|
|
259
|
+
{ role: "alert", className, style },
|
|
260
|
+
`Roxy UI script load failed: ${error.message}`
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
return React5.createElement("roxy-moon-phase", {
|
|
264
|
+
ref: internal,
|
|
265
|
+
className,
|
|
266
|
+
style,
|
|
267
|
+
...rest
|
|
268
|
+
});
|
|
158
269
|
}
|
|
159
270
|
);
|
|
160
271
|
|
|
161
272
|
// packages/ui-react/src/components/vedic-kundli.tsx
|
|
162
273
|
import * as React6 from "react";
|
|
163
274
|
var RoxyVedicKundli = React6.forwardRef(
|
|
164
|
-
function RoxyVedicKundli2({ data, ...rest }, ref) {
|
|
275
|
+
function RoxyVedicKundli2({ data, className, style, ...rest }, ref) {
|
|
165
276
|
const internal = React6.useRef(null);
|
|
166
|
-
React6.useImperativeHandle(
|
|
277
|
+
React6.useImperativeHandle(
|
|
278
|
+
ref,
|
|
279
|
+
() => internal.current,
|
|
280
|
+
[]
|
|
281
|
+
);
|
|
167
282
|
const [loaded2, setLoaded] = React6.useState(false);
|
|
283
|
+
const [error, setError] = React6.useState(null);
|
|
168
284
|
React6.useEffect(() => {
|
|
169
285
|
let active = true;
|
|
170
286
|
ensureScriptLoaded().then(() => {
|
|
171
287
|
if (active) setLoaded(true);
|
|
288
|
+
}).catch((err) => {
|
|
289
|
+
if (!active) return;
|
|
290
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
172
291
|
});
|
|
173
292
|
return () => {
|
|
174
293
|
active = false;
|
|
175
294
|
};
|
|
176
295
|
}, []);
|
|
177
296
|
React6.useEffect(() => {
|
|
178
|
-
|
|
179
|
-
|
|
297
|
+
const el = internal.current;
|
|
298
|
+
if (el && data !== void 0) {
|
|
299
|
+
el.data = data;
|
|
180
300
|
}
|
|
181
301
|
}, [data, loaded2]);
|
|
182
|
-
|
|
302
|
+
if (error) {
|
|
303
|
+
return React6.createElement(
|
|
304
|
+
"div",
|
|
305
|
+
{ role: "alert", className, style },
|
|
306
|
+
`Roxy UI script load failed: ${error.message}`
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
return React6.createElement("roxy-vedic-kundli", {
|
|
310
|
+
ref: internal,
|
|
311
|
+
className,
|
|
312
|
+
style,
|
|
313
|
+
...rest
|
|
314
|
+
});
|
|
183
315
|
}
|
|
184
316
|
);
|
|
185
317
|
|
|
186
318
|
// packages/ui-react/src/components/panchang-table.tsx
|
|
187
319
|
import * as React7 from "react";
|
|
188
320
|
var RoxyPanchangTable = React7.forwardRef(
|
|
189
|
-
function RoxyPanchangTable2({ data, ...rest }, ref) {
|
|
321
|
+
function RoxyPanchangTable2({ data, className, style, ...rest }, ref) {
|
|
190
322
|
const internal = React7.useRef(null);
|
|
191
|
-
React7.useImperativeHandle(
|
|
323
|
+
React7.useImperativeHandle(
|
|
324
|
+
ref,
|
|
325
|
+
() => internal.current,
|
|
326
|
+
[]
|
|
327
|
+
);
|
|
192
328
|
const [loaded2, setLoaded] = React7.useState(false);
|
|
329
|
+
const [error, setError] = React7.useState(null);
|
|
193
330
|
React7.useEffect(() => {
|
|
194
331
|
let active = true;
|
|
195
332
|
ensureScriptLoaded().then(() => {
|
|
196
333
|
if (active) setLoaded(true);
|
|
334
|
+
}).catch((err) => {
|
|
335
|
+
if (!active) return;
|
|
336
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
197
337
|
});
|
|
198
338
|
return () => {
|
|
199
339
|
active = false;
|
|
200
340
|
};
|
|
201
341
|
}, []);
|
|
202
342
|
React7.useEffect(() => {
|
|
203
|
-
|
|
204
|
-
|
|
343
|
+
const el = internal.current;
|
|
344
|
+
if (el && data !== void 0) {
|
|
345
|
+
el.data = data;
|
|
205
346
|
}
|
|
206
347
|
}, [data, loaded2]);
|
|
207
|
-
|
|
348
|
+
if (error) {
|
|
349
|
+
return React7.createElement(
|
|
350
|
+
"div",
|
|
351
|
+
{ role: "alert", className, style },
|
|
352
|
+
`Roxy UI script load failed: ${error.message}`
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
return React7.createElement("roxy-panchang-table", {
|
|
356
|
+
ref: internal,
|
|
357
|
+
className,
|
|
358
|
+
style,
|
|
359
|
+
...rest
|
|
360
|
+
});
|
|
208
361
|
}
|
|
209
362
|
);
|
|
210
363
|
|
|
211
364
|
// packages/ui-react/src/components/dasha-timeline.tsx
|
|
212
365
|
import * as React8 from "react";
|
|
213
366
|
var RoxyDashaTimeline = React8.forwardRef(
|
|
214
|
-
function RoxyDashaTimeline2({ data, ...rest }, ref) {
|
|
367
|
+
function RoxyDashaTimeline2({ data, className, style, ...rest }, ref) {
|
|
215
368
|
const internal = React8.useRef(null);
|
|
216
|
-
React8.useImperativeHandle(
|
|
369
|
+
React8.useImperativeHandle(
|
|
370
|
+
ref,
|
|
371
|
+
() => internal.current,
|
|
372
|
+
[]
|
|
373
|
+
);
|
|
217
374
|
const [loaded2, setLoaded] = React8.useState(false);
|
|
375
|
+
const [error, setError] = React8.useState(null);
|
|
218
376
|
React8.useEffect(() => {
|
|
219
377
|
let active = true;
|
|
220
378
|
ensureScriptLoaded().then(() => {
|
|
221
379
|
if (active) setLoaded(true);
|
|
380
|
+
}).catch((err) => {
|
|
381
|
+
if (!active) return;
|
|
382
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
222
383
|
});
|
|
223
384
|
return () => {
|
|
224
385
|
active = false;
|
|
225
386
|
};
|
|
226
387
|
}, []);
|
|
227
388
|
React8.useEffect(() => {
|
|
228
|
-
|
|
229
|
-
|
|
389
|
+
const el = internal.current;
|
|
390
|
+
if (el && data !== void 0) {
|
|
391
|
+
el.data = data;
|
|
230
392
|
}
|
|
231
393
|
}, [data, loaded2]);
|
|
232
|
-
|
|
394
|
+
if (error) {
|
|
395
|
+
return React8.createElement(
|
|
396
|
+
"div",
|
|
397
|
+
{ role: "alert", className, style },
|
|
398
|
+
`Roxy UI script load failed: ${error.message}`
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
return React8.createElement("roxy-dasha-timeline", {
|
|
402
|
+
ref: internal,
|
|
403
|
+
className,
|
|
404
|
+
style,
|
|
405
|
+
...rest
|
|
406
|
+
});
|
|
233
407
|
}
|
|
234
408
|
);
|
|
235
409
|
|
|
236
410
|
// packages/ui-react/src/components/dosha-card.tsx
|
|
237
411
|
import * as React9 from "react";
|
|
238
412
|
var RoxyDoshaCard = React9.forwardRef(
|
|
239
|
-
function RoxyDoshaCard2({ data, ...rest }, ref) {
|
|
413
|
+
function RoxyDoshaCard2({ data, className, style, ...rest }, ref) {
|
|
240
414
|
const internal = React9.useRef(null);
|
|
241
|
-
React9.useImperativeHandle(
|
|
415
|
+
React9.useImperativeHandle(
|
|
416
|
+
ref,
|
|
417
|
+
() => internal.current,
|
|
418
|
+
[]
|
|
419
|
+
);
|
|
242
420
|
const [loaded2, setLoaded] = React9.useState(false);
|
|
421
|
+
const [error, setError] = React9.useState(null);
|
|
243
422
|
React9.useEffect(() => {
|
|
244
423
|
let active = true;
|
|
245
424
|
ensureScriptLoaded().then(() => {
|
|
246
425
|
if (active) setLoaded(true);
|
|
426
|
+
}).catch((err) => {
|
|
427
|
+
if (!active) return;
|
|
428
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
247
429
|
});
|
|
248
430
|
return () => {
|
|
249
431
|
active = false;
|
|
250
432
|
};
|
|
251
433
|
}, []);
|
|
252
434
|
React9.useEffect(() => {
|
|
253
|
-
|
|
254
|
-
|
|
435
|
+
const el = internal.current;
|
|
436
|
+
if (el && data !== void 0) {
|
|
437
|
+
el.data = data;
|
|
255
438
|
}
|
|
256
439
|
}, [data, loaded2]);
|
|
257
|
-
|
|
440
|
+
if (error) {
|
|
441
|
+
return React9.createElement(
|
|
442
|
+
"div",
|
|
443
|
+
{ role: "alert", className, style },
|
|
444
|
+
`Roxy UI script load failed: ${error.message}`
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
return React9.createElement("roxy-dosha-card", {
|
|
448
|
+
ref: internal,
|
|
449
|
+
className,
|
|
450
|
+
style,
|
|
451
|
+
...rest
|
|
452
|
+
});
|
|
258
453
|
}
|
|
259
454
|
);
|
|
260
455
|
|
|
261
456
|
// packages/ui-react/src/components/guna-milan.tsx
|
|
262
457
|
import * as React10 from "react";
|
|
263
458
|
var RoxyGunaMilan = React10.forwardRef(
|
|
264
|
-
function RoxyGunaMilan2({ data, ...rest }, ref) {
|
|
459
|
+
function RoxyGunaMilan2({ data, className, style, ...rest }, ref) {
|
|
265
460
|
const internal = React10.useRef(null);
|
|
266
|
-
React10.useImperativeHandle(
|
|
461
|
+
React10.useImperativeHandle(
|
|
462
|
+
ref,
|
|
463
|
+
() => internal.current,
|
|
464
|
+
[]
|
|
465
|
+
);
|
|
267
466
|
const [loaded2, setLoaded] = React10.useState(false);
|
|
467
|
+
const [error, setError] = React10.useState(null);
|
|
268
468
|
React10.useEffect(() => {
|
|
269
469
|
let active = true;
|
|
270
470
|
ensureScriptLoaded().then(() => {
|
|
271
471
|
if (active) setLoaded(true);
|
|
472
|
+
}).catch((err) => {
|
|
473
|
+
if (!active) return;
|
|
474
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
272
475
|
});
|
|
273
476
|
return () => {
|
|
274
477
|
active = false;
|
|
275
478
|
};
|
|
276
479
|
}, []);
|
|
277
480
|
React10.useEffect(() => {
|
|
278
|
-
|
|
279
|
-
|
|
481
|
+
const el = internal.current;
|
|
482
|
+
if (el && data !== void 0) {
|
|
483
|
+
el.data = data;
|
|
280
484
|
}
|
|
281
485
|
}, [data, loaded2]);
|
|
282
|
-
|
|
486
|
+
if (error) {
|
|
487
|
+
return React10.createElement(
|
|
488
|
+
"div",
|
|
489
|
+
{ role: "alert", className, style },
|
|
490
|
+
`Roxy UI script load failed: ${error.message}`
|
|
491
|
+
);
|
|
492
|
+
}
|
|
493
|
+
return React10.createElement("roxy-guna-milan", {
|
|
494
|
+
ref: internal,
|
|
495
|
+
className,
|
|
496
|
+
style,
|
|
497
|
+
...rest
|
|
498
|
+
});
|
|
283
499
|
}
|
|
284
500
|
);
|
|
285
501
|
|
|
286
502
|
// packages/ui-react/src/components/kp-planets-table.tsx
|
|
287
503
|
import * as React11 from "react";
|
|
288
504
|
var RoxyKpPlanetsTable = React11.forwardRef(
|
|
289
|
-
function RoxyKpPlanetsTable2({ data, ...rest }, ref) {
|
|
505
|
+
function RoxyKpPlanetsTable2({ data, className, style, ...rest }, ref) {
|
|
290
506
|
const internal = React11.useRef(null);
|
|
291
|
-
React11.useImperativeHandle(
|
|
507
|
+
React11.useImperativeHandle(
|
|
508
|
+
ref,
|
|
509
|
+
() => internal.current,
|
|
510
|
+
[]
|
|
511
|
+
);
|
|
292
512
|
const [loaded2, setLoaded] = React11.useState(false);
|
|
513
|
+
const [error, setError] = React11.useState(null);
|
|
293
514
|
React11.useEffect(() => {
|
|
294
515
|
let active = true;
|
|
295
516
|
ensureScriptLoaded().then(() => {
|
|
296
517
|
if (active) setLoaded(true);
|
|
518
|
+
}).catch((err) => {
|
|
519
|
+
if (!active) return;
|
|
520
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
297
521
|
});
|
|
298
522
|
return () => {
|
|
299
523
|
active = false;
|
|
300
524
|
};
|
|
301
525
|
}, []);
|
|
302
526
|
React11.useEffect(() => {
|
|
303
|
-
|
|
304
|
-
|
|
527
|
+
const el = internal.current;
|
|
528
|
+
if (el && data !== void 0) {
|
|
529
|
+
el.data = data;
|
|
305
530
|
}
|
|
306
531
|
}, [data, loaded2]);
|
|
307
|
-
|
|
532
|
+
if (error) {
|
|
533
|
+
return React11.createElement(
|
|
534
|
+
"div",
|
|
535
|
+
{ role: "alert", className, style },
|
|
536
|
+
`Roxy UI script load failed: ${error.message}`
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
return React11.createElement("roxy-kp-planets-table", {
|
|
540
|
+
ref: internal,
|
|
541
|
+
className,
|
|
542
|
+
style,
|
|
543
|
+
...rest
|
|
544
|
+
});
|
|
308
545
|
}
|
|
309
546
|
);
|
|
310
547
|
|
|
311
548
|
// packages/ui-react/src/components/numerology-card.tsx
|
|
312
549
|
import * as React12 from "react";
|
|
313
550
|
var RoxyNumerologyCard = React12.forwardRef(
|
|
314
|
-
function RoxyNumerologyCard2({ data, ...rest }, ref) {
|
|
551
|
+
function RoxyNumerologyCard2({ data, className, style, ...rest }, ref) {
|
|
315
552
|
const internal = React12.useRef(null);
|
|
316
|
-
React12.useImperativeHandle(
|
|
553
|
+
React12.useImperativeHandle(
|
|
554
|
+
ref,
|
|
555
|
+
() => internal.current,
|
|
556
|
+
[]
|
|
557
|
+
);
|
|
317
558
|
const [loaded2, setLoaded] = React12.useState(false);
|
|
559
|
+
const [error, setError] = React12.useState(null);
|
|
318
560
|
React12.useEffect(() => {
|
|
319
561
|
let active = true;
|
|
320
562
|
ensureScriptLoaded().then(() => {
|
|
321
563
|
if (active) setLoaded(true);
|
|
564
|
+
}).catch((err) => {
|
|
565
|
+
if (!active) return;
|
|
566
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
322
567
|
});
|
|
323
568
|
return () => {
|
|
324
569
|
active = false;
|
|
325
570
|
};
|
|
326
571
|
}, []);
|
|
327
572
|
React12.useEffect(() => {
|
|
328
|
-
|
|
329
|
-
|
|
573
|
+
const el = internal.current;
|
|
574
|
+
if (el && data !== void 0) {
|
|
575
|
+
el.data = data;
|
|
330
576
|
}
|
|
331
577
|
}, [data, loaded2]);
|
|
332
|
-
|
|
578
|
+
if (error) {
|
|
579
|
+
return React12.createElement(
|
|
580
|
+
"div",
|
|
581
|
+
{ role: "alert", className, style },
|
|
582
|
+
`Roxy UI script load failed: ${error.message}`
|
|
583
|
+
);
|
|
584
|
+
}
|
|
585
|
+
return React12.createElement("roxy-numerology-card", {
|
|
586
|
+
ref: internal,
|
|
587
|
+
className,
|
|
588
|
+
style,
|
|
589
|
+
...rest
|
|
590
|
+
});
|
|
333
591
|
}
|
|
334
592
|
);
|
|
335
593
|
|
|
336
594
|
// packages/ui-react/src/components/tarot-card.tsx
|
|
337
595
|
import * as React13 from "react";
|
|
338
596
|
var RoxyTarotCard = React13.forwardRef(
|
|
339
|
-
function RoxyTarotCard2({ data, ...rest }, ref) {
|
|
597
|
+
function RoxyTarotCard2({ data, className, style, ...rest }, ref) {
|
|
340
598
|
const internal = React13.useRef(null);
|
|
341
|
-
React13.useImperativeHandle(
|
|
599
|
+
React13.useImperativeHandle(
|
|
600
|
+
ref,
|
|
601
|
+
() => internal.current,
|
|
602
|
+
[]
|
|
603
|
+
);
|
|
342
604
|
const [loaded2, setLoaded] = React13.useState(false);
|
|
605
|
+
const [error, setError] = React13.useState(null);
|
|
343
606
|
React13.useEffect(() => {
|
|
344
607
|
let active = true;
|
|
345
608
|
ensureScriptLoaded().then(() => {
|
|
346
609
|
if (active) setLoaded(true);
|
|
610
|
+
}).catch((err) => {
|
|
611
|
+
if (!active) return;
|
|
612
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
347
613
|
});
|
|
348
614
|
return () => {
|
|
349
615
|
active = false;
|
|
350
616
|
};
|
|
351
617
|
}, []);
|
|
352
618
|
React13.useEffect(() => {
|
|
353
|
-
|
|
354
|
-
|
|
619
|
+
const el = internal.current;
|
|
620
|
+
if (el && data !== void 0) {
|
|
621
|
+
el.data = data;
|
|
355
622
|
}
|
|
356
623
|
}, [data, loaded2]);
|
|
357
|
-
|
|
624
|
+
if (error) {
|
|
625
|
+
return React13.createElement(
|
|
626
|
+
"div",
|
|
627
|
+
{ role: "alert", className, style },
|
|
628
|
+
`Roxy UI script load failed: ${error.message}`
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
return React13.createElement("roxy-tarot-card", {
|
|
632
|
+
ref: internal,
|
|
633
|
+
className,
|
|
634
|
+
style,
|
|
635
|
+
...rest
|
|
636
|
+
});
|
|
358
637
|
}
|
|
359
638
|
);
|
|
360
639
|
|
|
361
640
|
// packages/ui-react/src/components/tarot-spread.tsx
|
|
362
641
|
import * as React14 from "react";
|
|
363
642
|
var RoxyTarotSpread = React14.forwardRef(
|
|
364
|
-
function RoxyTarotSpread2({ data, ...rest }, ref) {
|
|
643
|
+
function RoxyTarotSpread2({ data, className, style, ...rest }, ref) {
|
|
365
644
|
const internal = React14.useRef(null);
|
|
366
|
-
React14.useImperativeHandle(
|
|
645
|
+
React14.useImperativeHandle(
|
|
646
|
+
ref,
|
|
647
|
+
() => internal.current,
|
|
648
|
+
[]
|
|
649
|
+
);
|
|
367
650
|
const [loaded2, setLoaded] = React14.useState(false);
|
|
651
|
+
const [error, setError] = React14.useState(null);
|
|
368
652
|
React14.useEffect(() => {
|
|
369
653
|
let active = true;
|
|
370
654
|
ensureScriptLoaded().then(() => {
|
|
371
655
|
if (active) setLoaded(true);
|
|
656
|
+
}).catch((err) => {
|
|
657
|
+
if (!active) return;
|
|
658
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
372
659
|
});
|
|
373
660
|
return () => {
|
|
374
661
|
active = false;
|
|
375
662
|
};
|
|
376
663
|
}, []);
|
|
377
664
|
React14.useEffect(() => {
|
|
378
|
-
|
|
379
|
-
|
|
665
|
+
const el = internal.current;
|
|
666
|
+
if (el && data !== void 0) {
|
|
667
|
+
el.data = data;
|
|
380
668
|
}
|
|
381
669
|
}, [data, loaded2]);
|
|
382
|
-
|
|
670
|
+
if (error) {
|
|
671
|
+
return React14.createElement(
|
|
672
|
+
"div",
|
|
673
|
+
{ role: "alert", className, style },
|
|
674
|
+
`Roxy UI script load failed: ${error.message}`
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
return React14.createElement("roxy-tarot-spread", {
|
|
678
|
+
ref: internal,
|
|
679
|
+
className,
|
|
680
|
+
style,
|
|
681
|
+
...rest
|
|
682
|
+
});
|
|
383
683
|
}
|
|
384
684
|
);
|
|
385
685
|
|
|
386
686
|
// packages/ui-react/src/components/biorhythm-chart.tsx
|
|
387
687
|
import * as React15 from "react";
|
|
388
688
|
var RoxyBiorhythmChart = React15.forwardRef(
|
|
389
|
-
function RoxyBiorhythmChart2({ data, ...rest }, ref) {
|
|
689
|
+
function RoxyBiorhythmChart2({ data, className, style, ...rest }, ref) {
|
|
390
690
|
const internal = React15.useRef(null);
|
|
391
|
-
React15.useImperativeHandle(
|
|
691
|
+
React15.useImperativeHandle(
|
|
692
|
+
ref,
|
|
693
|
+
() => internal.current,
|
|
694
|
+
[]
|
|
695
|
+
);
|
|
392
696
|
const [loaded2, setLoaded] = React15.useState(false);
|
|
697
|
+
const [error, setError] = React15.useState(null);
|
|
393
698
|
React15.useEffect(() => {
|
|
394
699
|
let active = true;
|
|
395
700
|
ensureScriptLoaded().then(() => {
|
|
396
701
|
if (active) setLoaded(true);
|
|
702
|
+
}).catch((err) => {
|
|
703
|
+
if (!active) return;
|
|
704
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
397
705
|
});
|
|
398
706
|
return () => {
|
|
399
707
|
active = false;
|
|
400
708
|
};
|
|
401
709
|
}, []);
|
|
402
710
|
React15.useEffect(() => {
|
|
403
|
-
|
|
404
|
-
|
|
711
|
+
const el = internal.current;
|
|
712
|
+
if (el && data !== void 0) {
|
|
713
|
+
el.data = data;
|
|
405
714
|
}
|
|
406
715
|
}, [data, loaded2]);
|
|
407
|
-
|
|
716
|
+
if (error) {
|
|
717
|
+
return React15.createElement(
|
|
718
|
+
"div",
|
|
719
|
+
{ role: "alert", className, style },
|
|
720
|
+
`Roxy UI script load failed: ${error.message}`
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
return React15.createElement("roxy-biorhythm-chart", {
|
|
724
|
+
ref: internal,
|
|
725
|
+
className,
|
|
726
|
+
style,
|
|
727
|
+
...rest
|
|
728
|
+
});
|
|
408
729
|
}
|
|
409
730
|
);
|
|
410
731
|
|
|
411
732
|
// packages/ui-react/src/components/hexagram.tsx
|
|
412
733
|
import * as React16 from "react";
|
|
413
734
|
var RoxyHexagram = React16.forwardRef(
|
|
414
|
-
function RoxyHexagram2({ data, ...rest }, ref) {
|
|
735
|
+
function RoxyHexagram2({ data, className, style, ...rest }, ref) {
|
|
415
736
|
const internal = React16.useRef(null);
|
|
416
|
-
React16.useImperativeHandle(
|
|
737
|
+
React16.useImperativeHandle(
|
|
738
|
+
ref,
|
|
739
|
+
() => internal.current,
|
|
740
|
+
[]
|
|
741
|
+
);
|
|
417
742
|
const [loaded2, setLoaded] = React16.useState(false);
|
|
743
|
+
const [error, setError] = React16.useState(null);
|
|
418
744
|
React16.useEffect(() => {
|
|
419
745
|
let active = true;
|
|
420
746
|
ensureScriptLoaded().then(() => {
|
|
421
747
|
if (active) setLoaded(true);
|
|
748
|
+
}).catch((err) => {
|
|
749
|
+
if (!active) return;
|
|
750
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
422
751
|
});
|
|
423
752
|
return () => {
|
|
424
753
|
active = false;
|
|
425
754
|
};
|
|
426
755
|
}, []);
|
|
427
756
|
React16.useEffect(() => {
|
|
428
|
-
|
|
429
|
-
|
|
757
|
+
const el = internal.current;
|
|
758
|
+
if (el && data !== void 0) {
|
|
759
|
+
el.data = data;
|
|
430
760
|
}
|
|
431
761
|
}, [data, loaded2]);
|
|
432
|
-
|
|
762
|
+
if (error) {
|
|
763
|
+
return React16.createElement(
|
|
764
|
+
"div",
|
|
765
|
+
{ role: "alert", className, style },
|
|
766
|
+
`Roxy UI script load failed: ${error.message}`
|
|
767
|
+
);
|
|
768
|
+
}
|
|
769
|
+
return React16.createElement("roxy-hexagram", {
|
|
770
|
+
ref: internal,
|
|
771
|
+
className,
|
|
772
|
+
style,
|
|
773
|
+
...rest
|
|
774
|
+
});
|
|
433
775
|
}
|
|
434
776
|
);
|
|
435
777
|
|
|
436
778
|
// packages/ui-react/src/components/endpoint-form.tsx
|
|
437
779
|
import * as React17 from "react";
|
|
438
780
|
var RoxyEndpointForm = React17.forwardRef(
|
|
439
|
-
function RoxyEndpointForm2({ data, ...rest }, ref) {
|
|
781
|
+
function RoxyEndpointForm2({ data, className, style, onRoxySubmit, onRoxyValidationError, onRoxySpecError, ...rest }, ref) {
|
|
440
782
|
const internal = React17.useRef(null);
|
|
441
|
-
React17.useImperativeHandle(
|
|
783
|
+
React17.useImperativeHandle(
|
|
784
|
+
ref,
|
|
785
|
+
() => internal.current,
|
|
786
|
+
[]
|
|
787
|
+
);
|
|
442
788
|
const [loaded2, setLoaded] = React17.useState(false);
|
|
789
|
+
const [error, setError] = React17.useState(null);
|
|
443
790
|
React17.useEffect(() => {
|
|
444
791
|
let active = true;
|
|
445
792
|
ensureScriptLoaded().then(() => {
|
|
446
793
|
if (active) setLoaded(true);
|
|
794
|
+
}).catch((err) => {
|
|
795
|
+
if (!active) return;
|
|
796
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
447
797
|
});
|
|
448
798
|
return () => {
|
|
449
799
|
active = false;
|
|
450
800
|
};
|
|
451
801
|
}, []);
|
|
452
802
|
React17.useEffect(() => {
|
|
453
|
-
|
|
454
|
-
|
|
803
|
+
const el = internal.current;
|
|
804
|
+
if (el && data !== void 0) {
|
|
805
|
+
el.data = data;
|
|
455
806
|
}
|
|
456
807
|
}, [data, loaded2]);
|
|
457
|
-
|
|
808
|
+
React17.useEffect(() => {
|
|
809
|
+
const el = internal.current;
|
|
810
|
+
const handler = onRoxySubmit;
|
|
811
|
+
if (!el || !handler) return;
|
|
812
|
+
const listener = (event) => handler(event);
|
|
813
|
+
el.addEventListener("roxy-submit", listener);
|
|
814
|
+
return () => el.removeEventListener("roxy-submit", listener);
|
|
815
|
+
}, [onRoxySubmit, loaded2]);
|
|
816
|
+
React17.useEffect(() => {
|
|
817
|
+
const el = internal.current;
|
|
818
|
+
const handler = onRoxyValidationError;
|
|
819
|
+
if (!el || !handler) return;
|
|
820
|
+
const listener = (event) => handler(event);
|
|
821
|
+
el.addEventListener("roxy-validation-error", listener);
|
|
822
|
+
return () => el.removeEventListener("roxy-validation-error", listener);
|
|
823
|
+
}, [onRoxyValidationError, loaded2]);
|
|
824
|
+
React17.useEffect(() => {
|
|
825
|
+
const el = internal.current;
|
|
826
|
+
const handler = onRoxySpecError;
|
|
827
|
+
if (!el || !handler) return;
|
|
828
|
+
const listener = (event) => handler(event);
|
|
829
|
+
el.addEventListener("roxy-spec-error", listener);
|
|
830
|
+
return () => el.removeEventListener("roxy-spec-error", listener);
|
|
831
|
+
}, [onRoxySpecError, loaded2]);
|
|
832
|
+
if (error) {
|
|
833
|
+
return React17.createElement(
|
|
834
|
+
"div",
|
|
835
|
+
{ role: "alert", className, style },
|
|
836
|
+
`Roxy UI script load failed: ${error.message}`
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
return React17.createElement("roxy-endpoint-form", {
|
|
840
|
+
ref: internal,
|
|
841
|
+
className,
|
|
842
|
+
style,
|
|
843
|
+
...rest
|
|
844
|
+
});
|
|
458
845
|
}
|
|
459
846
|
);
|
|
460
847
|
|
|
461
848
|
// packages/ui-react/src/components/location-search.tsx
|
|
462
849
|
import * as React18 from "react";
|
|
463
850
|
var RoxyLocationSearch = React18.forwardRef(
|
|
464
|
-
function RoxyLocationSearch2({ data, ...rest }, ref) {
|
|
851
|
+
function RoxyLocationSearch2({ data, className, style, onRoxyLocationSelect, onRoxyValidationError, ...rest }, ref) {
|
|
465
852
|
const internal = React18.useRef(null);
|
|
466
|
-
React18.useImperativeHandle(
|
|
853
|
+
React18.useImperativeHandle(
|
|
854
|
+
ref,
|
|
855
|
+
() => internal.current,
|
|
856
|
+
[]
|
|
857
|
+
);
|
|
467
858
|
const [loaded2, setLoaded] = React18.useState(false);
|
|
859
|
+
const [error, setError] = React18.useState(null);
|
|
468
860
|
React18.useEffect(() => {
|
|
469
861
|
let active = true;
|
|
470
862
|
ensureScriptLoaded().then(() => {
|
|
471
863
|
if (active) setLoaded(true);
|
|
864
|
+
}).catch((err) => {
|
|
865
|
+
if (!active) return;
|
|
866
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
472
867
|
});
|
|
473
868
|
return () => {
|
|
474
869
|
active = false;
|
|
475
870
|
};
|
|
476
871
|
}, []);
|
|
477
872
|
React18.useEffect(() => {
|
|
478
|
-
|
|
479
|
-
|
|
873
|
+
const el = internal.current;
|
|
874
|
+
if (el && data !== void 0) {
|
|
875
|
+
el.data = data;
|
|
480
876
|
}
|
|
481
877
|
}, [data, loaded2]);
|
|
482
|
-
|
|
878
|
+
React18.useEffect(() => {
|
|
879
|
+
const el = internal.current;
|
|
880
|
+
const handler = onRoxyLocationSelect;
|
|
881
|
+
if (!el || !handler) return;
|
|
882
|
+
const listener = (event) => handler(event);
|
|
883
|
+
el.addEventListener("roxy-location-select", listener);
|
|
884
|
+
return () => el.removeEventListener("roxy-location-select", listener);
|
|
885
|
+
}, [onRoxyLocationSelect, loaded2]);
|
|
886
|
+
React18.useEffect(() => {
|
|
887
|
+
const el = internal.current;
|
|
888
|
+
const handler = onRoxyValidationError;
|
|
889
|
+
if (!el || !handler) return;
|
|
890
|
+
const listener = (event) => handler(event);
|
|
891
|
+
el.addEventListener("roxy-validation-error", listener);
|
|
892
|
+
return () => el.removeEventListener("roxy-validation-error", listener);
|
|
893
|
+
}, [onRoxyValidationError, loaded2]);
|
|
894
|
+
if (error) {
|
|
895
|
+
return React18.createElement(
|
|
896
|
+
"div",
|
|
897
|
+
{ role: "alert", className, style },
|
|
898
|
+
`Roxy UI script load failed: ${error.message}`
|
|
899
|
+
);
|
|
900
|
+
}
|
|
901
|
+
return React18.createElement("roxy-location-search", {
|
|
902
|
+
ref: internal,
|
|
903
|
+
className,
|
|
904
|
+
style,
|
|
905
|
+
...rest
|
|
906
|
+
});
|
|
483
907
|
}
|
|
484
908
|
);
|
|
485
909
|
|
|
486
910
|
// packages/ui-react/src/components/data.tsx
|
|
487
911
|
import * as React19 from "react";
|
|
488
912
|
var RoxyData = React19.forwardRef(
|
|
489
|
-
function RoxyData2({ data, ...rest }, ref) {
|
|
913
|
+
function RoxyData2({ data, className, style, ...rest }, ref) {
|
|
490
914
|
const internal = React19.useRef(null);
|
|
491
|
-
React19.useImperativeHandle(
|
|
915
|
+
React19.useImperativeHandle(
|
|
916
|
+
ref,
|
|
917
|
+
() => internal.current,
|
|
918
|
+
[]
|
|
919
|
+
);
|
|
492
920
|
const [loaded2, setLoaded] = React19.useState(false);
|
|
921
|
+
const [error, setError] = React19.useState(null);
|
|
493
922
|
React19.useEffect(() => {
|
|
494
923
|
let active = true;
|
|
495
924
|
ensureScriptLoaded().then(() => {
|
|
496
925
|
if (active) setLoaded(true);
|
|
926
|
+
}).catch((err) => {
|
|
927
|
+
if (!active) return;
|
|
928
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
497
929
|
});
|
|
498
930
|
return () => {
|
|
499
931
|
active = false;
|
|
500
932
|
};
|
|
501
933
|
}, []);
|
|
502
934
|
React19.useEffect(() => {
|
|
503
|
-
|
|
504
|
-
|
|
935
|
+
const el = internal.current;
|
|
936
|
+
if (el && data !== void 0) {
|
|
937
|
+
el.data = data;
|
|
505
938
|
}
|
|
506
939
|
}, [data, loaded2]);
|
|
507
|
-
|
|
940
|
+
if (error) {
|
|
941
|
+
return React19.createElement(
|
|
942
|
+
"div",
|
|
943
|
+
{ role: "alert", className, style },
|
|
944
|
+
`Roxy UI script load failed: ${error.message}`
|
|
945
|
+
);
|
|
946
|
+
}
|
|
947
|
+
return React19.createElement("roxy-data", {
|
|
948
|
+
ref: internal,
|
|
949
|
+
className,
|
|
950
|
+
style,
|
|
951
|
+
...rest
|
|
952
|
+
});
|
|
508
953
|
}
|
|
509
954
|
);
|
|
510
955
|
export {
|
|
956
|
+
ROXY_UI_VERSION,
|
|
511
957
|
RoxyBiorhythmChart,
|
|
512
958
|
RoxyCompatibilityCard,
|
|
513
959
|
RoxyDashaTimeline,
|