@eventop/sdk 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +319 -62
- package/dist/index.js +297 -40
- package/dist/react/index.cjs +319 -62
- package/dist/react/index.js +297 -40
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext, useContext, useRef, useCallback, useEffect, Children, cloneElement, useState } from 'react';
|
|
1
|
+
import require$$0, { createContext, useContext, useRef, useCallback, useEffect, Children, cloneElement, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Root context — holds the global feature registry.
|
|
@@ -185,25 +185,290 @@ function createFeatureRegistry() {
|
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
+
var jsxRuntime = {exports: {}};
|
|
189
|
+
|
|
190
|
+
var reactJsxRuntime_production = {};
|
|
191
|
+
|
|
188
192
|
/**
|
|
189
|
-
*
|
|
193
|
+
* @license React
|
|
194
|
+
* react-jsx-runtime.production.js
|
|
190
195
|
*
|
|
191
|
-
*
|
|
192
|
-
* Every EventopTarget and EventopStep anywhere in the tree will
|
|
193
|
-
* register with this provider automatically.
|
|
196
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
194
197
|
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
* provider={myServerFetcher}
|
|
198
|
-
* appName="PixelCraft"
|
|
199
|
-
* assistantName="Pixel AI"
|
|
200
|
-
* suggestions={['Add a shadow', 'Export design']}
|
|
201
|
-
* theme={{ mode: 'dark', tokens: { accent: '#6366f1' } }}
|
|
202
|
-
* position={{ corner: 'bottom-right' }}
|
|
203
|
-
* >
|
|
204
|
-
* <App />
|
|
205
|
-
* </EventopProvider>
|
|
198
|
+
* This source code is licensed under the MIT license found in the
|
|
199
|
+
* LICENSE file in the root directory of this source tree.
|
|
206
200
|
*/
|
|
201
|
+
var hasRequiredReactJsxRuntime_production;
|
|
202
|
+
function requireReactJsxRuntime_production() {
|
|
203
|
+
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
204
|
+
hasRequiredReactJsxRuntime_production = 1;
|
|
205
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
206
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
207
|
+
function jsxProd(type, config, maybeKey) {
|
|
208
|
+
var key = null;
|
|
209
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
210
|
+
void 0 !== config.key && (key = "" + config.key);
|
|
211
|
+
if ("key" in config) {
|
|
212
|
+
maybeKey = {};
|
|
213
|
+
for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
|
|
214
|
+
} else maybeKey = config;
|
|
215
|
+
config = maybeKey.ref;
|
|
216
|
+
return {
|
|
217
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
218
|
+
type: type,
|
|
219
|
+
key: key,
|
|
220
|
+
ref: void 0 !== config ? config : null,
|
|
221
|
+
props: maybeKey
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
225
|
+
reactJsxRuntime_production.jsx = jsxProd;
|
|
226
|
+
reactJsxRuntime_production.jsxs = jsxProd;
|
|
227
|
+
return reactJsxRuntime_production;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
var reactJsxRuntime_development = {};
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @license React
|
|
234
|
+
* react-jsx-runtime.development.js
|
|
235
|
+
*
|
|
236
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the MIT license found in the
|
|
239
|
+
* LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/
|
|
241
|
+
var hasRequiredReactJsxRuntime_development;
|
|
242
|
+
function requireReactJsxRuntime_development() {
|
|
243
|
+
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
244
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
245
|
+
"production" !== process.env.NODE_ENV && function () {
|
|
246
|
+
function getComponentNameFromType(type) {
|
|
247
|
+
if (null == type) return null;
|
|
248
|
+
if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
|
|
249
|
+
if ("string" === typeof type) return type;
|
|
250
|
+
switch (type) {
|
|
251
|
+
case REACT_FRAGMENT_TYPE:
|
|
252
|
+
return "Fragment";
|
|
253
|
+
case REACT_PROFILER_TYPE:
|
|
254
|
+
return "Profiler";
|
|
255
|
+
case REACT_STRICT_MODE_TYPE:
|
|
256
|
+
return "StrictMode";
|
|
257
|
+
case REACT_SUSPENSE_TYPE:
|
|
258
|
+
return "Suspense";
|
|
259
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
260
|
+
return "SuspenseList";
|
|
261
|
+
case REACT_ACTIVITY_TYPE:
|
|
262
|
+
return "Activity";
|
|
263
|
+
}
|
|
264
|
+
if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) {
|
|
265
|
+
case REACT_PORTAL_TYPE:
|
|
266
|
+
return "Portal";
|
|
267
|
+
case REACT_CONTEXT_TYPE:
|
|
268
|
+
return type.displayName || "Context";
|
|
269
|
+
case REACT_CONSUMER_TYPE:
|
|
270
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
271
|
+
case REACT_FORWARD_REF_TYPE:
|
|
272
|
+
var innerType = type.render;
|
|
273
|
+
type = type.displayName;
|
|
274
|
+
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
|
|
275
|
+
return type;
|
|
276
|
+
case REACT_MEMO_TYPE:
|
|
277
|
+
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
|
|
278
|
+
case REACT_LAZY_TYPE:
|
|
279
|
+
innerType = type._payload;
|
|
280
|
+
type = type._init;
|
|
281
|
+
try {
|
|
282
|
+
return getComponentNameFromType(type(innerType));
|
|
283
|
+
} catch (x) {}
|
|
284
|
+
}
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
function testStringCoercion(value) {
|
|
288
|
+
return "" + value;
|
|
289
|
+
}
|
|
290
|
+
function checkKeyStringCoercion(value) {
|
|
291
|
+
try {
|
|
292
|
+
testStringCoercion(value);
|
|
293
|
+
var JSCompiler_inline_result = !1;
|
|
294
|
+
} catch (e) {
|
|
295
|
+
JSCompiler_inline_result = true;
|
|
296
|
+
}
|
|
297
|
+
if (JSCompiler_inline_result) {
|
|
298
|
+
JSCompiler_inline_result = console;
|
|
299
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
300
|
+
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
|
301
|
+
JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0);
|
|
302
|
+
return testStringCoercion(value);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
function getTaskName(type) {
|
|
306
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
307
|
+
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>";
|
|
308
|
+
try {
|
|
309
|
+
var name = getComponentNameFromType(type);
|
|
310
|
+
return name ? "<" + name + ">" : "<...>";
|
|
311
|
+
} catch (x) {
|
|
312
|
+
return "<...>";
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
function getOwner() {
|
|
316
|
+
var dispatcher = ReactSharedInternals.A;
|
|
317
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
318
|
+
}
|
|
319
|
+
function UnknownOwner() {
|
|
320
|
+
return Error("react-stack-top-frame");
|
|
321
|
+
}
|
|
322
|
+
function hasValidKey(config) {
|
|
323
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
324
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
325
|
+
if (getter && getter.isReactWarning) return false;
|
|
326
|
+
}
|
|
327
|
+
return void 0 !== config.key;
|
|
328
|
+
}
|
|
329
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
330
|
+
function warnAboutAccessingKey() {
|
|
331
|
+
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName));
|
|
332
|
+
}
|
|
333
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
334
|
+
Object.defineProperty(props, "key", {
|
|
335
|
+
get: warnAboutAccessingKey,
|
|
336
|
+
configurable: true
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
340
|
+
var componentName = getComponentNameFromType(this.type);
|
|
341
|
+
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."));
|
|
342
|
+
componentName = this.props.ref;
|
|
343
|
+
return void 0 !== componentName ? componentName : null;
|
|
344
|
+
}
|
|
345
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
346
|
+
var refProp = props.ref;
|
|
347
|
+
type = {
|
|
348
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
349
|
+
type: type,
|
|
350
|
+
key: key,
|
|
351
|
+
props: props,
|
|
352
|
+
_owner: owner
|
|
353
|
+
};
|
|
354
|
+
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
355
|
+
enumerable: false,
|
|
356
|
+
get: elementRefGetterWithDeprecationWarning
|
|
357
|
+
}) : Object.defineProperty(type, "ref", {
|
|
358
|
+
enumerable: false,
|
|
359
|
+
value: null
|
|
360
|
+
});
|
|
361
|
+
type._store = {};
|
|
362
|
+
Object.defineProperty(type._store, "validated", {
|
|
363
|
+
configurable: false,
|
|
364
|
+
enumerable: false,
|
|
365
|
+
writable: true,
|
|
366
|
+
value: 0
|
|
367
|
+
});
|
|
368
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
369
|
+
configurable: false,
|
|
370
|
+
enumerable: false,
|
|
371
|
+
writable: true,
|
|
372
|
+
value: null
|
|
373
|
+
});
|
|
374
|
+
Object.defineProperty(type, "_debugStack", {
|
|
375
|
+
configurable: false,
|
|
376
|
+
enumerable: false,
|
|
377
|
+
writable: true,
|
|
378
|
+
value: debugStack
|
|
379
|
+
});
|
|
380
|
+
Object.defineProperty(type, "_debugTask", {
|
|
381
|
+
configurable: false,
|
|
382
|
+
enumerable: false,
|
|
383
|
+
writable: true,
|
|
384
|
+
value: debugTask
|
|
385
|
+
});
|
|
386
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
387
|
+
return type;
|
|
388
|
+
}
|
|
389
|
+
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
|
|
390
|
+
var children = config.children;
|
|
391
|
+
if (void 0 !== children) if (isStaticChildren) {
|
|
392
|
+
if (isArrayImpl(children)) {
|
|
393
|
+
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++) validateChildKeys(children[isStaticChildren]);
|
|
394
|
+
Object.freeze && Object.freeze(children);
|
|
395
|
+
} else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
396
|
+
} else validateChildKeys(children);
|
|
397
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
398
|
+
children = getComponentNameFromType(type);
|
|
399
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
400
|
+
return "key" !== k;
|
|
401
|
+
});
|
|
402
|
+
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
403
|
+
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', isStaticChildren, children, keys, children), didWarnAboutKeySpread[children + isStaticChildren] = true);
|
|
404
|
+
}
|
|
405
|
+
children = null;
|
|
406
|
+
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
|
|
407
|
+
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
|
|
408
|
+
if ("key" in config) {
|
|
409
|
+
maybeKey = {};
|
|
410
|
+
for (var propName in config) "key" !== propName && (maybeKey[propName] = config[propName]);
|
|
411
|
+
} else maybeKey = config;
|
|
412
|
+
children && defineKeyPropWarningGetter(maybeKey, "function" === typeof type ? type.displayName || type.name || "Unknown" : type);
|
|
413
|
+
return ReactElement(type, children, maybeKey, getOwner(), debugStack, debugTask);
|
|
414
|
+
}
|
|
415
|
+
function validateChildKeys(node) {
|
|
416
|
+
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
|
|
417
|
+
}
|
|
418
|
+
function isValidElement(object) {
|
|
419
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
420
|
+
}
|
|
421
|
+
var React = require$$0,
|
|
422
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
423
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
424
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
425
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
426
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
427
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
428
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
429
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
430
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
431
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
432
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
433
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
434
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
435
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
436
|
+
ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
437
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
438
|
+
isArrayImpl = Array.isArray,
|
|
439
|
+
createTask = console.createTask ? console.createTask : function () {
|
|
440
|
+
return null;
|
|
441
|
+
};
|
|
442
|
+
React = {
|
|
443
|
+
react_stack_bottom_frame: function (callStackForError) {
|
|
444
|
+
return callStackForError();
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
var specialPropKeyWarningShown;
|
|
448
|
+
var didWarnAboutElementRef = {};
|
|
449
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(React, UnknownOwner)();
|
|
450
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
451
|
+
var didWarnAboutKeySpread = {};
|
|
452
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
453
|
+
reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
|
|
454
|
+
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
455
|
+
return jsxDEVImpl(type, config, maybeKey, false, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
456
|
+
};
|
|
457
|
+
reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
|
|
458
|
+
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
459
|
+
return jsxDEVImpl(type, config, maybeKey, true, trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack, trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask);
|
|
460
|
+
};
|
|
461
|
+
}();
|
|
462
|
+
return reactJsxRuntime_development;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
if (process.env.NODE_ENV === 'production') {
|
|
466
|
+
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
467
|
+
} else {
|
|
468
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
469
|
+
}
|
|
470
|
+
var jsxRuntimeExports = jsxRuntime.exports;
|
|
471
|
+
|
|
207
472
|
function EventopProvider({
|
|
208
473
|
children,
|
|
209
474
|
provider,
|
|
@@ -254,17 +519,12 @@ function EventopProvider({
|
|
|
254
519
|
unregisterStep: registry.unregisterStep,
|
|
255
520
|
isRegistered: registry.isRegistered
|
|
256
521
|
};
|
|
257
|
-
return /*#__PURE__*/
|
|
258
|
-
value: ctx
|
|
259
|
-
|
|
522
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(EventopRegistryContext.Provider, {
|
|
523
|
+
value: ctx,
|
|
524
|
+
children: children
|
|
525
|
+
});
|
|
260
526
|
}
|
|
261
527
|
|
|
262
|
-
/**
|
|
263
|
-
* EventopTarget
|
|
264
|
-
*
|
|
265
|
-
* Wraps any component and registers it as an Eventop feature at the call site.
|
|
266
|
-
* The wrapped component does not need to know about Eventop.
|
|
267
|
-
*/
|
|
268
528
|
function EventopTarget({
|
|
269
529
|
children,
|
|
270
530
|
id,
|
|
@@ -312,25 +572,21 @@ function EventopTarget({
|
|
|
312
572
|
}
|
|
313
573
|
});
|
|
314
574
|
} catch {
|
|
315
|
-
wrapped = /*#__PURE__*/
|
|
575
|
+
wrapped = /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
316
576
|
[dataAttr]: '',
|
|
317
577
|
ref: ref,
|
|
318
578
|
style: {
|
|
319
579
|
display: 'contents'
|
|
320
|
-
}
|
|
321
|
-
|
|
580
|
+
},
|
|
581
|
+
children: child
|
|
582
|
+
});
|
|
322
583
|
}
|
|
323
|
-
return /*#__PURE__*/
|
|
324
|
-
value: id
|
|
325
|
-
|
|
584
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(EventopFeatureScopeContext.Provider, {
|
|
585
|
+
value: id,
|
|
586
|
+
children: wrapped
|
|
587
|
+
});
|
|
326
588
|
}
|
|
327
589
|
|
|
328
|
-
/**
|
|
329
|
-
* EventopStep
|
|
330
|
-
*
|
|
331
|
-
* Registers one step in a multi-step flow. Can live anywhere in the tree.
|
|
332
|
-
* Steps self-assemble into order via the `index` prop.
|
|
333
|
-
*/
|
|
334
590
|
function EventopStep({
|
|
335
591
|
children,
|
|
336
592
|
feature,
|
|
@@ -375,13 +631,14 @@ function EventopStep({
|
|
|
375
631
|
}
|
|
376
632
|
});
|
|
377
633
|
} catch {
|
|
378
|
-
wrapped = /*#__PURE__*/
|
|
634
|
+
wrapped = /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
379
635
|
[dataAttr]: '',
|
|
380
636
|
ref: ref,
|
|
381
637
|
style: {
|
|
382
638
|
display: 'contents'
|
|
383
|
-
}
|
|
384
|
-
|
|
639
|
+
},
|
|
640
|
+
children: child
|
|
641
|
+
});
|
|
385
642
|
}
|
|
386
643
|
return wrapped;
|
|
387
644
|
}
|