@potch/html-bin 2.1.1 → 2.1.2
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/build/index.min.js +1 -1
- package/build/index.min.js.map +1 -1
- package/package.json +1 -1
- package/src/index.js +5 -7
- package/src/style.css +1 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -134,7 +134,7 @@ Returns object with the following fields:
|
|
|
134
134
|
export const createBin = ({
|
|
135
135
|
container,
|
|
136
136
|
sources: rawSources,
|
|
137
|
-
split,
|
|
137
|
+
split = 0.5,
|
|
138
138
|
initialTab = "js",
|
|
139
139
|
splitMode = true,
|
|
140
140
|
width,
|
|
@@ -145,7 +145,7 @@ export const createBin = ({
|
|
|
145
145
|
document.head.append(injectedStyles);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
const editorSplit = signal(parseFloat(split)
|
|
148
|
+
const editorSplit = signal(parseFloat(split));
|
|
149
149
|
|
|
150
150
|
const teardownFns = [];
|
|
151
151
|
const stopCapturingEffects = onEffect((fn) => teardownFns.push(fn));
|
|
@@ -453,10 +453,9 @@ export const createBin = ({
|
|
|
453
453
|
|
|
454
454
|
// set the split in CSS, factoring in expanded panes
|
|
455
455
|
effect(() => {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
);
|
|
456
|
+
const o = splitOverride.value;
|
|
457
|
+
const s = editorSplit.value;
|
|
458
|
+
binEl.style.setProperty("--resizer-split", o !== null ? o : s);
|
|
460
459
|
});
|
|
461
460
|
|
|
462
461
|
// editor tabs
|
|
@@ -490,7 +489,6 @@ export const createBin = ({
|
|
|
490
489
|
|
|
491
490
|
// destroy / teardown
|
|
492
491
|
stopCapturingEffects();
|
|
493
|
-
console.log(teardownFns);
|
|
494
492
|
|
|
495
493
|
const teardown = () => {
|
|
496
494
|
while (teardownFns.length) {
|