fubi 1.0.0-beta.38 → 1.0.0-beta.39
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.es.js +43 -36
- package/dist/index.iife.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -21669,7 +21669,6 @@ function Comments$1($$anchor, $$props) {
|
|
|
21669
21669
|
var _a2;
|
|
21670
21670
|
return pages.ready && pages.valid && (pages.isNew || ((_a2 = comments == null ? void 0 : comments.threadsWithStatus) == null ? void 0 : _a2.length) === 0);
|
|
21671
21671
|
});
|
|
21672
|
-
console.log("threads with status:", comments == null ? void 0 : comments.threadsWithStatus);
|
|
21673
21672
|
Page($$anchor, {
|
|
21674
21673
|
name: "comments",
|
|
21675
21674
|
children: ($$anchor2, $$slotProps) => {
|
|
@@ -23127,7 +23126,7 @@ function Settings$1($$anchor, $$props) {
|
|
|
23127
23126
|
{
|
|
23128
23127
|
const after = ($$anchor3) => {
|
|
23129
23128
|
var div = root_2$6();
|
|
23130
|
-
div.textContent = `v${"1.0.0-beta.
|
|
23129
|
+
div.textContent = `v${"1.0.0-beta.39"}`;
|
|
23131
23130
|
append($$anchor3, div);
|
|
23132
23131
|
};
|
|
23133
23132
|
Navbar(node, {
|
|
@@ -24283,36 +24282,7 @@ class Comments extends CollectionModule {
|
|
|
24283
24282
|
__privateAdd(this, _activeThreadId, /* @__PURE__ */ state(null));
|
|
24284
24283
|
__privateAdd(this, _activeThread, /* @__PURE__ */ user_derived(() => this.filteredThreads.find((t2) => t2.id === this.activeThreadId) ?? null));
|
|
24285
24284
|
__privateAdd(this, _activeThreadReplies, /* @__PURE__ */ user_derived(() => [...this.data.filter((c) => c.parent === this.activeThreadId)].sort((a, b) => a.created.localeCompare(b.created))));
|
|
24286
|
-
__privateAdd(this, _bindings, /* @__PURE__ */
|
|
24287
|
-
const map = /* @__PURE__ */ new Map();
|
|
24288
|
-
this.grouped.forEach((comments, selector) => {
|
|
24289
|
-
if (!selector) return;
|
|
24290
|
-
const isMeta = comments.some((c) => {
|
|
24291
|
-
var _a2;
|
|
24292
|
-
return (_a2 = c.info) == null ? void 0 : _a2.meta;
|
|
24293
|
-
});
|
|
24294
|
-
const root2 = isMeta ? this.modules.toolbar.wrapper : document;
|
|
24295
|
-
let element = null;
|
|
24296
|
-
let missing = false;
|
|
24297
|
-
let hidden = false;
|
|
24298
|
-
if (root2) {
|
|
24299
|
-
element = root2.querySelector(selector);
|
|
24300
|
-
}
|
|
24301
|
-
if (!element) {
|
|
24302
|
-
missing = true;
|
|
24303
|
-
} else {
|
|
24304
|
-
hidden = !element.checkVisibility({ checkOpacity: true, checkVisibilityCSS: true });
|
|
24305
|
-
}
|
|
24306
|
-
map.set(selector, {
|
|
24307
|
-
selector,
|
|
24308
|
-
element,
|
|
24309
|
-
threadIds: comments.map((c) => c.id),
|
|
24310
|
-
missing,
|
|
24311
|
-
hidden
|
|
24312
|
-
});
|
|
24313
|
-
});
|
|
24314
|
-
return map;
|
|
24315
|
-
}));
|
|
24285
|
+
__privateAdd(this, _bindings, /* @__PURE__ */ state(proxy$1(/* @__PURE__ */ new Map())));
|
|
24316
24286
|
}
|
|
24317
24287
|
get filter() {
|
|
24318
24288
|
return get$2(__privateGet(this, _filter4));
|
|
@@ -24396,20 +24366,51 @@ class Comments extends CollectionModule {
|
|
|
24396
24366
|
return get$2(__privateGet(this, _bindings));
|
|
24397
24367
|
}
|
|
24398
24368
|
set bindings(value) {
|
|
24399
|
-
set(__privateGet(this, _bindings), value);
|
|
24369
|
+
set(__privateGet(this, _bindings), value, true);
|
|
24400
24370
|
}
|
|
24401
24371
|
start() {
|
|
24402
24372
|
this.initCollection({
|
|
24403
24373
|
name: "comments",
|
|
24404
24374
|
expand: "createdBy,mentions,comments_via_parent",
|
|
24405
|
-
onFinish: () => {
|
|
24375
|
+
onFinish: async () => {
|
|
24376
|
+
this.domTick++;
|
|
24377
|
+
await tick();
|
|
24406
24378
|
this.populate();
|
|
24407
24379
|
this.ready = true;
|
|
24408
24380
|
}
|
|
24409
24381
|
});
|
|
24382
|
+
watch$1(() => this.domTick, () => {
|
|
24383
|
+
const map = /* @__PURE__ */ new Map();
|
|
24384
|
+
this.grouped.forEach((comments, selector) => {
|
|
24385
|
+
if (!selector) return;
|
|
24386
|
+
const isMeta = comments.some((c) => {
|
|
24387
|
+
var _a2;
|
|
24388
|
+
return (_a2 = c.info) == null ? void 0 : _a2.meta;
|
|
24389
|
+
});
|
|
24390
|
+
const root2 = isMeta ? this.modules.toolbar.wrapper : document;
|
|
24391
|
+
let element = null;
|
|
24392
|
+
let missing = false;
|
|
24393
|
+
let hidden = false;
|
|
24394
|
+
if (root2) {
|
|
24395
|
+
element = root2.querySelector(selector);
|
|
24396
|
+
}
|
|
24397
|
+
if (!element) {
|
|
24398
|
+
missing = true;
|
|
24399
|
+
} else {
|
|
24400
|
+
hidden = !element.checkVisibility({ checkOpacity: true, checkVisibilityCSS: true });
|
|
24401
|
+
}
|
|
24402
|
+
map.set(selector, {
|
|
24403
|
+
selector,
|
|
24404
|
+
element,
|
|
24405
|
+
threadIds: comments.map((c) => c.id),
|
|
24406
|
+
missing,
|
|
24407
|
+
hidden
|
|
24408
|
+
});
|
|
24409
|
+
});
|
|
24410
|
+
this.bindings = map;
|
|
24411
|
+
});
|
|
24410
24412
|
this.on("pages:current", () => {
|
|
24411
24413
|
this.activeThreadId = null;
|
|
24412
|
-
this.reset();
|
|
24413
24414
|
if (this.modules.pages.isNew) {
|
|
24414
24415
|
this.ready = true;
|
|
24415
24416
|
return;
|
|
@@ -24430,7 +24431,9 @@ class Comments extends CollectionModule {
|
|
|
24430
24431
|
this.on("hover:reset", () => this.activeThreadId = null);
|
|
24431
24432
|
this.on("hover:isolation-dismiss", () => this.activeThreadId = null);
|
|
24432
24433
|
this.on("elements:changed", () => {
|
|
24434
|
+
console.log("[comments] elements:changed received, domTick before:", this.domTick);
|
|
24433
24435
|
this.domTick++;
|
|
24436
|
+
console.log("[comments] domTick incremented to:", this.domTick);
|
|
24434
24437
|
});
|
|
24435
24438
|
this.modules.keys.onPress("Escape", () => {
|
|
24436
24439
|
if (!this.can.commentInputEscape) return;
|
|
@@ -24559,6 +24562,10 @@ class Comments extends CollectionModule {
|
|
|
24559
24562
|
this.ready = false;
|
|
24560
24563
|
}
|
|
24561
24564
|
populate() {
|
|
24565
|
+
var _a2, _b2;
|
|
24566
|
+
console.log("[comments] populate - bindings is:", this.bindings);
|
|
24567
|
+
console.log("[comments] populate - bindings constructor:", (_b2 = (_a2 = this.bindings) == null ? void 0 : _a2.constructor) == null ? void 0 : _b2.name);
|
|
24568
|
+
console.log("[comments] populate - data length:", this.data.length, "grouped size:", this.grouped.size, "bindings size:", this.bindings.size);
|
|
24562
24569
|
this.bindings.forEach((binding) => {
|
|
24563
24570
|
if (binding.element) {
|
|
24564
24571
|
const visibleThreadIds = binding.threadIds.filter((id) => this.filteredThreads.some((t2) => t2.id === id));
|
|
@@ -26799,7 +26806,7 @@ const createApp = (params) => {
|
|
|
26799
26806
|
var root_1$8 = /* @__PURE__ */ from_html(`<div class="flex w-full items-center gap-6"><div></div> </div>`);
|
|
26800
26807
|
var root_3$2 = /* @__PURE__ */ from_html(`<p class="whitespace-nowrap"> <span> </span></p>`);
|
|
26801
26808
|
var root_2$5 = /* @__PURE__ */ from_html(`<details open><summary class="text-amber-500 hover:underline pb-4 mt-8 border-b border-amber-500/30"> </summary> <!></details>`);
|
|
26802
|
-
var root$7 = /* @__PURE__ */ from_html(`<div class=" fixed z-51 bottom-8 touch:top-8 w-200 touch:bottom-auto max-w-250 left-8 bg-black text-white/50 p-8 font-mono rounded-lg text-[10px]/none flex flex-col space-y-8 divide-white/10 [&_span]:text-white"><div class="text-amber-500 pb-4 mt-8 border-b border-amber-500/30"><p>Modules</p></div> <!> <!></div>`);
|
|
26809
|
+
var root$7 = /* @__PURE__ */ from_html(`<div class="hidden fixed z-51 bottom-8 touch:top-8 w-200 touch:bottom-auto max-w-250 left-8 bg-black text-white/50 p-8 font-mono rounded-lg text-[10px]/none flex flex-col space-y-8 divide-white/10 [&_span]:text-white"><div class="text-amber-500 pb-4 mt-8 border-b border-amber-500/30"><p>Modules</p></div> <!> <!></div>`);
|
|
26803
26810
|
function Debug($$anchor, $$props) {
|
|
26804
26811
|
push($$props, true);
|
|
26805
26812
|
const {
|