@almadar/ui 5.20.0 → 5.21.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.
@@ -15468,6 +15468,15 @@ function subscribeToVerification(listener) {
15468
15468
  getState().listeners.add(listener);
15469
15469
  return () => getState().listeners.delete(listener);
15470
15470
  }
15471
+ function defaultGetTraitState(traitName) {
15472
+ const getter = getState().traitSnapshots.get(traitName);
15473
+ if (getter === void 0) return void 0;
15474
+ try {
15475
+ return getter().currentState;
15476
+ } catch {
15477
+ return void 0;
15478
+ }
15479
+ }
15471
15480
  function exposeOnWindow() {
15472
15481
  if (typeof window === "undefined") return;
15473
15482
  if (!window.__orbitalVerification) {
@@ -15478,10 +15487,16 @@ function exposeOnWindow() {
15478
15487
  getBridge: getBridgeHealth,
15479
15488
  getSummary,
15480
15489
  waitForTransition,
15481
- getTraitSnapshots
15490
+ getTraitSnapshots,
15491
+ getTraitState: defaultGetTraitState
15482
15492
  };
15483
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
15484
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
15493
+ } else {
15494
+ if (!window.__orbitalVerification.getTraitSnapshots) {
15495
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
15496
+ }
15497
+ if (!window.__orbitalVerification.getTraitState) {
15498
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
15499
+ }
15485
15500
  }
15486
15501
  }
15487
15502
  function waitForTransition(event, timeoutMs = 1e4) {
@@ -54185,7 +54200,8 @@ function VerificationProvider({
54185
54200
  runtimeManager,
54186
54201
  traitStateGetter
54187
54202
  }) {
54188
- const isEnabled2 = enabled ?? (typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
54203
+ const verifyFlag = typeof window !== "undefined" && window.__ALMADAR_VERIFY__ === true;
54204
+ const isEnabled2 = enabled ?? (verifyFlag || typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
54189
54205
  const eventBus = useEventBus();
54190
54206
  const pendingRef = React97.useRef(/* @__PURE__ */ new Map());
54191
54207
  React97.useEffect(() => {
package/dist/avl/index.js CHANGED
@@ -15419,6 +15419,15 @@ function subscribeToVerification(listener) {
15419
15419
  getState().listeners.add(listener);
15420
15420
  return () => getState().listeners.delete(listener);
15421
15421
  }
15422
+ function defaultGetTraitState(traitName) {
15423
+ const getter = getState().traitSnapshots.get(traitName);
15424
+ if (getter === void 0) return void 0;
15425
+ try {
15426
+ return getter().currentState;
15427
+ } catch {
15428
+ return void 0;
15429
+ }
15430
+ }
15422
15431
  function exposeOnWindow() {
15423
15432
  if (typeof window === "undefined") return;
15424
15433
  if (!window.__orbitalVerification) {
@@ -15429,10 +15438,16 @@ function exposeOnWindow() {
15429
15438
  getBridge: getBridgeHealth,
15430
15439
  getSummary,
15431
15440
  waitForTransition,
15432
- getTraitSnapshots
15441
+ getTraitSnapshots,
15442
+ getTraitState: defaultGetTraitState
15433
15443
  };
15434
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
15435
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
15444
+ } else {
15445
+ if (!window.__orbitalVerification.getTraitSnapshots) {
15446
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
15447
+ }
15448
+ if (!window.__orbitalVerification.getTraitState) {
15449
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
15450
+ }
15436
15451
  }
15437
15452
  }
15438
15453
  function waitForTransition(event, timeoutMs = 1e4) {
@@ -54136,7 +54151,8 @@ function VerificationProvider({
54136
54151
  runtimeManager,
54137
54152
  traitStateGetter
54138
54153
  }) {
54139
- const isEnabled2 = enabled ?? (typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
54154
+ const verifyFlag = typeof window !== "undefined" && window.__ALMADAR_VERIFY__ === true;
54155
+ const isEnabled2 = enabled ?? (verifyFlag || typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
54140
54156
  const eventBus = useEventBus();
54141
54157
  const pendingRef = useRef(/* @__PURE__ */ new Map());
54142
54158
  useEffect(() => {
@@ -10028,6 +10028,15 @@ function subscribeToVerification(listener) {
10028
10028
  getState().listeners.add(listener);
10029
10029
  return () => getState().listeners.delete(listener);
10030
10030
  }
10031
+ function defaultGetTraitState(traitName) {
10032
+ const getter = getState().traitSnapshots.get(traitName);
10033
+ if (getter === void 0) return void 0;
10034
+ try {
10035
+ return getter().currentState;
10036
+ } catch {
10037
+ return void 0;
10038
+ }
10039
+ }
10031
10040
  function exposeOnWindow() {
10032
10041
  if (typeof window === "undefined") return;
10033
10042
  if (!window.__orbitalVerification) {
@@ -10038,10 +10047,16 @@ function exposeOnWindow() {
10038
10047
  getBridge: getBridgeHealth,
10039
10048
  getSummary,
10040
10049
  waitForTransition,
10041
- getTraitSnapshots
10050
+ getTraitSnapshots,
10051
+ getTraitState: defaultGetTraitState
10042
10052
  };
10043
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
10044
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
10053
+ } else {
10054
+ if (!window.__orbitalVerification.getTraitSnapshots) {
10055
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
10056
+ }
10057
+ if (!window.__orbitalVerification.getTraitState) {
10058
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
10059
+ }
10045
10060
  }
10046
10061
  }
10047
10062
  function waitForTransition(event, timeoutMs = 1e4) {
@@ -9979,6 +9979,15 @@ function subscribeToVerification(listener) {
9979
9979
  getState().listeners.add(listener);
9980
9980
  return () => getState().listeners.delete(listener);
9981
9981
  }
9982
+ function defaultGetTraitState(traitName) {
9983
+ const getter = getState().traitSnapshots.get(traitName);
9984
+ if (getter === void 0) return void 0;
9985
+ try {
9986
+ return getter().currentState;
9987
+ } catch {
9988
+ return void 0;
9989
+ }
9990
+ }
9982
9991
  function exposeOnWindow() {
9983
9992
  if (typeof window === "undefined") return;
9984
9993
  if (!window.__orbitalVerification) {
@@ -9989,10 +9998,16 @@ function exposeOnWindow() {
9989
9998
  getBridge: getBridgeHealth,
9990
9999
  getSummary,
9991
10000
  waitForTransition,
9992
- getTraitSnapshots
10001
+ getTraitSnapshots,
10002
+ getTraitState: defaultGetTraitState
9993
10003
  };
9994
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
9995
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
10004
+ } else {
10005
+ if (!window.__orbitalVerification.getTraitSnapshots) {
10006
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
10007
+ }
10008
+ if (!window.__orbitalVerification.getTraitState) {
10009
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
10010
+ }
9996
10011
  }
9997
10012
  }
9998
10013
  function waitForTransition(event, timeoutMs = 1e4) {
@@ -622,6 +622,15 @@ function subscribeToVerification(listener) {
622
622
  getState().listeners.add(listener);
623
623
  return () => getState().listeners.delete(listener);
624
624
  }
625
+ function defaultGetTraitState(traitName) {
626
+ const getter = getState().traitSnapshots.get(traitName);
627
+ if (getter === void 0) return void 0;
628
+ try {
629
+ return getter().currentState;
630
+ } catch {
631
+ return void 0;
632
+ }
633
+ }
625
634
  function exposeOnWindow() {
626
635
  if (typeof window === "undefined") return;
627
636
  if (!window.__orbitalVerification) {
@@ -632,10 +641,16 @@ function exposeOnWindow() {
632
641
  getBridge: getBridgeHealth,
633
642
  getSummary,
634
643
  waitForTransition,
635
- getTraitSnapshots
644
+ getTraitSnapshots,
645
+ getTraitState: defaultGetTraitState
636
646
  };
637
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
638
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
647
+ } else {
648
+ if (!window.__orbitalVerification.getTraitSnapshots) {
649
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
650
+ }
651
+ if (!window.__orbitalVerification.getTraitState) {
652
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
653
+ }
639
654
  }
640
655
  }
641
656
  function waitForTransition(event, timeoutMs = 1e4) {
package/dist/lib/index.js CHANGED
@@ -620,6 +620,15 @@ function subscribeToVerification(listener) {
620
620
  getState().listeners.add(listener);
621
621
  return () => getState().listeners.delete(listener);
622
622
  }
623
+ function defaultGetTraitState(traitName) {
624
+ const getter = getState().traitSnapshots.get(traitName);
625
+ if (getter === void 0) return void 0;
626
+ try {
627
+ return getter().currentState;
628
+ } catch {
629
+ return void 0;
630
+ }
631
+ }
623
632
  function exposeOnWindow() {
624
633
  if (typeof window === "undefined") return;
625
634
  if (!window.__orbitalVerification) {
@@ -630,10 +639,16 @@ function exposeOnWindow() {
630
639
  getBridge: getBridgeHealth,
631
640
  getSummary,
632
641
  waitForTransition,
633
- getTraitSnapshots
642
+ getTraitSnapshots,
643
+ getTraitState: defaultGetTraitState
634
644
  };
635
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
636
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
645
+ } else {
646
+ if (!window.__orbitalVerification.getTraitSnapshots) {
647
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
648
+ }
649
+ if (!window.__orbitalVerification.getTraitState) {
650
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
651
+ }
637
652
  }
638
653
  }
639
654
  function waitForTransition(event, timeoutMs = 1e4) {
@@ -11464,6 +11464,15 @@ function subscribeToVerification(listener) {
11464
11464
  getState().listeners.add(listener);
11465
11465
  return () => getState().listeners.delete(listener);
11466
11466
  }
11467
+ function defaultGetTraitState(traitName) {
11468
+ const getter = getState().traitSnapshots.get(traitName);
11469
+ if (getter === void 0) return void 0;
11470
+ try {
11471
+ return getter().currentState;
11472
+ } catch {
11473
+ return void 0;
11474
+ }
11475
+ }
11467
11476
  function exposeOnWindow() {
11468
11477
  if (typeof window === "undefined") return;
11469
11478
  if (!window.__orbitalVerification) {
@@ -11474,10 +11483,16 @@ function exposeOnWindow() {
11474
11483
  getBridge: getBridgeHealth,
11475
11484
  getSummary,
11476
11485
  waitForTransition,
11477
- getTraitSnapshots
11486
+ getTraitSnapshots,
11487
+ getTraitState: defaultGetTraitState
11478
11488
  };
11479
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
11480
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
11489
+ } else {
11490
+ if (!window.__orbitalVerification.getTraitSnapshots) {
11491
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
11492
+ }
11493
+ if (!window.__orbitalVerification.getTraitState) {
11494
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
11495
+ }
11481
11496
  }
11482
11497
  }
11483
11498
  function waitForTransition(event, timeoutMs = 1e4) {
@@ -48274,7 +48289,8 @@ function VerificationProvider({
48274
48289
  runtimeManager,
48275
48290
  traitStateGetter
48276
48291
  }) {
48277
- const isEnabled = enabled ?? (typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
48292
+ const verifyFlag = typeof window !== "undefined" && window.__ALMADAR_VERIFY__ === true;
48293
+ const isEnabled = enabled ?? (verifyFlag || typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
48278
48294
  const eventBus = useEventBus();
48279
48295
  const pendingRef = React85.useRef(/* @__PURE__ */ new Map());
48280
48296
  React85.useEffect(() => {
@@ -11415,6 +11415,15 @@ function subscribeToVerification(listener) {
11415
11415
  getState().listeners.add(listener);
11416
11416
  return () => getState().listeners.delete(listener);
11417
11417
  }
11418
+ function defaultGetTraitState(traitName) {
11419
+ const getter = getState().traitSnapshots.get(traitName);
11420
+ if (getter === void 0) return void 0;
11421
+ try {
11422
+ return getter().currentState;
11423
+ } catch {
11424
+ return void 0;
11425
+ }
11426
+ }
11418
11427
  function exposeOnWindow() {
11419
11428
  if (typeof window === "undefined") return;
11420
11429
  if (!window.__orbitalVerification) {
@@ -11425,10 +11434,16 @@ function exposeOnWindow() {
11425
11434
  getBridge: getBridgeHealth,
11426
11435
  getSummary,
11427
11436
  waitForTransition,
11428
- getTraitSnapshots
11437
+ getTraitSnapshots,
11438
+ getTraitState: defaultGetTraitState
11429
11439
  };
11430
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
11431
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
11440
+ } else {
11441
+ if (!window.__orbitalVerification.getTraitSnapshots) {
11442
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
11443
+ }
11444
+ if (!window.__orbitalVerification.getTraitState) {
11445
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
11446
+ }
11432
11447
  }
11433
11448
  }
11434
11449
  function waitForTransition(event, timeoutMs = 1e4) {
@@ -48225,7 +48240,8 @@ function VerificationProvider({
48225
48240
  runtimeManager,
48226
48241
  traitStateGetter
48227
48242
  }) {
48228
- const isEnabled = enabled ?? (typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
48243
+ const verifyFlag = typeof window !== "undefined" && window.__ALMADAR_VERIFY__ === true;
48244
+ const isEnabled = enabled ?? (verifyFlag || typeof process !== "undefined" && process.env?.NODE_ENV !== "production");
48229
48245
  const eventBus = useEventBus();
48230
48246
  const pendingRef = useRef(/* @__PURE__ */ new Map());
48231
48247
  useEffect(() => {
@@ -11382,6 +11382,15 @@ function subscribeToVerification(listener) {
11382
11382
  getState().listeners.add(listener);
11383
11383
  return () => getState().listeners.delete(listener);
11384
11384
  }
11385
+ function defaultGetTraitState(traitName) {
11386
+ const getter = getState().traitSnapshots.get(traitName);
11387
+ if (getter === void 0) return void 0;
11388
+ try {
11389
+ return getter().currentState;
11390
+ } catch {
11391
+ return void 0;
11392
+ }
11393
+ }
11385
11394
  function exposeOnWindow() {
11386
11395
  if (typeof window === "undefined") return;
11387
11396
  if (!window.__orbitalVerification) {
@@ -11392,10 +11401,16 @@ function exposeOnWindow() {
11392
11401
  getBridge: getBridgeHealth,
11393
11402
  getSummary,
11394
11403
  waitForTransition,
11395
- getTraitSnapshots
11404
+ getTraitSnapshots,
11405
+ getTraitState: defaultGetTraitState
11396
11406
  };
11397
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
11398
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
11407
+ } else {
11408
+ if (!window.__orbitalVerification.getTraitSnapshots) {
11409
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
11410
+ }
11411
+ if (!window.__orbitalVerification.getTraitState) {
11412
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
11413
+ }
11399
11414
  }
11400
11415
  }
11401
11416
  function waitForTransition(event, timeoutMs = 1e4) {
@@ -11333,6 +11333,15 @@ function subscribeToVerification(listener) {
11333
11333
  getState().listeners.add(listener);
11334
11334
  return () => getState().listeners.delete(listener);
11335
11335
  }
11336
+ function defaultGetTraitState(traitName) {
11337
+ const getter = getState().traitSnapshots.get(traitName);
11338
+ if (getter === void 0) return void 0;
11339
+ try {
11340
+ return getter().currentState;
11341
+ } catch {
11342
+ return void 0;
11343
+ }
11344
+ }
11336
11345
  function exposeOnWindow() {
11337
11346
  if (typeof window === "undefined") return;
11338
11347
  if (!window.__orbitalVerification) {
@@ -11343,10 +11352,16 @@ function exposeOnWindow() {
11343
11352
  getBridge: getBridgeHealth,
11344
11353
  getSummary,
11345
11354
  waitForTransition,
11346
- getTraitSnapshots
11355
+ getTraitSnapshots,
11356
+ getTraitState: defaultGetTraitState
11347
11357
  };
11348
- } else if (!window.__orbitalVerification.getTraitSnapshots) {
11349
- window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
11358
+ } else {
11359
+ if (!window.__orbitalVerification.getTraitSnapshots) {
11360
+ window.__orbitalVerification.getTraitSnapshots = getTraitSnapshots;
11361
+ }
11362
+ if (!window.__orbitalVerification.getTraitState) {
11363
+ window.__orbitalVerification.getTraitState = defaultGetTraitState;
11364
+ }
11350
11365
  }
11351
11366
  }
11352
11367
  function waitForTransition(event, timeoutMs = 1e4) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "5.20.0",
3
+ "version": "5.21.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [