@portel/photon 1.16.0 → 1.16.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/auto-ui/beam/photon-management.d.ts +1 -1
- package/dist/auto-ui/beam/photon-management.d.ts.map +1 -1
- package/dist/auto-ui/beam/photon-management.js +5 -1
- package/dist/auto-ui/beam/photon-management.js.map +1 -1
- package/dist/auto-ui/beam/routes/api-config.d.ts.map +1 -1
- package/dist/auto-ui/beam/routes/api-config.js +2 -1
- package/dist/auto-ui/beam/routes/api-config.js.map +1 -1
- package/dist/auto-ui/beam.d.ts.map +1 -1
- package/dist/auto-ui/beam.js +39 -9
- package/dist/auto-ui/beam.js.map +1 -1
- package/dist/beam.bundle.js +959 -415
- package/dist/beam.bundle.js.map +4 -4
- package/dist/claude-code-plugin.js +11 -3
- package/dist/claude-code-plugin.js.map +1 -1
- package/dist/cli/commands/build.js +1 -1
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +7 -5
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +3 -2
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/mcp.js +2 -2
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +6 -2
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli-alias.d.ts.map +1 -1
- package/dist/cli-alias.js +3 -2
- package/dist/cli-alias.js.map +1 -1
- package/dist/daemon/worker-manager.js +1 -1
- package/dist/daemon/worker-manager.js.map +1 -1
- package/dist/deploy/cloudflare.d.ts.map +1 -1
- package/dist/deploy/cloudflare.js +10 -16
- package/dist/deploy/cloudflare.js.map +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +3 -15
- package/dist/loader.js.map +1 -1
- package/dist/photons/builder-compass.photon.d.ts +167 -0
- package/dist/photons/builder-compass.photon.d.ts.map +1 -0
- package/dist/photons/builder-compass.photon.js +816 -0
- package/dist/photons/builder-compass.photon.js.map +1 -0
- package/dist/photons/builder-compass.photon.ts +1129 -0
- package/dist/photons/maker.photon.d.ts.map +1 -1
- package/dist/photons/maker.photon.js +19 -2
- package/dist/photons/maker.photon.js.map +1 -1
- package/dist/photons/maker.photon.ts +18 -2
- package/dist/photons/ui/builder-compass.html +1199 -0
- package/dist/photons/ui/builder-compass.photon.html +380 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +16 -2
- package/dist/server.js.map +1 -1
- package/dist/shared-utils.d.ts +13 -0
- package/dist/shared-utils.d.ts.map +1 -1
- package/dist/shared-utils.js +33 -0
- package/dist/shared-utils.js.map +1 -1
- package/dist/template-manager.d.ts.map +1 -1
- package/dist/template-manager.js +2 -1
- package/dist/template-manager.js.map +1 -1
- package/package.json +2 -2
package/dist/beam.bundle.js
CHANGED
|
@@ -5,16 +5,16 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
5
5
|
var __esm = (fn2, res) => function __init() {
|
|
6
6
|
return fn2 && (res = (0, fn2[__getOwnPropNames(fn2)[0]])(fn2 = 0)), res;
|
|
7
7
|
};
|
|
8
|
-
var __export = (
|
|
8
|
+
var __export = (target2, all) => {
|
|
9
9
|
for (var name2 in all)
|
|
10
|
-
__defProp(
|
|
10
|
+
__defProp(target2, name2, { get: all[name2], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
var __decorateClass = (decorators,
|
|
13
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(
|
|
12
|
+
var __decorateClass = (decorators, target2, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target2, key) : target2;
|
|
14
14
|
for (var i7 = decorators.length - 1, decorator; i7 >= 0; i7--)
|
|
15
15
|
if (decorator = decorators[i7])
|
|
16
|
-
result = (kind ? decorator(
|
|
17
|
-
if (kind && result) __defProp(
|
|
16
|
+
result = (kind ? decorator(target2, key, result) : decorator(result)) || result;
|
|
17
|
+
if (kind && result) __defProp(target2, key, result);
|
|
18
18
|
return result;
|
|
19
19
|
};
|
|
20
20
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -654,14 +654,14 @@ function clone3(source3) {
|
|
|
654
654
|
return source3.map(clone3);
|
|
655
655
|
}
|
|
656
656
|
if (isObject(source3)) {
|
|
657
|
-
const
|
|
657
|
+
const target2 = /* @__PURE__ */ Object.create(null);
|
|
658
658
|
const keys2 = Object.keys(source3);
|
|
659
659
|
const klen = keys2.length;
|
|
660
660
|
let k3 = 0;
|
|
661
661
|
for (; k3 < klen; ++k3) {
|
|
662
|
-
|
|
662
|
+
target2[keys2[k3]] = clone3(source3[keys2[k3]]);
|
|
663
663
|
}
|
|
664
|
-
return
|
|
664
|
+
return target2;
|
|
665
665
|
}
|
|
666
666
|
return source3;
|
|
667
667
|
}
|
|
@@ -672,25 +672,25 @@ function isValidKey(key) {
|
|
|
672
672
|
"constructor"
|
|
673
673
|
].indexOf(key) === -1;
|
|
674
674
|
}
|
|
675
|
-
function _merger(key,
|
|
675
|
+
function _merger(key, target2, source3, options) {
|
|
676
676
|
if (!isValidKey(key)) {
|
|
677
677
|
return;
|
|
678
678
|
}
|
|
679
|
-
const tval =
|
|
679
|
+
const tval = target2[key];
|
|
680
680
|
const sval = source3[key];
|
|
681
681
|
if (isObject(tval) && isObject(sval)) {
|
|
682
682
|
merge(tval, sval, options);
|
|
683
683
|
} else {
|
|
684
|
-
|
|
684
|
+
target2[key] = clone3(sval);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
function merge(
|
|
687
|
+
function merge(target2, source3, options) {
|
|
688
688
|
const sources = isArray(source3) ? source3 : [
|
|
689
689
|
source3
|
|
690
690
|
];
|
|
691
691
|
const ilen = sources.length;
|
|
692
|
-
if (!isObject(
|
|
693
|
-
return
|
|
692
|
+
if (!isObject(target2)) {
|
|
693
|
+
return target2;
|
|
694
694
|
}
|
|
695
695
|
options = options || {};
|
|
696
696
|
const merger = options.merger || _merger;
|
|
@@ -702,26 +702,26 @@ function merge(target, source3, options) {
|
|
|
702
702
|
}
|
|
703
703
|
const keys2 = Object.keys(current);
|
|
704
704
|
for (let k3 = 0, klen = keys2.length; k3 < klen; ++k3) {
|
|
705
|
-
merger(keys2[k3],
|
|
705
|
+
merger(keys2[k3], target2, current, options);
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
return
|
|
708
|
+
return target2;
|
|
709
709
|
}
|
|
710
|
-
function mergeIf(
|
|
711
|
-
return merge(
|
|
710
|
+
function mergeIf(target2, source3) {
|
|
711
|
+
return merge(target2, source3, {
|
|
712
712
|
merger: _mergerIf
|
|
713
713
|
});
|
|
714
714
|
}
|
|
715
|
-
function _mergerIf(key,
|
|
715
|
+
function _mergerIf(key, target2, source3) {
|
|
716
716
|
if (!isValidKey(key)) {
|
|
717
717
|
return;
|
|
718
718
|
}
|
|
719
|
-
const tval =
|
|
719
|
+
const tval = target2[key];
|
|
720
720
|
const sval = source3[key];
|
|
721
721
|
if (isObject(tval) && isObject(sval)) {
|
|
722
722
|
mergeIf(tval, sval);
|
|
723
|
-
} else if (!Object.prototype.hasOwnProperty.call(
|
|
724
|
-
|
|
723
|
+
} else if (!Object.prototype.hasOwnProperty.call(target2, key)) {
|
|
724
|
+
target2[key] = clone3(sval);
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
727
|
function _splitKey(key) {
|
|
@@ -798,13 +798,13 @@ function almostWhole(x3, epsilon) {
|
|
|
798
798
|
const rounded = Math.round(x3);
|
|
799
799
|
return rounded - epsilon <= x3 && rounded + epsilon >= x3;
|
|
800
800
|
}
|
|
801
|
-
function _setMinAndMaxByKey(array2,
|
|
801
|
+
function _setMinAndMaxByKey(array2, target2, property2) {
|
|
802
802
|
let i7, ilen, value;
|
|
803
803
|
for (i7 = 0, ilen = array2.length; i7 < ilen; i7++) {
|
|
804
804
|
value = array2[i7][property2];
|
|
805
805
|
if (!isNaN(value)) {
|
|
806
|
-
|
|
807
|
-
|
|
806
|
+
target2.min = Math.min(target2.min, value);
|
|
807
|
+
target2.max = Math.max(target2.max, value);
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
810
|
}
|
|
@@ -1444,26 +1444,26 @@ function clipArea(ctx, area) {
|
|
|
1444
1444
|
function unclipArea(ctx) {
|
|
1445
1445
|
ctx.restore();
|
|
1446
1446
|
}
|
|
1447
|
-
function _steppedLineTo(ctx, previous,
|
|
1447
|
+
function _steppedLineTo(ctx, previous, target2, flip, mode) {
|
|
1448
1448
|
if (!previous) {
|
|
1449
|
-
return ctx.lineTo(
|
|
1449
|
+
return ctx.lineTo(target2.x, target2.y);
|
|
1450
1450
|
}
|
|
1451
1451
|
if (mode === "middle") {
|
|
1452
|
-
const midpoint = (previous.x +
|
|
1452
|
+
const midpoint = (previous.x + target2.x) / 2;
|
|
1453
1453
|
ctx.lineTo(midpoint, previous.y);
|
|
1454
|
-
ctx.lineTo(midpoint,
|
|
1454
|
+
ctx.lineTo(midpoint, target2.y);
|
|
1455
1455
|
} else if (mode === "after" !== !!flip) {
|
|
1456
|
-
ctx.lineTo(previous.x,
|
|
1456
|
+
ctx.lineTo(previous.x, target2.y);
|
|
1457
1457
|
} else {
|
|
1458
|
-
ctx.lineTo(
|
|
1458
|
+
ctx.lineTo(target2.x, previous.y);
|
|
1459
1459
|
}
|
|
1460
|
-
ctx.lineTo(
|
|
1460
|
+
ctx.lineTo(target2.x, target2.y);
|
|
1461
1461
|
}
|
|
1462
|
-
function _bezierCurveTo(ctx, previous,
|
|
1462
|
+
function _bezierCurveTo(ctx, previous, target2, flip) {
|
|
1463
1463
|
if (!previous) {
|
|
1464
|
-
return ctx.lineTo(
|
|
1464
|
+
return ctx.lineTo(target2.x, target2.y);
|
|
1465
1465
|
}
|
|
1466
|
-
ctx.bezierCurveTo(flip ? previous.cp1x : previous.cp2x, flip ? previous.cp1y : previous.cp2y, flip ?
|
|
1466
|
+
ctx.bezierCurveTo(flip ? previous.cp1x : previous.cp2x, flip ? previous.cp1y : previous.cp2y, flip ? target2.cp2x : target2.cp1x, flip ? target2.cp2y : target2.cp1y, target2.x, target2.y);
|
|
1467
1467
|
}
|
|
1468
1468
|
function setRenderOpts(ctx, opts) {
|
|
1469
1469
|
if (opts.translation) {
|
|
@@ -1673,24 +1673,24 @@ function _createResolver(scopes, prefixes = [
|
|
|
1673
1673
|
/**
|
|
1674
1674
|
* A trap for the delete operator.
|
|
1675
1675
|
*/
|
|
1676
|
-
deleteProperty(
|
|
1677
|
-
delete
|
|
1678
|
-
delete
|
|
1676
|
+
deleteProperty(target2, prop) {
|
|
1677
|
+
delete target2[prop];
|
|
1678
|
+
delete target2._keys;
|
|
1679
1679
|
delete scopes[0][prop];
|
|
1680
1680
|
return true;
|
|
1681
1681
|
},
|
|
1682
1682
|
/**
|
|
1683
1683
|
* A trap for getting property values.
|
|
1684
1684
|
*/
|
|
1685
|
-
get(
|
|
1686
|
-
return _cached(
|
|
1685
|
+
get(target2, prop) {
|
|
1686
|
+
return _cached(target2, prop, () => _resolveWithPrefixes(prop, prefixes, scopes, target2));
|
|
1687
1687
|
},
|
|
1688
1688
|
/**
|
|
1689
1689
|
* A trap for Object.getOwnPropertyDescriptor.
|
|
1690
1690
|
* Also used by Object.hasOwnProperty.
|
|
1691
1691
|
*/
|
|
1692
|
-
getOwnPropertyDescriptor(
|
|
1693
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
1692
|
+
getOwnPropertyDescriptor(target2, prop) {
|
|
1693
|
+
return Reflect.getOwnPropertyDescriptor(target2._scopes[0], prop);
|
|
1694
1694
|
},
|
|
1695
1695
|
/**
|
|
1696
1696
|
* A trap for Object.getPrototypeOf.
|
|
@@ -1701,22 +1701,22 @@ function _createResolver(scopes, prefixes = [
|
|
|
1701
1701
|
/**
|
|
1702
1702
|
* A trap for the in operator.
|
|
1703
1703
|
*/
|
|
1704
|
-
has(
|
|
1705
|
-
return getKeysFromAllScopes(
|
|
1704
|
+
has(target2, prop) {
|
|
1705
|
+
return getKeysFromAllScopes(target2).includes(prop);
|
|
1706
1706
|
},
|
|
1707
1707
|
/**
|
|
1708
1708
|
* A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.
|
|
1709
1709
|
*/
|
|
1710
|
-
ownKeys(
|
|
1711
|
-
return getKeysFromAllScopes(
|
|
1710
|
+
ownKeys(target2) {
|
|
1711
|
+
return getKeysFromAllScopes(target2);
|
|
1712
1712
|
},
|
|
1713
1713
|
/**
|
|
1714
1714
|
* A trap for setting property values.
|
|
1715
1715
|
*/
|
|
1716
|
-
set(
|
|
1717
|
-
const storage =
|
|
1718
|
-
|
|
1719
|
-
delete
|
|
1716
|
+
set(target2, prop, value) {
|
|
1717
|
+
const storage = target2._storage || (target2._storage = getTarget());
|
|
1718
|
+
target2[prop] = storage[prop] = value;
|
|
1719
|
+
delete target2._keys;
|
|
1720
1720
|
return true;
|
|
1721
1721
|
}
|
|
1722
1722
|
});
|
|
@@ -1736,23 +1736,23 @@ function _attachContext(proxy, context, subProxy, descriptorDefaults) {
|
|
|
1736
1736
|
/**
|
|
1737
1737
|
* A trap for the delete operator.
|
|
1738
1738
|
*/
|
|
1739
|
-
deleteProperty(
|
|
1740
|
-
delete
|
|
1739
|
+
deleteProperty(target2, prop) {
|
|
1740
|
+
delete target2[prop];
|
|
1741
1741
|
delete proxy[prop];
|
|
1742
1742
|
return true;
|
|
1743
1743
|
},
|
|
1744
1744
|
/**
|
|
1745
1745
|
* A trap for getting property values.
|
|
1746
1746
|
*/
|
|
1747
|
-
get(
|
|
1748
|
-
return _cached(
|
|
1747
|
+
get(target2, prop, receiver) {
|
|
1748
|
+
return _cached(target2, prop, () => _resolveWithContext(target2, prop, receiver));
|
|
1749
1749
|
},
|
|
1750
1750
|
/**
|
|
1751
1751
|
* A trap for Object.getOwnPropertyDescriptor.
|
|
1752
1752
|
* Also used by Object.hasOwnProperty.
|
|
1753
1753
|
*/
|
|
1754
|
-
getOwnPropertyDescriptor(
|
|
1755
|
-
return
|
|
1754
|
+
getOwnPropertyDescriptor(target2, prop) {
|
|
1755
|
+
return target2._descriptors.allKeys ? Reflect.has(proxy, prop) ? {
|
|
1756
1756
|
enumerable: true,
|
|
1757
1757
|
configurable: true
|
|
1758
1758
|
} : void 0 : Reflect.getOwnPropertyDescriptor(proxy, prop);
|
|
@@ -1766,7 +1766,7 @@ function _attachContext(proxy, context, subProxy, descriptorDefaults) {
|
|
|
1766
1766
|
/**
|
|
1767
1767
|
* A trap for the in operator.
|
|
1768
1768
|
*/
|
|
1769
|
-
has(
|
|
1769
|
+
has(target2, prop) {
|
|
1770
1770
|
return Reflect.has(proxy, prop);
|
|
1771
1771
|
},
|
|
1772
1772
|
/**
|
|
@@ -1778,9 +1778,9 @@ function _attachContext(proxy, context, subProxy, descriptorDefaults) {
|
|
|
1778
1778
|
/**
|
|
1779
1779
|
* A trap for setting property values.
|
|
1780
1780
|
*/
|
|
1781
|
-
set(
|
|
1781
|
+
set(target2, prop, value) {
|
|
1782
1782
|
proxy[prop] = value;
|
|
1783
|
-
delete
|
|
1783
|
+
delete target2[prop];
|
|
1784
1784
|
return true;
|
|
1785
1785
|
}
|
|
1786
1786
|
});
|
|
@@ -1798,30 +1798,30 @@ function _descriptors(proxy, defaults4 = {
|
|
|
1798
1798
|
isIndexable: isFunction(_indexable) ? _indexable : () => _indexable
|
|
1799
1799
|
};
|
|
1800
1800
|
}
|
|
1801
|
-
function _cached(
|
|
1802
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1803
|
-
return
|
|
1801
|
+
function _cached(target2, prop, resolve2) {
|
|
1802
|
+
if (Object.prototype.hasOwnProperty.call(target2, prop) || prop === "constructor") {
|
|
1803
|
+
return target2[prop];
|
|
1804
1804
|
}
|
|
1805
1805
|
const value = resolve2();
|
|
1806
|
-
|
|
1806
|
+
target2[prop] = value;
|
|
1807
1807
|
return value;
|
|
1808
1808
|
}
|
|
1809
|
-
function _resolveWithContext(
|
|
1810
|
-
const { _proxy, _context, _subProxy, _descriptors: descriptors2 } =
|
|
1809
|
+
function _resolveWithContext(target2, prop, receiver) {
|
|
1810
|
+
const { _proxy, _context, _subProxy, _descriptors: descriptors2 } = target2;
|
|
1811
1811
|
let value = _proxy[prop];
|
|
1812
1812
|
if (isFunction(value) && descriptors2.isScriptable(prop)) {
|
|
1813
|
-
value = _resolveScriptable(prop, value,
|
|
1813
|
+
value = _resolveScriptable(prop, value, target2, receiver);
|
|
1814
1814
|
}
|
|
1815
1815
|
if (isArray(value) && value.length) {
|
|
1816
|
-
value = _resolveArray(prop, value,
|
|
1816
|
+
value = _resolveArray(prop, value, target2, descriptors2.isIndexable);
|
|
1817
1817
|
}
|
|
1818
1818
|
if (needsSubResolver(prop, value)) {
|
|
1819
1819
|
value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors2);
|
|
1820
1820
|
}
|
|
1821
1821
|
return value;
|
|
1822
1822
|
}
|
|
1823
|
-
function _resolveScriptable(prop, getValue,
|
|
1824
|
-
const { _proxy, _context, _subProxy, _stack } =
|
|
1823
|
+
function _resolveScriptable(prop, getValue, target2, receiver) {
|
|
1824
|
+
const { _proxy, _context, _subProxy, _stack } = target2;
|
|
1825
1825
|
if (_stack.has(prop)) {
|
|
1826
1826
|
throw new Error("Recursion detected: " + Array.from(_stack).join("->") + "->" + prop);
|
|
1827
1827
|
}
|
|
@@ -1833,8 +1833,8 @@ function _resolveScriptable(prop, getValue, target, receiver) {
|
|
|
1833
1833
|
}
|
|
1834
1834
|
return value;
|
|
1835
1835
|
}
|
|
1836
|
-
function _resolveArray(prop, value,
|
|
1837
|
-
const { _proxy, _context, _subProxy, _descriptors: descriptors2 } =
|
|
1836
|
+
function _resolveArray(prop, value, target2, isIndexable) {
|
|
1837
|
+
const { _proxy, _context, _subProxy, _descriptors: descriptors2 } = target2;
|
|
1838
1838
|
if (typeof _context.index !== "undefined" && isIndexable(prop)) {
|
|
1839
1839
|
return value[_context.index % value.length];
|
|
1840
1840
|
} else if (isObject(value[0])) {
|
|
@@ -1900,11 +1900,11 @@ function subGetTarget(resolver, prop, value) {
|
|
|
1900
1900
|
if (!(prop in parent)) {
|
|
1901
1901
|
parent[prop] = {};
|
|
1902
1902
|
}
|
|
1903
|
-
const
|
|
1904
|
-
if (isArray(
|
|
1903
|
+
const target2 = parent[prop];
|
|
1904
|
+
if (isArray(target2) && isObject(value)) {
|
|
1905
1905
|
return value;
|
|
1906
1906
|
}
|
|
1907
|
-
return
|
|
1907
|
+
return target2 || {};
|
|
1908
1908
|
}
|
|
1909
1909
|
function _resolveWithPrefixes(prop, prefixes, scopes, proxy) {
|
|
1910
1910
|
let value;
|
|
@@ -1926,10 +1926,10 @@ function _resolve(key, scopes) {
|
|
|
1926
1926
|
}
|
|
1927
1927
|
}
|
|
1928
1928
|
}
|
|
1929
|
-
function getKeysFromAllScopes(
|
|
1930
|
-
let keys2 =
|
|
1929
|
+
function getKeysFromAllScopes(target2) {
|
|
1930
|
+
let keys2 = target2._keys;
|
|
1931
1931
|
if (!keys2) {
|
|
1932
|
-
keys2 =
|
|
1932
|
+
keys2 = target2._keys = resolveKeysFromAllScopes(target2._scopes);
|
|
1933
1933
|
}
|
|
1934
1934
|
return keys2;
|
|
1935
1935
|
}
|
|
@@ -2892,11 +2892,11 @@ var init_helpers_dataset = __esm({
|
|
|
2892
2892
|
enumerable: true,
|
|
2893
2893
|
get() {
|
|
2894
2894
|
const local = this[privateName];
|
|
2895
|
-
const
|
|
2895
|
+
const target2 = targetScopeObject[targetName];
|
|
2896
2896
|
if (isObject(local)) {
|
|
2897
|
-
return Object.assign({},
|
|
2897
|
+
return Object.assign({}, target2, local);
|
|
2898
2898
|
}
|
|
2899
|
-
return valueOrDefault(local,
|
|
2899
|
+
return valueOrDefault(local, target2);
|
|
2900
2900
|
},
|
|
2901
2901
|
set(value) {
|
|
2902
2902
|
this[privateName] = value;
|
|
@@ -2939,7 +2939,7 @@ var init_helpers_dataset = __esm({
|
|
|
2939
2939
|
"bottom",
|
|
2940
2940
|
"left"
|
|
2941
2941
|
];
|
|
2942
|
-
useOffsetPos = (x3, y5,
|
|
2942
|
+
useOffsetPos = (x3, y5, target2) => (x3 > 0 || y5 > 0) && (!target2 || !target2.shadowRoot);
|
|
2943
2943
|
round1 = (v2) => Math.round(v2 * 10) / 10;
|
|
2944
2944
|
supportsEventListenerOptions = (function() {
|
|
2945
2945
|
let passiveSupported = false;
|
|
@@ -3063,17 +3063,17 @@ function awaitAll(animations, properties) {
|
|
|
3063
3063
|
}
|
|
3064
3064
|
return Promise.all(running);
|
|
3065
3065
|
}
|
|
3066
|
-
function resolveTargetOptions(
|
|
3066
|
+
function resolveTargetOptions(target2, newOptions) {
|
|
3067
3067
|
if (!newOptions) {
|
|
3068
3068
|
return;
|
|
3069
3069
|
}
|
|
3070
|
-
let options =
|
|
3070
|
+
let options = target2.options;
|
|
3071
3071
|
if (!options) {
|
|
3072
|
-
|
|
3072
|
+
target2.options = newOptions;
|
|
3073
3073
|
return;
|
|
3074
3074
|
}
|
|
3075
3075
|
if (options.$shared) {
|
|
3076
|
-
|
|
3076
|
+
target2.options = options = Object.assign({}, options, {
|
|
3077
3077
|
$shared: false,
|
|
3078
3078
|
$animations: {}
|
|
3079
3079
|
});
|
|
@@ -4801,8 +4801,8 @@ function setStyle(ctx, options, style = options) {
|
|
|
4801
4801
|
ctx.lineWidth = valueOrDefault(style.borderWidth, options.borderWidth);
|
|
4802
4802
|
ctx.strokeStyle = valueOrDefault(style.borderColor, options.borderColor);
|
|
4803
4803
|
}
|
|
4804
|
-
function lineTo(ctx, previous,
|
|
4805
|
-
ctx.lineTo(
|
|
4804
|
+
function lineTo(ctx, previous, target2) {
|
|
4805
|
+
ctx.lineTo(target2.x, target2.y);
|
|
4806
4806
|
}
|
|
4807
4807
|
function getLineMethod(options) {
|
|
4808
4808
|
if (options.stepped) {
|
|
@@ -5244,16 +5244,16 @@ function getStartAndCountOfVisiblePointsSimplified(meta4, points) {
|
|
|
5244
5244
|
count
|
|
5245
5245
|
};
|
|
5246
5246
|
}
|
|
5247
|
-
function _segments(line,
|
|
5247
|
+
function _segments(line, target2, property2) {
|
|
5248
5248
|
const segments = line.segments;
|
|
5249
5249
|
const points = line.points;
|
|
5250
|
-
const tpoints =
|
|
5250
|
+
const tpoints = target2.points;
|
|
5251
5251
|
const parts = [];
|
|
5252
5252
|
for (const segment of segments) {
|
|
5253
5253
|
let { start, end } = segment;
|
|
5254
5254
|
end = _findSegmentEnd(start, end, points);
|
|
5255
5255
|
const bounds = _getBounds(property2, points[start], points[end], segment.loop);
|
|
5256
|
-
if (!
|
|
5256
|
+
if (!target2.segments) {
|
|
5257
5257
|
parts.push({
|
|
5258
5258
|
source: segment,
|
|
5259
5259
|
target: bounds,
|
|
@@ -5262,7 +5262,7 @@ function _segments(line, target, property2) {
|
|
|
5262
5262
|
});
|
|
5263
5263
|
continue;
|
|
5264
5264
|
}
|
|
5265
|
-
const targetSegments = _boundSegments(
|
|
5265
|
+
const targetSegments = _boundSegments(target2, bounds);
|
|
5266
5266
|
for (const tgt of targetSegments) {
|
|
5267
5267
|
const subBounds = _getBounds(property2, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);
|
|
5268
5268
|
const fillSources = _boundSegment(segment, points, subBounds);
|
|
@@ -5370,7 +5370,7 @@ function _resolveTarget(sources, index2, propagate) {
|
|
|
5370
5370
|
const visited = [
|
|
5371
5371
|
index2
|
|
5372
5372
|
];
|
|
5373
|
-
let
|
|
5373
|
+
let target2;
|
|
5374
5374
|
if (!propagate) {
|
|
5375
5375
|
return fill2;
|
|
5376
5376
|
}
|
|
@@ -5378,15 +5378,15 @@ function _resolveTarget(sources, index2, propagate) {
|
|
|
5378
5378
|
if (!isNumberFinite(fill2)) {
|
|
5379
5379
|
return fill2;
|
|
5380
5380
|
}
|
|
5381
|
-
|
|
5382
|
-
if (!
|
|
5381
|
+
target2 = sources[fill2];
|
|
5382
|
+
if (!target2) {
|
|
5383
5383
|
return false;
|
|
5384
5384
|
}
|
|
5385
|
-
if (
|
|
5385
|
+
if (target2.visible) {
|
|
5386
5386
|
return fill2;
|
|
5387
5387
|
}
|
|
5388
5388
|
visited.push(fill2);
|
|
5389
|
-
fill2 =
|
|
5389
|
+
fill2 = target2.fill;
|
|
5390
5390
|
}
|
|
5391
5391
|
return false;
|
|
5392
5392
|
}
|
|
@@ -5395,9 +5395,9 @@ function _decodeFill(line, index2, count) {
|
|
|
5395
5395
|
if (isObject(fill2)) {
|
|
5396
5396
|
return isNaN(fill2.value) ? false : fill2;
|
|
5397
5397
|
}
|
|
5398
|
-
let
|
|
5399
|
-
if (isNumberFinite(
|
|
5400
|
-
return decodeTargetIndex(fill2[0], index2,
|
|
5398
|
+
let target2 = parseFloat(fill2);
|
|
5399
|
+
if (isNumberFinite(target2) && Math.floor(target2) === target2) {
|
|
5400
|
+
return decodeTargetIndex(fill2[0], index2, target2, count);
|
|
5401
5401
|
}
|
|
5402
5402
|
return [
|
|
5403
5403
|
"origin",
|
|
@@ -5407,14 +5407,14 @@ function _decodeFill(line, index2, count) {
|
|
|
5407
5407
|
"shape"
|
|
5408
5408
|
].indexOf(fill2) >= 0 && fill2;
|
|
5409
5409
|
}
|
|
5410
|
-
function decodeTargetIndex(firstCh, index2,
|
|
5410
|
+
function decodeTargetIndex(firstCh, index2, target2, count) {
|
|
5411
5411
|
if (firstCh === "-" || firstCh === "+") {
|
|
5412
|
-
|
|
5412
|
+
target2 = index2 + target2;
|
|
5413
5413
|
}
|
|
5414
|
-
if (
|
|
5414
|
+
if (target2 === index2 || target2 < 0 || target2 >= count) {
|
|
5415
5415
|
return false;
|
|
5416
5416
|
}
|
|
5417
|
-
return
|
|
5417
|
+
return target2;
|
|
5418
5418
|
}
|
|
5419
5419
|
function _getTargetPixel(fill2, scale) {
|
|
5420
5420
|
let pixel = null;
|
|
@@ -5584,7 +5584,7 @@ function computeCircularBoundary(source3) {
|
|
|
5584
5584
|
const length = scale.getLabels().length;
|
|
5585
5585
|
const start = options.reverse ? scale.max : scale.min;
|
|
5586
5586
|
const value = _getTargetValue(fill2, scale, start);
|
|
5587
|
-
const
|
|
5587
|
+
const target2 = [];
|
|
5588
5588
|
if (options.grid.circular) {
|
|
5589
5589
|
const center = scale.getPointPositionForValue(0, start);
|
|
5590
5590
|
return new simpleArc({
|
|
@@ -5594,12 +5594,12 @@ function computeCircularBoundary(source3) {
|
|
|
5594
5594
|
});
|
|
5595
5595
|
}
|
|
5596
5596
|
for (let i7 = 0; i7 < length; ++i7) {
|
|
5597
|
-
|
|
5597
|
+
target2.push(scale.getPointPositionForValue(i7, value));
|
|
5598
5598
|
}
|
|
5599
|
-
return
|
|
5599
|
+
return target2;
|
|
5600
5600
|
}
|
|
5601
5601
|
function _drawfill(ctx, source3, area) {
|
|
5602
|
-
const
|
|
5602
|
+
const target2 = _getTarget(source3);
|
|
5603
5603
|
const { chart, index: index2, line, scale, axis } = source3;
|
|
5604
5604
|
const lineOpts = line.options;
|
|
5605
5605
|
const fillOption = lineOpts.fill;
|
|
@@ -5607,11 +5607,11 @@ function _drawfill(ctx, source3, area) {
|
|
|
5607
5607
|
const { above = color2, below = color2 } = fillOption || {};
|
|
5608
5608
|
const meta4 = chart.getDatasetMeta(index2);
|
|
5609
5609
|
const clip2 = getDatasetClipArea(chart, meta4);
|
|
5610
|
-
if (
|
|
5610
|
+
if (target2 && line.points.length) {
|
|
5611
5611
|
clipArea(ctx, area);
|
|
5612
5612
|
doFill(ctx, {
|
|
5613
5613
|
line,
|
|
5614
|
-
target,
|
|
5614
|
+
target: target2,
|
|
5615
5615
|
above,
|
|
5616
5616
|
below,
|
|
5617
5617
|
area,
|
|
@@ -5623,16 +5623,16 @@ function _drawfill(ctx, source3, area) {
|
|
|
5623
5623
|
}
|
|
5624
5624
|
}
|
|
5625
5625
|
function doFill(ctx, cfg) {
|
|
5626
|
-
const { line, target, above, below, area, scale, clip: clip2 } = cfg;
|
|
5626
|
+
const { line, target: target2, above, below, area, scale, clip: clip2 } = cfg;
|
|
5627
5627
|
const property2 = line._loop ? "angle" : cfg.axis;
|
|
5628
5628
|
ctx.save();
|
|
5629
5629
|
let fillColor = below;
|
|
5630
5630
|
if (below !== above) {
|
|
5631
5631
|
if (property2 === "x") {
|
|
5632
|
-
clipVertical(ctx,
|
|
5632
|
+
clipVertical(ctx, target2, area.top);
|
|
5633
5633
|
fill(ctx, {
|
|
5634
5634
|
line,
|
|
5635
|
-
target,
|
|
5635
|
+
target: target2,
|
|
5636
5636
|
color: above,
|
|
5637
5637
|
scale,
|
|
5638
5638
|
property: property2,
|
|
@@ -5640,12 +5640,12 @@ function doFill(ctx, cfg) {
|
|
|
5640
5640
|
});
|
|
5641
5641
|
ctx.restore();
|
|
5642
5642
|
ctx.save();
|
|
5643
|
-
clipVertical(ctx,
|
|
5643
|
+
clipVertical(ctx, target2, area.bottom);
|
|
5644
5644
|
} else if (property2 === "y") {
|
|
5645
|
-
clipHorizontal(ctx,
|
|
5645
|
+
clipHorizontal(ctx, target2, area.left);
|
|
5646
5646
|
fill(ctx, {
|
|
5647
5647
|
line,
|
|
5648
|
-
target,
|
|
5648
|
+
target: target2,
|
|
5649
5649
|
color: below,
|
|
5650
5650
|
scale,
|
|
5651
5651
|
property: property2,
|
|
@@ -5653,13 +5653,13 @@ function doFill(ctx, cfg) {
|
|
|
5653
5653
|
});
|
|
5654
5654
|
ctx.restore();
|
|
5655
5655
|
ctx.save();
|
|
5656
|
-
clipHorizontal(ctx,
|
|
5656
|
+
clipHorizontal(ctx, target2, area.right);
|
|
5657
5657
|
fillColor = above;
|
|
5658
5658
|
}
|
|
5659
5659
|
}
|
|
5660
5660
|
fill(ctx, {
|
|
5661
5661
|
line,
|
|
5662
|
-
target,
|
|
5662
|
+
target: target2,
|
|
5663
5663
|
color: fillColor,
|
|
5664
5664
|
scale,
|
|
5665
5665
|
property: property2,
|
|
@@ -5667,8 +5667,8 @@ function doFill(ctx, cfg) {
|
|
|
5667
5667
|
});
|
|
5668
5668
|
ctx.restore();
|
|
5669
5669
|
}
|
|
5670
|
-
function clipVertical(ctx,
|
|
5671
|
-
const { segments, points } =
|
|
5670
|
+
function clipVertical(ctx, target2, clipY) {
|
|
5671
|
+
const { segments, points } = target2;
|
|
5672
5672
|
let first = true;
|
|
5673
5673
|
let lineLoop = false;
|
|
5674
5674
|
ctx.beginPath();
|
|
@@ -5683,7 +5683,7 @@ function clipVertical(ctx, target, clipY) {
|
|
|
5683
5683
|
ctx.lineTo(firstPoint.x, clipY);
|
|
5684
5684
|
ctx.lineTo(firstPoint.x, firstPoint.y);
|
|
5685
5685
|
}
|
|
5686
|
-
lineLoop = !!
|
|
5686
|
+
lineLoop = !!target2.pathSegment(ctx, segment, {
|
|
5687
5687
|
move: lineLoop
|
|
5688
5688
|
});
|
|
5689
5689
|
if (lineLoop) {
|
|
@@ -5692,12 +5692,12 @@ function clipVertical(ctx, target, clipY) {
|
|
|
5692
5692
|
ctx.lineTo(lastPoint.x, clipY);
|
|
5693
5693
|
}
|
|
5694
5694
|
}
|
|
5695
|
-
ctx.lineTo(
|
|
5695
|
+
ctx.lineTo(target2.first().x, clipY);
|
|
5696
5696
|
ctx.closePath();
|
|
5697
5697
|
ctx.clip();
|
|
5698
5698
|
}
|
|
5699
|
-
function clipHorizontal(ctx,
|
|
5700
|
-
const { segments, points } =
|
|
5699
|
+
function clipHorizontal(ctx, target2, clipX) {
|
|
5700
|
+
const { segments, points } = target2;
|
|
5701
5701
|
let first = true;
|
|
5702
5702
|
let lineLoop = false;
|
|
5703
5703
|
ctx.beginPath();
|
|
@@ -5712,7 +5712,7 @@ function clipHorizontal(ctx, target, clipX) {
|
|
|
5712
5712
|
ctx.lineTo(clipX, firstPoint.y);
|
|
5713
5713
|
ctx.lineTo(firstPoint.x, firstPoint.y);
|
|
5714
5714
|
}
|
|
5715
|
-
lineLoop = !!
|
|
5715
|
+
lineLoop = !!target2.pathSegment(ctx, segment, {
|
|
5716
5716
|
move: lineLoop
|
|
5717
5717
|
});
|
|
5718
5718
|
if (lineLoop) {
|
|
@@ -5721,16 +5721,16 @@ function clipHorizontal(ctx, target, clipX) {
|
|
|
5721
5721
|
ctx.lineTo(clipX, lastPoint.y);
|
|
5722
5722
|
}
|
|
5723
5723
|
}
|
|
5724
|
-
ctx.lineTo(clipX,
|
|
5724
|
+
ctx.lineTo(clipX, target2.first().y);
|
|
5725
5725
|
ctx.closePath();
|
|
5726
5726
|
ctx.clip();
|
|
5727
5727
|
}
|
|
5728
5728
|
function fill(ctx, cfg) {
|
|
5729
|
-
const { line, target, property: property2, color: color2, scale, clip: clip2 } = cfg;
|
|
5730
|
-
const segments = _segments(line,
|
|
5729
|
+
const { line, target: target2, property: property2, color: color2, scale, clip: clip2 } = cfg;
|
|
5730
|
+
const segments = _segments(line, target2, property2);
|
|
5731
5731
|
for (const { source: src, target: tgt, start, end } of segments) {
|
|
5732
5732
|
const { style: { backgroundColor = color2 } = {} } = src;
|
|
5733
|
-
const notShape =
|
|
5733
|
+
const notShape = target2 !== true;
|
|
5734
5734
|
ctx.save();
|
|
5735
5735
|
ctx.fillStyle = backgroundColor;
|
|
5736
5736
|
clipBounds(ctx, scale, clip2, notShape && _getBounds(property2, start, end));
|
|
@@ -5741,15 +5741,15 @@ function fill(ctx, cfg) {
|
|
|
5741
5741
|
if (lineLoop) {
|
|
5742
5742
|
ctx.closePath();
|
|
5743
5743
|
} else {
|
|
5744
|
-
interpolatedLineTo(ctx,
|
|
5744
|
+
interpolatedLineTo(ctx, target2, end, property2);
|
|
5745
5745
|
}
|
|
5746
|
-
const targetLoop = !!
|
|
5746
|
+
const targetLoop = !!target2.pathSegment(ctx, tgt, {
|
|
5747
5747
|
move: lineLoop,
|
|
5748
5748
|
reverse: true
|
|
5749
5749
|
});
|
|
5750
5750
|
loop = lineLoop && targetLoop;
|
|
5751
5751
|
if (!loop) {
|
|
5752
|
-
interpolatedLineTo(ctx,
|
|
5752
|
+
interpolatedLineTo(ctx, target2, start, property2);
|
|
5753
5753
|
}
|
|
5754
5754
|
}
|
|
5755
5755
|
ctx.closePath();
|
|
@@ -5784,8 +5784,8 @@ function clipBounds(ctx, scale, clip2, bounds) {
|
|
|
5784
5784
|
ctx.clip();
|
|
5785
5785
|
}
|
|
5786
5786
|
}
|
|
5787
|
-
function interpolatedLineTo(ctx,
|
|
5788
|
-
const interpolatedPoint =
|
|
5787
|
+
function interpolatedLineTo(ctx, target2, point, property2) {
|
|
5788
|
+
const interpolatedPoint = target2.interpolate(point, property2);
|
|
5789
5789
|
if (interpolatedPoint) {
|
|
5790
5790
|
ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);
|
|
5791
5791
|
}
|
|
@@ -6723,8 +6723,8 @@ var init_chart = __esm({
|
|
|
6723
6723
|
}
|
|
6724
6724
|
};
|
|
6725
6725
|
Animation = class {
|
|
6726
|
-
constructor(cfg,
|
|
6727
|
-
const currentValue =
|
|
6726
|
+
constructor(cfg, target2, prop, to3) {
|
|
6727
|
+
const currentValue = target2[prop];
|
|
6728
6728
|
to3 = resolve([
|
|
6729
6729
|
cfg.to,
|
|
6730
6730
|
to3,
|
|
@@ -6742,7 +6742,7 @@ var init_chart = __esm({
|
|
|
6742
6742
|
this._start = Math.floor(Date.now() + (cfg.delay || 0));
|
|
6743
6743
|
this._duration = this._total = Math.floor(cfg.duration);
|
|
6744
6744
|
this._loop = !!cfg.loop;
|
|
6745
|
-
this._target =
|
|
6745
|
+
this._target = target2;
|
|
6746
6746
|
this._prop = prop;
|
|
6747
6747
|
this._from = from2;
|
|
6748
6748
|
this._to = to3;
|
|
@@ -6851,25 +6851,25 @@ var init_chart = __esm({
|
|
|
6851
6851
|
});
|
|
6852
6852
|
});
|
|
6853
6853
|
}
|
|
6854
|
-
_animateOptions(
|
|
6854
|
+
_animateOptions(target2, values) {
|
|
6855
6855
|
const newOptions = values.options;
|
|
6856
|
-
const options = resolveTargetOptions(
|
|
6856
|
+
const options = resolveTargetOptions(target2, newOptions);
|
|
6857
6857
|
if (!options) {
|
|
6858
6858
|
return [];
|
|
6859
6859
|
}
|
|
6860
6860
|
const animations = this._createAnimations(options, newOptions);
|
|
6861
6861
|
if (newOptions.$shared) {
|
|
6862
|
-
awaitAll(
|
|
6863
|
-
|
|
6862
|
+
awaitAll(target2.options.$animations, newOptions).then(() => {
|
|
6863
|
+
target2.options = newOptions;
|
|
6864
6864
|
}, () => {
|
|
6865
6865
|
});
|
|
6866
6866
|
}
|
|
6867
6867
|
return animations;
|
|
6868
6868
|
}
|
|
6869
|
-
_createAnimations(
|
|
6869
|
+
_createAnimations(target2, values) {
|
|
6870
6870
|
const animatedProps = this._properties;
|
|
6871
6871
|
const animations = [];
|
|
6872
|
-
const running =
|
|
6872
|
+
const running = target2.$animations || (target2.$animations = {});
|
|
6873
6873
|
const props = Object.keys(values);
|
|
6874
6874
|
const date4 = Date.now();
|
|
6875
6875
|
let i7;
|
|
@@ -6879,7 +6879,7 @@ var init_chart = __esm({
|
|
|
6879
6879
|
continue;
|
|
6880
6880
|
}
|
|
6881
6881
|
if (prop === "options") {
|
|
6882
|
-
animations.push(...this._animateOptions(
|
|
6882
|
+
animations.push(...this._animateOptions(target2, values));
|
|
6883
6883
|
continue;
|
|
6884
6884
|
}
|
|
6885
6885
|
const value = values[prop];
|
|
@@ -6894,20 +6894,20 @@ var init_chart = __esm({
|
|
|
6894
6894
|
}
|
|
6895
6895
|
}
|
|
6896
6896
|
if (!cfg || !cfg.duration) {
|
|
6897
|
-
|
|
6897
|
+
target2[prop] = value;
|
|
6898
6898
|
continue;
|
|
6899
6899
|
}
|
|
6900
|
-
running[prop] = animation = new Animation(cfg,
|
|
6900
|
+
running[prop] = animation = new Animation(cfg, target2, prop, value);
|
|
6901
6901
|
animations.push(animation);
|
|
6902
6902
|
}
|
|
6903
6903
|
return animations;
|
|
6904
6904
|
}
|
|
6905
|
-
update(
|
|
6905
|
+
update(target2, values) {
|
|
6906
6906
|
if (this._properties.size === 0) {
|
|
6907
|
-
Object.assign(
|
|
6907
|
+
Object.assign(target2, values);
|
|
6908
6908
|
return;
|
|
6909
6909
|
}
|
|
6910
|
-
const animations = this._createAnimations(
|
|
6910
|
+
const animations = this._createAnimations(target2, values);
|
|
6911
6911
|
if (animations.length) {
|
|
6912
6912
|
animator.add(this._chart, animations);
|
|
6913
6913
|
return true;
|
|
@@ -19692,7 +19692,7 @@ var BeamApp = class extends i4 {
|
|
|
19692
19692
|
await this._openForkDialog();
|
|
19693
19693
|
};
|
|
19694
19694
|
this._handleForkConfirm = async (e8) => {
|
|
19695
|
-
const { target } = e8.detail;
|
|
19695
|
+
const { target: target2 } = e8.detail;
|
|
19696
19696
|
const name2 = this._forkPhotonName;
|
|
19697
19697
|
if (!name2) return;
|
|
19698
19698
|
this._showForkDialog = false;
|
|
@@ -19701,7 +19701,7 @@ var BeamApp = class extends i4 {
|
|
|
19701
19701
|
const res = await fetch("/api/marketplace/fork", {
|
|
19702
19702
|
method: "POST",
|
|
19703
19703
|
headers: { "Content-Type": "application/json" },
|
|
19704
|
-
body: JSON.stringify({ name: name2, target }),
|
|
19704
|
+
body: JSON.stringify({ name: name2, target: target2 }),
|
|
19705
19705
|
signal: AbortSignal.timeout(3e4)
|
|
19706
19706
|
});
|
|
19707
19707
|
const result = await res.json();
|
|
@@ -19874,11 +19874,11 @@ var BeamApp = class extends i4 {
|
|
|
19874
19874
|
if (selected === "__auto__") {
|
|
19875
19875
|
this._instanceSelectorMode = "auto";
|
|
19876
19876
|
await this._fetchInstances(photonName);
|
|
19877
|
-
const
|
|
19878
|
-
if (
|
|
19877
|
+
const target3 = this._autoInstance || "default";
|
|
19878
|
+
if (target3 !== this._currentInstance) {
|
|
19879
19879
|
try {
|
|
19880
|
-
await mcpClient.callTool(`${photonName}/_use`, { name:
|
|
19881
|
-
this._setCurrentInstance(photonName,
|
|
19880
|
+
await mcpClient.callTool(`${photonName}/_use`, { name: target3 });
|
|
19881
|
+
this._setCurrentInstance(photonName, target3);
|
|
19882
19882
|
if (this._selectedMethod) {
|
|
19883
19883
|
void this._handleExecute(new CustomEvent("execute", { detail: { args: {} } }));
|
|
19884
19884
|
}
|
|
@@ -19890,12 +19890,12 @@ var BeamApp = class extends i4 {
|
|
|
19890
19890
|
break;
|
|
19891
19891
|
}
|
|
19892
19892
|
this._instanceSelectorMode = "manual";
|
|
19893
|
-
const
|
|
19894
|
-
if (
|
|
19893
|
+
const target2 = selected;
|
|
19894
|
+
if (target2 === this._currentInstance) return;
|
|
19895
19895
|
try {
|
|
19896
|
-
await mcpClient.callTool(`${photonName}/_use`, { name:
|
|
19897
|
-
this._setCurrentInstance(photonName,
|
|
19898
|
-
showToast(`Switched to: ${
|
|
19896
|
+
await mcpClient.callTool(`${photonName}/_use`, { name: target2 });
|
|
19897
|
+
this._setCurrentInstance(photonName, target2);
|
|
19898
|
+
showToast(`Switched to: ${target2 === "default" ? "(default)" : target2}`, "success");
|
|
19899
19899
|
if (this._selectedMethod) {
|
|
19900
19900
|
void this._handleExecute(new CustomEvent("execute", { detail: { args: {} } }));
|
|
19901
19901
|
}
|
|
@@ -20709,22 +20709,22 @@ var BeamApp = class extends i4 {
|
|
|
20709
20709
|
}
|
|
20710
20710
|
_handleMakerAction(e8) {
|
|
20711
20711
|
const action = e8.detail.action;
|
|
20712
|
-
let
|
|
20712
|
+
let target2 = this._photons.find((p5) => p5.name === "maker");
|
|
20713
20713
|
let targetName = "maker";
|
|
20714
|
-
if ((action === "sync" || action === "init") && !
|
|
20715
|
-
|
|
20714
|
+
if ((action === "sync" || action === "init") && !target2?.methods?.find((m3) => m3.name === action)) {
|
|
20715
|
+
target2 = this._photons.find((p5) => p5.name === "marketplace");
|
|
20716
20716
|
targetName = "marketplace";
|
|
20717
20717
|
}
|
|
20718
|
-
if (!
|
|
20718
|
+
if (!target2) {
|
|
20719
20719
|
this._showError("Photon not found", `${targetName} photon not found`);
|
|
20720
20720
|
return;
|
|
20721
20721
|
}
|
|
20722
|
-
this._selectedPhoton =
|
|
20722
|
+
this._selectedPhoton = target2;
|
|
20723
20723
|
if (action === "new" || action === "wizard") {
|
|
20724
20724
|
this._pendingStudioOpen = true;
|
|
20725
20725
|
this._pendingTemplateSource = e8.detail.templateSource;
|
|
20726
20726
|
}
|
|
20727
|
-
const method =
|
|
20727
|
+
const method = target2.methods?.find((m3) => m3.name === action);
|
|
20728
20728
|
if (method) {
|
|
20729
20729
|
this._selectedMethod = method;
|
|
20730
20730
|
this._view = "form";
|
|
@@ -22994,12 +22994,12 @@ ${photon.errorMessage || "Unknown error"}</pre
|
|
|
22994
22994
|
} else {
|
|
22995
22995
|
this._instanceSelectorMode = "manual";
|
|
22996
22996
|
}
|
|
22997
|
-
const
|
|
22998
|
-
if (
|
|
22997
|
+
const target2 = selected === "__auto__" ? this._autoInstance || "default" : selected;
|
|
22998
|
+
if (target2 === this._currentInstance) return;
|
|
22999
22999
|
try {
|
|
23000
|
-
await mcpClient.callTool(`${photonName}/_use`, { name:
|
|
23001
|
-
this._currentInstance =
|
|
23002
|
-
sessionStorage.setItem(`photon-instance:${photonName}`,
|
|
23000
|
+
await mcpClient.callTool(`${photonName}/_use`, { name: target2 });
|
|
23001
|
+
this._currentInstance = target2;
|
|
23002
|
+
sessionStorage.setItem(`photon-instance:${photonName}`, target2);
|
|
23003
23003
|
if (this._selectedMethod) {
|
|
23004
23004
|
void this._handleExecute(new CustomEvent("execute", { detail: { args: {} } }));
|
|
23005
23005
|
}
|
|
@@ -28950,8 +28950,8 @@ var MethodCard = class extends i4 {
|
|
|
28950
28950
|
e8.stopPropagation();
|
|
28951
28951
|
this._editingIcon = !this._editingIcon;
|
|
28952
28952
|
if (this._editingIcon) {
|
|
28953
|
-
const
|
|
28954
|
-
const rect =
|
|
28953
|
+
const target2 = e8.currentTarget || e8.target;
|
|
28954
|
+
const rect = target2.getBoundingClientRect();
|
|
28955
28955
|
const pickerHeight = 220;
|
|
28956
28956
|
const spaceBelow = window.innerHeight - rect.bottom;
|
|
28957
28957
|
this._pickerPos = {
|
|
@@ -31901,6 +31901,138 @@ ActivityLog = __decorateClass([
|
|
|
31901
31901
|
t4("activity-log")
|
|
31902
31902
|
], ActivityLog);
|
|
31903
31903
|
|
|
31904
|
+
// src/auto-ui/frontend/services/motion.ts
|
|
31905
|
+
var ENTER_EFFECTS = /* @__PURE__ */ new Set([
|
|
31906
|
+
"fade-in",
|
|
31907
|
+
"slide-up",
|
|
31908
|
+
"slide-down",
|
|
31909
|
+
"slide-in-right",
|
|
31910
|
+
"slide-in-left",
|
|
31911
|
+
"scale-in",
|
|
31912
|
+
"scale-up",
|
|
31913
|
+
"flip-in",
|
|
31914
|
+
"drop-in",
|
|
31915
|
+
"stagger",
|
|
31916
|
+
"stagger-fast"
|
|
31917
|
+
]);
|
|
31918
|
+
var DEPTH_PRESETS = {
|
|
31919
|
+
front: "motion-depth-front",
|
|
31920
|
+
back: "motion-depth-back",
|
|
31921
|
+
float: "motion-depth-float",
|
|
31922
|
+
tilt: "motion-tilt",
|
|
31923
|
+
"tilt-right": "motion-tilt-right"
|
|
31924
|
+
};
|
|
31925
|
+
function parseDepthDirective(value) {
|
|
31926
|
+
const preset = DEPTH_PRESETS[value];
|
|
31927
|
+
if (preset) return { className: preset };
|
|
31928
|
+
const tiltMatch = value.match(/^tilt\(\s*([-\d.]+)\s*,\s*([-\d.]+)\s*\)$/);
|
|
31929
|
+
if (tiltMatch) {
|
|
31930
|
+
const rotY = tiltMatch[1];
|
|
31931
|
+
const rotX = tiltMatch[2];
|
|
31932
|
+
return { style: `transform: rotateY(${rotY}deg) rotateX(${rotX}deg)` };
|
|
31933
|
+
}
|
|
31934
|
+
const zMatch = value.match(/^z\(\s*([-\d.]+)\s*\)$/);
|
|
31935
|
+
if (zMatch) {
|
|
31936
|
+
return { style: `transform: translateZ(${zMatch[1]}px)` };
|
|
31937
|
+
}
|
|
31938
|
+
return {};
|
|
31939
|
+
}
|
|
31940
|
+
var MotionObserver = class {
|
|
31941
|
+
constructor() {
|
|
31942
|
+
this._mutationObserver = null;
|
|
31943
|
+
this._intersectionObserver = null;
|
|
31944
|
+
this._root = null;
|
|
31945
|
+
this._observed = /* @__PURE__ */ new WeakSet();
|
|
31946
|
+
}
|
|
31947
|
+
/**
|
|
31948
|
+
* Start observing a root element (typically a shadow root) for motion attributes
|
|
31949
|
+
*/
|
|
31950
|
+
observe(root) {
|
|
31951
|
+
this._root = root;
|
|
31952
|
+
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
31953
|
+
return;
|
|
31954
|
+
}
|
|
31955
|
+
this._processExistingElements(root);
|
|
31956
|
+
this._mutationObserver = new MutationObserver((mutations) => {
|
|
31957
|
+
for (const mutation of mutations) {
|
|
31958
|
+
for (const node of mutation.addedNodes) {
|
|
31959
|
+
if (node instanceof HTMLElement) {
|
|
31960
|
+
this._processElement(node);
|
|
31961
|
+
for (const child of node.querySelectorAll("[data-enter], [data-depth]")) {
|
|
31962
|
+
this._processElement(child);
|
|
31963
|
+
}
|
|
31964
|
+
}
|
|
31965
|
+
}
|
|
31966
|
+
}
|
|
31967
|
+
});
|
|
31968
|
+
this._mutationObserver.observe(root instanceof HTMLElement ? root : root.host, {
|
|
31969
|
+
childList: true,
|
|
31970
|
+
subtree: true
|
|
31971
|
+
});
|
|
31972
|
+
this._intersectionObserver = new IntersectionObserver(
|
|
31973
|
+
(entries) => {
|
|
31974
|
+
for (const entry of entries) {
|
|
31975
|
+
if (entry.isIntersecting) {
|
|
31976
|
+
const el2 = entry.target;
|
|
31977
|
+
const enterEffect = el2.dataset.enterOnVisible;
|
|
31978
|
+
if (enterEffect && ENTER_EFFECTS.has(enterEffect)) {
|
|
31979
|
+
el2.classList.add(`motion-${enterEffect}`);
|
|
31980
|
+
this._intersectionObserver?.unobserve(el2);
|
|
31981
|
+
}
|
|
31982
|
+
}
|
|
31983
|
+
}
|
|
31984
|
+
},
|
|
31985
|
+
{ threshold: 0.1 }
|
|
31986
|
+
);
|
|
31987
|
+
}
|
|
31988
|
+
/**
|
|
31989
|
+
* Stop observing
|
|
31990
|
+
*/
|
|
31991
|
+
disconnect() {
|
|
31992
|
+
this._mutationObserver?.disconnect();
|
|
31993
|
+
this._intersectionObserver?.disconnect();
|
|
31994
|
+
this._mutationObserver = null;
|
|
31995
|
+
this._intersectionObserver = null;
|
|
31996
|
+
this._root = null;
|
|
31997
|
+
}
|
|
31998
|
+
_processExistingElements(root) {
|
|
31999
|
+
const elements2 = root.querySelectorAll?.(
|
|
32000
|
+
"[data-enter], [data-depth], [data-enter-on-visible]"
|
|
32001
|
+
);
|
|
32002
|
+
if (elements2) {
|
|
32003
|
+
for (const el2 of elements2) {
|
|
32004
|
+
this._processElement(el2);
|
|
32005
|
+
}
|
|
32006
|
+
}
|
|
32007
|
+
}
|
|
32008
|
+
_processElement(el2) {
|
|
32009
|
+
if (this._observed.has(el2)) return;
|
|
32010
|
+
this._observed.add(el2);
|
|
32011
|
+
const enterEffect = el2.dataset.enter;
|
|
32012
|
+
if (enterEffect && ENTER_EFFECTS.has(enterEffect)) {
|
|
32013
|
+
el2.classList.add(`motion-${enterEffect}`);
|
|
32014
|
+
}
|
|
32015
|
+
const enterOnVisible = el2.dataset.enterOnVisible;
|
|
32016
|
+
if (enterOnVisible && ENTER_EFFECTS.has(enterOnVisible)) {
|
|
32017
|
+
this._intersectionObserver?.observe(el2);
|
|
32018
|
+
}
|
|
32019
|
+
const depthDirective = el2.dataset.depth;
|
|
32020
|
+
if (depthDirective) {
|
|
32021
|
+
const parent = el2.parentElement;
|
|
32022
|
+
if (parent && !parent.classList.contains("motion-perspective")) {
|
|
32023
|
+
parent.classList.add("motion-perspective");
|
|
32024
|
+
}
|
|
32025
|
+
const { className, style } = parseDepthDirective(depthDirective);
|
|
32026
|
+
if (className) {
|
|
32027
|
+
el2.classList.add(className);
|
|
32028
|
+
}
|
|
32029
|
+
if (style) {
|
|
32030
|
+
el2.style.cssText += `;${style}`;
|
|
32031
|
+
}
|
|
32032
|
+
}
|
|
32033
|
+
}
|
|
32034
|
+
};
|
|
32035
|
+
|
|
31904
32036
|
// src/auto-ui/frontend/components/result-viewer.ts
|
|
31905
32037
|
var CHART_PALETTE = {
|
|
31906
32038
|
dark: ["#6366f1", "#22c55e", "#f97316", "#06b6d4", "#a855f7", "#ec4899", "#eab308", "#14b8a6"],
|
|
@@ -31952,6 +32084,7 @@ var ResultViewer = class extends i4 {
|
|
|
31952
32084
|
this._previousResult = null;
|
|
31953
32085
|
// Recency heat: track when items were last added/updated
|
|
31954
32086
|
this._itemHeatTimestamps = /* @__PURE__ */ new Map();
|
|
32087
|
+
this._motion = new MotionObserver();
|
|
31955
32088
|
// Audit trail expansion state: track which items have expanded audit trails
|
|
31956
32089
|
this._expandedAuditTrails = /* @__PURE__ */ new Set();
|
|
31957
32090
|
// The detected ID field for the current result (shared across diff, animation, warmth)
|
|
@@ -31974,26 +32107,28 @@ var ResultViewer = class extends i4 {
|
|
|
31974
32107
|
this._closeFullscreen();
|
|
31975
32108
|
}
|
|
31976
32109
|
if (this.outputFormat === "slides" && this._slidesParsed?.length > 0) {
|
|
31977
|
-
const
|
|
31978
|
-
|
|
31979
|
-
|
|
31980
|
-
|
|
32110
|
+
const active = document.activeElement;
|
|
32111
|
+
const isInput = active instanceof HTMLElement && (active.tagName === "INPUT" || active.tagName === "TEXTAREA" || active.tagName === "SELECT" || active.isContentEditable);
|
|
32112
|
+
if (!isInput) {
|
|
32113
|
+
const total = this._slidesParsed.length;
|
|
32114
|
+
let handled = true;
|
|
32115
|
+
if (e8.key === "ArrowRight" || e8.key === "PageDown") {
|
|
31981
32116
|
this._slidesNavigate(this._slidesCurrentIndex + 1, total);
|
|
31982
|
-
}
|
|
31983
|
-
} else if (e8.key === "ArrowLeft" || e8.key === "PageUp") {
|
|
31984
|
-
e8.preventDefault();
|
|
31985
|
-
if (this._slidesCurrentIndex > 0) {
|
|
32117
|
+
} else if (e8.key === "ArrowLeft" || e8.key === "PageUp") {
|
|
31986
32118
|
this._slidesNavigate(this._slidesCurrentIndex - 1, total);
|
|
32119
|
+
} else if (e8.key === "Home") {
|
|
32120
|
+
this._slidesNavigate(0, total);
|
|
32121
|
+
} else if (e8.key === "End") {
|
|
32122
|
+
this._slidesNavigate(total - 1, total);
|
|
32123
|
+
} else if (e8.key === "f" || e8.key === "F") {
|
|
32124
|
+
this._slidesToggleFullscreen();
|
|
32125
|
+
} else {
|
|
32126
|
+
handled = false;
|
|
32127
|
+
}
|
|
32128
|
+
if (handled) {
|
|
32129
|
+
e8.preventDefault();
|
|
32130
|
+
e8.stopPropagation();
|
|
31987
32131
|
}
|
|
31988
|
-
} else if (e8.key === "Home") {
|
|
31989
|
-
e8.preventDefault();
|
|
31990
|
-
this._slidesNavigate(0, total);
|
|
31991
|
-
} else if (e8.key === "End") {
|
|
31992
|
-
e8.preventDefault();
|
|
31993
|
-
this._slidesNavigate(total - 1, total);
|
|
31994
|
-
} else if (e8.key === "f" || e8.key === "F") {
|
|
31995
|
-
e8.preventDefault();
|
|
31996
|
-
this._slidesToggleFullscreen();
|
|
31997
32132
|
}
|
|
31998
32133
|
}
|
|
31999
32134
|
if (this._fullscreenImage || this._fullscreenMermaid) {
|
|
@@ -32061,12 +32196,22 @@ var ResultViewer = class extends i4 {
|
|
|
32061
32196
|
this._slidesTransitions = /* @__PURE__ */ new Map();
|
|
32062
32197
|
// per-slide transition overrides
|
|
32063
32198
|
this._slidesDefaultTransition = "fade";
|
|
32199
|
+
this._slidesBackgrounds = /* @__PURE__ */ new Map();
|
|
32200
|
+
// per-slide bg (color, url, gradient)
|
|
32201
|
+
this._slidesEffects = /* @__PURE__ */ new Map();
|
|
32202
|
+
// per-slide element effect
|
|
32203
|
+
this._slidesCols = /* @__PURE__ */ new Map();
|
|
32204
|
+
// per-slide column count
|
|
32205
|
+
this._slidesBuilds = /* @__PURE__ */ new Map();
|
|
32206
|
+
// per-slide build (click-to-reveal)
|
|
32064
32207
|
this._slidesBoundElements = /* @__PURE__ */ new Set();
|
|
32065
32208
|
this._slidesRefreshTimers = [];
|
|
32066
32209
|
this._slidesResizeObserver = null;
|
|
32067
32210
|
this._slidesScaleDebounce = null;
|
|
32068
32211
|
this._slidesScaling = false;
|
|
32069
32212
|
this._slidesLastZoom = "";
|
|
32213
|
+
this._slidesShaking = false;
|
|
32214
|
+
// boundary shake animation guard
|
|
32070
32215
|
// ── Bridge-powered slide rendering ──
|
|
32071
32216
|
// Slide embeds run inside an iframe with the platform bridge loaded.
|
|
32072
32217
|
// The bridge handles data-method binding, format rendering, streaming, and live updates.
|
|
@@ -32088,14 +32233,18 @@ var ResultViewer = class extends i4 {
|
|
|
32088
32233
|
}
|
|
32089
32234
|
connectedCallback() {
|
|
32090
32235
|
super.connectedCallback();
|
|
32091
|
-
window.addEventListener("keydown", this._handleGlobalKeydown);
|
|
32236
|
+
window.addEventListener("keydown", this._handleGlobalKeydown, true);
|
|
32092
32237
|
this._warmthTimer = window.setInterval(() => {
|
|
32093
32238
|
if (this._itemHeatTimestamps.size > 0) this.requestUpdate();
|
|
32094
32239
|
}, 6e4);
|
|
32240
|
+
void this.updateComplete.then(() => {
|
|
32241
|
+
if (this.shadowRoot) this._motion.observe(this.shadowRoot);
|
|
32242
|
+
});
|
|
32095
32243
|
}
|
|
32096
32244
|
disconnectedCallback() {
|
|
32097
32245
|
super.disconnectedCallback();
|
|
32098
|
-
window.removeEventListener("keydown", this._handleGlobalKeydown);
|
|
32246
|
+
window.removeEventListener("keydown", this._handleGlobalKeydown, true);
|
|
32247
|
+
this._motion.disconnect();
|
|
32099
32248
|
if (this._warmthTimer) clearInterval(this._warmthTimer);
|
|
32100
32249
|
if (this._chartInstance) {
|
|
32101
32250
|
this._chartInstance.destroy();
|
|
@@ -33848,29 +33997,29 @@ ${rows}`);
|
|
|
33848
33997
|
}
|
|
33849
33998
|
});
|
|
33850
33999
|
for (const { id: id2, code } of blocks) {
|
|
33851
|
-
const
|
|
33852
|
-
if (!
|
|
34000
|
+
const target2 = this.shadowRoot?.querySelector(`[data-mermaid-id="${id2}"]`);
|
|
34001
|
+
if (!target2) {
|
|
33853
34002
|
console.warn("Mermaid placeholder not found:", id2);
|
|
33854
34003
|
continue;
|
|
33855
34004
|
}
|
|
33856
34005
|
try {
|
|
33857
34006
|
const renderSuffix = Math.random().toString(36).substr(2, 6);
|
|
33858
34007
|
const { svg: svg2 } = await mermaid.render(`${id2}-${renderSuffix}-svg`, code);
|
|
33859
|
-
if (
|
|
33860
|
-
let diagramDiv2 =
|
|
34008
|
+
if (target2.classList.contains("mermaid-live-container")) {
|
|
34009
|
+
let diagramDiv2 = target2.querySelector(".mermaid-diagram");
|
|
33861
34010
|
if (!diagramDiv2) {
|
|
33862
34011
|
diagramDiv2 = document.createElement("div");
|
|
33863
34012
|
diagramDiv2.className = "mermaid-diagram";
|
|
33864
34013
|
diagramDiv2.style.transition = "opacity 0.2s ease";
|
|
33865
|
-
|
|
33866
|
-
this._addMermaidExpandBtn(
|
|
34014
|
+
target2.appendChild(diagramDiv2);
|
|
34015
|
+
this._addMermaidExpandBtn(target2, code, id2);
|
|
33867
34016
|
}
|
|
33868
34017
|
diagramDiv2.style.opacity = "0.4";
|
|
33869
34018
|
requestAnimationFrame(() => {
|
|
33870
34019
|
diagramDiv2.innerHTML = svg2;
|
|
33871
34020
|
diagramDiv2.style.opacity = "1";
|
|
33872
34021
|
});
|
|
33873
|
-
const btn =
|
|
34022
|
+
const btn = target2.querySelector(".expand-btn");
|
|
33874
34023
|
if (btn) btn.onclick = () => this._openMermaidFullscreen(code, id2);
|
|
33875
34024
|
continue;
|
|
33876
34025
|
}
|
|
@@ -33886,10 +34035,10 @@ ${rows}`);
|
|
|
33886
34035
|
diagramDiv.innerHTML = svg2;
|
|
33887
34036
|
wrapper.appendChild(diagramDiv);
|
|
33888
34037
|
this._addMermaidExpandBtn(wrapper, code, id2);
|
|
33889
|
-
|
|
34038
|
+
target2.replaceWith(wrapper);
|
|
33890
34039
|
} catch (e8) {
|
|
33891
34040
|
console.error("Mermaid render error:", e8);
|
|
33892
|
-
|
|
34041
|
+
target2.innerHTML = `<pre style="color: #ff6b6b; background: rgba(255,0,0,0.1); padding: 8px; border-radius: var(--radius-xs);">Mermaid Error: ${e8 instanceof Error ? e8.message : String(e8)}
|
|
33893
34042
|
|
|
33894
34043
|
${code}</pre>`;
|
|
33895
34044
|
}
|
|
@@ -33949,15 +34098,49 @@ ${code}</pre>`;
|
|
|
33949
34098
|
}
|
|
33950
34099
|
const slides = content2.split(/\n---\s*\n/).map((s5) => s5.trim()).filter((s5) => s5.length > 0);
|
|
33951
34100
|
this._slidesTransitions.clear();
|
|
34101
|
+
this._slidesBackgrounds.clear();
|
|
34102
|
+
this._slidesEffects.clear();
|
|
34103
|
+
this._slidesCols.clear();
|
|
34104
|
+
this._slidesBuilds.clear();
|
|
33952
34105
|
slides.forEach((slide, i7) => {
|
|
33953
|
-
const
|
|
33954
|
-
if (
|
|
33955
|
-
|
|
33956
|
-
|
|
34106
|
+
const tMatch = slide.match(/<!--\s*transition:\s*(\w+)\s*-->/);
|
|
34107
|
+
if (tMatch) this._slidesTransitions.set(i7, tMatch[1]);
|
|
34108
|
+
const bgMatch = slide.match(/<!--\s*bg:\s*(.+?)\s*-->/);
|
|
34109
|
+
if (bgMatch) this._slidesBackgrounds.set(i7, bgMatch[1].trim());
|
|
34110
|
+
const fxMatch = slide.match(/<!--\s*effect:\s*(\S+)\s*-->/);
|
|
34111
|
+
if (fxMatch) this._slidesEffects.set(i7, fxMatch[1].trim());
|
|
34112
|
+
const colMatch = slide.match(/<!--\s*cols:\s*(\d+)\s*-->/);
|
|
34113
|
+
if (colMatch) this._slidesCols.set(i7, Math.min(Math.max(parseInt(colMatch[1], 10), 2), 4));
|
|
34114
|
+
if (/<!--\s*build\s*-->/.test(slide)) this._slidesBuilds.set(i7, true);
|
|
33957
34115
|
});
|
|
33958
34116
|
const defaultTheme2 = "auto";
|
|
33959
34117
|
return { slides, theme: config3.theme || defaultTheme2, config: config3 };
|
|
33960
34118
|
}
|
|
34119
|
+
/** Build HTML for a background layer (image, video, or gradient) inside bridge iframe */
|
|
34120
|
+
_buildSlideBgHtml(bg2) {
|
|
34121
|
+
if (!bg2) return "";
|
|
34122
|
+
const isVideo = bg2.startsWith("video:") || /\.(mp4|webm|mov)(\?|$)/i.test(bg2);
|
|
34123
|
+
if (isVideo) {
|
|
34124
|
+
const src = bg2.replace(/^video:/, "");
|
|
34125
|
+
return `<video class="slide-bg-video" src="${src}" autoplay muted loop playsinline></video>`;
|
|
34126
|
+
}
|
|
34127
|
+
const style = this._buildSlideBgStyle(bg2);
|
|
34128
|
+
if (!style) return "";
|
|
34129
|
+
return `<div class="slide-bg-layer" style="${style}"></div>`;
|
|
34130
|
+
}
|
|
34131
|
+
/** Convert a bg directive value into inline CSS for the background layer */
|
|
34132
|
+
_buildSlideBgStyle(bg2) {
|
|
34133
|
+
if (!bg2) return "";
|
|
34134
|
+
if (bg2.startsWith("video:") || /\.(mp4|webm|mov)(\?|$)/i.test(bg2)) return "";
|
|
34135
|
+
if (/^url\(/.test(bg2) || /\.(jpg|jpeg|png|gif|svg|webp|avif)(\?|$)/i.test(bg2)) {
|
|
34136
|
+
const url2 = bg2.startsWith("url(") ? bg2 : `url(${bg2})`;
|
|
34137
|
+
return `background-image:${url2};background-size:cover;background-position:center;`;
|
|
34138
|
+
}
|
|
34139
|
+
if (/^(linear|radial|conic)-gradient/i.test(bg2)) {
|
|
34140
|
+
return `background:${bg2};`;
|
|
34141
|
+
}
|
|
34142
|
+
return `background:${bg2};`;
|
|
34143
|
+
}
|
|
33961
34144
|
/** Ensure the bridge script is loaded and cached */
|
|
33962
34145
|
async _ensureBridgeScript() {
|
|
33963
34146
|
if (this._slidesBridgeScript) return this._slidesBridgeScript;
|
|
@@ -33981,7 +34164,7 @@ ${code}</pre>`;
|
|
|
33981
34164
|
return this._slidesBridgeScript || "";
|
|
33982
34165
|
}
|
|
33983
34166
|
/** Build an iframe srcdoc for a slide with the bridge loaded */
|
|
33984
|
-
_buildSlideSrcdoc(slideHtml, codeBlocks, headerText, footerText, pageNum) {
|
|
34167
|
+
_buildSlideSrcdoc(slideHtml, codeBlocks, headerText, footerText, pageNum, slideBg, slideEffect) {
|
|
33985
34168
|
const bridge = this._slidesBridgeScript || "";
|
|
33986
34169
|
const photonPrefix = this.photonName ? this.photonName + "/" : "";
|
|
33987
34170
|
let html = slideHtml;
|
|
@@ -34034,6 +34217,42 @@ ${bridge}
|
|
|
34034
34217
|
transform-origin: 50% 50%;
|
|
34035
34218
|
display: flex; flex-direction: column;
|
|
34036
34219
|
overflow: hidden;
|
|
34220
|
+
z-index: 1;
|
|
34221
|
+
}
|
|
34222
|
+
/* Background layers (image, gradient, color) */
|
|
34223
|
+
.slide-bg-layer {
|
|
34224
|
+
position: absolute; inset: 0; z-index: 0;
|
|
34225
|
+
}
|
|
34226
|
+
.slide-bg-video {
|
|
34227
|
+
position: absolute; inset: 0; z-index: 0;
|
|
34228
|
+
width: 100%; height: 100%; object-fit: cover;
|
|
34229
|
+
}
|
|
34230
|
+
/* When bg is present, add a scrim for text readability */
|
|
34231
|
+
.slide-bg-layer + .slide-canvas,
|
|
34232
|
+
.slide-bg-video + .slide-canvas {
|
|
34233
|
+
background: rgba(0,0,0,0.35);
|
|
34234
|
+
}
|
|
34235
|
+
/* Universal motion system \u2014 matches motion.ts keyframes via data-enter attribute */
|
|
34236
|
+
@keyframes motion-slide-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
|
|
34237
|
+
@keyframes motion-slide-down { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
|
|
34238
|
+
@keyframes motion-slide-in-right { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
|
|
34239
|
+
@keyframes motion-slide-in-left { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
|
|
34240
|
+
@keyframes motion-scale-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
|
|
34241
|
+
@keyframes motion-scale-up { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: none; } }
|
|
34242
|
+
@keyframes motion-flip-in { from { opacity: 0; transform: perspective(800px) rotateY(90deg); } to { opacity: 1; transform: none; } }
|
|
34243
|
+
@keyframes motion-fade-in { from { opacity: 0; } to { opacity: 1; } }
|
|
34244
|
+
@keyframes motion-drop-in { from { opacity: 0; transform: translateY(-40px) scale(0.95); } 60% { opacity: 1; transform: translateY(4px) scale(1.01); } to { opacity: 1; transform: none; } }
|
|
34245
|
+
[data-enter="slide-up"] { animation: motion-slide-up 0.3s cubic-bezier(0.16,1,0.3,1) both; }
|
|
34246
|
+
[data-enter="slide-down"] { animation: motion-slide-down 0.3s cubic-bezier(0.16,1,0.3,1) both; }
|
|
34247
|
+
[data-enter="slide-in-right"] { animation: motion-slide-in-right 0.3s cubic-bezier(0.16,1,0.3,1) both; }
|
|
34248
|
+
[data-enter="slide-in-left"] { animation: motion-slide-in-left 0.3s cubic-bezier(0.16,1,0.3,1) both; }
|
|
34249
|
+
[data-enter="scale-in"] { animation: motion-scale-in 0.3s cubic-bezier(0.16,1,0.3,1) both; }
|
|
34250
|
+
[data-enter="scale-up"] { animation: motion-scale-up 0.3s cubic-bezier(0.16,1,0.3,1) both; }
|
|
34251
|
+
[data-enter="flip-in"] { animation: motion-flip-in 0.5s cubic-bezier(0.16,1,0.3,1) both; }
|
|
34252
|
+
[data-enter="fade-in"] { animation: motion-fade-in 0.3s cubic-bezier(0.16,1,0.3,1) both; }
|
|
34253
|
+
[data-enter="drop-in"] { animation: motion-drop-in 0.5s cubic-bezier(0.16,1,0.3,1) both; }
|
|
34254
|
+
@media (prefers-reduced-motion: reduce) {
|
|
34255
|
+
[data-enter] { animation: none !important; opacity: 1 !important; }
|
|
34037
34256
|
}
|
|
34038
34257
|
.slide-header { padding: 4px 32px; font-size: 9px; opacity: 0.4;
|
|
34039
34258
|
color: var(--color-on-surface-variant, inherit);
|
|
@@ -34054,11 +34273,33 @@ ${bridge}
|
|
|
34054
34273
|
color: var(--color-on-surface-variant, inherit);
|
|
34055
34274
|
border-top: 1px solid var(--color-outline-variant, rgba(128,128,128,0.1)); flex-shrink: 0; }
|
|
34056
34275
|
h1, h2, h3 { color: var(--color-primary, var(--accent, #79aef0)); margin-top: 0; }
|
|
34057
|
-
h1 { font-size:
|
|
34058
|
-
|
|
34059
|
-
|
|
34276
|
+
h1 { font-size: 2em; margin-bottom: 0.3em; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
|
|
34277
|
+
.slide-body.title-slide h1 { font-size: 2.8em; letter-spacing: -0.03em; }
|
|
34278
|
+
.slide-body.title-slide h3 { font-size: 1.1em; font-weight: 400; opacity: 0.7; margin-top: 0.3em; }
|
|
34279
|
+
h2 { font-size: 1.5em; font-weight: 700; letter-spacing: -0.01em; }
|
|
34280
|
+
h3 { font-size: 1.15em; font-weight: 600; }
|
|
34281
|
+
p { margin: 0.4em 0; line-height: 1.65; }
|
|
34282
|
+
ul, ol { margin: 0.5em 0; padding-left: 1.4em; }
|
|
34283
|
+
li { margin: 0.25em 0; line-height: 1.55; }
|
|
34284
|
+
li::marker { color: var(--color-primary, var(--accent, #79aef0)); }
|
|
34060
34285
|
a { color: var(--color-primary, var(--accent, #79aef0)); }
|
|
34061
34286
|
strong { color: var(--color-on-surface, var(--text-primary, inherit)); }
|
|
34287
|
+
/* Columns */
|
|
34288
|
+
.slide-cols { display: grid; gap: 24px; height: 100%; align-items: start; }
|
|
34289
|
+
.slide-cols-2 { grid-template-columns: 1fr 1fr; }
|
|
34290
|
+
.slide-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
|
|
34291
|
+
.slide-cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
|
|
34292
|
+
.slide-col { min-width: 0; }
|
|
34293
|
+
/* Build fragments */
|
|
34294
|
+
.slide-fragment { transition: opacity 0.3s ease; }
|
|
34295
|
+
.slide-fragment:not(.visible) { opacity: 0; pointer-events: none; }
|
|
34296
|
+
.slide-fragment.visible { opacity: 1; }
|
|
34297
|
+
/* Blockquote */
|
|
34298
|
+
blockquote { border-left: 3px solid var(--color-primary, var(--accent, #79aef0)); padding: 4px 16px;
|
|
34299
|
+
margin: 0.6em 0; font-size: 1.05em; font-style: italic;
|
|
34300
|
+
color: var(--color-on-surface-variant, rgba(255,255,255,0.8)); }
|
|
34301
|
+
/* Images */
|
|
34302
|
+
img { max-width: 100%; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
|
|
34062
34303
|
[data-method] { position: relative; overflow: hidden; }
|
|
34063
34304
|
[data-method].loading::after {
|
|
34064
34305
|
content: ''; display: inline-block; width: 14px; height: 14px;
|
|
@@ -34156,7 +34397,8 @@ ${bridge}
|
|
|
34156
34397
|
<\/script>
|
|
34157
34398
|
</head>
|
|
34158
34399
|
<body>
|
|
34159
|
-
|
|
34400
|
+
${this._buildSlideBgHtml(slideBg || "")}
|
|
34401
|
+
<div class="slide-canvas"${slideEffect ? ` data-effect="${slideEffect}"` : ""}>
|
|
34160
34402
|
${headerText ? `<div class="slide-header">${headerText}</div>` : ""}
|
|
34161
34403
|
<div class="slide-body">${html}</div>
|
|
34162
34404
|
${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</span><span>${pageNum || ""}</span></div>` : ""}
|
|
@@ -34199,12 +34441,21 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34199
34441
|
}
|
|
34200
34442
|
}
|
|
34201
34443
|
})();
|
|
34444
|
+
// Build fragments: parent can call window.advanceFragment() to reveal next
|
|
34445
|
+
window.advanceFragment = function() {
|
|
34446
|
+
var frags = document.querySelectorAll('.slide-fragment:not(.visible)');
|
|
34447
|
+
if (frags.length > 0) { frags[0].classList.add('visible'); return true; }
|
|
34448
|
+
return false;
|
|
34449
|
+
};
|
|
34450
|
+
window.allFragmentsRevealed = function() {
|
|
34451
|
+
return document.querySelectorAll('.slide-fragment:not(.visible)').length === 0;
|
|
34452
|
+
};
|
|
34202
34453
|
<\/script>
|
|
34203
34454
|
</body>
|
|
34204
34455
|
</html>`;
|
|
34205
34456
|
}
|
|
34206
34457
|
/** Render a single slide's markdown to HTML (shared by live render + pre-render) */
|
|
34207
|
-
_renderSlideHtml(slideMarkdown) {
|
|
34458
|
+
_renderSlideHtml(slideMarkdown, slideIndex) {
|
|
34208
34459
|
let md = slideMarkdown;
|
|
34209
34460
|
if (this._slidesBaseUrl) {
|
|
34210
34461
|
md = md.replace(
|
|
@@ -34216,10 +34467,33 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34216
34467
|
(_3, pre, relPath, post) => `${pre}${this._slidesBaseUrl}${relPath}${post}`
|
|
34217
34468
|
);
|
|
34218
34469
|
}
|
|
34219
|
-
|
|
34470
|
+
const colCount = slideIndex !== void 0 ? this._slidesCols.get(slideIndex) : void 0;
|
|
34471
|
+
if (colCount && md.includes("|||")) {
|
|
34472
|
+
const parts = md.split(/\n\|\|\|\s*\n/);
|
|
34473
|
+
const rendered = parts.map(
|
|
34474
|
+
(part) => this._parseRichMarkdown(part.trim(), { stripFrontMatter: false, includeInlineStyles: true })
|
|
34475
|
+
);
|
|
34476
|
+
const colHtml = rendered.map((r7) => `<div class="slide-col">${r7.html}</div>`).join("");
|
|
34477
|
+
return {
|
|
34478
|
+
html: `<div class="slide-cols slide-cols-${colCount}">${colHtml}</div>`,
|
|
34479
|
+
mermaidBlocks: rendered.flatMap((r7) => r7.mermaidBlocks),
|
|
34480
|
+
codeBlocks: rendered.flatMap((r7) => r7.codeBlocks)
|
|
34481
|
+
};
|
|
34482
|
+
}
|
|
34483
|
+
const result = this._parseRichMarkdown(md, {
|
|
34220
34484
|
stripFrontMatter: false,
|
|
34221
34485
|
includeInlineStyles: true
|
|
34222
34486
|
});
|
|
34487
|
+
const hasBuild = slideIndex !== void 0 ? this._slidesBuilds.get(slideIndex) : false;
|
|
34488
|
+
if (hasBuild) {
|
|
34489
|
+
const chunks = result.html.split(/<!--\s*build\s*-->/);
|
|
34490
|
+
if (chunks.length > 1) {
|
|
34491
|
+
result.html = chunks.map(
|
|
34492
|
+
(chunk, i7) => `<div class="slide-fragment${i7 === 0 ? " visible" : ""}" data-fragment="${i7}">${chunk}</div>`
|
|
34493
|
+
).join("");
|
|
34494
|
+
}
|
|
34495
|
+
}
|
|
34496
|
+
return result;
|
|
34223
34497
|
}
|
|
34224
34498
|
_renderSlides(data) {
|
|
34225
34499
|
const raw = String(data);
|
|
@@ -34247,7 +34521,7 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34247
34521
|
const stripQuotes = (s5) => s5.replace(/^["']|["']$/g, "");
|
|
34248
34522
|
const rawBaseUrl = stripQuotes(config3.baseUrl || "");
|
|
34249
34523
|
this._slidesBaseUrl = rawBaseUrl || (this.photonName ? `/api/assets/${encodeURIComponent(this.photonName)}/` : "");
|
|
34250
|
-
const { html: slideHtml, mermaidBlocks, codeBlocks } = this._renderSlideHtml(current);
|
|
34524
|
+
const { html: slideHtml, mermaidBlocks, codeBlocks } = this._renderSlideHtml(current, idx);
|
|
34251
34525
|
this._pendingMermaidBlocks = mermaidBlocks;
|
|
34252
34526
|
this._pendingCodeBlocks = codeBlocks;
|
|
34253
34527
|
const resolvedTheme = rawTheme === "auto" || rawTheme === "default" ? this.theme === "light" ? "uncover" : "default" : rawTheme;
|
|
@@ -34260,17 +34534,30 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34260
34534
|
const headerText = stripQuotes(config3.header || "");
|
|
34261
34535
|
const footerText = stripQuotes(config3.footer || "");
|
|
34262
34536
|
const currentTransition = this._getSlideTransition(idx);
|
|
34537
|
+
const slideBg = this._slidesBackgrounds.get(idx) || "";
|
|
34538
|
+
const slideEffect = this._slidesEffects.get(idx) || "";
|
|
34539
|
+
const slideBgStyle = this._buildSlideBgStyle(slideBg);
|
|
34540
|
+
const isVideoBg = /\.(mp4|webm|mov)(\?|$)/i.test(slideBg) || slideBg.startsWith("video:");
|
|
34263
34541
|
return b2`
|
|
34264
34542
|
<div
|
|
34265
34543
|
class="slides-container ${themeClass}"
|
|
34266
34544
|
id="slides-root"
|
|
34267
34545
|
data-transition="${currentTransition}"
|
|
34268
34546
|
data-direction="${this._slidesDirection}"
|
|
34547
|
+
data-effect="${slideEffect}"
|
|
34269
34548
|
@keydown=${(e8) => this._slidesKeydown(e8, total)}
|
|
34270
34549
|
tabindex="0"
|
|
34271
34550
|
style="${viewportStyle}"
|
|
34272
34551
|
>
|
|
34273
34552
|
<div class="slides-viewport">
|
|
34553
|
+
${slideBg ? isVideoBg ? b2`<video
|
|
34554
|
+
class="slides-bg-video"
|
|
34555
|
+
src="${slideBg.replace(/^video:/, "")}"
|
|
34556
|
+
autoplay
|
|
34557
|
+
muted
|
|
34558
|
+
loop
|
|
34559
|
+
playsinline
|
|
34560
|
+
></video>` : b2`<div class="slides-bg-layer" style="${slideBgStyle}"></div>` : ""}
|
|
34274
34561
|
<div class="slides-content">
|
|
34275
34562
|
${this._slidesBridgeScript ? b2`<iframe
|
|
34276
34563
|
class="slide-bridge-frame"
|
|
@@ -34279,7 +34566,9 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34279
34566
|
codeBlocks,
|
|
34280
34567
|
headerText,
|
|
34281
34568
|
footerText,
|
|
34282
|
-
showPaginate ? `${idx + 1} / ${total}` : ""
|
|
34569
|
+
showPaginate ? `${idx + 1} / ${total}` : "",
|
|
34570
|
+
slideBg,
|
|
34571
|
+
slideEffect
|
|
34283
34572
|
)}
|
|
34284
34573
|
sandbox="allow-scripts allow-same-origin allow-popups"
|
|
34285
34574
|
frameborder="0"
|
|
@@ -34287,11 +34576,7 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34287
34576
|
></iframe>` : o5(slideHtml)}
|
|
34288
34577
|
</div>
|
|
34289
34578
|
<div class="slides-controls">
|
|
34290
|
-
<button
|
|
34291
|
-
class="slides-btn"
|
|
34292
|
-
?disabled=${idx === 0}
|
|
34293
|
-
@click=${() => this._slidesNavigate(idx - 1, total)}
|
|
34294
|
-
>
|
|
34579
|
+
<button class="slides-btn" @click=${() => this._slidesNavigate(idx - 1, total)}>
|
|
34295
34580
|
<svg
|
|
34296
34581
|
width="14"
|
|
34297
34582
|
height="14"
|
|
@@ -34306,11 +34591,7 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34306
34591
|
</svg>
|
|
34307
34592
|
</button>
|
|
34308
34593
|
<span class="slides-counter">${idx + 1} / ${total}</span>
|
|
34309
|
-
<button
|
|
34310
|
-
class="slides-btn"
|
|
34311
|
-
?disabled=${idx === total - 1}
|
|
34312
|
-
@click=${() => this._slidesNavigate(idx + 1, total)}
|
|
34313
|
-
>
|
|
34594
|
+
<button class="slides-btn" @click=${() => this._slidesNavigate(idx + 1, total)}>
|
|
34314
34595
|
<svg
|
|
34315
34596
|
width="14"
|
|
34316
34597
|
height="14"
|
|
@@ -34345,6 +34626,16 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34345
34626
|
</svg>
|
|
34346
34627
|
</button>
|
|
34347
34628
|
</div>
|
|
34629
|
+
<!-- Progress bar -->
|
|
34630
|
+
<div class="slides-progress">
|
|
34631
|
+
${Array.from(
|
|
34632
|
+
{ length: total },
|
|
34633
|
+
(_3, i7) => b2`<div
|
|
34634
|
+
class="slides-progress-segment ${i7 <= idx ? "visited" : ""} ${i7 === idx ? "current" : ""}"
|
|
34635
|
+
@click=${() => this._slidesNavigate(i7, total)}
|
|
34636
|
+
></div>`
|
|
34637
|
+
)}
|
|
34638
|
+
</div>
|
|
34348
34639
|
</div>
|
|
34349
34640
|
${footerText && !this._slidesBridgeScript ? b2`<div class="slides-footer">
|
|
34350
34641
|
<span>${footerText}</span>
|
|
@@ -34383,6 +34674,30 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34383
34674
|
.slides-container:fullscreen .slides-viewport:has(.slide-bridge-frame) {
|
|
34384
34675
|
padding: 0;
|
|
34385
34676
|
}
|
|
34677
|
+
/* ═══ BACKGROUND LAYERS ═══ */
|
|
34678
|
+
.slides-bg-layer {
|
|
34679
|
+
position: absolute;
|
|
34680
|
+
inset: 0;
|
|
34681
|
+
z-index: 0;
|
|
34682
|
+
border-radius: inherit;
|
|
34683
|
+
}
|
|
34684
|
+
.slides-bg-video {
|
|
34685
|
+
position: absolute;
|
|
34686
|
+
inset: 0;
|
|
34687
|
+
z-index: 0;
|
|
34688
|
+
width: 100%;
|
|
34689
|
+
height: 100%;
|
|
34690
|
+
object-fit: cover;
|
|
34691
|
+
border-radius: inherit;
|
|
34692
|
+
}
|
|
34693
|
+
/* Scrim for readability when bg image/video is present */
|
|
34694
|
+
.slides-viewport:has(.slides-bg-layer) .slides-content,
|
|
34695
|
+
.slides-viewport:has(.slides-bg-video) .slides-content {
|
|
34696
|
+
position: relative;
|
|
34697
|
+
z-index: 1;
|
|
34698
|
+
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
|
|
34699
|
+
}
|
|
34700
|
+
|
|
34386
34701
|
.slides-content {
|
|
34387
34702
|
width: 100%;
|
|
34388
34703
|
max-width: 960px;
|
|
@@ -34411,20 +34726,25 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34411
34726
|
.slides-content h1 {
|
|
34412
34727
|
font-size: 2.4em;
|
|
34413
34728
|
margin: 0 0 0.4em;
|
|
34414
|
-
font-weight:
|
|
34729
|
+
font-weight: 800;
|
|
34730
|
+
letter-spacing: -0.02em;
|
|
34731
|
+
line-height: 1.15;
|
|
34415
34732
|
}
|
|
34416
34733
|
.slides-content h2 {
|
|
34417
34734
|
font-size: 1.8em;
|
|
34418
34735
|
margin: 0 0 0.4em;
|
|
34419
|
-
font-weight:
|
|
34736
|
+
font-weight: 700;
|
|
34737
|
+
letter-spacing: -0.01em;
|
|
34420
34738
|
}
|
|
34421
34739
|
.slides-content h3 {
|
|
34422
34740
|
font-size: 1.3em;
|
|
34423
34741
|
margin: 0 0 0.3em;
|
|
34742
|
+
font-weight: 600;
|
|
34424
34743
|
}
|
|
34425
34744
|
.slides-content p {
|
|
34426
34745
|
margin: 0.5em 0;
|
|
34427
34746
|
font-size: 1.15em;
|
|
34747
|
+
line-height: 1.65;
|
|
34428
34748
|
}
|
|
34429
34749
|
.slides-content ul,
|
|
34430
34750
|
.slides-content ol {
|
|
@@ -34434,6 +34754,10 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34434
34754
|
}
|
|
34435
34755
|
.slides-content li {
|
|
34436
34756
|
margin: 0.3em 0;
|
|
34757
|
+
line-height: 1.55;
|
|
34758
|
+
}
|
|
34759
|
+
.slides-content li::marker {
|
|
34760
|
+
color: var(--color-primary, rgba(125, 211, 252, 0.7));
|
|
34437
34761
|
}
|
|
34438
34762
|
.slides-content code {
|
|
34439
34763
|
background: rgba(255, 255, 255, 0.1);
|
|
@@ -34454,12 +34778,47 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34454
34778
|
.slides-content img {
|
|
34455
34779
|
max-width: 100%;
|
|
34456
34780
|
border-radius: 8px;
|
|
34781
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
|
|
34457
34782
|
}
|
|
34458
34783
|
.slides-content blockquote {
|
|
34459
|
-
border-left:
|
|
34460
|
-
padding
|
|
34461
|
-
margin: 0.
|
|
34462
|
-
|
|
34784
|
+
border-left: 3px solid var(--color-primary, rgba(125, 211, 252, 0.6));
|
|
34785
|
+
padding: 4px 16px;
|
|
34786
|
+
margin: 0.6em 0;
|
|
34787
|
+
font-style: italic;
|
|
34788
|
+
color: var(--color-on-surface-variant, rgba(255, 255, 255, 0.8));
|
|
34789
|
+
}
|
|
34790
|
+
/* ═══ COLUMNS ═══ */
|
|
34791
|
+
.slides-content .slide-cols {
|
|
34792
|
+
display: grid;
|
|
34793
|
+
gap: 24px;
|
|
34794
|
+
align-items: start;
|
|
34795
|
+
}
|
|
34796
|
+
.slides-content .slide-cols-2 {
|
|
34797
|
+
grid-template-columns: 1fr 1fr;
|
|
34798
|
+
}
|
|
34799
|
+
.slides-content .slide-cols-3 {
|
|
34800
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
34801
|
+
}
|
|
34802
|
+
.slides-content .slide-cols-4 {
|
|
34803
|
+
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
34804
|
+
}
|
|
34805
|
+
.slides-content .slide-col {
|
|
34806
|
+
min-width: 0;
|
|
34807
|
+
}
|
|
34808
|
+
/* ═══ BUILD FRAGMENTS ═══ */
|
|
34809
|
+
.slides-content .slide-fragment {
|
|
34810
|
+
transition:
|
|
34811
|
+
opacity 0.3s ease,
|
|
34812
|
+
transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
|
|
34813
|
+
}
|
|
34814
|
+
.slides-content .slide-fragment:not(.visible) {
|
|
34815
|
+
opacity: 0;
|
|
34816
|
+
transform: translateY(8px);
|
|
34817
|
+
pointer-events: none;
|
|
34818
|
+
}
|
|
34819
|
+
.slides-content .slide-fragment.visible {
|
|
34820
|
+
opacity: 1;
|
|
34821
|
+
transform: none;
|
|
34463
34822
|
}
|
|
34464
34823
|
.slides-content table {
|
|
34465
34824
|
border-collapse: collapse;
|
|
@@ -34519,6 +34878,77 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34519
34878
|
opacity: 0.3;
|
|
34520
34879
|
cursor: default;
|
|
34521
34880
|
}
|
|
34881
|
+
|
|
34882
|
+
/* ═══ BOUNDARY SHAKE ═══ */
|
|
34883
|
+
@keyframes slides-shake {
|
|
34884
|
+
10%,
|
|
34885
|
+
90% {
|
|
34886
|
+
transform: translateX(-1px);
|
|
34887
|
+
}
|
|
34888
|
+
20%,
|
|
34889
|
+
80% {
|
|
34890
|
+
transform: translateX(2px);
|
|
34891
|
+
}
|
|
34892
|
+
30%,
|
|
34893
|
+
50%,
|
|
34894
|
+
70% {
|
|
34895
|
+
transform: translateX(-4px);
|
|
34896
|
+
}
|
|
34897
|
+
40%,
|
|
34898
|
+
60% {
|
|
34899
|
+
transform: translateX(4px);
|
|
34900
|
+
}
|
|
34901
|
+
}
|
|
34902
|
+
.slides-shake {
|
|
34903
|
+
animation: slides-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
|
34904
|
+
}
|
|
34905
|
+
|
|
34906
|
+
/* Element stagger uses universal data-enter from motion system — no custom keyframes */
|
|
34907
|
+
|
|
34908
|
+
/* ═══ PROGRESS BAR ═══ */
|
|
34909
|
+
.slides-progress {
|
|
34910
|
+
display: flex;
|
|
34911
|
+
gap: 2px;
|
|
34912
|
+
padding: 0 16px;
|
|
34913
|
+
position: absolute;
|
|
34914
|
+
bottom: 0;
|
|
34915
|
+
left: 0;
|
|
34916
|
+
right: 0;
|
|
34917
|
+
height: 4px;
|
|
34918
|
+
z-index: 11;
|
|
34919
|
+
opacity: 0;
|
|
34920
|
+
transition: opacity 0.3s ease;
|
|
34921
|
+
}
|
|
34922
|
+
.slides-container:hover .slides-progress,
|
|
34923
|
+
.slides-container:focus-within .slides-progress {
|
|
34924
|
+
opacity: 1;
|
|
34925
|
+
}
|
|
34926
|
+
.slides-progress-segment {
|
|
34927
|
+
flex: 1;
|
|
34928
|
+
background: rgba(255, 255, 255, 0.15);
|
|
34929
|
+
border-radius: 2px;
|
|
34930
|
+
cursor: pointer;
|
|
34931
|
+
transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
34932
|
+
}
|
|
34933
|
+
.slides-progress-segment.visited {
|
|
34934
|
+
background: var(--color-primary, rgba(125, 211, 252, 0.5));
|
|
34935
|
+
}
|
|
34936
|
+
.slides-progress-segment.current {
|
|
34937
|
+
background: var(--color-primary, #7dd3fc);
|
|
34938
|
+
}
|
|
34939
|
+
.slides-progress-segment:hover {
|
|
34940
|
+
background: var(--color-primary, #7dd3fc);
|
|
34941
|
+
opacity: 0.8;
|
|
34942
|
+
}
|
|
34943
|
+
.slides-theme-uncover .slides-progress-segment {
|
|
34944
|
+
background: rgba(0, 0, 0, 0.08);
|
|
34945
|
+
}
|
|
34946
|
+
.slides-theme-uncover .slides-progress-segment.visited {
|
|
34947
|
+
background: var(--color-primary, rgba(26, 26, 46, 0.4));
|
|
34948
|
+
}
|
|
34949
|
+
.slides-theme-uncover .slides-progress-segment.current {
|
|
34950
|
+
background: var(--color-primary, #1a1a2e);
|
|
34951
|
+
}
|
|
34522
34952
|
.slides-counter {
|
|
34523
34953
|
font-size: 13px;
|
|
34524
34954
|
opacity: 0.7;
|
|
@@ -34743,72 +35173,79 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34743
35173
|
|
|
34744
35174
|
/* Transition: fade (default) */
|
|
34745
35175
|
::view-transition-old(slide-content) {
|
|
34746
|
-
animation: fadeOut 0.
|
|
35176
|
+
animation: fadeOut 0.2s ease;
|
|
34747
35177
|
}
|
|
34748
35178
|
::view-transition-new(slide-content) {
|
|
34749
|
-
animation: fadeIn 0.
|
|
35179
|
+
animation: fadeIn 0.2s ease;
|
|
34750
35180
|
}
|
|
34751
35181
|
|
|
34752
35182
|
/* Transition: slide forward */
|
|
34753
35183
|
:host([data-slides-transition='slide'][data-slides-direction='forward'])
|
|
34754
35184
|
::view-transition-old(slide-content) {
|
|
34755
|
-
animation: slideOutLeft 0.
|
|
35185
|
+
animation: slideOutLeft 0.2s ease;
|
|
34756
35186
|
}
|
|
34757
35187
|
:host([data-slides-transition='slide'][data-slides-direction='forward'])
|
|
34758
35188
|
::view-transition-new(slide-content) {
|
|
34759
|
-
animation: slideInRight 0.
|
|
35189
|
+
animation: slideInRight 0.2s ease;
|
|
34760
35190
|
}
|
|
34761
35191
|
:host([data-slides-transition='slide'][data-slides-direction='backward'])
|
|
34762
35192
|
::view-transition-old(slide-content) {
|
|
34763
|
-
animation: slideOutRight 0.
|
|
35193
|
+
animation: slideOutRight 0.2s ease;
|
|
34764
35194
|
}
|
|
34765
35195
|
:host([data-slides-transition='slide'][data-slides-direction='backward'])
|
|
34766
35196
|
::view-transition-new(slide-content) {
|
|
34767
|
-
animation: slideInLeft 0.
|
|
35197
|
+
animation: slideInLeft 0.2s ease;
|
|
34768
35198
|
}
|
|
34769
35199
|
|
|
34770
35200
|
/* Transition: cover */
|
|
34771
35201
|
:host([data-slides-transition='cover'][data-slides-direction='forward'])
|
|
34772
35202
|
::view-transition-old(slide-content) {
|
|
34773
|
-
animation: stayPut 0.
|
|
35203
|
+
animation: stayPut 0.2s ease;
|
|
34774
35204
|
}
|
|
34775
35205
|
:host([data-slides-transition='cover'][data-slides-direction='forward'])
|
|
34776
35206
|
::view-transition-new(slide-content) {
|
|
34777
|
-
animation: coverIn 0.
|
|
35207
|
+
animation: coverIn 0.2s ease;
|
|
34778
35208
|
}
|
|
34779
35209
|
:host([data-slides-transition='cover'][data-slides-direction='backward'])
|
|
34780
35210
|
::view-transition-old(slide-content) {
|
|
34781
|
-
animation: stayPut 0.
|
|
35211
|
+
animation: stayPut 0.2s ease;
|
|
34782
35212
|
}
|
|
34783
35213
|
:host([data-slides-transition='cover'][data-slides-direction='backward'])
|
|
34784
35214
|
::view-transition-new(slide-content) {
|
|
34785
|
-
animation: coverInReverse 0.
|
|
35215
|
+
animation: coverInReverse 0.2s ease;
|
|
34786
35216
|
}
|
|
34787
35217
|
|
|
34788
35218
|
/* Transition: reveal */
|
|
34789
35219
|
:host([data-slides-transition='reveal'][data-slides-direction='forward'])
|
|
34790
35220
|
::view-transition-old(slide-content) {
|
|
34791
|
-
animation: revealOut 0.
|
|
35221
|
+
animation: revealOut 0.2s ease;
|
|
34792
35222
|
}
|
|
34793
35223
|
:host([data-slides-transition='reveal'][data-slides-direction='forward'])
|
|
34794
35224
|
::view-transition-new(slide-content) {
|
|
34795
|
-
animation: stayPut 0.
|
|
35225
|
+
animation: stayPut 0.2s ease;
|
|
34796
35226
|
}
|
|
34797
35227
|
:host([data-slides-transition='reveal'][data-slides-direction='backward'])
|
|
34798
35228
|
::view-transition-old(slide-content) {
|
|
34799
|
-
animation: revealOutReverse 0.
|
|
35229
|
+
animation: revealOutReverse 0.2s ease;
|
|
34800
35230
|
}
|
|
34801
35231
|
:host([data-slides-transition='reveal'][data-slides-direction='backward'])
|
|
34802
35232
|
::view-transition-new(slide-content) {
|
|
34803
|
-
animation: stayPut 0.
|
|
35233
|
+
animation: stayPut 0.2s ease;
|
|
34804
35234
|
}
|
|
34805
35235
|
|
|
34806
35236
|
/* Transition: zoom */
|
|
34807
35237
|
:host([data-slides-transition='zoom']) ::view-transition-old(slide-content) {
|
|
34808
|
-
animation: zoomOut 0.
|
|
35238
|
+
animation: zoomOut 0.2s ease;
|
|
34809
35239
|
}
|
|
34810
35240
|
:host([data-slides-transition='zoom']) ::view-transition-new(slide-content) {
|
|
34811
|
-
animation: zoomIn 0.
|
|
35241
|
+
animation: zoomIn 0.2s ease;
|
|
35242
|
+
}
|
|
35243
|
+
|
|
35244
|
+
/* ═══ REDUCED MOTION (slides) ═══ */
|
|
35245
|
+
@media (prefers-reduced-motion: reduce) {
|
|
35246
|
+
.slides-shake {
|
|
35247
|
+
animation: none !important;
|
|
35248
|
+
}
|
|
34812
35249
|
}
|
|
34813
35250
|
|
|
34814
35251
|
/* ═══ DECLARATIVE BINDING STYLES ═══ */
|
|
@@ -34910,8 +35347,99 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34910
35347
|
}
|
|
34911
35348
|
return true;
|
|
34912
35349
|
}
|
|
35350
|
+
/** Shake the slide viewport to signal boundary (first/last slide) */
|
|
35351
|
+
_slidesBoundaryShake() {
|
|
35352
|
+
if (this._slidesShaking) return;
|
|
35353
|
+
const viewport = this.shadowRoot?.querySelector(".slides-viewport");
|
|
35354
|
+
if (!viewport) return;
|
|
35355
|
+
this._slidesShaking = true;
|
|
35356
|
+
viewport.classList.add("slides-shake");
|
|
35357
|
+
viewport.addEventListener(
|
|
35358
|
+
"animationend",
|
|
35359
|
+
() => {
|
|
35360
|
+
viewport.classList.remove("slides-shake");
|
|
35361
|
+
this._slidesShaking = false;
|
|
35362
|
+
},
|
|
35363
|
+
{ once: true }
|
|
35364
|
+
);
|
|
35365
|
+
}
|
|
35366
|
+
/** Trigger stagger-in animation on slide content children after transition.
|
|
35367
|
+
* Uses the universal data-enter attribute from the motion system. */
|
|
35368
|
+
_slidesStaggerIn() {
|
|
35369
|
+
const slideEffect = this._slidesEffects.get(this._slidesCurrentIndex) || "";
|
|
35370
|
+
const enterValue = ResultViewer._EFFECT_MAP[slideEffect] || (slideEffect ? slideEffect : "slide-up");
|
|
35371
|
+
const CHILD_SELECTOR = ":scope > h1, :scope > h2, :scope > h3, :scope > p, :scope > ul, :scope > ol, :scope > table, :scope > blockquote, :scope > pre, :scope > div:not(.slide-header):not(.slide-footer), :scope > figure, :scope > img, :scope > .slide-content-area";
|
|
35372
|
+
const applyToChildren = (container) => {
|
|
35373
|
+
const children = container.querySelectorAll(CHILD_SELECTOR);
|
|
35374
|
+
children.forEach((el2, i7) => {
|
|
35375
|
+
const htmlEl = el2;
|
|
35376
|
+
htmlEl.removeAttribute("data-enter");
|
|
35377
|
+
void htmlEl.offsetWidth;
|
|
35378
|
+
htmlEl.setAttribute("data-enter", enterValue);
|
|
35379
|
+
htmlEl.style.animationDelay = `${i7 * 60}ms`;
|
|
35380
|
+
});
|
|
35381
|
+
};
|
|
35382
|
+
const iframe = this.shadowRoot?.querySelector(".slide-bridge-frame");
|
|
35383
|
+
if (iframe) {
|
|
35384
|
+
const applyStagger = () => {
|
|
35385
|
+
try {
|
|
35386
|
+
const iframeDoc = iframe.contentDocument;
|
|
35387
|
+
if (!iframeDoc) return;
|
|
35388
|
+
const body = iframeDoc.querySelector(".slide-body") || iframeDoc.body;
|
|
35389
|
+
if (body) applyToChildren(body);
|
|
35390
|
+
} catch {
|
|
35391
|
+
}
|
|
35392
|
+
};
|
|
35393
|
+
iframe.addEventListener("load", applyStagger, { once: true });
|
|
35394
|
+
return;
|
|
35395
|
+
}
|
|
35396
|
+
const content2 = this.shadowRoot?.querySelector(".slides-content");
|
|
35397
|
+
if (content2) applyToChildren(content2);
|
|
35398
|
+
}
|
|
35399
|
+
/** Advance the next hidden build fragment. Returns true if a fragment was revealed. */
|
|
35400
|
+
_slidesAdvanceBuild() {
|
|
35401
|
+
const hasBuild = this._slidesBuilds.get(this._slidesCurrentIndex);
|
|
35402
|
+
if (!hasBuild) return false;
|
|
35403
|
+
const iframe = this.shadowRoot?.querySelector(".slide-bridge-frame");
|
|
35404
|
+
if (iframe?.contentWindow) {
|
|
35405
|
+
try {
|
|
35406
|
+
return iframe.contentWindow.advanceFragment?.() === true;
|
|
35407
|
+
} catch {
|
|
35408
|
+
return false;
|
|
35409
|
+
}
|
|
35410
|
+
}
|
|
35411
|
+
const fragments = this.shadowRoot?.querySelectorAll(".slide-fragment:not(.visible)");
|
|
35412
|
+
if (fragments && fragments.length > 0) {
|
|
35413
|
+
fragments[0].classList.add("visible");
|
|
35414
|
+
return true;
|
|
35415
|
+
}
|
|
35416
|
+
return false;
|
|
35417
|
+
}
|
|
35418
|
+
/** Check if all build fragments are visible (or no builds exist) */
|
|
35419
|
+
_slidesAllBuildsRevealed() {
|
|
35420
|
+
const hasBuild = this._slidesBuilds.get(this._slidesCurrentIndex);
|
|
35421
|
+
if (!hasBuild) return true;
|
|
35422
|
+
const iframe = this.shadowRoot?.querySelector(".slide-bridge-frame");
|
|
35423
|
+
if (iframe?.contentWindow) {
|
|
35424
|
+
try {
|
|
35425
|
+
return iframe.contentWindow.allFragmentsRevealed?.() !== false;
|
|
35426
|
+
} catch {
|
|
35427
|
+
return true;
|
|
35428
|
+
}
|
|
35429
|
+
}
|
|
35430
|
+
const hidden = this.shadowRoot?.querySelectorAll(".slide-fragment:not(.visible)");
|
|
35431
|
+
return !hidden || hidden.length === 0;
|
|
35432
|
+
}
|
|
34913
35433
|
_slidesNavigate(newIndex, total) {
|
|
34914
|
-
if (newIndex
|
|
35434
|
+
if (newIndex > this._slidesCurrentIndex && !this._slidesAllBuildsRevealed()) {
|
|
35435
|
+
this._slidesAdvanceBuild();
|
|
35436
|
+
return;
|
|
35437
|
+
}
|
|
35438
|
+
if (newIndex < 0 || newIndex >= total) {
|
|
35439
|
+
this._slidesBoundaryShake();
|
|
35440
|
+
return;
|
|
35441
|
+
}
|
|
35442
|
+
if (newIndex === this._slidesCurrentIndex) return;
|
|
34915
35443
|
this._slidesDirection = newIndex > this._slidesCurrentIndex ? "forward" : "backward";
|
|
34916
35444
|
const transition = this._getSlideTransition(newIndex);
|
|
34917
35445
|
try {
|
|
@@ -34931,6 +35459,7 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34931
35459
|
} else {
|
|
34932
35460
|
this._afterSlideRender();
|
|
34933
35461
|
}
|
|
35462
|
+
this._slidesStaggerIn();
|
|
34934
35463
|
};
|
|
34935
35464
|
if (transition === "none" || !("startViewTransition" in document) || this._slidesBridgeScript) {
|
|
34936
35465
|
this._slidesCurrentIndex = newIndex;
|
|
@@ -34988,9 +35517,9 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
34988
35517
|
this._slidesPrerendered.delete(cached2);
|
|
34989
35518
|
}
|
|
34990
35519
|
}
|
|
34991
|
-
for (const
|
|
34992
|
-
if (this._slidesPrerendered.has(
|
|
34993
|
-
void this._preRenderSlide(
|
|
35520
|
+
for (const target2 of targets) {
|
|
35521
|
+
if (this._slidesPrerendered.has(target2) || this._slidesPrerendering.has(target2)) continue;
|
|
35522
|
+
void this._preRenderSlide(target2);
|
|
34994
35523
|
}
|
|
34995
35524
|
}
|
|
34996
35525
|
async _preRenderSlide(slideIndex) {
|
|
@@ -35003,7 +35532,7 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
35003
35532
|
if (!root) return;
|
|
35004
35533
|
const viewport = root.querySelector(".slides-viewport");
|
|
35005
35534
|
if (!viewport) return;
|
|
35006
|
-
const { html: slideHtml } = this._renderSlideHtml(markdown);
|
|
35535
|
+
const { html: slideHtml } = this._renderSlideHtml(markdown, target);
|
|
35007
35536
|
const container = document.createElement("div");
|
|
35008
35537
|
container.className = "slides-prerender";
|
|
35009
35538
|
container.innerHTML = slideHtml;
|
|
@@ -35232,21 +35761,21 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
35232
35761
|
} catch {
|
|
35233
35762
|
}
|
|
35234
35763
|
const invoke = async () => {
|
|
35235
|
-
const
|
|
35236
|
-
|
|
35237
|
-
|
|
35764
|
+
const target2 = targetSel ? root.querySelector(targetSel) ?? el2 : el2;
|
|
35765
|
+
target2.classList.add("loading");
|
|
35766
|
+
target2.classList.remove("error");
|
|
35238
35767
|
try {
|
|
35239
35768
|
const result = await mcpClient.callTool(method, args);
|
|
35240
35769
|
const data = mcpClient.parseToolResult(result);
|
|
35241
|
-
|
|
35770
|
+
target2.classList.remove("loading");
|
|
35242
35771
|
if (result.isError) {
|
|
35243
|
-
|
|
35244
|
-
|
|
35772
|
+
target2.classList.add("error");
|
|
35773
|
+
target2.textContent = String(data) || "Error";
|
|
35245
35774
|
return;
|
|
35246
35775
|
}
|
|
35247
|
-
this._renderBindingResult(
|
|
35776
|
+
this._renderBindingResult(target2, data, format, field);
|
|
35248
35777
|
} catch {
|
|
35249
|
-
|
|
35778
|
+
target2.classList.remove("loading");
|
|
35250
35779
|
}
|
|
35251
35780
|
};
|
|
35252
35781
|
if (trigger === "load") {
|
|
@@ -35259,11 +35788,11 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
35259
35788
|
if (embedPhoton && embedMethod) {
|
|
35260
35789
|
const renderHandler = (data) => {
|
|
35261
35790
|
if (data?.photon === embedPhoton && data?.method === embedMethod) {
|
|
35262
|
-
const
|
|
35263
|
-
|
|
35791
|
+
const target2 = targetSel ? root.querySelector(targetSel) ?? el2 : el2;
|
|
35792
|
+
target2.classList.remove("loading");
|
|
35264
35793
|
const renderFormat = data.format || format;
|
|
35265
35794
|
if (renderFormat && data.value !== void 0) {
|
|
35266
|
-
this._renderSlideFormat(
|
|
35795
|
+
this._renderSlideFormat(target2, data.value, renderFormat);
|
|
35267
35796
|
}
|
|
35268
35797
|
}
|
|
35269
35798
|
};
|
|
@@ -35293,7 +35822,7 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
35293
35822
|
if (unit === "m") return num * 6e4;
|
|
35294
35823
|
return num * 1e3;
|
|
35295
35824
|
}
|
|
35296
|
-
_renderBindingResult(
|
|
35825
|
+
_renderBindingResult(target2, data, format, field) {
|
|
35297
35826
|
let value = data;
|
|
35298
35827
|
if (field && typeof data === "object" && data !== null) {
|
|
35299
35828
|
const parts = field.split(".");
|
|
@@ -35305,27 +35834,27 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
35305
35834
|
value = current;
|
|
35306
35835
|
}
|
|
35307
35836
|
if (format === "text" || !format) {
|
|
35308
|
-
|
|
35837
|
+
target2.textContent = value == null ? "" : typeof value === "object" ? JSON.stringify(value, null, 2) : String(value);
|
|
35309
35838
|
} else if (format === "json") {
|
|
35310
35839
|
const pre = document.createElement("pre");
|
|
35311
35840
|
const code = document.createElement("code");
|
|
35312
35841
|
code.textContent = JSON.stringify(value, null, 2);
|
|
35313
35842
|
pre.appendChild(code);
|
|
35314
|
-
|
|
35315
|
-
|
|
35843
|
+
target2.innerHTML = "";
|
|
35844
|
+
target2.appendChild(pre);
|
|
35316
35845
|
} else if (format === "html") {
|
|
35317
|
-
|
|
35846
|
+
target2.innerHTML = String(value);
|
|
35318
35847
|
} else {
|
|
35319
|
-
this._renderSlideFormat(
|
|
35848
|
+
this._renderSlideFormat(target2, value, format);
|
|
35320
35849
|
}
|
|
35321
35850
|
}
|
|
35322
|
-
_renderSlideFormat(
|
|
35851
|
+
_renderSlideFormat(target2, data, format) {
|
|
35323
35852
|
const win = window;
|
|
35324
35853
|
const doRender = () => {
|
|
35325
35854
|
if (win._photonRenderers?.render) {
|
|
35326
|
-
win._photonRenderers.render(
|
|
35855
|
+
win._photonRenderers.render(target2, data, format);
|
|
35327
35856
|
} else {
|
|
35328
|
-
|
|
35857
|
+
target2.textContent = typeof data === "object" ? JSON.stringify(data, null, 2) : String(data ?? "");
|
|
35329
35858
|
}
|
|
35330
35859
|
};
|
|
35331
35860
|
if (win._photonRenderers) {
|
|
@@ -35354,14 +35883,10 @@ ${footerText || pageNum ? `<div class="slide-footer"><span>${footerText || ""}</
|
|
|
35354
35883
|
_slidesKeydown(e8, total) {
|
|
35355
35884
|
if (e8.key === "ArrowRight" || e8.key === " " || e8.key === "PageDown") {
|
|
35356
35885
|
e8.preventDefault();
|
|
35357
|
-
|
|
35358
|
-
this._slidesNavigate(this._slidesCurrentIndex + 1, total);
|
|
35359
|
-
}
|
|
35886
|
+
this._slidesNavigate(this._slidesCurrentIndex + 1, total);
|
|
35360
35887
|
} else if (e8.key === "ArrowLeft" || e8.key === "PageUp") {
|
|
35361
35888
|
e8.preventDefault();
|
|
35362
|
-
|
|
35363
|
-
this._slidesNavigate(this._slidesCurrentIndex - 1, total);
|
|
35364
|
-
}
|
|
35889
|
+
this._slidesNavigate(this._slidesCurrentIndex - 1, total);
|
|
35365
35890
|
} else if (e8.key === "Home") {
|
|
35366
35891
|
e8.preventDefault();
|
|
35367
35892
|
this._slidesNavigate(0, total);
|
|
@@ -38767,6 +39292,25 @@ ResultViewer._TIMESTAMP_FIELDS = [
|
|
|
38767
39292
|
"_addedAt"
|
|
38768
39293
|
// ReactiveArray auto-stamp (fallback for creation)
|
|
38769
39294
|
];
|
|
39295
|
+
// Map slide effect directives to universal motion data-enter values
|
|
39296
|
+
ResultViewer._EFFECT_MAP = {
|
|
39297
|
+
"fade-up": "slide-up",
|
|
39298
|
+
"fade-down": "slide-down",
|
|
39299
|
+
"fade-left": "slide-in-left",
|
|
39300
|
+
"fade-right": "slide-in-right",
|
|
39301
|
+
"scale-in": "scale-in",
|
|
39302
|
+
"zoom-in": "scale-up",
|
|
39303
|
+
"flip-up": "flip-in",
|
|
39304
|
+
"drop-in": "drop-in",
|
|
39305
|
+
"fade-in": "fade-in",
|
|
39306
|
+
// Also accept motion names directly
|
|
39307
|
+
"slide-up": "slide-up",
|
|
39308
|
+
"slide-down": "slide-down",
|
|
39309
|
+
"slide-in-left": "slide-in-left",
|
|
39310
|
+
"slide-in-right": "slide-in-right",
|
|
39311
|
+
"scale-up": "scale-up",
|
|
39312
|
+
"flip-in": "flip-in"
|
|
39313
|
+
};
|
|
38770
39314
|
__decorateClass([
|
|
38771
39315
|
n4({ type: Object })
|
|
38772
39316
|
], ResultViewer.prototype, "result", 2);
|
|
@@ -42062,8 +42606,8 @@ function defineLazy(object3, key, getter) {
|
|
|
42062
42606
|
function objectClone(obj) {
|
|
42063
42607
|
return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
|
|
42064
42608
|
}
|
|
42065
|
-
function assignProp(
|
|
42066
|
-
Object.defineProperty(
|
|
42609
|
+
function assignProp(target2, prop, value) {
|
|
42610
|
+
Object.defineProperty(target2, prop, {
|
|
42067
42611
|
value,
|
|
42068
42612
|
writable: true,
|
|
42069
42613
|
enumerable: true,
|
|
@@ -42232,35 +42776,35 @@ function normalizeParams(_params) {
|
|
|
42232
42776
|
return params;
|
|
42233
42777
|
}
|
|
42234
42778
|
function createTransparentProxy(getter) {
|
|
42235
|
-
let
|
|
42779
|
+
let target2;
|
|
42236
42780
|
return new Proxy({}, {
|
|
42237
42781
|
get(_3, prop, receiver) {
|
|
42238
|
-
|
|
42239
|
-
return Reflect.get(
|
|
42782
|
+
target2 ?? (target2 = getter());
|
|
42783
|
+
return Reflect.get(target2, prop, receiver);
|
|
42240
42784
|
},
|
|
42241
42785
|
set(_3, prop, value, receiver) {
|
|
42242
|
-
|
|
42243
|
-
return Reflect.set(
|
|
42786
|
+
target2 ?? (target2 = getter());
|
|
42787
|
+
return Reflect.set(target2, prop, value, receiver);
|
|
42244
42788
|
},
|
|
42245
42789
|
has(_3, prop) {
|
|
42246
|
-
|
|
42247
|
-
return Reflect.has(
|
|
42790
|
+
target2 ?? (target2 = getter());
|
|
42791
|
+
return Reflect.has(target2, prop);
|
|
42248
42792
|
},
|
|
42249
42793
|
deleteProperty(_3, prop) {
|
|
42250
|
-
|
|
42251
|
-
return Reflect.deleteProperty(
|
|
42794
|
+
target2 ?? (target2 = getter());
|
|
42795
|
+
return Reflect.deleteProperty(target2, prop);
|
|
42252
42796
|
},
|
|
42253
42797
|
ownKeys(_3) {
|
|
42254
|
-
|
|
42255
|
-
return Reflect.ownKeys(
|
|
42798
|
+
target2 ?? (target2 = getter());
|
|
42799
|
+
return Reflect.ownKeys(target2);
|
|
42256
42800
|
},
|
|
42257
42801
|
getOwnPropertyDescriptor(_3, prop) {
|
|
42258
|
-
|
|
42259
|
-
return Reflect.getOwnPropertyDescriptor(
|
|
42802
|
+
target2 ?? (target2 = getter());
|
|
42803
|
+
return Reflect.getOwnPropertyDescriptor(target2, prop);
|
|
42260
42804
|
},
|
|
42261
42805
|
defineProperty(_3, prop, descriptor) {
|
|
42262
|
-
|
|
42263
|
-
return Reflect.defineProperty(
|
|
42806
|
+
target2 ?? (target2 = getter());
|
|
42807
|
+
return Reflect.defineProperty(target2, prop, descriptor);
|
|
42264
42808
|
}
|
|
42265
42809
|
});
|
|
42266
42810
|
}
|
|
@@ -46415,15 +46959,15 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
46415
46959
|
|
|
46416
46960
|
// node_modules/zod/v4/core/to-json-schema.js
|
|
46417
46961
|
function initializeContext(params) {
|
|
46418
|
-
let
|
|
46419
|
-
if (
|
|
46420
|
-
|
|
46421
|
-
if (
|
|
46422
|
-
|
|
46962
|
+
let target2 = params?.target ?? "draft-2020-12";
|
|
46963
|
+
if (target2 === "draft-4")
|
|
46964
|
+
target2 = "draft-04";
|
|
46965
|
+
if (target2 === "draft-7")
|
|
46966
|
+
target2 = "draft-07";
|
|
46423
46967
|
return {
|
|
46424
46968
|
processors: params.processors ?? {},
|
|
46425
46969
|
metadataRegistry: params?.metadata ?? globalRegistry,
|
|
46426
|
-
target,
|
|
46970
|
+
target: target2,
|
|
46427
46971
|
unrepresentable: params?.unrepresentable ?? "throw",
|
|
46428
46972
|
override: params?.override ?? (() => {
|
|
46429
46973
|
}),
|
|
@@ -46758,8 +47302,8 @@ var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
|
|
|
46758
47302
|
return finalize(ctx, schema);
|
|
46759
47303
|
};
|
|
46760
47304
|
var createStandardJSONSchemaMethod = (schema, io2, processors = {}) => (params) => {
|
|
46761
|
-
const { libraryOptions, target } = params ?? {};
|
|
46762
|
-
const ctx = initializeContext({ ...libraryOptions ?? {}, target, io: io2, processors });
|
|
47305
|
+
const { libraryOptions, target: target2 } = params ?? {};
|
|
47306
|
+
const ctx = initializeContext({ ...libraryOptions ?? {}, target: target2, io: io2, processors });
|
|
46763
47307
|
process2(schema, ctx);
|
|
46764
47308
|
extractDefs(ctx, schema);
|
|
46765
47309
|
return finalize(ctx, schema);
|
|
@@ -47597,7 +48141,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
47597
48141
|
inst.default = (def2) => _default(inst, def2);
|
|
47598
48142
|
inst.prefault = (def2) => prefault(inst, def2);
|
|
47599
48143
|
inst.catch = (params) => _catch(inst, params);
|
|
47600
|
-
inst.pipe = (
|
|
48144
|
+
inst.pipe = (target2) => pipe(inst, target2);
|
|
47601
48145
|
inst.readonly = () => readonly(inst);
|
|
47602
48146
|
inst.describe = (description) => {
|
|
47603
48147
|
const cl2 = inst.clone();
|
|
@@ -50942,8 +51486,8 @@ var ZodType2 = class {
|
|
|
50942
51486
|
description
|
|
50943
51487
|
});
|
|
50944
51488
|
}
|
|
50945
|
-
pipe(
|
|
50946
|
-
return ZodPipeline.create(this,
|
|
51489
|
+
pipe(target2) {
|
|
51490
|
+
return ZodPipeline.create(this, target2);
|
|
50947
51491
|
}
|
|
50948
51492
|
readonly() {
|
|
50949
51493
|
return ZodReadonly2.create(this);
|
|
@@ -62482,28 +63026,28 @@ var TextLeaf = class _TextLeaf extends Text {
|
|
|
62482
63026
|
get children() {
|
|
62483
63027
|
return null;
|
|
62484
63028
|
}
|
|
62485
|
-
lineInner(
|
|
63029
|
+
lineInner(target2, isLine, line, offset) {
|
|
62486
63030
|
for (let i7 = 0; ; i7++) {
|
|
62487
63031
|
let string4 = this.text[i7], end = offset + string4.length;
|
|
62488
|
-
if ((isLine ? line : end) >=
|
|
63032
|
+
if ((isLine ? line : end) >= target2)
|
|
62489
63033
|
return new Line(offset, end, line, string4);
|
|
62490
63034
|
offset = end + 1;
|
|
62491
63035
|
line++;
|
|
62492
63036
|
}
|
|
62493
63037
|
}
|
|
62494
|
-
decompose(from2, to3,
|
|
63038
|
+
decompose(from2, to3, target2, open) {
|
|
62495
63039
|
let text = from2 <= 0 && to3 >= this.length ? this : new _TextLeaf(sliceText(this.text, from2, to3), Math.min(to3, this.length) - Math.max(0, from2));
|
|
62496
63040
|
if (open & 1) {
|
|
62497
|
-
let prev =
|
|
63041
|
+
let prev = target2.pop();
|
|
62498
63042
|
let joined = appendText(text.text, prev.text.slice(), 0, text.length);
|
|
62499
63043
|
if (joined.length <= 32) {
|
|
62500
|
-
|
|
63044
|
+
target2.push(new _TextLeaf(joined, prev.length + text.length));
|
|
62501
63045
|
} else {
|
|
62502
63046
|
let mid = joined.length >> 1;
|
|
62503
|
-
|
|
63047
|
+
target2.push(new _TextLeaf(joined.slice(0, mid)), new _TextLeaf(joined.slice(mid)));
|
|
62504
63048
|
}
|
|
62505
63049
|
} else {
|
|
62506
|
-
|
|
63050
|
+
target2.push(text);
|
|
62507
63051
|
}
|
|
62508
63052
|
}
|
|
62509
63053
|
replace(from2, to3, text) {
|
|
@@ -62529,27 +63073,27 @@ var TextLeaf = class _TextLeaf extends Text {
|
|
|
62529
63073
|
}
|
|
62530
63074
|
return result;
|
|
62531
63075
|
}
|
|
62532
|
-
flatten(
|
|
63076
|
+
flatten(target2) {
|
|
62533
63077
|
for (let line of this.text)
|
|
62534
|
-
|
|
63078
|
+
target2.push(line);
|
|
62535
63079
|
}
|
|
62536
63080
|
scanIdentical() {
|
|
62537
63081
|
return 0;
|
|
62538
63082
|
}
|
|
62539
|
-
static split(text,
|
|
63083
|
+
static split(text, target2) {
|
|
62540
63084
|
let part = [], len = -1;
|
|
62541
63085
|
for (let line of text) {
|
|
62542
63086
|
part.push(line);
|
|
62543
63087
|
len += line.length + 1;
|
|
62544
63088
|
if (part.length == 32) {
|
|
62545
|
-
|
|
63089
|
+
target2.push(new _TextLeaf(part, len));
|
|
62546
63090
|
part = [];
|
|
62547
63091
|
len = -1;
|
|
62548
63092
|
}
|
|
62549
63093
|
}
|
|
62550
63094
|
if (len > -1)
|
|
62551
|
-
|
|
62552
|
-
return
|
|
63095
|
+
target2.push(new _TextLeaf(part, len));
|
|
63096
|
+
return target2;
|
|
62553
63097
|
}
|
|
62554
63098
|
};
|
|
62555
63099
|
var TextNode = class _TextNode extends Text {
|
|
@@ -62561,24 +63105,24 @@ var TextNode = class _TextNode extends Text {
|
|
|
62561
63105
|
for (let child of children)
|
|
62562
63106
|
this.lines += child.lines;
|
|
62563
63107
|
}
|
|
62564
|
-
lineInner(
|
|
63108
|
+
lineInner(target2, isLine, line, offset) {
|
|
62565
63109
|
for (let i7 = 0; ; i7++) {
|
|
62566
63110
|
let child = this.children[i7], end = offset + child.length, endLine = line + child.lines - 1;
|
|
62567
|
-
if ((isLine ? endLine : end) >=
|
|
62568
|
-
return child.lineInner(
|
|
63111
|
+
if ((isLine ? endLine : end) >= target2)
|
|
63112
|
+
return child.lineInner(target2, isLine, line, offset);
|
|
62569
63113
|
offset = end + 1;
|
|
62570
63114
|
line = endLine + 1;
|
|
62571
63115
|
}
|
|
62572
63116
|
}
|
|
62573
|
-
decompose(from2, to3,
|
|
63117
|
+
decompose(from2, to3, target2, open) {
|
|
62574
63118
|
for (let i7 = 0, pos = 0; pos <= to3 && i7 < this.children.length; i7++) {
|
|
62575
63119
|
let child = this.children[i7], end = pos + child.length;
|
|
62576
63120
|
if (from2 <= end && to3 >= pos) {
|
|
62577
63121
|
let childOpen = open & ((pos <= from2 ? 1 : 0) | (end >= to3 ? 2 : 0));
|
|
62578
63122
|
if (pos >= from2 && end <= to3 && !childOpen)
|
|
62579
|
-
|
|
63123
|
+
target2.push(child);
|
|
62580
63124
|
else
|
|
62581
|
-
child.decompose(from2 - pos, to3 - pos,
|
|
63125
|
+
child.decompose(from2 - pos, to3 - pos, target2, childOpen);
|
|
62582
63126
|
}
|
|
62583
63127
|
pos = end + 1;
|
|
62584
63128
|
}
|
|
@@ -62615,9 +63159,9 @@ var TextNode = class _TextNode extends Text {
|
|
|
62615
63159
|
}
|
|
62616
63160
|
return result;
|
|
62617
63161
|
}
|
|
62618
|
-
flatten(
|
|
63162
|
+
flatten(target2) {
|
|
62619
63163
|
for (let child of this.children)
|
|
62620
|
-
child.flatten(
|
|
63164
|
+
child.flatten(target2);
|
|
62621
63165
|
}
|
|
62622
63166
|
scanIdentical(other, dir) {
|
|
62623
63167
|
if (!(other instanceof _TextNode))
|
|
@@ -62689,7 +63233,7 @@ function textLength(text) {
|
|
|
62689
63233
|
length += line.length + 1;
|
|
62690
63234
|
return length;
|
|
62691
63235
|
}
|
|
62692
|
-
function appendText(text,
|
|
63236
|
+
function appendText(text, target2, from2 = 0, to3 = 1e9) {
|
|
62693
63237
|
for (let pos = 0, i7 = 0, first = true; i7 < text.length && pos <= to3; i7++) {
|
|
62694
63238
|
let line = text[i7], end = pos + line.length;
|
|
62695
63239
|
if (end >= from2) {
|
|
@@ -62698,14 +63242,14 @@ function appendText(text, target, from2 = 0, to3 = 1e9) {
|
|
|
62698
63242
|
if (pos < from2)
|
|
62699
63243
|
line = line.slice(from2 - pos);
|
|
62700
63244
|
if (first) {
|
|
62701
|
-
|
|
63245
|
+
target2[target2.length - 1] += line;
|
|
62702
63246
|
first = false;
|
|
62703
63247
|
} else
|
|
62704
|
-
|
|
63248
|
+
target2.push(line);
|
|
62705
63249
|
}
|
|
62706
63250
|
pos = end + 1;
|
|
62707
63251
|
}
|
|
62708
|
-
return
|
|
63252
|
+
return target2;
|
|
62709
63253
|
}
|
|
62710
63254
|
function sliceText(text, from2, to3) {
|
|
62711
63255
|
return appendText(text, [""], from2, to3);
|
|
@@ -65688,16 +66232,16 @@ var StyleModule = class {
|
|
|
65688
66232
|
function splitSelector(selector) {
|
|
65689
66233
|
return /^@/.test(selector) ? [selector] : selector.split(/,\s*/);
|
|
65690
66234
|
}
|
|
65691
|
-
function render(selectors, spec2,
|
|
66235
|
+
function render(selectors, spec2, target2, isKeyframes) {
|
|
65692
66236
|
let local = [], isAt = /^@(\w+)\b/.exec(selectors[0]), keyframes = isAt && isAt[1] == "keyframes";
|
|
65693
|
-
if (isAt && spec2 == null) return
|
|
66237
|
+
if (isAt && spec2 == null) return target2.push(selectors[0] + ";");
|
|
65694
66238
|
for (let prop in spec2) {
|
|
65695
66239
|
let value = spec2[prop];
|
|
65696
66240
|
if (/&/.test(prop)) {
|
|
65697
66241
|
render(
|
|
65698
66242
|
prop.split(/,\s*/).map((part) => selectors.map((sel) => part.replace(/&/, sel))).reduce((a5, b3) => a5.concat(b3)),
|
|
65699
66243
|
value,
|
|
65700
|
-
|
|
66244
|
+
target2
|
|
65701
66245
|
);
|
|
65702
66246
|
} else if (value && typeof value == "object") {
|
|
65703
66247
|
if (!isAt) throw new RangeError("The value of a property (" + prop + ") should be a primitive value.");
|
|
@@ -65707,7 +66251,7 @@ var StyleModule = class {
|
|
|
65707
66251
|
}
|
|
65708
66252
|
}
|
|
65709
66253
|
if (local.length || keyframes) {
|
|
65710
|
-
|
|
66254
|
+
target2.push((finish && !isAt && !isKeyframes ? selectors.map(finish) : selectors).join(", ") + " {" + local.join(" ") + "}");
|
|
65711
66255
|
}
|
|
65712
66256
|
}
|
|
65713
66257
|
for (let prop in spec) render(splitSelector(prop), spec[prop], this.rules);
|
|
@@ -65791,9 +66335,9 @@ var StyleSet = class {
|
|
|
65791
66335
|
for (let i7 = 0; i7 < this.modules.length; i7++)
|
|
65792
66336
|
text += this.modules[i7].getRules() + "\n";
|
|
65793
66337
|
this.styleTag.textContent = text;
|
|
65794
|
-
let
|
|
65795
|
-
if (this.styleTag.parentNode !=
|
|
65796
|
-
|
|
66338
|
+
let target2 = root.head || root;
|
|
66339
|
+
if (this.styleTag.parentNode != target2)
|
|
66340
|
+
target2.insertBefore(this.styleTag, target2.firstChild);
|
|
65797
66341
|
}
|
|
65798
66342
|
}
|
|
65799
66343
|
setNonce(nonce) {
|
|
@@ -65967,16 +66511,16 @@ var browser = {
|
|
|
65967
66511
|
safari_version: safari ? +(/* @__PURE__ */ /\bVersion\/(\d+(\.\d+)?)/.exec(nav.userAgent) || [0, 0])[1] : 0,
|
|
65968
66512
|
tabSize: doc.documentElement.style.tabSize != null ? "tab-size" : "-moz-tab-size"
|
|
65969
66513
|
};
|
|
65970
|
-
function combineAttrs(source3,
|
|
66514
|
+
function combineAttrs(source3, target2) {
|
|
65971
66515
|
for (let name2 in source3) {
|
|
65972
|
-
if (name2 == "class" &&
|
|
65973
|
-
|
|
65974
|
-
else if (name2 == "style" &&
|
|
65975
|
-
|
|
66516
|
+
if (name2 == "class" && target2.class)
|
|
66517
|
+
target2.class += " " + source3.class;
|
|
66518
|
+
else if (name2 == "style" && target2.style)
|
|
66519
|
+
target2.style += ";" + source3.style;
|
|
65976
66520
|
else
|
|
65977
|
-
|
|
66521
|
+
target2[name2] = source3[name2];
|
|
65978
66522
|
}
|
|
65979
|
-
return
|
|
66523
|
+
return target2;
|
|
65980
66524
|
}
|
|
65981
66525
|
var noAttrs = /* @__PURE__ */ Object.create(null);
|
|
65982
66526
|
function attrsEq(a5, b3, ignore) {
|
|
@@ -66307,13 +66851,13 @@ var BlockWrapper = class _BlockWrapper extends RangeValue {
|
|
|
66307
66851
|
};
|
|
66308
66852
|
BlockWrapper.prototype.startSide = BlockWrapper.prototype.endSide = -1;
|
|
66309
66853
|
function getSelection(root) {
|
|
66310
|
-
let
|
|
66854
|
+
let target2;
|
|
66311
66855
|
if (root.nodeType == 11) {
|
|
66312
|
-
|
|
66856
|
+
target2 = root.getSelection ? root : root.ownerDocument;
|
|
66313
66857
|
} else {
|
|
66314
|
-
|
|
66858
|
+
target2 = root;
|
|
66315
66859
|
}
|
|
66316
|
-
return
|
|
66860
|
+
return target2.getSelection();
|
|
66317
66861
|
}
|
|
66318
66862
|
function contains(dom, node) {
|
|
66319
66863
|
return node ? dom == node || dom.contains(node.nodeType != 1 ? node.parentNode : node) : false;
|
|
@@ -67674,8 +68218,8 @@ var LineTile = class _LineTile extends CompositeTile {
|
|
|
67674
68218
|
}
|
|
67675
68219
|
}
|
|
67676
68220
|
scan(this, pos);
|
|
67677
|
-
let
|
|
67678
|
-
return
|
|
68221
|
+
let target2 = (side < 0 ? before : after) || before || after;
|
|
68222
|
+
return target2 ? { tile: target2, offset: target2 == before ? beforeOff : afterOff } : null;
|
|
67679
68223
|
}
|
|
67680
68224
|
coordsIn(pos, side) {
|
|
67681
68225
|
let found = this.resolveInline(pos, side, true);
|
|
@@ -69047,22 +69591,22 @@ var DocView = class {
|
|
|
69047
69591
|
this.dynamicDecorationMap[i7++] = false;
|
|
69048
69592
|
this.blockWrappers = this.view.state.facet(blockWrappers).map((v2) => typeof v2 == "function" ? v2(this.view) : v2);
|
|
69049
69593
|
}
|
|
69050
|
-
scrollIntoView(
|
|
69051
|
-
if (
|
|
69052
|
-
let ref = this.view.viewState.lineBlockAt(
|
|
69053
|
-
this.view.scrollDOM.scrollTop = ref.top -
|
|
69054
|
-
this.view.scrollDOM.scrollLeft =
|
|
69594
|
+
scrollIntoView(target2) {
|
|
69595
|
+
if (target2.isSnapshot) {
|
|
69596
|
+
let ref = this.view.viewState.lineBlockAt(target2.range.head);
|
|
69597
|
+
this.view.scrollDOM.scrollTop = ref.top - target2.yMargin;
|
|
69598
|
+
this.view.scrollDOM.scrollLeft = target2.xMargin;
|
|
69055
69599
|
return;
|
|
69056
69600
|
}
|
|
69057
69601
|
for (let handler of this.view.state.facet(scrollHandler)) {
|
|
69058
69602
|
try {
|
|
69059
|
-
if (handler(this.view,
|
|
69603
|
+
if (handler(this.view, target2.range, target2))
|
|
69060
69604
|
return true;
|
|
69061
69605
|
} catch (e8) {
|
|
69062
69606
|
logException(this.view.state, e8, "scroll handler");
|
|
69063
69607
|
}
|
|
69064
69608
|
}
|
|
69065
|
-
let { range } =
|
|
69609
|
+
let { range } = target2;
|
|
69066
69610
|
let rect = this.coordsAt(range.head, range.empty ? range.assoc : range.head > range.anchor ? -1 : 1), other;
|
|
69067
69611
|
if (!rect)
|
|
69068
69612
|
return;
|
|
@@ -69081,7 +69625,7 @@ var DocView = class {
|
|
|
69081
69625
|
bottom: rect.bottom + margins.bottom
|
|
69082
69626
|
};
|
|
69083
69627
|
let { offsetWidth, offsetHeight } = this.view.scrollDOM;
|
|
69084
|
-
scrollRectIntoView(this.view.scrollDOM, targetRect, range.head < range.anchor ? -1 : 1,
|
|
69628
|
+
scrollRectIntoView(this.view.scrollDOM, targetRect, range.head < range.anchor ? -1 : 1, target2.x, target2.y, Math.max(Math.min(target2.xMargin, offsetWidth), -offsetWidth), Math.max(Math.min(target2.yMargin, offsetHeight), -offsetHeight), this.view.textDirection == Direction.LTR);
|
|
69085
69629
|
if (window.visualViewport && window.innerHeight - window.visualViewport.height > 1 && (rect.top > window.pageYOffset + window.visualViewport.offsetTop + window.visualViewport.height || rect.bottom < window.pageYOffset + window.visualViewport.offsetTop)) {
|
|
69086
69630
|
let line = this.view.docView.lineAt(range.head, 1);
|
|
69087
69631
|
if (line)
|
|
@@ -70300,13 +70844,13 @@ function capturePaste(view) {
|
|
|
70300
70844
|
let parent = view.dom.parentNode;
|
|
70301
70845
|
if (!parent)
|
|
70302
70846
|
return;
|
|
70303
|
-
let
|
|
70304
|
-
|
|
70305
|
-
|
|
70847
|
+
let target2 = parent.appendChild(document.createElement("textarea"));
|
|
70848
|
+
target2.style.cssText = "position: fixed; left: -10000px; top: 10px";
|
|
70849
|
+
target2.focus();
|
|
70306
70850
|
setTimeout(() => {
|
|
70307
70851
|
view.focus();
|
|
70308
|
-
|
|
70309
|
-
doPaste(view,
|
|
70852
|
+
target2.remove();
|
|
70853
|
+
doPaste(view, target2.value);
|
|
70310
70854
|
}, 50);
|
|
70311
70855
|
}
|
|
70312
70856
|
function textFilter(state, facet, text) {
|
|
@@ -70549,14 +71093,14 @@ function captureCopy(view, text) {
|
|
|
70549
71093
|
let parent = view.dom.parentNode;
|
|
70550
71094
|
if (!parent)
|
|
70551
71095
|
return;
|
|
70552
|
-
let
|
|
70553
|
-
|
|
70554
|
-
|
|
70555
|
-
|
|
70556
|
-
|
|
70557
|
-
|
|
71096
|
+
let target2 = parent.appendChild(document.createElement("textarea"));
|
|
71097
|
+
target2.style.cssText = "position: fixed; left: -10000px; top: 10px";
|
|
71098
|
+
target2.value = text;
|
|
71099
|
+
target2.focus();
|
|
71100
|
+
target2.selectionEnd = text.length;
|
|
71101
|
+
target2.selectionStart = 0;
|
|
70558
71102
|
setTimeout(() => {
|
|
70559
|
-
|
|
71103
|
+
target2.remove();
|
|
70560
71104
|
view.focus();
|
|
70561
71105
|
}, 50);
|
|
70562
71106
|
}
|
|
@@ -71820,13 +72364,13 @@ var ViewState = class {
|
|
|
71820
72364
|
let structure = lineStructure(line.from, line.to, this.stateDeco);
|
|
71821
72365
|
if (structure.total < doubleMargin)
|
|
71822
72366
|
return;
|
|
71823
|
-
let
|
|
72367
|
+
let target2 = this.scrollTarget ? this.scrollTarget.range.head : null;
|
|
71824
72368
|
let viewFrom, viewTo;
|
|
71825
72369
|
if (wrapping) {
|
|
71826
72370
|
let marginHeight = margin / this.heightOracle.lineLength * this.heightOracle.lineHeight;
|
|
71827
72371
|
let top2, bot2;
|
|
71828
|
-
if (
|
|
71829
|
-
let targetFrac = findFraction(structure,
|
|
72372
|
+
if (target2 != null) {
|
|
72373
|
+
let targetFrac = findFraction(structure, target2);
|
|
71830
72374
|
let spaceFrac = ((this.visibleBottom - this.visibleTop) / 2 + marginHeight) / line.height;
|
|
71831
72375
|
top2 = targetFrac - spaceFrac;
|
|
71832
72376
|
bot2 = targetFrac + spaceFrac;
|
|
@@ -71847,8 +72391,8 @@ var ViewState = class {
|
|
|
71847
72391
|
}
|
|
71848
72392
|
let pxLeft = this.pixelViewport.left + horizOffset, pxRight = this.pixelViewport.right + horizOffset;
|
|
71849
72393
|
let left, right;
|
|
71850
|
-
if (
|
|
71851
|
-
let targetFrac = findFraction(structure,
|
|
72394
|
+
if (target2 != null) {
|
|
72395
|
+
let targetFrac = findFraction(structure, target2);
|
|
71852
72396
|
let spaceFrac = ((pxRight - pxLeft) / 2 + marginWidth) / totalWidth;
|
|
71853
72397
|
left = targetFrac - spaceFrac;
|
|
71854
72398
|
right = targetFrac + spaceFrac;
|
|
@@ -76146,11 +76690,11 @@ var SingleGutterView = class {
|
|
|
76146
76690
|
this.dom.className = "cm-gutter" + (this.config.class ? " " + this.config.class : "");
|
|
76147
76691
|
for (let prop in config3.domEventHandlers) {
|
|
76148
76692
|
this.dom.addEventListener(prop, (event) => {
|
|
76149
|
-
let
|
|
76150
|
-
if (
|
|
76151
|
-
while (
|
|
76152
|
-
|
|
76153
|
-
let rect =
|
|
76693
|
+
let target2 = event.target, y5;
|
|
76694
|
+
if (target2 != this.dom && this.dom.contains(target2)) {
|
|
76695
|
+
while (target2.parentNode != this.dom)
|
|
76696
|
+
target2 = target2.parentNode;
|
|
76697
|
+
let rect = target2.getBoundingClientRect();
|
|
76154
76698
|
y5 = (rect.top + rect.bottom) / 2;
|
|
76155
76699
|
} else {
|
|
76156
76700
|
y5 = event.clientY;
|
|
@@ -78331,8 +78875,8 @@ var Stack = class _Stack {
|
|
|
78331
78875
|
return false;
|
|
78332
78876
|
if (!parser2.validAction(this.state, reduce)) {
|
|
78333
78877
|
let depth = reduce >> 19, term = reduce & 65535;
|
|
78334
|
-
let
|
|
78335
|
-
if (
|
|
78878
|
+
let target2 = this.stack.length - depth * 3;
|
|
78879
|
+
if (target2 < 0 || parser2.getGoto(this.stack[target2], term, false) < 0) {
|
|
78336
78880
|
let backup = this.findForcedReduction();
|
|
78337
78881
|
if (backup == null)
|
|
78338
78882
|
return false;
|
|
@@ -78361,8 +78905,8 @@ var Stack = class _Stack {
|
|
|
78361
78905
|
else if (action & 65536) {
|
|
78362
78906
|
let rDepth = (action >> 19) - depth;
|
|
78363
78907
|
if (rDepth > 1) {
|
|
78364
|
-
let term = action & 65535,
|
|
78365
|
-
if (
|
|
78908
|
+
let term = action & 65535, target2 = this.stack.length - rDepth * 3;
|
|
78909
|
+
if (target2 >= 0 && parser2.getGoto(this.stack[target2], term, false) >= 0)
|
|
78366
78910
|
return rDepth << 19 | 65536 | term;
|
|
78367
78911
|
}
|
|
78368
78912
|
} else {
|
|
@@ -79541,12 +80085,12 @@ var LRParser = class _LRParser extends Parser {
|
|
|
79541
80085
|
return -1;
|
|
79542
80086
|
for (let pos = table[term + 1]; ; ) {
|
|
79543
80087
|
let groupTag = table[pos++], last = groupTag & 1;
|
|
79544
|
-
let
|
|
80088
|
+
let target2 = table[pos++];
|
|
79545
80089
|
if (last && loose)
|
|
79546
|
-
return
|
|
80090
|
+
return target2;
|
|
79547
80091
|
for (let end = pos + (groupTag >> 1); pos < end; pos++)
|
|
79548
80092
|
if (table[pos] == state)
|
|
79549
|
-
return
|
|
80093
|
+
return target2;
|
|
79550
80094
|
if (last)
|
|
79551
80095
|
return -1;
|
|
79552
80096
|
}
|
|
@@ -84525,9 +85069,9 @@ var oneDarkHighlightStyle = /* @__PURE__ */ HighlightStyle.define([
|
|
|
84525
85069
|
var oneDark = [oneDarkTheme, /* @__PURE__ */ syntaxHighlighting(oneDarkHighlightStyle)];
|
|
84526
85070
|
|
|
84527
85071
|
// node_modules/@codemirror/commands/dist/index.js
|
|
84528
|
-
var toggleComment = (
|
|
84529
|
-
let { state } =
|
|
84530
|
-
return config3.line ? toggleLineComment(
|
|
85072
|
+
var toggleComment = (target2) => {
|
|
85073
|
+
let { state } = target2, line = state.doc.lineAt(state.selection.main.from), config3 = getConfig(target2.state, line.from);
|
|
85074
|
+
return config3.line ? toggleLineComment(target2) : config3.block ? toggleBlockCommentByLine(target2) : false;
|
|
84531
85075
|
};
|
|
84532
85076
|
function command(f5, option) {
|
|
84533
85077
|
return ({ state, dispatch }) => {
|
|
@@ -85089,14 +85633,14 @@ function toMatchingBracket(state, dispatch, extend2) {
|
|
|
85089
85633
|
return true;
|
|
85090
85634
|
}
|
|
85091
85635
|
var cursorMatchingBracket = ({ state, dispatch }) => toMatchingBracket(state, dispatch, false);
|
|
85092
|
-
function extendSel(
|
|
85093
|
-
let selection2 = updateSel(
|
|
85636
|
+
function extendSel(target2, how) {
|
|
85637
|
+
let selection2 = updateSel(target2.state.selection, (range) => {
|
|
85094
85638
|
let head = how(range);
|
|
85095
85639
|
return EditorSelection.range(range.anchor, head.head, head.goalColumn, head.bidiLevel || void 0);
|
|
85096
85640
|
});
|
|
85097
|
-
if (selection2.eq(
|
|
85641
|
+
if (selection2.eq(target2.state.selection))
|
|
85098
85642
|
return false;
|
|
85099
|
-
|
|
85643
|
+
target2.dispatch(setSel(target2.state, selection2));
|
|
85100
85644
|
return true;
|
|
85101
85645
|
}
|
|
85102
85646
|
function selectByChar(view, forward) {
|
|
@@ -85208,49 +85752,49 @@ var simplifySelection = ({ state, dispatch }) => {
|
|
|
85208
85752
|
dispatch(setSel(state, selection2));
|
|
85209
85753
|
return true;
|
|
85210
85754
|
};
|
|
85211
|
-
function deleteBy(
|
|
85212
|
-
if (
|
|
85755
|
+
function deleteBy(target2, by) {
|
|
85756
|
+
if (target2.state.readOnly)
|
|
85213
85757
|
return false;
|
|
85214
|
-
let event = "delete.selection", { state } =
|
|
85758
|
+
let event = "delete.selection", { state } = target2;
|
|
85215
85759
|
let changes = state.changeByRange((range) => {
|
|
85216
85760
|
let { from: from2, to: to3 } = range;
|
|
85217
85761
|
if (from2 == to3) {
|
|
85218
85762
|
let towards = by(range);
|
|
85219
85763
|
if (towards < from2) {
|
|
85220
85764
|
event = "delete.backward";
|
|
85221
|
-
towards = skipAtomic(
|
|
85765
|
+
towards = skipAtomic(target2, towards, false);
|
|
85222
85766
|
} else if (towards > from2) {
|
|
85223
85767
|
event = "delete.forward";
|
|
85224
|
-
towards = skipAtomic(
|
|
85768
|
+
towards = skipAtomic(target2, towards, true);
|
|
85225
85769
|
}
|
|
85226
85770
|
from2 = Math.min(from2, towards);
|
|
85227
85771
|
to3 = Math.max(to3, towards);
|
|
85228
85772
|
} else {
|
|
85229
|
-
from2 = skipAtomic(
|
|
85230
|
-
to3 = skipAtomic(
|
|
85773
|
+
from2 = skipAtomic(target2, from2, false);
|
|
85774
|
+
to3 = skipAtomic(target2, to3, true);
|
|
85231
85775
|
}
|
|
85232
85776
|
return from2 == to3 ? { range } : { changes: { from: from2, to: to3 }, range: EditorSelection.cursor(from2, from2 < range.head ? -1 : 1) };
|
|
85233
85777
|
});
|
|
85234
85778
|
if (changes.changes.empty)
|
|
85235
85779
|
return false;
|
|
85236
|
-
|
|
85780
|
+
target2.dispatch(state.update(changes, {
|
|
85237
85781
|
scrollIntoView: true,
|
|
85238
85782
|
userEvent: event,
|
|
85239
85783
|
effects: event == "delete.selection" ? EditorView.announce.of(state.phrase("Selection deleted")) : void 0
|
|
85240
85784
|
}));
|
|
85241
85785
|
return true;
|
|
85242
85786
|
}
|
|
85243
|
-
function skipAtomic(
|
|
85244
|
-
if (
|
|
85245
|
-
for (let ranges of
|
|
85787
|
+
function skipAtomic(target2, pos, forward) {
|
|
85788
|
+
if (target2 instanceof EditorView)
|
|
85789
|
+
for (let ranges of target2.state.facet(EditorView.atomicRanges).map((f5) => f5(target2)))
|
|
85246
85790
|
ranges.between(pos, pos, (from2, to3) => {
|
|
85247
85791
|
if (from2 < pos && to3 > pos)
|
|
85248
85792
|
pos = forward ? to3 : from2;
|
|
85249
85793
|
});
|
|
85250
85794
|
return pos;
|
|
85251
85795
|
}
|
|
85252
|
-
var deleteByChar = (
|
|
85253
|
-
let pos = range.from, { state } =
|
|
85796
|
+
var deleteByChar = (target2, forward, byIndentUnit) => deleteBy(target2, (range) => {
|
|
85797
|
+
let pos = range.from, { state } = target2, line = state.doc.lineAt(pos), before, targetPos;
|
|
85254
85798
|
if (byIndentUnit && !forward && pos > line.from && pos < line.from + 200 && !/[^ \t]/.test(before = line.text.slice(0, pos - line.from))) {
|
|
85255
85799
|
if (before[before.length - 1] == " ")
|
|
85256
85800
|
return pos - 1;
|
|
@@ -85269,8 +85813,8 @@ var deleteByChar = (target, forward, byIndentUnit) => deleteBy(target, (range) =
|
|
|
85269
85813
|
});
|
|
85270
85814
|
var deleteCharBackward = (view) => deleteByChar(view, false, true);
|
|
85271
85815
|
var deleteCharForward = (view) => deleteByChar(view, true, false);
|
|
85272
|
-
var deleteByGroup = (
|
|
85273
|
-
let pos = range.head, { state } =
|
|
85816
|
+
var deleteByGroup = (target2, forward) => deleteBy(target2, (range) => {
|
|
85817
|
+
let pos = range.head, { state } = target2, line = state.doc.lineAt(pos);
|
|
85274
85818
|
let categorize = state.charCategorizer(pos);
|
|
85275
85819
|
for (let cat = null; ; ) {
|
|
85276
85820
|
if (pos == (forward ? line.to : line.from)) {
|
|
@@ -85289,8 +85833,8 @@ var deleteByGroup = (target, forward) => deleteBy(target, (range) => {
|
|
|
85289
85833
|
}
|
|
85290
85834
|
return pos;
|
|
85291
85835
|
});
|
|
85292
|
-
var deleteGroupBackward = (
|
|
85293
|
-
var deleteGroupForward = (
|
|
85836
|
+
var deleteGroupBackward = (target2) => deleteByGroup(target2, false);
|
|
85837
|
+
var deleteGroupForward = (target2) => deleteByGroup(target2, true);
|
|
85294
85838
|
var deleteToLineEnd = (view) => deleteBy(view, (range) => {
|
|
85295
85839
|
let lineEnd = view.lineBlockAt(range.head).to;
|
|
85296
85840
|
return range.head < lineEnd ? lineEnd : Math.min(view.state.doc.length, range.head + 1);
|
|
@@ -94176,15 +94720,15 @@ var ForkDialog = class extends i4 {
|
|
|
94176
94720
|
`;
|
|
94177
94721
|
}
|
|
94178
94722
|
_confirm() {
|
|
94179
|
-
let
|
|
94723
|
+
let target2;
|
|
94180
94724
|
if (this._selectedTarget === "create") {
|
|
94181
|
-
|
|
94725
|
+
target2 = `create:${this._newRepoName.trim()}`;
|
|
94182
94726
|
} else {
|
|
94183
|
-
|
|
94727
|
+
target2 = this._selectedTarget;
|
|
94184
94728
|
}
|
|
94185
94729
|
this.dispatchEvent(
|
|
94186
94730
|
new CustomEvent("fork-confirm", {
|
|
94187
|
-
detail: { target },
|
|
94731
|
+
detail: { target: target2 },
|
|
94188
94732
|
bubbles: true,
|
|
94189
94733
|
composed: true
|
|
94190
94734
|
})
|