@erikey/react 0.1.7 → 0.2.0

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/ui/index.js CHANGED
@@ -2438,12 +2438,12 @@ function clsx() {
2438
2438
 
2439
2439
  // ../../../node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
2440
2440
  var CLASS_PART_SEPARATOR = "-";
2441
- var createClassGroupUtils = (config2) => {
2442
- const classMap = createClassMap(config2);
2441
+ var createClassGroupUtils = (config3) => {
2442
+ const classMap = createClassMap(config3);
2443
2443
  const {
2444
2444
  conflictingClassGroups,
2445
2445
  conflictingClassGroupModifiers
2446
- } = config2;
2446
+ } = config3;
2447
2447
  const getClassGroupId = (className) => {
2448
2448
  const classParts = className.split(CLASS_PART_SEPARATOR);
2449
2449
  if (classParts[0] === "" && classParts.length !== 1) {
@@ -2491,16 +2491,16 @@ var getGroupIdForArbitraryProperty = (className) => {
2491
2491
  }
2492
2492
  }
2493
2493
  };
2494
- var createClassMap = (config2) => {
2494
+ var createClassMap = (config3) => {
2495
2495
  const {
2496
2496
  theme,
2497
2497
  prefix
2498
- } = config2;
2498
+ } = config3;
2499
2499
  const classMap = {
2500
2500
  nextPart: /* @__PURE__ */ new Map(),
2501
2501
  validators: []
2502
2502
  };
2503
- const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config2.classGroups), prefix);
2503
+ const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config3.classGroups), prefix);
2504
2504
  prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
2505
2505
  processClassesRecursively(classGroup, classMap, classGroupId, theme);
2506
2506
  });
@@ -2601,11 +2601,11 @@ var createLruCache = (maxCacheSize) => {
2601
2601
  };
2602
2602
  };
2603
2603
  var IMPORTANT_MODIFIER = "!";
2604
- var createParseClassName = (config2) => {
2604
+ var createParseClassName = (config3) => {
2605
2605
  const {
2606
2606
  separator,
2607
2607
  experimentalParseClassName
2608
- } = config2;
2608
+ } = config3;
2609
2609
  const isSeparatorSingleCharacter = separator.length === 1;
2610
2610
  const firstSeparatorCharacter = separator[0];
2611
2611
  const separatorLength = separator.length;
@@ -2670,10 +2670,10 @@ var sortModifiers = (modifiers) => {
2670
2670
  sortedModifiers.push(...unsortedModifiers.sort());
2671
2671
  return sortedModifiers;
2672
2672
  };
2673
- var createConfigUtils = (config2) => ({
2674
- cache: createLruCache(config2.cacheSize),
2675
- parseClassName: createParseClassName(config2),
2676
- ...createClassGroupUtils(config2)
2673
+ var createConfigUtils = (config3) => ({
2674
+ cache: createLruCache(config3.cacheSize),
2675
+ parseClassName: createParseClassName(config3),
2676
+ ...createClassGroupUtils(config3)
2677
2677
  });
2678
2678
  var SPLIT_CLASSES_REGEX = /\s+/;
2679
2679
  var mergeClassList = (classList, configUtils) => {
@@ -2760,8 +2760,8 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
2760
2760
  let cacheSet;
2761
2761
  let functionToCall = initTailwindMerge;
2762
2762
  function initTailwindMerge(classList) {
2763
- const config2 = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
2764
- configUtils = createConfigUtils(config2);
2763
+ const config3 = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
2764
+ configUtils = createConfigUtils(config3);
2765
2765
  cacheGet = configUtils.cache.get;
2766
2766
  cacheSet = configUtils.cache.set;
2767
2767
  functionToCall = tailwindMerge;
@@ -4901,7 +4901,7 @@ var NEVER = Object.freeze({
4901
4901
  status: "aborted"
4902
4902
  });
4903
4903
  // @__NO_SIDE_EFFECTS__
4904
- function $constructor(name, initializer3, params) {
4904
+ function $constructor(name, initializer4, params) {
4905
4905
  function init(inst, def) {
4906
4906
  var _a;
4907
4907
  Object.defineProperty(inst, "_zod", {
@@ -4910,7 +4910,7 @@ function $constructor(name, initializer3, params) {
4910
4910
  });
4911
4911
  (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
4912
4912
  inst._zod.traits.add(name);
4913
- initializer3(inst, def);
4913
+ initializer4(inst, def);
4914
4914
  for (const k2 in _3.prototype) {
4915
4915
  if (!(k2 in inst))
4916
4916
  Object.defineProperty(inst, k2, { value: _3.prototype[k2].bind(inst) });
@@ -5508,10 +5508,10 @@ function prefixIssues(path, issues) {
5508
5508
  function unwrapMessage(message) {
5509
5509
  return typeof message === "string" ? message : message?.message;
5510
5510
  }
5511
- function finalizeIssue(iss, ctx, config2) {
5511
+ function finalizeIssue(iss, ctx, config3) {
5512
5512
  const full = { ...iss, path: iss.path ?? [] };
5513
5513
  if (!iss.message) {
5514
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
5514
+ const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input";
5515
5515
  full.message = message;
5516
5516
  }
5517
5517
  delete full.inst;
@@ -5676,7 +5676,6 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
5676
5676
  }
5677
5677
  return result.value;
5678
5678
  };
5679
- var parse = /* @__PURE__ */ _parse($ZodRealError);
5680
5679
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
5681
5680
  const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
5682
5681
  let result = schema._zod.run({ value, issues: [] }, ctx);
@@ -5689,7 +5688,6 @@ var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
5689
5688
  }
5690
5689
  return result.value;
5691
5690
  };
5692
- var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
5693
5691
  var _safeParse = (_Err) => (schema, value, _ctx) => {
5694
5692
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
5695
5693
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -6960,8 +6958,8 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
6960
6958
  let fastpass;
6961
6959
  const isObject3 = isObject;
6962
6960
  const jit = !globalConfig.jitless;
6963
- const allowsEval2 = allowsEval;
6964
- const fastEnabled = jit && allowsEval2.value;
6961
+ const allowsEval3 = allowsEval;
6962
+ const fastEnabled = jit && allowsEval3.value;
6965
6963
  const catchall = def.catchall;
6966
6964
  let value;
6967
6965
  inst._zod.parse = (payload, ctx) => {
@@ -10513,10 +10511,10 @@ function getElementRef(element) {
10513
10511
  // ../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
10514
10512
  var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
10515
10513
  var cx = clsx;
10516
- var cva = (base, config2) => (props) => {
10514
+ var cva = (base, config3) => (props) => {
10517
10515
  var _config_compoundVariants;
10518
- if ((config2 === null || config2 === void 0 ? void 0 : config2.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
10519
- const { variants, defaultVariants } = config2;
10516
+ if ((config3 === null || config3 === void 0 ? void 0 : config3.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
10517
+ const { variants, defaultVariants } = config3;
10520
10518
  const getVariantClassNames = Object.keys(variants).map((variant) => {
10521
10519
  const variantProp = props === null || props === void 0 ? void 0 : props[variant];
10522
10520
  const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
@@ -10532,7 +10530,7 @@ var cva = (base, config2) => (props) => {
10532
10530
  acc[key] = value;
10533
10531
  return acc;
10534
10532
  }, {});
10535
- const getCompoundVariantClassNames = config2 === null || config2 === void 0 ? void 0 : (_config_compoundVariants = config2.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
10533
+ const getCompoundVariantClassNames = config3 === null || config3 === void 0 ? void 0 : (_config_compoundVariants = config3.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
10536
10534
  let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
10537
10535
  return Object.entries(compoundVariantOptions).every((param2) => {
10538
10536
  let [key, value] = param2;
@@ -11598,13 +11596,13 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
11598
11596
  }
11599
11597
  return coords;
11600
11598
  }
11601
- var computePosition = async (reference, floating, config2) => {
11599
+ var computePosition = async (reference, floating, config3) => {
11602
11600
  const {
11603
11601
  placement = "bottom",
11604
11602
  strategy = "absolute",
11605
11603
  middleware = [],
11606
11604
  platform: platform2
11607
- } = config2;
11605
+ } = config3;
11608
11606
  const validMiddleware = middleware.filter(Boolean);
11609
11607
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
11610
11608
  let rects = await platform2.getElementRects({
@@ -13145,15 +13143,15 @@ function useFloating(options) {
13145
13143
  if (!referenceRef.current || !floatingRef.current) {
13146
13144
  return;
13147
13145
  }
13148
- const config2 = {
13146
+ const config3 = {
13149
13147
  placement,
13150
13148
  strategy,
13151
13149
  middleware: latestMiddleware
13152
13150
  };
13153
13151
  if (platformRef.current) {
13154
- config2.platform = platformRef.current;
13152
+ config3.platform = platformRef.current;
13155
13153
  }
13156
- computePosition2(referenceRef.current, floatingRef.current, config2).then((data2) => {
13154
+ computePosition2(referenceRef.current, floatingRef.current, config3).then((data2) => {
13157
13155
  const fullData = {
13158
13156
  ...data2,
13159
13157
  // The floating element's position may be recomputed while it's closed
@@ -17374,12 +17372,12 @@ function createFormControl(props = {}) {
17374
17372
  options.shouldFocus && !validationResult && iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);
17375
17373
  return validationResult;
17376
17374
  };
17377
- const getValues = (fieldNames, config2) => {
17375
+ const getValues = (fieldNames, config3) => {
17378
17376
  let values = {
17379
17377
  ..._state.mount ? _formValues : _defaultValues
17380
17378
  };
17381
- if (config2) {
17382
- values = extractFormValues(config2.dirtyFields ? _formState.dirtyFields : _formState.touchedFields, values);
17379
+ if (config3) {
17380
+ values = extractFormValues(config3.dirtyFields ? _formState.dirtyFields : _formState.touchedFields, values);
17383
17381
  }
17384
17382
  return isUndefined(fieldNames) ? values : isString(fieldNames) ? get(values, fieldNames) : fieldNames.map((name) => get(values, name));
17385
17383
  };
@@ -18265,6 +18263,178 @@ function n(e) {
18265
18263
  return e.replace(/\]|\[/g, "");
18266
18264
  }
18267
18265
 
18266
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js
18267
+ var NEVER2 = Object.freeze({
18268
+ status: "aborted"
18269
+ });
18270
+ // @__NO_SIDE_EFFECTS__
18271
+ function $constructor2(name, initializer4, params) {
18272
+ function init(inst, def) {
18273
+ var _a;
18274
+ Object.defineProperty(inst, "_zod", {
18275
+ value: inst._zod ?? {},
18276
+ enumerable: false
18277
+ });
18278
+ (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
18279
+ inst._zod.traits.add(name);
18280
+ initializer4(inst, def);
18281
+ for (const k2 in _3.prototype) {
18282
+ if (!(k2 in inst))
18283
+ Object.defineProperty(inst, k2, { value: _3.prototype[k2].bind(inst) });
18284
+ }
18285
+ inst._zod.constr = _3;
18286
+ inst._zod.def = def;
18287
+ }
18288
+ const Parent = params?.Parent ?? Object;
18289
+ class Definition extends Parent {
18290
+ }
18291
+ Object.defineProperty(Definition, "name", { value: name });
18292
+ function _3(def) {
18293
+ var _a;
18294
+ const inst = params?.Parent ? new Definition() : this;
18295
+ init(inst, def);
18296
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
18297
+ for (const fn of inst._zod.deferred) {
18298
+ fn();
18299
+ }
18300
+ return inst;
18301
+ }
18302
+ Object.defineProperty(_3, "init", { value: init });
18303
+ Object.defineProperty(_3, Symbol.hasInstance, {
18304
+ value: (inst) => {
18305
+ if (params?.Parent && inst instanceof params.Parent)
18306
+ return true;
18307
+ return inst?._zod?.traits?.has(name);
18308
+ }
18309
+ });
18310
+ Object.defineProperty(_3, "name", { value: name });
18311
+ return _3;
18312
+ }
18313
+ var $brand2 = Symbol("zod_brand");
18314
+ var $ZodAsyncError2 = class extends Error {
18315
+ constructor() {
18316
+ super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
18317
+ }
18318
+ };
18319
+ var globalConfig2 = {};
18320
+ function config2(newConfig) {
18321
+ if (newConfig)
18322
+ Object.assign(globalConfig2, newConfig);
18323
+ return globalConfig2;
18324
+ }
18325
+
18326
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/util.js
18327
+ function jsonStringifyReplacer2(_3, value) {
18328
+ if (typeof value === "bigint")
18329
+ return value.toString();
18330
+ return value;
18331
+ }
18332
+ function cached2(getter) {
18333
+ const set2 = false;
18334
+ return {
18335
+ get value() {
18336
+ if (!set2) {
18337
+ const value = getter();
18338
+ Object.defineProperty(this, "value", { value });
18339
+ return value;
18340
+ }
18341
+ throw new Error("cached value already set");
18342
+ }
18343
+ };
18344
+ }
18345
+ var captureStackTrace2 = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {
18346
+ };
18347
+ var allowsEval2 = cached2(() => {
18348
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
18349
+ return false;
18350
+ }
18351
+ try {
18352
+ const F2 = Function;
18353
+ new F2("");
18354
+ return true;
18355
+ } catch (_3) {
18356
+ return false;
18357
+ }
18358
+ });
18359
+ var NUMBER_FORMAT_RANGES2 = {
18360
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
18361
+ int32: [-2147483648, 2147483647],
18362
+ uint32: [0, 4294967295],
18363
+ float32: [-34028234663852886e22, 34028234663852886e22],
18364
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
18365
+ };
18366
+ function unwrapMessage2(message) {
18367
+ return typeof message === "string" ? message : message?.message;
18368
+ }
18369
+ function finalizeIssue2(iss, ctx, config3) {
18370
+ const full = { ...iss, path: iss.path ?? [] };
18371
+ if (!iss.message) {
18372
+ const message = unwrapMessage2(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage2(ctx?.error?.(iss)) ?? unwrapMessage2(config3.customError?.(iss)) ?? unwrapMessage2(config3.localeError?.(iss)) ?? "Invalid input";
18373
+ full.message = message;
18374
+ }
18375
+ delete full.inst;
18376
+ delete full.continue;
18377
+ if (!ctx?.reportInput) {
18378
+ delete full.input;
18379
+ }
18380
+ return full;
18381
+ }
18382
+
18383
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/errors.js
18384
+ var initializer3 = (inst, def) => {
18385
+ inst.name = "$ZodError";
18386
+ Object.defineProperty(inst, "_zod", {
18387
+ value: inst._zod,
18388
+ enumerable: false
18389
+ });
18390
+ Object.defineProperty(inst, "issues", {
18391
+ value: def,
18392
+ enumerable: false
18393
+ });
18394
+ Object.defineProperty(inst, "message", {
18395
+ get() {
18396
+ return JSON.stringify(def, jsonStringifyReplacer2, 2);
18397
+ },
18398
+ enumerable: true
18399
+ // configurable: false,
18400
+ });
18401
+ Object.defineProperty(inst, "toString", {
18402
+ value: () => inst.message,
18403
+ enumerable: false
18404
+ });
18405
+ };
18406
+ var $ZodError2 = $constructor2("$ZodError", initializer3);
18407
+ var $ZodRealError2 = $constructor2("$ZodError", initializer3, { Parent: Error });
18408
+
18409
+ // ../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/parse.js
18410
+ var _parse2 = (_Err) => (schema, value, _ctx, _params) => {
18411
+ const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
18412
+ const result = schema._zod.run({ value, issues: [] }, ctx);
18413
+ if (result instanceof Promise) {
18414
+ throw new $ZodAsyncError2();
18415
+ }
18416
+ if (result.issues.length) {
18417
+ const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2())));
18418
+ captureStackTrace2(e, _params?.callee);
18419
+ throw e;
18420
+ }
18421
+ return result.value;
18422
+ };
18423
+ var parse4 = /* @__PURE__ */ _parse2($ZodRealError2);
18424
+ var _parseAsync2 = (_Err) => async (schema, value, _ctx, params) => {
18425
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
18426
+ let result = schema._zod.run({ value, issues: [] }, ctx);
18427
+ if (result instanceof Promise)
18428
+ result = await result;
18429
+ if (result.issues.length) {
18430
+ const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue2(iss, ctx, config2())));
18431
+ captureStackTrace2(e, params?.callee);
18432
+ throw e;
18433
+ }
18434
+ return result.value;
18435
+ };
18436
+ var parseAsync3 = /* @__PURE__ */ _parseAsync2($ZodRealError2);
18437
+
18268
18438
  // ../../../node_modules/.pnpm/@hookform+resolvers@5.2.2_react-hook-form@7.66.1_react@19.0.0_/node_modules/@hookform/resolvers/zod/dist/zod.mjs
18269
18439
  function t(r3, e) {
18270
18440
  try {
@@ -18336,12 +18506,12 @@ function a(o2, a2, u) {
18336
18506
  })(o2)) return function(s3, c, f2) {
18337
18507
  try {
18338
18508
  return Promise.resolve(t(function() {
18339
- return Promise.resolve(("sync" === u.mode ? parse : parseAsync)(o2, s3, a2)).then(function(e) {
18509
+ return Promise.resolve(("sync" === u.mode ? parse4 : parseAsync3)(o2, s3, a2)).then(function(e) {
18340
18510
  return f2.shouldUseNativeValidation && o({}, f2), { errors: {}, values: u.raw ? Object.assign({}, s3) : e };
18341
18511
  });
18342
18512
  }, function(r3) {
18343
18513
  if ((function(r4) {
18344
- return r4 instanceof $ZodError;
18514
+ return r4 instanceof $ZodError2;
18345
18515
  })(r3)) return { values: {}, errors: s(i2(r3.issues, !f2.shouldUseNativeValidation && "all" === f2.criteriaMode), f2) };
18346
18516
  throw r3;
18347
18517
  }));
@@ -21337,10 +21507,10 @@ function UAItem(itemType, ua, rgxMap, uaCH) {
21337
21507
  break;
21338
21508
  case RESULT:
21339
21509
  var data = this.data;
21340
- var parse4 = function(itemType2) {
21510
+ var parse5 = function(itemType2) {
21341
21511
  return data[itemType2].getItem().setCH(uaCH2).parseCH().get();
21342
21512
  };
21343
- this.set(BROWSER, parse4(BROWSER)).set(CPU, parse4(CPU)).set(DEVICE, parse4(DEVICE)).set(ENGINE, parse4(ENGINE)).set(OS, parse4(OS));
21513
+ this.set(BROWSER, parse5(BROWSER)).set(CPU, parse5(CPU)).set(DEVICE, parse5(DEVICE)).set(ENGINE, parse5(ENGINE)).set(OS, parse5(OS));
21344
21514
  }
21345
21515
  return this;
21346
21516
  };