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