@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.
@@ -9554,7 +9554,7 @@ var require_faqir_core = __commonJS((exports, module) => {
9554
9554
  continue;
9555
9555
  if (rootEl.__faqirScope) {
9556
9556
  processed.add(rootEl);
9557
- var seen = rootEl.querySelectorAll("[l-data]");
9557
+ var seen = rootEl.querySelectorAll("[l-data], [data-ui]");
9558
9558
  for (var sd = 0;sd < seen.length; sd++)
9559
9559
  processed.add(seen[sd]);
9560
9560
  continue;
@@ -9580,7 +9580,7 @@ var require_faqir_core = __commonJS((exports, module) => {
9580
9580
  }
9581
9581
  if (!skipThis) {
9582
9582
  initTree(rootEl, null);
9583
- var descendants = rootEl.querySelectorAll("[l-data]");
9583
+ var descendants = rootEl.querySelectorAll("[l-data], [data-ui]");
9584
9584
  for (var d = 0;d < descendants.length; d++)
9585
9585
  processed.add(descendants[d]);
9586
9586
  processed.add(rootEl);
@@ -9645,16 +9645,25 @@ var require_faqir_core = __commonJS((exports, module) => {
9645
9645
  mutationObserver.observe(document.body, { childList: true, subtree: true });
9646
9646
  }
9647
9647
  var currentScript = typeof document !== "undefined" ? document.currentScript : null;
9648
- var isManual = currentScript && currentScript.hasAttribute("data-manual");
9648
+ var isManual = currentScript ? currentScript.hasAttribute("data-manual") : typeof document !== "undefined" && !!document.querySelector('script[type="module"][data-manual]');
9649
+ var autoStarted = false;
9650
+ function autoStart() {
9651
+ if (autoStarted)
9652
+ return;
9653
+ autoStarted = true;
9654
+ bootstrap();
9655
+ }
9649
9656
  if (!isManual && typeof document !== "undefined") {
9650
9657
  if (document.readyState === "loading") {
9651
- document.addEventListener("DOMContentLoaded", bootstrap);
9658
+ document.addEventListener("DOMContentLoaded", autoStart);
9652
9659
  } else {
9653
- bootstrap();
9660
+ if (document.readyState === "interactive")
9661
+ document.addEventListener("DOMContentLoaded", autoStart);
9662
+ setTimeout(autoStart, 0);
9654
9663
  }
9655
9664
  }
9656
9665
  var Faqir = {
9657
- version: "1.1.0",
9666
+ version: "1.1.1",
9658
9667
  reactive,
9659
9668
  effect,
9660
9669
  batch,
package/dist/sri.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
- "faqir-core.js": "sha384-Ehw+8Knrsxpt9enram44fdKrZh9cJoKDO8WeN7+gZ4DDJEH/RwHiceK7lgfiGprw",
3
- "faqir-core.min.js": "sha384-+FqfiMSc4+AeDam5DHWdByfqFpegDaGaYGsKVFeKqrV2YHahZla6egt04qPvvHSc",
4
- "faqir-core.min.js.map": "sha384-eMfL8gnKtbSNBDSDa8FvuTsbIe5QFjcgaMktueIfzLSGL48HzFBmCA6Wt4mMKapj",
5
- "faqir-core.mjs": "sha384-GIAWwY5wDRhwHb3/yKRvQ7D8oSmMI4PZKI0IsSMye5K1mnIwtCbgG20zphtOCn2x",
2
+ "faqir-core.js": "sha384-ypj/JvdM2DNbSf7TIOUBlbV3kKw3JE0YuKDPkDuroqFt8H/jB2O80j0rUa/s8N9l",
3
+ "faqir-core.min.js": "sha384-+0VjcV+UV4XDD6Y5YZ+yJG9qiwlcZRr+LgT6uVspQgw4ynLLzyNKrDc6HDvo6uiM",
4
+ "faqir-core.min.js.map": "sha384-3NMITzrdJEWU6VH6d64NSzEhMGdilUMAqm7tG37R9mq1oQcbiifI7azkysTVSK/a",
5
+ "faqir-core.mjs": "sha384-bFYiYI3mnO3fluPZh14FGac4ZgBXPEfENyv+/ewSMHNyataamJyDJYENbGaXnV8t",
6
6
  "faqir.aurora.css": "sha384-TrPBHGXGxwY6sLypt3kbjbhEHz87wsYgqQhzPqi5zghmsiqewgykQx6aS+WP2O0h",
7
7
  "faqir.brutalist.css": "sha384-N/VfEAEdOZ2PGFX4xsPzlHEmDkXtjzmkXXW1Ta3PCtBV/RZm1rF4EYsfwLEvwqPZ",
8
8
  "faqir.candy.css": "sha384-/lk9HAr46O2pYwsM8vE8MBVkPLB1t2otA3Edfux98b564DvNkWqpsD4DSVdcmHAX",
package/faqir-core.d.ts CHANGED
@@ -837,7 +837,14 @@ export interface FaqirGlobal {
837
837
  ): void;
838
838
 
839
839
  // ── Lifecycle ──
840
- /** Bootstrap. Runs automatically unless the script tag carries `data-manual`. */
840
+ /**
841
+ * Bootstrap. Runs automatically — on `DOMContentLoaded`, or one task after the
842
+ * engine is evaluated when the document is already parsed (a module, `defer`
843
+ * script or bundler import), so `data()` / `directive()` calls made right after
844
+ * importing it are seen. Opt out with `data-manual` on the engine's `<script>`,
845
+ * or on the page's `<script type="module">` when the engine is imported.
846
+ * Safe to call again: already-bound markup is not re-bound.
847
+ */
841
848
  start(): void;
842
849
  /** Initialize one subtree, optionally inside an existing scope. */
843
850
  initTree(root: Element, parentScope?: Scope | null): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faqir-ui/core",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Faqir UI runtime engine — the Alpine-style reactive core (faqir-core.js), minified CDN build, and prebuilt per-theme CSS bundles. Zero dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/faqir-core.mjs",