Mission Control Dashboard - Initial implementation
This commit is contained in:
14
node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs
generated
vendored
Normal file
14
node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { addDomEvent } from '../../events/add-dom-event.mjs';
|
||||
import { createProjectionNode } from './create-projection-node.mjs';
|
||||
|
||||
const DocumentProjectionNode = createProjectionNode({
|
||||
attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify),
|
||||
measureScroll: () => ({
|
||||
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
|
||||
y: document.documentElement.scrollTop || document.body?.scrollTop || 0,
|
||||
}),
|
||||
checkIsScrollRoot: () => true,
|
||||
});
|
||||
|
||||
export { DocumentProjectionNode };
|
||||
//# sourceMappingURL=DocumentProjectionNode.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"DocumentProjectionNode.mjs","sources":["../../../../src/projection/node/DocumentProjectionNode.ts"],"sourcesContent":["import { addDomEvent } from \"../../events/add-dom-event\"\nimport { createProjectionNode } from \"./create-projection-node\"\n\nexport const DocumentProjectionNode = createProjectionNode<Window>({\n attachResizeListener: (\n ref: Window | Element,\n notify: VoidFunction\n ): VoidFunction => addDomEvent(ref, \"resize\", notify),\n measureScroll: () => ({\n x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,\n y: document.documentElement.scrollTop || document.body?.scrollTop || 0,\n }),\n checkIsScrollRoot: () => true,\n})\n"],"names":[],"mappings":";;;AAGO,MAAM,sBAAsB,GAAG,oBAAoB,CAAS;AAC/D,IAAA,oBAAoB,EAAE,CAClB,GAAqB,EACrB,MAAoB,KACL,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC;AACrD,IAAA,aAAa,EAAE,OAAO;AAClB,QAAA,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,UAAU,IAAI,QAAQ,CAAC,IAAI,EAAE,UAAU,IAAI,CAAC;AACxE,QAAA,CAAC,EAAE,QAAQ,CAAC,eAAe,CAAC,SAAS,IAAI,QAAQ,CAAC,IAAI,EAAE,SAAS,IAAI,CAAC;KACzE,CAAC;AACF,IAAA,iBAAiB,EAAE,MAAM,IAAI;AAChC,CAAA;;;;"}
|
||||
28
node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs
generated
vendored
Normal file
28
node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { createProjectionNode } from './create-projection-node.mjs';
|
||||
import { DocumentProjectionNode } from './DocumentProjectionNode.mjs';
|
||||
|
||||
const rootProjectionNode = {
|
||||
current: undefined,
|
||||
};
|
||||
const HTMLProjectionNode = createProjectionNode({
|
||||
measureScroll: (instance) => ({
|
||||
x: instance.scrollLeft,
|
||||
y: instance.scrollTop,
|
||||
}),
|
||||
defaultParent: () => {
|
||||
if (!rootProjectionNode.current) {
|
||||
const documentNode = new DocumentProjectionNode({});
|
||||
documentNode.mount(window);
|
||||
documentNode.setOptions({ layoutScroll: true });
|
||||
rootProjectionNode.current = documentNode;
|
||||
}
|
||||
return rootProjectionNode.current;
|
||||
},
|
||||
resetTransform: (instance, value) => {
|
||||
instance.style.transform = value !== undefined ? value : "none";
|
||||
},
|
||||
checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed"),
|
||||
});
|
||||
|
||||
export { HTMLProjectionNode, rootProjectionNode };
|
||||
//# sourceMappingURL=HTMLProjectionNode.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HTMLProjectionNode.mjs","sources":["../../../../src/projection/node/HTMLProjectionNode.ts"],"sourcesContent":["import { createProjectionNode } from \"./create-projection-node\"\nimport { DocumentProjectionNode } from \"./DocumentProjectionNode\"\nimport { IProjectionNode } from \"./types\"\n\nexport const rootProjectionNode: { current: IProjectionNode | undefined } = {\n current: undefined,\n}\n\nexport const HTMLProjectionNode = createProjectionNode<HTMLElement>({\n measureScroll: (instance) => ({\n x: instance.scrollLeft,\n y: instance.scrollTop,\n }),\n defaultParent: () => {\n if (!rootProjectionNode.current) {\n const documentNode = new DocumentProjectionNode({})\n documentNode.mount(window)\n documentNode.setOptions({ layoutScroll: true })\n rootProjectionNode.current = documentNode\n }\n return rootProjectionNode.current\n },\n resetTransform: (instance, value) => {\n instance.style.transform = value !== undefined ? value : \"none\"\n },\n checkIsScrollRoot: (instance) =>\n Boolean(window.getComputedStyle(instance).position === \"fixed\"),\n})\n"],"names":[],"mappings":";;;AAIO,MAAM,kBAAkB,GAA6C;AACxE,IAAA,OAAO,EAAE,SAAS;;AAGf,MAAM,kBAAkB,GAAG,oBAAoB,CAAc;AAChE,IAAA,aAAa,EAAE,CAAC,QAAQ,MAAM;QAC1B,CAAC,EAAE,QAAQ,CAAC,UAAU;QACtB,CAAC,EAAE,QAAQ,CAAC,SAAS;KACxB,CAAC;IACF,aAAa,EAAE,MAAK;AAChB,QAAA,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;AAC7B,YAAA,MAAM,YAAY,GAAG,IAAI,sBAAsB,CAAC,EAAE,CAAC;AACnD,YAAA,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;YAC1B,YAAY,CAAC,UAAU,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;AAC/C,YAAA,kBAAkB,CAAC,OAAO,GAAG,YAAY;QAC7C;QACA,OAAO,kBAAkB,CAAC,OAAO;IACrC,CAAC;AACD,IAAA,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAI;AAChC,QAAA,QAAQ,CAAC,KAAK,CAAC,SAAS,GAAG,KAAK,KAAK,SAAS,GAAG,KAAK,GAAG,MAAM;IACnE,CAAC;AACD,IAAA,iBAAiB,EAAE,CAAC,QAAQ,KACxB,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC;AACtE,CAAA;;;;"}
|
||||
1677
node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs
generated
vendored
Normal file
1677
node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
25
node_modules/motion-dom/dist/es/projection/node/group.mjs
generated
vendored
Normal file
25
node_modules/motion-dom/dist/es/projection/node/group.mjs
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
const notify = (node) => !node.isLayoutDirty && node.willUpdate(false);
|
||||
function nodeGroup() {
|
||||
const nodes = new Set();
|
||||
const subscriptions = new WeakMap();
|
||||
const dirtyAll = () => nodes.forEach(notify);
|
||||
return {
|
||||
add: (node) => {
|
||||
nodes.add(node);
|
||||
subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll));
|
||||
},
|
||||
remove: (node) => {
|
||||
nodes.delete(node);
|
||||
const unsubscribe = subscriptions.get(node);
|
||||
if (unsubscribe) {
|
||||
unsubscribe();
|
||||
subscriptions.delete(node);
|
||||
}
|
||||
dirtyAll();
|
||||
},
|
||||
dirty: dirtyAll,
|
||||
};
|
||||
}
|
||||
|
||||
export { nodeGroup };
|
||||
//# sourceMappingURL=group.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/projection/node/group.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/projection/node/group.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"group.mjs","sources":["../../../../src/projection/node/group.ts"],"sourcesContent":["import { IProjectionNode } from \"./types\"\n\nconst notify = (node: IProjectionNode) =>\n !node.isLayoutDirty && node.willUpdate(false)\n\nexport interface NodeGroup {\n add: (node: IProjectionNode) => void\n remove: (node: IProjectionNode) => void\n dirty: VoidFunction\n}\n\nexport function nodeGroup(): NodeGroup {\n const nodes = new Set<IProjectionNode>()\n const subscriptions = new WeakMap<IProjectionNode, () => void>()\n\n const dirtyAll = () => nodes.forEach(notify)\n\n return {\n add: (node) => {\n nodes.add(node)\n subscriptions.set(\n node,\n node.addEventListener(\"willUpdate\", dirtyAll)\n )\n },\n remove: (node) => {\n nodes.delete(node)\n const unsubscribe = subscriptions.get(node)\n if (unsubscribe) {\n unsubscribe()\n subscriptions.delete(node)\n }\n dirtyAll()\n },\n dirty: dirtyAll,\n }\n}\n"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAG,CAAC,IAAqB,KACjC,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;SAQjC,SAAS,GAAA;AACrB,IAAA,MAAM,KAAK,GAAG,IAAI,GAAG,EAAmB;AACxC,IAAA,MAAM,aAAa,GAAG,IAAI,OAAO,EAA+B;IAEhE,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;IAE5C,OAAO;AACH,QAAA,GAAG,EAAE,CAAC,IAAI,KAAI;AACV,YAAA,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;AACf,YAAA,aAAa,CAAC,GAAG,CACb,IAAI,EACJ,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAChD;QACL,CAAC;AACD,QAAA,MAAM,EAAE,CAAC,IAAI,KAAI;AACb,YAAA,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;YAClB,MAAM,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC;YAC3C,IAAI,WAAW,EAAE;AACb,gBAAA,WAAW,EAAE;AACb,gBAAA,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC;YAC9B;AACA,YAAA,QAAQ,EAAE;QACd,CAAC;AACD,QAAA,KAAK,EAAE,QAAQ;KAClB;AACL;;;;"}
|
||||
20
node_modules/motion-dom/dist/es/projection/node/state.mjs
generated
vendored
Normal file
20
node_modules/motion-dom/dist/es/projection/node/state.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* This should only ever be modified on the client otherwise it'll
|
||||
* persist through server requests. If we need instanced states we
|
||||
* could lazy-init via root.
|
||||
*/
|
||||
const globalProjectionState = {
|
||||
/**
|
||||
* Global flag as to whether the tree has animated since the last time
|
||||
* we resized the window
|
||||
*/
|
||||
hasAnimatedSinceResize: true,
|
||||
/**
|
||||
* We set this to true once, on the first update. Any nodes added to the tree beyond that
|
||||
* update will be given a `data-projection-id` attribute.
|
||||
*/
|
||||
hasEverUpdated: false,
|
||||
};
|
||||
|
||||
export { globalProjectionState };
|
||||
//# sourceMappingURL=state.mjs.map
|
||||
1
node_modules/motion-dom/dist/es/projection/node/state.mjs.map
generated
vendored
Normal file
1
node_modules/motion-dom/dist/es/projection/node/state.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"state.mjs","sources":["../../../../src/projection/node/state.ts"],"sourcesContent":["/**\n * This should only ever be modified on the client otherwise it'll\n * persist through server requests. If we need instanced states we\n * could lazy-init via root.\n */\nexport const globalProjectionState = {\n /**\n * Global flag as to whether the tree has animated since the last time\n * we resized the window\n */\n hasAnimatedSinceResize: true,\n\n /**\n * We set this to true once, on the first update. Any nodes added to the tree beyond that\n * update will be given a `data-projection-id` attribute.\n */\n hasEverUpdated: false,\n}\n"],"names":[],"mappings":"AAAA;;;;AAIG;AACI,MAAM,qBAAqB,GAAG;AACjC;;;AAGG;AACH,IAAA,sBAAsB,EAAE,IAAI;AAE5B;;;AAGG;AACH,IAAA,cAAc,EAAE,KAAK;;;;;"}
|
||||
Reference in New Issue
Block a user