@faqir-ui/core 1.1.0 → 1.1.1

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/cdn.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "package": "@faqir-ui/core",
3
- "version": "1.1.0",
4
- "base": "https://cdn.jsdelivr.net/npm/@faqir-ui/core@1.1.0/dist/",
3
+ "version": "1.1.1",
4
+ "base": "https://cdn.jsdelivr.net/npm/@faqir-ui/core@1.1.1/dist/",
5
5
  "integrity": {
6
- "faqir-core.js": "sha384-Ehw+8Knrsxpt9enram44fdKrZh9cJoKDO8WeN7+gZ4DDJEH/RwHiceK7lgfiGprw",
7
- "faqir-core.min.js": "sha384-+FqfiMSc4+AeDam5DHWdByfqFpegDaGaYGsKVFeKqrV2YHahZla6egt04qPvvHSc",
8
- "faqir-core.min.js.map": "sha384-eMfL8gnKtbSNBDSDa8FvuTsbIe5QFjcgaMktueIfzLSGL48HzFBmCA6Wt4mMKapj",
9
- "faqir-core.mjs": "sha384-GIAWwY5wDRhwHb3/yKRvQ7D8oSmMI4PZKI0IsSMye5K1mnIwtCbgG20zphtOCn2x",
6
+ "faqir-core.js": "sha384-ypj/JvdM2DNbSf7TIOUBlbV3kKw3JE0YuKDPkDuroqFt8H/jB2O80j0rUa/s8N9l",
7
+ "faqir-core.min.js": "sha384-+0VjcV+UV4XDD6Y5YZ+yJG9qiwlcZRr+LgT6uVspQgw4ynLLzyNKrDc6HDvo6uiM",
8
+ "faqir-core.min.js.map": "sha384-3NMITzrdJEWU6VH6d64NSzEhMGdilUMAqm7tG37R9mq1oQcbiifI7azkysTVSK/a",
9
+ "faqir-core.mjs": "sha384-bFYiYI3mnO3fluPZh14FGac4ZgBXPEfENyv+/ewSMHNyataamJyDJYENbGaXnV8t",
10
10
  "faqir.aurora.css": "sha384-TrPBHGXGxwY6sLypt3kbjbhEHz87wsYgqQhzPqi5zghmsiqewgykQx6aS+WP2O0h",
11
11
  "faqir.brutalist.css": "sha384-N/VfEAEdOZ2PGFX4xsPzlHEmDkXtjzmkXXW1Ta3PCtBV/RZm1rF4EYsfwLEvwqPZ",
12
12
  "faqir.candy.css": "sha384-/lk9HAr46O2pYwsM8vE8MBVkPLB1t2otA3Edfux98b564DvNkWqpsD4DSVdcmHAX",
@@ -10,7 +10,7 @@
10
10
  // PRODUCTION BUILD — dev-only diagnostics stripped at assembly time.
11
11
  // Load faqir-core.dev.js instead while developing for full warnings.
12
12
  // Regenerate with: bun run build:core
13
- // Package version: 1.1.0
13
+ // Package version: 1.1.1
14
14
  // ============================================================================
15
15
 
16
16
  /**
@@ -11632,7 +11632,7 @@ function createTreeView(root) {
11632
11632
  // to call `start()` again. [W3-1]
11633
11633
  if (rootEl.__faqirScope) {
11634
11634
  processed.add(rootEl);
11635
- var seen = rootEl.querySelectorAll('[l-data]');
11635
+ var seen = rootEl.querySelectorAll('[l-data], [data-ui]');
11636
11636
  for (var sd = 0; sd < seen.length; sd++) processed.add(seen[sd]);
11637
11637
  continue;
11638
11638
  }
@@ -11664,7 +11664,13 @@ function createTreeView(root) {
11664
11664
 
11665
11665
  if (!skipThis) {
11666
11666
  initTree(rootEl, null);
11667
- var descendants = rootEl.querySelectorAll('[l-data]');
11667
+ // `initTree` walked the whole subtree, so every root candidate inside it
11668
+ // — nested `[l-data]` scopes AND nested `[data-ui]` components — is
11669
+ // bound already. Claiming only the `[l-data]` ones left a `[data-ui]`
11670
+ // inside a standalone `[data-ui]` looking standalone too: it became a
11671
+ // root of its own and re-bound its subtree, so a button four components
11672
+ // deep fired its `@click` four times.
11673
+ var descendants = rootEl.querySelectorAll('[l-data], [data-ui]');
11668
11674
  for (var d = 0; d < descendants.length; d++) processed.add(descendants[d]);
11669
11675
  processed.add(rootEl);
11670
11676
  }
@@ -11766,14 +11772,35 @@ function createTreeView(root) {
11766
11772
  }
11767
11773
 
11768
11774
  // Auto-start logic
11775
+ //
11776
+ // `data-manual` opts out. A classic script is its own `currentScript`; a
11777
+ // module (or anything a bundler emitted) has none, so there the attribute is
11778
+ // honoured on the page's module `<script>` instead.
11769
11779
  var currentScript = typeof document !== 'undefined' ? document.currentScript : null;
11770
- var isManual = currentScript && currentScript.hasAttribute('data-manual');
11780
+ var isManual = currentScript
11781
+ ? currentScript.hasAttribute('data-manual')
11782
+ : typeof document !== 'undefined' && !!document.querySelector('script[type="module"][data-manual]');
11783
+
11784
+ // Once the document is parsed — always true for a module, a `defer` script
11785
+ // or a bundler import — booting right here ran before the importing code
11786
+ // got past its `import`, so every `Faqir.data()` / `Faqir.directive()` it
11787
+ // registered next was never seen. The boot waits one task instead: long
11788
+ // enough for the rest of the module graph and any `import().then(...)`, and
11789
+ // `DOMContentLoaded` still wins if it has not fired yet. `bootstrap` is
11790
+ // re-entry safe, so an explicit `Faqir.start()` before then costs nothing.
11791
+ var autoStarted = false;
11792
+ function autoStart() {
11793
+ if (autoStarted) return;
11794
+ autoStarted = true;
11795
+ bootstrap();
11796
+ }
11771
11797
 
11772
11798
  if (!isManual && typeof document !== 'undefined') {
11773
11799
  if (document.readyState === 'loading') {
11774
- document.addEventListener('DOMContentLoaded', bootstrap);
11800
+ document.addEventListener('DOMContentLoaded', autoStart);
11775
11801
  } else {
11776
- bootstrap();
11802
+ if (document.readyState === 'interactive') document.addEventListener('DOMContentLoaded', autoStart);
11803
+ setTimeout(autoStart, 0);
11777
11804
  }
11778
11805
  }
11779
11806
 
@@ -11787,7 +11814,7 @@ function createTreeView(root) {
11787
11814
  // one time it was hand-maintained (0.1.0 in a package versioned 0.2.4), so
11788
11815
  // the built artifact is now the only place the number is authoritative and
11789
11816
  // the build fails if this marker goes missing.
11790
- version: '1.1.0', // @faqir:version
11817
+ version: '1.1.1', // @faqir:version
11791
11818
  reactive: reactive,
11792
11819
  effect: effect,
11793
11820
  batch: batch,