@codbex/harmonia 1.6.0 → 1.6.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/dist/harmonia.css +2 -2
- package/dist/harmonia.esm.js +117 -72
- package/dist/harmonia.esm.min.js +2 -2
- package/dist/harmonia.esm.min.js.map +3 -3
- package/dist/harmonia.js +121 -74
- package/dist/harmonia.min.js +2 -2
- package/dist/harmonia.min.js.map +3 -3
- package/package.json +6 -6
package/dist/harmonia.js
CHANGED
|
@@ -2862,11 +2862,11 @@
|
|
|
2862
2862
|
"bg-input-inner",
|
|
2863
2863
|
"border",
|
|
2864
2864
|
"border-input",
|
|
2865
|
-
"dark:has-[aria-invalid=true]:ring-negative/40",
|
|
2865
|
+
"dark:has-[input[aria-invalid=true]]:ring-negative/40",
|
|
2866
2866
|
"dark:has-[input:invalid]:ring-negative/40",
|
|
2867
2867
|
"duration-200",
|
|
2868
|
-
"has-[aria-invalid=true]:border-negative",
|
|
2869
|
-
"has-[aria-invalid=true]:ring-negative/20",
|
|
2868
|
+
"has-[input[aria-invalid=true]]:border-negative",
|
|
2869
|
+
"has-[input[aria-invalid=true]]:ring-negative/20",
|
|
2870
2870
|
"has-[input:checked]:bg-primary",
|
|
2871
2871
|
"has-[input:checked]:border-primary",
|
|
2872
2872
|
"has-[input:disabled]:cursor-not-allowed",
|
|
@@ -3825,14 +3825,14 @@
|
|
|
3825
3825
|
break;
|
|
3826
3826
|
}
|
|
3827
3827
|
}
|
|
3828
|
-
function
|
|
3828
|
+
function onClick(event) {
|
|
3829
3829
|
if (event.target.getAttribute("data-slot") === "list-item") selectOption(event.target);
|
|
3830
3830
|
}
|
|
3831
|
-
el.addEventListener("click",
|
|
3831
|
+
el.addEventListener("click", onClick);
|
|
3832
3832
|
el.addEventListener("keydown", onKeyDown);
|
|
3833
3833
|
cleanup(() => {
|
|
3834
3834
|
el.removeEventListener("keydown", onKeyDown);
|
|
3835
|
-
el.removeEventListener("click",
|
|
3835
|
+
el.removeEventListener("click", onClick);
|
|
3836
3836
|
});
|
|
3837
3837
|
});
|
|
3838
3838
|
Alpine.directive("h-list", (el) => {
|
|
@@ -3917,6 +3917,9 @@
|
|
|
3917
3917
|
while (sibling && !sibling.hasOwnProperty("_menu_trigger")) {
|
|
3918
3918
|
sibling = sibling.previousElementSibling;
|
|
3919
3919
|
}
|
|
3920
|
+
if (!sibling.hasOwnProperty("_menu_trigger")) {
|
|
3921
|
+
throw new Error(`${original2} must be placed after the menu trigger`);
|
|
3922
|
+
}
|
|
3920
3923
|
return sibling;
|
|
3921
3924
|
})();
|
|
3922
3925
|
if (!isSubmenu && !menuTrigger) {
|
|
@@ -3940,8 +3943,8 @@
|
|
|
3940
3943
|
left: "0px",
|
|
3941
3944
|
top: "0px"
|
|
3942
3945
|
});
|
|
3943
|
-
top.removeEventListener("contextmenu",
|
|
3944
|
-
top.removeEventListener("click",
|
|
3946
|
+
top.removeEventListener("contextmenu", onClick);
|
|
3947
|
+
top.removeEventListener("click", onClick);
|
|
3945
3948
|
el.removeEventListener("keydown", onKeyDown);
|
|
3946
3949
|
if (isSubmenu) {
|
|
3947
3950
|
if (closeParent) {
|
|
@@ -3973,7 +3976,7 @@
|
|
|
3973
3976
|
}
|
|
3974
3977
|
return false;
|
|
3975
3978
|
}
|
|
3976
|
-
function
|
|
3979
|
+
function onClick(event) {
|
|
3977
3980
|
if (event.type === "contextmenu") event.preventDefault();
|
|
3978
3981
|
close(isSubmenu);
|
|
3979
3982
|
}
|
|
@@ -4091,8 +4094,8 @@
|
|
|
4091
4094
|
listenForTrigger(false);
|
|
4092
4095
|
}
|
|
4093
4096
|
Alpine2.nextTick(() => {
|
|
4094
|
-
top.addEventListener("contextmenu",
|
|
4095
|
-
top.addEventListener("click",
|
|
4097
|
+
top.addEventListener("contextmenu", onClick);
|
|
4098
|
+
top.addEventListener("click", onClick);
|
|
4096
4099
|
el.addEventListener("keydown", onKeyDown);
|
|
4097
4100
|
});
|
|
4098
4101
|
Object.assign(el.style, {
|
|
@@ -4133,9 +4136,9 @@
|
|
|
4133
4136
|
listenForTrigger(true);
|
|
4134
4137
|
}
|
|
4135
4138
|
cleanup(() => {
|
|
4136
|
-
listenForTrigger(false);
|
|
4137
|
-
top.removeEventListener("click",
|
|
4138
|
-
top.removeEventListener("contextmenu",
|
|
4139
|
+
if (menuTrigger) listenForTrigger(false);
|
|
4140
|
+
top.removeEventListener("click", onClick);
|
|
4141
|
+
top.removeEventListener("contextmenu", onClick);
|
|
4139
4142
|
el.removeEventListener("keydown", onKeyDown);
|
|
4140
4143
|
});
|
|
4141
4144
|
});
|
|
@@ -4735,10 +4738,10 @@
|
|
|
4735
4738
|
"bg-input-inner",
|
|
4736
4739
|
"border",
|
|
4737
4740
|
"border-input",
|
|
4738
|
-
"dark:has-[aria-invalid=true]:ring-negative/40",
|
|
4741
|
+
"dark:has-[input[aria-invalid=true]]:ring-negative/40",
|
|
4739
4742
|
"dark:has-[input:invalid]:ring-negative/40",
|
|
4740
|
-
"has-[aria-invalid=true]:border-negative",
|
|
4741
|
-
"has-[aria-invalid=true]:ring-negative/20",
|
|
4743
|
+
"has-[input[aria-invalid=true]]:border-negative",
|
|
4744
|
+
"has-[input[aria-invalid=true]]:ring-negative/20",
|
|
4742
4745
|
"has-[input:checked]:before:visible",
|
|
4743
4746
|
"has-[input:disabled]:cursor-not-allowed",
|
|
4744
4747
|
"has-[input:disabled]:opacity-50",
|
|
@@ -6669,10 +6672,10 @@
|
|
|
6669
6672
|
"has-focus-visible:border-ring",
|
|
6670
6673
|
"has-focus-visible:ring-[calc(var(--spacing)*0.75)]",
|
|
6671
6674
|
"has-focus-visible:ring-ring/50",
|
|
6672
|
-
"dark:has-[aria-invalid=true]:ring-negative/40",
|
|
6675
|
+
"dark:has-[input[aria-invalid=true]]:ring-negative/40",
|
|
6673
6676
|
"dark:has-[input:invalid]:ring-negative/40",
|
|
6674
|
-
"has-[aria-invalid=true]:border-negative",
|
|
6675
|
-
"has-[aria-invalid=true]:ring-negative/20",
|
|
6677
|
+
"has-[input[aria-invalid=true]]:border-negative",
|
|
6678
|
+
"has-[input[aria-invalid=true]]:ring-negative/20",
|
|
6676
6679
|
"has-[input:invalid]:border-negative",
|
|
6677
6680
|
"has-[input:invalid]:ring-negative/20",
|
|
6678
6681
|
"hover:bg-secondary-hover",
|
|
@@ -6903,7 +6906,7 @@
|
|
|
6903
6906
|
}
|
|
6904
6907
|
}
|
|
6905
6908
|
};
|
|
6906
|
-
const
|
|
6909
|
+
const onClick = () => {
|
|
6907
6910
|
select._h_select.expanded = !select._h_select.expanded;
|
|
6908
6911
|
if (select._h_select.expanded) {
|
|
6909
6912
|
if (!content) content = select.querySelector(`#${select._h_select.controls}`);
|
|
@@ -6924,14 +6927,14 @@
|
|
|
6924
6927
|
if (event.key === "Escape" && select._h_select.expanded) close(true);
|
|
6925
6928
|
else if (event.key === "Enter") {
|
|
6926
6929
|
event.preventDefault();
|
|
6927
|
-
|
|
6930
|
+
onClick();
|
|
6928
6931
|
} else if (event.key === " ") {
|
|
6929
6932
|
event.preventDefault();
|
|
6930
|
-
setTimeout(() =>
|
|
6933
|
+
setTimeout(() => onClick(), 0);
|
|
6931
6934
|
}
|
|
6932
6935
|
};
|
|
6933
6936
|
fakeTrigger.addEventListener("keydown", onPress);
|
|
6934
|
-
fakeTrigger.addEventListener("click",
|
|
6937
|
+
fakeTrigger.addEventListener("click", onClick);
|
|
6935
6938
|
const chevronDown = createSvg({
|
|
6936
6939
|
icon: ChevronDown,
|
|
6937
6940
|
classes: "opacity-70 text-foreground size-4 shrink-0 pointer-events-none transition-transform duration-200",
|
|
@@ -6954,7 +6957,7 @@
|
|
|
6954
6957
|
select._h_select.refreshLabel = onInputChange;
|
|
6955
6958
|
el.addEventListener("change", onInputChange);
|
|
6956
6959
|
cleanup(() => {
|
|
6957
|
-
fakeTrigger.removeEventListener("click",
|
|
6960
|
+
fakeTrigger.removeEventListener("click", onClick);
|
|
6958
6961
|
fakeTrigger.removeEventListener("keydown", onPress);
|
|
6959
6962
|
el.parentElement.removeEventListener("keydown", onKeyDown);
|
|
6960
6963
|
top.removeEventListener("click", close);
|
|
@@ -7051,11 +7054,11 @@
|
|
|
7051
7054
|
}
|
|
7052
7055
|
el.addEventListener("click", onActivate);
|
|
7053
7056
|
el.addEventListener("keydown", onActivate);
|
|
7057
|
+
function onInput() {
|
|
7058
|
+
select._h_select.search = searchInput.value.toLowerCase();
|
|
7059
|
+
}
|
|
7054
7060
|
if (select._h_select.filterType !== FilterType.none) {
|
|
7055
|
-
|
|
7056
|
-
select._h_select.search = searchInput.value.toLowerCase();
|
|
7057
|
-
};
|
|
7058
|
-
searchInput.addEventListener("keyup", onInput2);
|
|
7061
|
+
searchInput.addEventListener("keyup", onInput);
|
|
7059
7062
|
}
|
|
7060
7063
|
effect(() => {
|
|
7061
7064
|
if (select._h_select.expanded) searchInput.focus({ preventScroll: true });
|
|
@@ -7254,14 +7257,14 @@
|
|
|
7254
7257
|
el.setAttribute("data-open", isOpen);
|
|
7255
7258
|
});
|
|
7256
7259
|
});
|
|
7257
|
-
const
|
|
7260
|
+
const onClick = (event) => {
|
|
7258
7261
|
if (event.target.getAttribute("data-slot") === "sheet-overlay") {
|
|
7259
7262
|
evaluate2(`${expression} = false`);
|
|
7260
7263
|
}
|
|
7261
7264
|
};
|
|
7262
|
-
el.addEventListener("click",
|
|
7265
|
+
el.addEventListener("click", onClick);
|
|
7263
7266
|
cleanup(() => {
|
|
7264
|
-
el.removeEventListener("click",
|
|
7267
|
+
el.removeEventListener("click", onClick);
|
|
7265
7268
|
});
|
|
7266
7269
|
});
|
|
7267
7270
|
Alpine.directive("h-sheet", (el, _, { cleanup }) => {
|
|
@@ -7740,6 +7743,7 @@
|
|
|
7740
7743
|
"rounded-full",
|
|
7741
7744
|
"animate-spin"
|
|
7742
7745
|
);
|
|
7746
|
+
if (el.tagName === "SPAN") el.classList.add("inline-block");
|
|
7743
7747
|
el.setAttribute("role", "status");
|
|
7744
7748
|
el.setAttribute("data-slot", "spinner");
|
|
7745
7749
|
if (!el.hasAttribute("aria-label")) el.setAttribute("aria-label", "Loading");
|
|
@@ -7883,7 +7887,8 @@
|
|
|
7883
7887
|
});
|
|
7884
7888
|
};
|
|
7885
7889
|
const refreshGutters = () => {
|
|
7886
|
-
|
|
7890
|
+
const lastPanelIndex = panels.length - 1;
|
|
7891
|
+
panels.forEach((p, i) => p.setGutter(i === lastPanelIndex));
|
|
7887
7892
|
};
|
|
7888
7893
|
el._h_split = {
|
|
7889
7894
|
state,
|
|
@@ -7948,7 +7953,19 @@
|
|
|
7948
7953
|
if (!split) {
|
|
7949
7954
|
throw new Error(`${original2} must be inside an split element`);
|
|
7950
7955
|
}
|
|
7951
|
-
el.classList.add(
|
|
7956
|
+
el.classList.add(
|
|
7957
|
+
"flex",
|
|
7958
|
+
"shrink",
|
|
7959
|
+
"grow-0",
|
|
7960
|
+
"box-border",
|
|
7961
|
+
"overflow-visible",
|
|
7962
|
+
"[[data-orientation=horizontal]_&]:min-w-(--h-split-panel-min)",
|
|
7963
|
+
"[[data-orientation=horizontal]_&]:max-w-(--h-split-panel-max)",
|
|
7964
|
+
"[[data-orientation=horizontal]_&]:min-h-0",
|
|
7965
|
+
"[[data-orientation=vertical]_&]:min-h-(--h-split-panel-min)",
|
|
7966
|
+
"[[data-orientation=vertical]_&]:max-h-(--h-split-panel-max)",
|
|
7967
|
+
"[[data-orientation=vertical]_&]:min-w-0"
|
|
7968
|
+
);
|
|
7952
7969
|
el.setAttribute("tabindex", "-1");
|
|
7953
7970
|
el.setAttribute("data-slot", "split-panel");
|
|
7954
7971
|
let gutterless = el.getAttribute("data-gutterless") === "true";
|
|
@@ -8055,6 +8072,7 @@
|
|
|
8055
8072
|
effect(setVariant);
|
|
8056
8073
|
const initialSize = split._h_split.normalize(el.getAttribute("data-size"));
|
|
8057
8074
|
let handleSize = 0;
|
|
8075
|
+
let layoutFrame = null;
|
|
8058
8076
|
const panel = {
|
|
8059
8077
|
el,
|
|
8060
8078
|
gutter,
|
|
@@ -8075,9 +8093,13 @@
|
|
|
8075
8093
|
setGutter(last) {
|
|
8076
8094
|
if (this.hidden || gutterless || last) {
|
|
8077
8095
|
gutter.remove();
|
|
8078
|
-
} else
|
|
8079
|
-
|
|
8080
|
-
|
|
8096
|
+
} else {
|
|
8097
|
+
if (layoutFrame) cancelAnimationFrame(layoutFrame);
|
|
8098
|
+
layoutFrame = requestAnimationFrame(() => {
|
|
8099
|
+
el.after(gutter);
|
|
8100
|
+
handleSize = this.getHandleSize();
|
|
8101
|
+
layoutFrame = null;
|
|
8102
|
+
});
|
|
8081
8103
|
}
|
|
8082
8104
|
},
|
|
8083
8105
|
setHandleOffset() {
|
|
@@ -8103,6 +8125,7 @@
|
|
|
8103
8125
|
},
|
|
8104
8126
|
setLocked(locked = false) {
|
|
8105
8127
|
const panelLocked = el.getAttribute("data-locked") === "true";
|
|
8128
|
+
gutter.setAttribute("aria-disabled", locked || panelLocked);
|
|
8106
8129
|
if (locked) {
|
|
8107
8130
|
gutter.classList.add("pointer-events-none");
|
|
8108
8131
|
} else if (panelLocked) {
|
|
@@ -8112,6 +8135,10 @@
|
|
|
8112
8135
|
}
|
|
8113
8136
|
}
|
|
8114
8137
|
};
|
|
8138
|
+
el.style.setProperty("--h-split-panel-min", `${panel.min}px`);
|
|
8139
|
+
if (panel.max < Infinity) {
|
|
8140
|
+
el.style.setProperty("--h-split-panel-max", `${panel.max}px`);
|
|
8141
|
+
}
|
|
8115
8142
|
split._h_split.addPanel(panel);
|
|
8116
8143
|
const drag = (e) => {
|
|
8117
8144
|
e.preventDefault();
|
|
@@ -9472,10 +9499,10 @@
|
|
|
9472
9499
|
periodList.classList.add("hidden");
|
|
9473
9500
|
}
|
|
9474
9501
|
}
|
|
9475
|
-
const
|
|
9502
|
+
const onClick = (event) => {
|
|
9476
9503
|
event.stopPropagation();
|
|
9477
9504
|
};
|
|
9478
|
-
el.addEventListener("click",
|
|
9505
|
+
el.addEventListener("click", onClick);
|
|
9479
9506
|
let autoUpdateCleanup;
|
|
9480
9507
|
let focusFirstItem = true;
|
|
9481
9508
|
function updatePosition() {
|
|
@@ -9518,20 +9545,10 @@
|
|
|
9518
9545
|
});
|
|
9519
9546
|
cleanup(() => {
|
|
9520
9547
|
el.removeEventListener("keydown", onKeyDown);
|
|
9521
|
-
el.removeEventListener("click",
|
|
9548
|
+
el.removeEventListener("click", onClick);
|
|
9522
9549
|
okButton.removeEventListener("click", timepicker._h_timepicker.close);
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
}
|
|
9526
|
-
for (let m = 0; m < minutesList.children.length; m++) {
|
|
9527
|
-
minutesList.children[m].removeEventListener("click", setMinute);
|
|
9528
|
-
}
|
|
9529
|
-
for (let s = 0; s < secondsList.children.length; s++) {
|
|
9530
|
-
secondsList.children[s].removeEventListener("click", setSecond);
|
|
9531
|
-
}
|
|
9532
|
-
for (let p = 0; p < periodList.children.length; p++) {
|
|
9533
|
-
periodList.children[p].removeEventListener("click", setPeriod);
|
|
9534
|
-
}
|
|
9550
|
+
nowButton.removeEventListener("click", getCurrentTime);
|
|
9551
|
+
timeContainer.removeEventListener("click", setTime);
|
|
9535
9552
|
});
|
|
9536
9553
|
});
|
|
9537
9554
|
}
|
|
@@ -9776,7 +9793,7 @@
|
|
|
9776
9793
|
el.setAttribute("role", "tree");
|
|
9777
9794
|
el.addEventListener("keydown", onKeyDown);
|
|
9778
9795
|
cleanup(() => {
|
|
9779
|
-
el.removeEventListener("keydown",
|
|
9796
|
+
el.removeEventListener("keydown", onKeyDown);
|
|
9780
9797
|
});
|
|
9781
9798
|
}
|
|
9782
9799
|
});
|
|
@@ -9806,7 +9823,7 @@
|
|
|
9806
9823
|
effect(() => {
|
|
9807
9824
|
if (!el.closest('[role="tree"]')) return;
|
|
9808
9825
|
});
|
|
9809
|
-
const
|
|
9826
|
+
const onClick = (event) => {
|
|
9810
9827
|
if (event.target === el || event.target.parentElement === el) {
|
|
9811
9828
|
if (el._h_tree_item.hasSubtree) {
|
|
9812
9829
|
if (expression === "false" || expression === "true") {
|
|
@@ -9821,9 +9838,9 @@
|
|
|
9821
9838
|
el.setAttribute("tabindex", "0");
|
|
9822
9839
|
}
|
|
9823
9840
|
};
|
|
9824
|
-
el.addEventListener("click",
|
|
9841
|
+
el.addEventListener("click", onClick);
|
|
9825
9842
|
cleanup(() => {
|
|
9826
|
-
el.removeEventListener("click",
|
|
9843
|
+
el.removeEventListener("click", onClick);
|
|
9827
9844
|
});
|
|
9828
9845
|
if (el._h_tree_item.hasSubtree) {
|
|
9829
9846
|
const setExpanded = (expanded) => {
|
|
@@ -9958,10 +9975,7 @@
|
|
|
9958
9975
|
var getColorScheme = () => {
|
|
9959
9976
|
const theme = localStorage.getItem(colorSchemeKey);
|
|
9960
9977
|
if (theme) return theme;
|
|
9961
|
-
|
|
9962
|
-
return "dark";
|
|
9963
|
-
}
|
|
9964
|
-
return "light";
|
|
9978
|
+
return "auto";
|
|
9965
9979
|
};
|
|
9966
9980
|
var getSystemColorScheme = () => {
|
|
9967
9981
|
if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
|
@@ -10022,32 +10036,59 @@
|
|
|
10022
10036
|
|
|
10023
10037
|
// src/utils/include.js
|
|
10024
10038
|
function include_default(Alpine) {
|
|
10025
|
-
Alpine.directive("h-include", (el, { modifiers, expression }, { evaluateLater, effect }) => {
|
|
10039
|
+
Alpine.directive("h-include", (el, { modifiers, expression }, { evaluateLater, effect, cleanup, Alpine: Alpine2 }) => {
|
|
10026
10040
|
const getUrl = evaluateLater(expression);
|
|
10041
|
+
function executeScript(oldScript) {
|
|
10042
|
+
return new Promise((resolve, reject) => {
|
|
10043
|
+
const newScript = document.createElement("script");
|
|
10044
|
+
for (const attr of oldScript.attributes) {
|
|
10045
|
+
newScript.setAttribute(attr.name, attr.value);
|
|
10046
|
+
}
|
|
10047
|
+
if (oldScript.src) {
|
|
10048
|
+
newScript.src = oldScript.src;
|
|
10049
|
+
newScript.onload = resolve;
|
|
10050
|
+
newScript.onerror = reject;
|
|
10051
|
+
} else {
|
|
10052
|
+
newScript.textContent = oldScript.textContent;
|
|
10053
|
+
resolve();
|
|
10054
|
+
}
|
|
10055
|
+
el.appendChild(newScript);
|
|
10056
|
+
});
|
|
10057
|
+
}
|
|
10058
|
+
function initTree() {
|
|
10059
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
10060
|
+
if (el.children[i].tagName !== "SCRIPT") Alpine2.initTree(el.children[i]);
|
|
10061
|
+
}
|
|
10062
|
+
}
|
|
10063
|
+
function destroyTree() {
|
|
10064
|
+
if (el.children.length) {
|
|
10065
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
10066
|
+
if (el.children[i].tagName !== "SCRIPT") Alpine2.initTree(el.children[i]);
|
|
10067
|
+
}
|
|
10068
|
+
}
|
|
10069
|
+
}
|
|
10027
10070
|
function getHtml(url) {
|
|
10028
10071
|
const parsed = new URL(url, window.location.origin);
|
|
10029
10072
|
if (parsed.origin === window.location.origin) {
|
|
10030
10073
|
fetch(url).then((response) => {
|
|
10031
10074
|
if (response.status === 200) return response.text();
|
|
10032
10075
|
throw response;
|
|
10033
|
-
}).then((content) => {
|
|
10076
|
+
}).then(async (content) => {
|
|
10034
10077
|
if (modifiers.includes("js")) {
|
|
10035
10078
|
const container = document.createElement("div");
|
|
10036
10079
|
container.innerHTML = content;
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
for (let a = 0; a < staticScript.attributes.length; a++) {
|
|
10040
|
-
script.setAttribute(staticScript.attributes[a].name, staticScript.attributes[a].value);
|
|
10041
|
-
}
|
|
10042
|
-
script.appendChild(document.createTextNode(staticScript.innerHTML));
|
|
10043
|
-
staticScript.remove();
|
|
10080
|
+
const scripts = [...container.querySelectorAll("script")];
|
|
10081
|
+
scripts.forEach((script) => script.remove());
|
|
10044
10082
|
while (container.childNodes.length > 0) {
|
|
10045
10083
|
el.appendChild(container.childNodes[0]);
|
|
10046
10084
|
}
|
|
10047
|
-
|
|
10085
|
+
for (const oldScript of scripts) {
|
|
10086
|
+
await executeScript(oldScript);
|
|
10087
|
+
}
|
|
10048
10088
|
} else {
|
|
10049
10089
|
el.innerHTML = content;
|
|
10050
10090
|
}
|
|
10091
|
+
initTree();
|
|
10051
10092
|
}).catch((response) => {
|
|
10052
10093
|
console.error(response);
|
|
10053
10094
|
});
|
|
@@ -10057,10 +10098,14 @@
|
|
|
10057
10098
|
}
|
|
10058
10099
|
effect(() => {
|
|
10059
10100
|
getUrl((url) => {
|
|
10101
|
+
destroyTree();
|
|
10102
|
+
el.innerHTML = "";
|
|
10060
10103
|
if (url) getHtml(url);
|
|
10061
|
-
else el.innerHTML = "";
|
|
10062
10104
|
});
|
|
10063
10105
|
});
|
|
10106
|
+
cleanup(() => {
|
|
10107
|
+
destroyTree();
|
|
10108
|
+
});
|
|
10064
10109
|
}).before("bind");
|
|
10065
10110
|
}
|
|
10066
10111
|
|
|
@@ -10077,11 +10122,11 @@
|
|
|
10077
10122
|
}
|
|
10078
10123
|
|
|
10079
10124
|
// package.json
|
|
10080
|
-
var version = "1.6.
|
|
10125
|
+
var version = "1.6.1";
|
|
10081
10126
|
|
|
10082
10127
|
// src/index.js
|
|
10083
10128
|
window.Harmonia = { getBreakpointListener, addColorSchemeListener, getColorScheme, removeColorSchemeListener, setColorScheme, getSystemColorScheme, version };
|
|
10084
|
-
|
|
10129
|
+
function registerPlugins() {
|
|
10085
10130
|
window.Alpine.plugin(accordion_default);
|
|
10086
10131
|
window.Alpine.plugin(alert_default);
|
|
10087
10132
|
window.Alpine.plugin(avatar_default);
|
|
@@ -10126,5 +10171,7 @@
|
|
|
10126
10171
|
window.Alpine.plugin(focus_default);
|
|
10127
10172
|
window.Alpine.plugin(template_default);
|
|
10128
10173
|
window.Alpine.plugin(include_default);
|
|
10129
|
-
}
|
|
10174
|
+
}
|
|
10175
|
+
if (window.Alpine) registerPlugins();
|
|
10176
|
+
else document.addEventListener("alpine:init", registerPlugins, { once: true });
|
|
10130
10177
|
})();
|