@window-splitter/state 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tshy/build.json +8 -0
- package/.tshy/commonjs.json +17 -0
- package/.tshy/esm.json +16 -0
- package/.turbo/turbo-build.log +5 -0
- package/.turbo/turbo-lint.log +5 -0
- package/.turbo/turbo-test.log +278 -0
- package/CHANGELOG.md +191 -0
- package/README.md +13 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/clover.xml +350 -0
- package/coverage/coverage-final.json +2 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +116 -0
- package/coverage/index.ts.html +4627 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/dist/commonjs/index.d.ts +314 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +932 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/machine.test.d.ts +5 -0
- package/dist/commonjs/machine.test.d.ts.map +1 -0
- package/dist/commonjs/machine.test.js +1038 -0
- package/dist/commonjs/machine.test.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/utils.test.d.ts +2 -0
- package/dist/commonjs/utils.test.d.ts.map +1 -0
- package/dist/commonjs/utils.test.js +79 -0
- package/dist/commonjs/utils.test.js.map +1 -0
- package/dist/esm/index.d.ts +314 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +890 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/machine.test.d.ts +5 -0
- package/dist/esm/machine.test.d.ts.map +1 -0
- package/dist/esm/machine.test.js +1036 -0
- package/dist/esm/machine.test.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/utils.test.d.ts +2 -0
- package/dist/esm/utils.test.d.ts.map +1 -0
- package/dist/esm/utils.test.js +77 -0
- package/dist/esm/utils.test.js.map +1 -0
- package/eslint.config.js +3 -0
- package/package.json +79 -0
- package/src/index.ts +1514 -0
- package/src/machine.test.ts +1316 -0
- package/src/utils.test.ts +104 -0
- package/tsconfig.json +3 -0
- package/vitest.config.ts +16 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machine.test.js","sourceRoot":"","sources":["../../src/machine.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,mCAAoD;AACpD,yCAOoB;AACpB,mCAA4C;AAC5C,0CAA0C;AAE1C,SAAS,WAAW,CAAC,KAAiC;IACpD,OAAO,IAAA,wBAAa,EAAC,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,OAAgB;IACtB,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,SAAS,UAAU,CACjB,KAAiC,EACjC,OAKC;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACjD,KAAK,CAAC,IAAI,CAAC;YACT,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,OAAO,CAAC,EAAE;YACpB,KAAK,EAAE,IAAA,4BAAiB,EAAC;gBACvB,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,YAAY;gBAChD,KAAK,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACjC,QAAQ,EAAE,OAAO,CAAC,QAAQ;aAC3B,CAAC;SACH,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,SAAS,OAAO,CACd,KAAiC,EACjC,MAA2B;IAE3B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACp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EAAE;YACpE,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE;YACjD;gBACE,IAAI,EAAE,YAAY;gBAClB,QAAQ,EAAE,UAAU;gBACpB,KAAK,EAAE,IAAA,4BAAiB,EAAC,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;aACpE;SACF,CAAC,CAAC;QAEH,IAAA,eAAM,EAAC,GAAG,CAAC,CAAC,oBAAoB,CAC9B,IAAI,KAAK,CAAC,yCAAyC,CAAC,CACrD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * @vitest-environment jsdom\n */\n\nimport { expect, test, describe, vi } from \"vitest\";\nimport {\n buildTemplate,\n dragHandlePayload,\n groupMachine,\n GroupMachineEvent,\n initializePanel,\n isPanelHandle,\n} from \"./index.js\";\nimport { Actor, createActor } from \"xstate\";\n// import { spring } from \"framer-motion\";\n\nfunction getTemplate(actor: Actor<typeof groupMachine>) {\n return buildTemplate(actor.getSnapshot().context);\n}\n\nconst handleSize = {\n type: \"pixel\" as const,\n value: 10,\n};\n\nfunction dragHandle(\n actor: Actor<typeof groupMachine>,\n options: {\n delta: number;\n orientation?: \"horizontal\" | \"vertical\";\n id: string;\n shiftKey?: boolean;\n }\n) {\n for (let i = 0; i < Math.abs(options.delta); i++) {\n actor.send({\n type: \"dragHandle\",\n handleId: options.id,\n value: dragHandlePayload({\n orientation: options.orientation || \"horizontal\",\n delta: options.delta > 0 ? 1 : -1,\n shiftKey: options.shiftKey,\n }),\n });\n }\n}\n\nfunction sendAll(\n actor: Actor<typeof groupMachine>,\n events: GroupMachineEvent[]\n) {\n for (const event of events) {\n actor.send(event);\n }\n}\n\nfunction capturePixelValues(actor: Actor<typeof groupMachine>, cb: () => void) {\n const firstHandle = actor\n .getSnapshot()\n .context.items.find((i) => isPanelHandle(i));\n\n if (firstHandle) {\n actor.send({ type: \"dragHandleStart\", handleId: firstHandle.id });\n }\n\n cb();\n\n if (firstHandle) {\n actor.send({ type: \"dragHandleEnd\", handleId: firstHandle.id });\n }\n}\n\nfunction waitForIdle(actor: Actor<typeof groupMachine>) {\n return new Promise<void>((resolve) => {\n setInterval(() => {\n const snapshot = actor.getSnapshot();\n\n if (snapshot.value === \"idle\") {\n resolve();\n }\n }, 100);\n });\n}\n\nfunction initializeSizes(\n actor: Actor<typeof groupMachine>,\n options: {\n width: number;\n height: number;\n }\n) {\n const context = actor.getSnapshot().context;\n const { orientation, items } = context;\n const template = buildTemplate(context);\n const div = document.createElement(\"div\");\n\n div.style.width = `${options.width}px`;\n div.style.height = `${options.height}px`;\n div.style.display = \"grid\";\n div.id = \"group\";\n\n if (orientation === \"horizontal\") {\n div.style.gridTemplateColumns = template;\n } else {\n div.style.gridTemplateRows = template;\n }\n\n for (let i = 0; i < items.length; i++) {\n div.appendChild(document.createElement(\"div\"));\n }\n\n document.body.appendChild(div);\n\n const childrenSizes: Record<string, { width: number; height: number }> = {};\n\n div.childNodes.forEach((node, index) => {\n const item = items[index];\n\n if (node instanceof HTMLElement && item) {\n const rect = node.getBoundingClientRect();\n\n childrenSizes[item.id] = {\n width: rect.width,\n height: rect.height,\n };\n }\n });\n\n actor.send({\n type: \"setSize\",\n size: { width: options.width, height: options.height },\n });\n actor.send({\n type: \"setActualItemsSize\",\n childrenSizes,\n });\n}\n\ndescribe(\"constraints\", () => {\n test(\"works with 2 simple panels - horizontal\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-2\" }) },\n ]);\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 1fr) 10px minmax(0px, 1fr)\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n // Drag the resizer to the right\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n dragHandle(actor, { id: \"resizer-1\", delta: 10 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"255px 10px 235px\"`);\n });\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, min(calc(0.5204081632653061 * (100% - 10px)), 100%)) 10px minmax(0px, min(calc(0.47959183673469385 * (100% - 10px)), 100%))\"`\n );\n\n // Drag the resizer to the left\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"255px 10px 235px\"`);\n dragHandle(actor, { id: \"resizer-1\", delta: -20 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"235px 10px 255px\"`);\n });\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, min(calc(0.47959183673469385 * (100% - 10px)), 100%)) 10px minmax(0px, min(calc(0.5204081632653061 * (100% - 10px)), 100%))\"`\n );\n });\n\n test(\"works with 2 simple panels - vertical\", () => {\n const actor = createActor(groupMachine, {\n input: { orientation: \"vertical\", groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-2\" }) },\n ]);\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 1fr) 10px minmax(0px, 1fr)\"`\n );\n initializeSizes(actor, { width: 200, height: 500 });\n\n // Drag the resizer down\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n dragHandle(actor, {\n id: \"resizer-1\",\n delta: 10,\n orientation: \"vertical\",\n });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"255px 10px 235px\"`);\n });\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, min(calc(0.5204081632653061 * (100% - 10px)), 100%)) 10px minmax(0px, min(calc(0.47959183673469385 * (100% - 10px)), 100%))\"`\n );\n\n // Drag the resizer to the up\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"255px 10px 235px\"`);\n dragHandle(actor, {\n id: \"resizer-1\",\n delta: -20,\n orientation: \"vertical\",\n });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"235px 10px 255px\"`);\n });\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, min(calc(0.47959183673469385 * (100% - 10px)), 100%)) 10px minmax(0px, min(calc(0.5204081632653061 * (100% - 10px)), 100%))\"`\n );\n });\n\n test(\"doesn't register a panel with the same id twice\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [initializePanel({ id: \"panel-1\" })],\n },\n }).start();\n\n actor.send({\n type: \"registerPanel\",\n data: initializePanel({ id: \"panel-1\" }),\n });\n\n expect(actor.getSnapshot().context.items).toHaveLength(1);\n });\n\n test(\"works with 2 simple panels as input\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [\n initializePanel({ id: \"panel-1\" }),\n {\n type: \"handle\",\n id: \"resizer-1\",\n size: { type: \"pixel\", value: 10 },\n },\n initializePanel({ id: \"panel-2\" }),\n ],\n },\n }).start();\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 1fr) 10px minmax(0px, 1fr)\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n });\n });\n\n test(\"no delta does nothing\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [\n initializePanel({ id: \"panel-1\" }),\n {\n type: \"handle\",\n id: \"resizer-1\",\n size: { type: \"pixel\", value: 10 },\n },\n initializePanel({ id: \"panel-2\" }),\n ],\n },\n }).start();\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n actor.send({\n type: \"dragHandle\",\n handleId: \"resizer-1\",\n value: dragHandlePayload({ delta: 0, orientation: \"horizontal\" }),\n });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n });\n });\n\n test(\"shift key makes it drag more\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [\n initializePanel({ id: \"panel-1\" }),\n {\n type: \"handle\",\n id: \"resizer-1\",\n size: { type: \"pixel\", value: 10 },\n },\n initializePanel({ id: \"panel-2\" }),\n ],\n },\n }).start();\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n dragHandle(actor, { id: \"resizer-1\", delta: -1, shiftKey: true });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"230px 10px 260px\"`);\n });\n });\n\n test(\"works with percentages\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [\n initializePanel({ id: \"panel-1\", min: \"40%\" }),\n {\n type: \"handle\",\n id: \"resizer-1\",\n size: { type: \"pixel\", value: 10 },\n },\n initializePanel({ id: \"panel-2\", min: \"10%\", default: \"30%\" }),\n ],\n },\n }).start();\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(40%, 1fr) 10px 30%\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"340px 10px 150px\"`);\n dragHandle(actor, { id: \"resizer-1\", delta: -200 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"200px 10px 290px\"`);\n });\n });\n\n test(\"supports max\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [\n initializePanel({ id: \"panel-1\", max: \"90%\" }),\n {\n type: \"handle\",\n id: \"resizer-1\",\n size: { type: \"pixel\", value: 10 },\n },\n initializePanel({ id: \"panel-2\", default: \"30%\" }),\n ],\n },\n }).start();\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 90%) 10px 30%\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n dragHandle(actor, { id: \"resizer-1\", delta: 400 });\n });\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, min(calc(0.9183673469387755 * (100% - 10px)), 90%)) 10px minmax(0px, min(calc(0.08163265306122448 * (100% - 10px)), 100%))\"`\n );\n });\n\n test(\"panel can have a min\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({ id: \"panel-2\", min: \"100px\" }),\n },\n ]);\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 1fr) 10px minmax(100px, 1fr)\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n dragHandle(actor, { id: \"resizer-1\", delta: 200 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"390px 10px 100px\"`);\n });\n });\n\n test(\"panel can have a max\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({ id: \"panel-2\", max: \"300px\" }),\n },\n ]);\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 1fr) 10px minmax(0px, 300px)\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n // Drag the resizer to the right\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"190px 10px 300px\"`);\n dragHandle(actor, { id: \"resizer-1\", delta: -200 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"190px 10px 300px\"`);\n });\n });\n\n test(\"panel can have a default size\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({ id: \"panel-2\", default: \"300px\" }),\n },\n ]);\n initializeSizes(actor, { width: 500, height: 200 });\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, min(calc(1 * (100% - 310px)), 100%)) 10px minmax(0px, min(calc(1.5789473684210527 * (100% - 310px)), 100%))\"`\n );\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"190px 10px 300px\"`);\n });\n });\n\n test(\"dragging eats space from multiple panels in front of it\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({\n id: \"panel-2\",\n min: \"200px\",\n default: \"300px\",\n }),\n },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-2\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({ id: \"panel-3\", min: \"100px\" }),\n },\n ]);\n\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"80px 10px 300px 10px 100px\"`\n );\n dragHandle(actor, { id: \"resizer-1\", delta: 160 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"180px 10px 200px 10px 100px\"`\n );\n });\n });\n\n test(\"can set a panel's size\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [\n initializePanel({ id: \"panel-1\" }),\n {\n type: \"handle\",\n id: \"resizer-1\",\n size: { type: \"pixel\", value: 10 },\n },\n initializePanel({ id: \"panel-2\" }),\n ],\n },\n }).start();\n initializeSizes(actor, { width: 500, height: 200 });\n\n actor.send({\n type: \"setPanelPixelSize\",\n panelId: \"panel-1\",\n size: \"100px\",\n });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"100px 10px 390px\"`);\n });\n\n actor.send({\n type: \"setPanelPixelSize\",\n panelId: \"panel-1\",\n size: \"25%\",\n });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"125px 10px 365px\"`);\n });\n });\n\n test(\"can update orientation at runtime\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-2\" }) },\n ]);\n\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n });\n\n actor.send({ type: \"setOrientation\", orientation: \"vertical\" });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"95px 10px 95px\"`);\n });\n });\n});\n\ndescribe(\"collapsible panel\", () => {\n // const springAnimation = spring({\n // keyframes: [0, 1],\n // velocity: 1,\n // stiffness: 100,\n // damping: 10,\n // mass: 1.0,\n // });\n // const springEasing = (t: number) => springAnimation.next(t * 1000).value;\n\n test.each([\n undefined,\n \"ease-in-out\" as const,\n // The math is wrong, enable after Decimal128\n // { duration: 1000, easing: springEasing },\n ])(\"panel can be collapsible: %s\", async (animation) => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({\n id: \"panel-2\",\n collapsible: true,\n min: \"100px\",\n collapseAnimation: animation,\n }),\n },\n ]);\n\n expect(getTemplate(actor)).toBe(\"minmax(0px, 1fr) 10px minmax(100px, 1fr)\");\n initializeSizes(actor, { width: 500, height: 200 });\n\n // Test dragging to collapse the panel\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toBe(\"245px 10px 245px\");\n\n // Drag into the drag buffer but not past it\n dragHandle(actor, { id: \"resizer-1\", delta: 160 });\n expect(getTemplate(actor)).toBe(\"390px 10px 100px\");\n\n // Drag past the drag buffer and collapse the panel\n dragHandle(actor, { id: \"resizer-1\", delta: 100 });\n expect(getTemplate(actor)).toBe(\"490px 10px 0px\");\n });\n\n expect(getTemplate(actor)).toBe(\n \"minmax(0px, min(calc(1 * (100% - 10px)), 100%)) 10px 0px\"\n );\n\n // Test dragging to expand the panel\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toBe(\"490px 10px 0px\");\n\n // Stays oollapsed in the buffer\n dragHandle(actor, { id: \"resizer-1\", delta: -30 });\n expect(getTemplate(actor)).toBe(\"490px 10px 0px\");\n\n // Opens once the buffer is cleared\n dragHandle(actor, { id: \"resizer-1\", delta: -20 });\n expect(getTemplate(actor)).toBe(\"390px 10px 100px\");\n });\n\n actor.send({ type: \"collapsePanel\", panelId: \"panel-2\" });\n await waitForIdle(actor);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toBe(\"490px 10px 0px\");\n });\n });\n\n test(\"collapsible panel can have collapsed size - right\", async () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({\n id: \"panel-2\",\n collapsible: true,\n defaultCollapsed: true,\n min: \"200px\",\n collapsedSize: \"60px\",\n }),\n },\n ]);\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 1fr) 10px 60px\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"430px 10px 60px\"`);\n\n // Drag into the the panel\n dragHandle(actor, { id: \"resizer-1\", delta: 50 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"430px 10px 60px\"`);\n\n // Drag into the start\n dragHandle(actor, { id: \"resizer-1\", delta: -50 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"430px 10px 60px\"`);\n\n // Drag into the drag buffer but not past it\n dragHandle(actor, { id: \"resizer-1\", delta: -25 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"430px 10px 60px\"`);\n\n // Drag past the buffer\n dragHandle(actor, { id: \"resizer-1\", delta: -25 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"290px 10px 200px\"`);\n });\n });\n\n test(\"can expand default collapsed panel via event\", async () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({\n id: \"panel-2\",\n collapsible: true,\n defaultCollapsed: true,\n min: \"200px\",\n collapsedSize: \"60px\",\n }),\n },\n ]);\n\n initializeSizes(actor, { width: 500, height: 200 });\n actor.send({ type: \"expandPanel\", panelId: \"panel-2\" });\n await waitForIdle(actor);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"290px 10px 200px\"`);\n });\n });\n\n test(\"collapsible panel can have collapsed size - left\", async () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n {\n type: \"registerPanel\",\n data: initializePanel({\n id: \"panel-2\",\n collapsible: true,\n defaultCollapsed: true,\n min: \"200px\",\n collapsedSize: \"60px\",\n }),\n },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n ]);\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"60px 10px minmax(0px, 1fr)\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"60px 10px 430px\"`);\n\n // Drag into the the panel\n dragHandle(actor, { id: \"resizer-1\", delta: -50 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"60px 10px 430px\"`);\n\n // Drag to the start\n dragHandle(actor, { id: \"resizer-1\", delta: 50 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"60px 10px 430px\"`);\n\n // Drag into the drag buffer but not past it\n dragHandle(actor, { id: \"resizer-1\", delta: 25 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"60px 10px 430px\"`);\n\n // Drag past the buffer\n dragHandle(actor, { id: \"resizer-1\", delta: 25 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"200px 10px 290px\"`);\n });\n });\n\n test(\"collapsible remembers last position\", async () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({\n id: \"panel-2\",\n collapsible: true,\n min: \"200px\",\n collapsedSize: \"60px\",\n }),\n },\n ]);\n\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n dragHandle(actor, { id: \"resizer-1\", delta: -50 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"195px 10px 295px\"`);\n });\n\n actor.send({ type: \"collapsePanel\", panelId: \"panel-2\" });\n await waitForIdle(actor);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"430px 10px 60px\"`);\n });\n\n actor.send({ type: \"expandPanel\", panelId: \"panel-2\" });\n await waitForIdle(actor);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"195px 10px 295px\"`);\n });\n });\n\n test(\"panel can collapse can subscribe to collapsed state\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n const spy = vi.fn();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({\n id: \"panel-2\",\n collapsible: true,\n min: \"100px\",\n onCollapseChange: {\n current: spy,\n },\n }),\n },\n ]);\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 1fr) 10px minmax(100px, 1fr)\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n // collapse the panel\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n\n // Drag into the drag buffer but not past it\n dragHandle(actor, { id: \"resizer-1\", delta: 160 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"390px 10px 100px\"`);\n\n // Drag past the drag buffer and collapse the panel\n dragHandle(actor, { id: \"resizer-1\", delta: 100 });\n expect(spy).toHaveBeenCalledWith(true);\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"490px 10px 0px\"`);\n });\n\n spy.mockReset();\n\n // expand the panel\n capturePixelValues(actor, () => {\n // The panel doesn't actually expand yet\n dragHandle(actor, { id: \"resizer-1\", delta: -150 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"290px 10px 200px\"`);\n\n expect(spy).toHaveBeenCalledWith(false);\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"290px 10px 200px\"`);\n\n // Actually collapse the panel\n actor.send({\n type: \"expandPanel\",\n panelId: \"panel-2\",\n controlled: true,\n });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"290px 10px 200px\"`);\n });\n });\n\n test(\"should be able to trigger collapse/expand via event\", async () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({\n id: \"panel-2\",\n collapsible: true,\n min: \"100px\",\n default: \"100px\",\n }),\n },\n ]);\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 1fr) 10px 100px\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"390px 10px 100px\"`);\n });\n\n actor.send({ type: \"collapsePanel\", panelId: \"panel-2\" });\n await waitForIdle(actor);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"490px 10px 0px\"`);\n });\n\n actor.send({ type: \"expandPanel\", panelId: \"panel-2\" });\n await waitForIdle(actor);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"390px 10px 100px\"`);\n });\n });\n\n test(\"panel collapse can be controlled\", async () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n const spy = vi.fn();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({\n id: \"panel-2\",\n collapsible: true,\n min: \"100px\",\n // This marks the collapse as controlled\n collapsed: false,\n collapsedSize: \"20px\",\n onCollapseChange: {\n current: spy,\n },\n }),\n },\n ]);\n\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"minmax(0px, 1fr) 10px minmax(100px, 1fr)\"`\n );\n initializeSizes(actor, { width: 500, height: 200 });\n\n // collapse the panel via drag\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n\n dragHandle(actor, { id: \"resizer-1\", delta: 160 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"390px 10px 100px\"`);\n\n // The panel doesn't actually collapse yet\n dragHandle(actor, { id: \"resizer-1\", delta: 100 });\n expect(spy).toHaveBeenCalledWith(true);\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"390px 10px 100px\"`);\n\n // Actually collapse the panel\n actor.send({\n type: \"collapsePanel\",\n panelId: \"panel-2\",\n controlled: true,\n });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"470px 10px 20px\"`);\n });\n\n spy.mockReset();\n\n // expand the panel via drag\n capturePixelValues(actor, () => {\n // The panel doesn't actually expand yet\n dragHandle(actor, { id: \"resizer-1\", delta: -150 });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"470px 10px 20px\"`);\n\n expect(spy).toHaveBeenCalledWith(false);\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"470px 10px 20px\"`);\n\n // Actually collapse the panel\n actor.send({\n type: \"expandPanel\",\n panelId: \"panel-2\",\n controlled: true,\n });\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"319px 10px 171px\"`);\n });\n\n spy.mockReset();\n\n actor.send({ type: \"collapsePanel\", panelId: \"panel-2\" });\n await waitForIdle(actor);\n\n // collapse the panel via drag\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"319px 10px 171px\"`);\n });\n\n actor.send({ type: \"expandPanel\", panelId: \"panel-2\" });\n await waitForIdle(actor);\n\n // collapse the panel via drag\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"319px 10px 171px\"`);\n });\n });\n});\n\ndescribe(\"conditional panel\", () => {\n test(\"panel can be conditionally rendered\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-2\" }) },\n ]);\n\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n });\n\n sendAll(actor, [\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-2\", size: handleSize },\n },\n {\n type: \"registerDynamicPanel\",\n data: initializePanel({ id: \"panel-3\", min: \"100px\" }),\n },\n ]);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"240px 10px 140px 10px 100px\"`\n );\n });\n\n sendAll(actor, [\n { type: \"unregisterPanelHandle\", id: \"resizer-2\" },\n { type: \"unregisterPanel\", id: \"panel-3\" },\n ]);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"240px 10px 250px\"`);\n });\n });\n\n test(\"collapsed panel can be conditionally rendered\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({ id: \"panel-2\" }),\n },\n ]);\n\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n });\n\n sendAll(actor, [\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-2\", size: handleSize },\n },\n {\n type: \"registerDynamicPanel\",\n data: initializePanel({\n id: \"panel-3\",\n min: \"100px\",\n collapsible: true,\n defaultCollapsed: true,\n }),\n },\n ]);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"240px 10px 240px 10px 0px\"`\n );\n });\n\n sendAll(actor, [\n { type: \"unregisterPanelHandle\", id: \"resizer-2\" },\n { type: \"unregisterPanel\", id: \"panel-3\" },\n ]);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"240px 10px 250px\"`);\n });\n });\n\n test(\"panel can be conditionally rendered at default width\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n {\n type: \"registerPanel\",\n data: initializePanel({ id: \"panel-2\" }),\n },\n ]);\n\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n });\n\n sendAll(actor, [\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-2\", size: handleSize },\n },\n {\n type: \"registerDynamicPanel\",\n data: initializePanel({\n id: \"panel-3\",\n default: \"125px\",\n }),\n },\n ]);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"240px 10px 115px 10px 125px\"`\n );\n });\n\n sendAll(actor, [\n { type: \"unregisterPanelHandle\", id: \"resizer-2\" },\n { type: \"unregisterPanel\", id: \"panel-3\" },\n ]);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"240px 10px 250px\"`);\n });\n });\n\n test(\"panel can be conditionally rendered w/order\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-1\" }) },\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-1\", size: handleSize },\n },\n { type: \"registerPanel\", data: initializePanel({ id: \"panel-2\" }) },\n ]);\n\n initializeSizes(actor, { width: 500, height: 200 });\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"245px 10px 245px\"`);\n });\n\n sendAll(actor, [\n {\n type: \"registerPanelHandle\",\n data: { id: \"resizer-2\", size: handleSize, order: 1 },\n },\n {\n type: \"registerDynamicPanel\",\n data: {\n ...initializePanel({ id: \"panel-3\", min: \"100px\" }),\n order: 2,\n },\n },\n ]);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(\n `\"240px 10px 100px 10px 140px\"`\n );\n });\n\n sendAll(actor, [\n { type: \"unregisterPanelHandle\", id: \"resizer-2\" },\n { type: \"unregisterPanel\", id: \"panel-3\" },\n ]);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"240px 10px 250px\"`);\n });\n\n sendAll(actor, [\n { type: \"unregisterPanelHandle\", id: \"resizer-2\" },\n { type: \"unregisterPanel\", id: \"panel-3\" },\n ]);\n\n capturePixelValues(actor, () => {\n expect(getTemplate(actor)).toMatchInlineSnapshot(`\"240px 10px 250px\"`);\n });\n });\n});\n\ndescribe(\"errors\", () => {\n test(\"throws for invalid units\", () => {\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n expect(() =>\n actor.send({\n type: \"registerPanel\",\n // @ts-expect-error Testing the error\n data: initializePanel({ id: \"panel-1\", min: \"40fr\" }),\n })\n ).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid unit: 40fr]`);\n });\n\n test(\"throws when using invalid panel IDs\", () => {\n const spy = vi.fn();\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n actor.subscribe({ error: spy });\n\n actor.send({\n type: \"registerPanel\",\n data: initializePanel({ id: \"panel-1\" }),\n });\n\n actor.send({\n type: \"setPanelPixelSize\",\n panelId: \"panel-2\",\n size: \"100px\",\n });\n\n expect(spy).toHaveBeenCalledWith(\n new Error(\"Expected panel with id: panel-2\")\n );\n });\n\n test(\"throws when using invalid handle IDs\", () => {\n const spy = vi.fn();\n const actor = createActor(groupMachine, {\n input: { groupId: \"group\" },\n }).start();\n\n actor.subscribe({ error: spy });\n\n sendAll(actor, [\n { type: \"registerPanel\", data: initializePanel({ id: \"handle-2\" }) },\n { type: \"dragHandleStart\", handleId: \"handle-2\" },\n {\n type: \"dragHandle\",\n handleId: \"handle-2\",\n value: dragHandlePayload({ delta: 100, orientation: \"horizontal\" }),\n },\n ]);\n\n expect(spy).toHaveBeenCalledWith(\n new Error(\"Expected panel handle with id: handle-2\")\n );\n });\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../src/utils.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const vitest_1 = require("vitest");
|
|
4
|
+
const index_js_1 = require("./index.js");
|
|
5
|
+
const xstate_1 = require("xstate");
|
|
6
|
+
(0, vitest_1.describe)("getUnitPercentageValue", () => {
|
|
7
|
+
(0, vitest_1.test)("works with pixels", () => {
|
|
8
|
+
(0, vitest_1.expect)((0, index_js_1.getUnitPercentageValue)(100, { type: "pixel", value: 100 })).toBe(1);
|
|
9
|
+
(0, vitest_1.expect)((0, index_js_1.getUnitPercentageValue)(100, { type: "pixel", value: 50 })).toBe(0.5);
|
|
10
|
+
});
|
|
11
|
+
(0, vitest_1.test)("works with percentages", () => {
|
|
12
|
+
(0, vitest_1.expect)((0, index_js_1.getUnitPercentageValue)(100, { type: "percent", value: 1 })).toBe(1);
|
|
13
|
+
(0, vitest_1.expect)((0, index_js_1.getUnitPercentageValue)(100, { type: "percent", value: 0.5 })).toBe(0.5);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
(0, vitest_1.describe)("getCollapsiblePanelForHandleId", () => {
|
|
17
|
+
(0, vitest_1.test)("works with left collapsible panel", () => {
|
|
18
|
+
const actor = (0, xstate_1.createActor)(index_js_1.groupMachine, {
|
|
19
|
+
input: {
|
|
20
|
+
groupId: "group",
|
|
21
|
+
initialItems: [
|
|
22
|
+
(0, index_js_1.initializePanel)({ id: "panel-1", collapsible: true }),
|
|
23
|
+
{
|
|
24
|
+
type: "handle",
|
|
25
|
+
id: "resizer-1",
|
|
26
|
+
size: { type: "pixel", value: 10 },
|
|
27
|
+
},
|
|
28
|
+
(0, index_js_1.initializePanel)({ id: "panel-2" }),
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
}).start();
|
|
32
|
+
(0, vitest_1.expect)((0, index_js_1.getCollapsiblePanelForHandleId)(actor.getSnapshot().context, "resizer-1")
|
|
33
|
+
?.id).toBe("panel-1");
|
|
34
|
+
});
|
|
35
|
+
(0, vitest_1.test)("works with right collapsible panel", () => {
|
|
36
|
+
const actor = (0, xstate_1.createActor)(index_js_1.groupMachine, {
|
|
37
|
+
input: {
|
|
38
|
+
groupId: "group",
|
|
39
|
+
initialItems: [
|
|
40
|
+
(0, index_js_1.initializePanel)({ id: "panel-1" }),
|
|
41
|
+
{
|
|
42
|
+
type: "handle",
|
|
43
|
+
id: "resizer-1",
|
|
44
|
+
size: { type: "pixel", value: 10 },
|
|
45
|
+
},
|
|
46
|
+
(0, index_js_1.initializePanel)({ id: "panel-2", collapsible: true }),
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
}).start();
|
|
50
|
+
(0, vitest_1.expect)((0, index_js_1.getCollapsiblePanelForHandleId)(actor.getSnapshot().context, "resizer-1")
|
|
51
|
+
?.id).toBe("panel-2");
|
|
52
|
+
});
|
|
53
|
+
(0, vitest_1.test)("throws when no items", () => {
|
|
54
|
+
const actor = (0, xstate_1.createActor)(index_js_1.groupMachine, {
|
|
55
|
+
input: {
|
|
56
|
+
groupId: "group",
|
|
57
|
+
initialItems: [],
|
|
58
|
+
},
|
|
59
|
+
}).start();
|
|
60
|
+
(0, vitest_1.expect)(() => (0, index_js_1.getCollapsiblePanelForHandleId)(actor.getSnapshot().context, "resizer-1")).toThrowErrorMatchingInlineSnapshot(`[Error: No items in group]`);
|
|
61
|
+
});
|
|
62
|
+
(0, vitest_1.test)("throws when no collapsible panel", () => {
|
|
63
|
+
const actor = (0, xstate_1.createActor)(index_js_1.groupMachine, {
|
|
64
|
+
input: {
|
|
65
|
+
groupId: "group",
|
|
66
|
+
initialItems: [
|
|
67
|
+
(0, index_js_1.initializePanel)({ id: "panel-1" }),
|
|
68
|
+
{
|
|
69
|
+
type: "handle",
|
|
70
|
+
id: "resizer-1",
|
|
71
|
+
size: { type: "pixel", value: 10 },
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
}).start();
|
|
76
|
+
(0, vitest_1.expect)(() => (0, index_js_1.getCollapsiblePanelForHandleId)(actor.getSnapshot().context, "resizer-1")).toThrowErrorMatchingInlineSnapshot(`[Error: No collapsible panel found for handle: resizer-1]`);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=utils.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.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W,EAAC,uBAAY,EAAE;YACtC,KAAK,EAAE;gBACL,OAAO,EAAE,OAAO;gBAChB,YAAY,EAAE,EAAE;aACjB;SACF,CAAC,CAAC,KAAK,EAAE,CAAC;QAEX,IAAA,eAAM,EAAC,GAAG,EAAE,CACV,IAAA,yCAA8B,EAAC,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,CACzE,CAAC,kCAAkC,CAAC,4BAA4B,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,kCAAkC,EAAE,GAAG,EAAE;QAC5C,MAAM,KAAK,GAAG,IAAA,oBAAW,EAAC,uBAAY,EAAE;YACtC,KAAK,EAAE;gBACL,OAAO,EAAE,OAAO;gBAChB,YAAY,EAAE;oBACZ,IAAA,0BAAe,EAAC,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC;oBAClC;wBACE,IAAI,EAAE,QAAQ;wBACd,EAAE,EAAE,WAAW;wBACf,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;qBACnC;iBACF;aACF;SACF,CAAC,CAAC,KAAK,EAAE,CAAC;QAEX,IAAA,eAAM,EAAC,GAAG,EAAE,CACV,IAAA,yCAA8B,EAAC,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,CACzE,CAAC,kCAAkC,CAClC,2DAA2D,CAC5D,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, test, describe } from \"vitest\";\n\nimport {\n getUnitPercentageValue,\n getCollapsiblePanelForHandleId,\n groupMachine,\n initializePanel,\n} from \"./index.js\";\nimport { createActor } from \"xstate\";\n\ndescribe(\"getUnitPercentageValue\", () => {\n test(\"works with pixels\", () => {\n expect(getUnitPercentageValue(100, { type: \"pixel\", value: 100 })).toBe(1);\n expect(getUnitPercentageValue(100, { type: \"pixel\", value: 50 })).toBe(0.5);\n });\n\n test(\"works with percentages\", () => {\n expect(getUnitPercentageValue(100, { type: \"percent\", value: 1 })).toBe(1);\n expect(getUnitPercentageValue(100, { type: \"percent\", value: 0.5 })).toBe(\n 0.5\n );\n });\n});\n\ndescribe(\"getCollapsiblePanelForHandleId\", () => {\n test(\"works with left collapsible panel\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [\n initializePanel({ id: \"panel-1\", collapsible: true }),\n {\n type: \"handle\",\n id: \"resizer-1\",\n size: { type: \"pixel\", value: 10 },\n },\n initializePanel({ id: \"panel-2\" }),\n ],\n },\n }).start();\n\n expect(\n getCollapsiblePanelForHandleId(actor.getSnapshot().context, \"resizer-1\")\n ?.id\n ).toBe(\"panel-1\");\n });\n\n test(\"works with right collapsible panel\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [\n initializePanel({ id: \"panel-1\" }),\n {\n type: \"handle\",\n id: \"resizer-1\",\n size: { type: \"pixel\", value: 10 },\n },\n initializePanel({ id: \"panel-2\", collapsible: true }),\n ],\n },\n }).start();\n\n expect(\n getCollapsiblePanelForHandleId(actor.getSnapshot().context, \"resizer-1\")\n ?.id\n ).toBe(\"panel-2\");\n });\n\n test(\"throws when no items\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [],\n },\n }).start();\n\n expect(() =>\n getCollapsiblePanelForHandleId(actor.getSnapshot().context, \"resizer-1\")\n ).toThrowErrorMatchingInlineSnapshot(`[Error: No items in group]`);\n });\n\n test(\"throws when no collapsible panel\", () => {\n const actor = createActor(groupMachine, {\n input: {\n groupId: \"group\",\n initialItems: [\n initializePanel({ id: \"panel-1\" }),\n {\n type: \"handle\",\n id: \"resizer-1\",\n size: { type: \"pixel\", value: 10 },\n },\n ],\n },\n }).start();\n\n expect(() =>\n getCollapsiblePanelForHandleId(actor.getSnapshot().context, \"resizer-1\")\n ).toThrowErrorMatchingInlineSnapshot(\n `[Error: No collapsible panel found for handle: resizer-1]`\n );\n });\n});\n"]}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import * as easings from "d3-ease";
|
|
2
|
+
type PixelUnit = `${number}px`;
|
|
3
|
+
type PercentUnit = `${number}%`;
|
|
4
|
+
export type Unit = PixelUnit | PercentUnit;
|
|
5
|
+
type Orientation = "horizontal" | "vertical";
|
|
6
|
+
interface ParsedPercentUnit {
|
|
7
|
+
type: "percent";
|
|
8
|
+
value: number;
|
|
9
|
+
}
|
|
10
|
+
interface ParsedPixelUnit {
|
|
11
|
+
type: "pixel";
|
|
12
|
+
value: number;
|
|
13
|
+
}
|
|
14
|
+
type ParsedUnit = ParsedPercentUnit | ParsedPixelUnit;
|
|
15
|
+
interface MoveMoveEvent {
|
|
16
|
+
shiftKey: boolean;
|
|
17
|
+
ctrlKey: boolean;
|
|
18
|
+
metaKey: boolean;
|
|
19
|
+
altKey: boolean;
|
|
20
|
+
deltaX: number;
|
|
21
|
+
deltaY: number;
|
|
22
|
+
}
|
|
23
|
+
export interface Constraints<T extends ParsedUnit | Unit = ParsedUnit> {
|
|
24
|
+
/** The minimum size of the panel */
|
|
25
|
+
min?: T;
|
|
26
|
+
/** The maximum size of the panel */
|
|
27
|
+
max?: T;
|
|
28
|
+
/** The default size of the panel */
|
|
29
|
+
default?: T;
|
|
30
|
+
/** Whether the panel is collapsible */
|
|
31
|
+
collapsible?: boolean;
|
|
32
|
+
/** Whether the panel should initially render as collapsed */
|
|
33
|
+
defaultCollapsed?: boolean;
|
|
34
|
+
/** The size of the panel once collapsed */
|
|
35
|
+
collapsedSize?: T;
|
|
36
|
+
}
|
|
37
|
+
interface Order {
|
|
38
|
+
/**
|
|
39
|
+
* When dynamically rendering panels/handles you need to add the order prop.
|
|
40
|
+
* This tells the component what place the items should be in once rendered.
|
|
41
|
+
*/
|
|
42
|
+
order?: number;
|
|
43
|
+
}
|
|
44
|
+
export interface PanelData extends Omit<Constraints, "min" | "max" | "collapsedSize">, Required<Pick<Constraints, "min" | "collapsedSize">>, Order {
|
|
45
|
+
max: ParsedUnit | "1fr";
|
|
46
|
+
type: "panel";
|
|
47
|
+
id: string;
|
|
48
|
+
/** Whether the collapsed state is controlled by the consumer or not */
|
|
49
|
+
collapseIsControlled?: boolean;
|
|
50
|
+
/** A ref to the latest "collapseChange" function provided by the user */
|
|
51
|
+
onCollapseChange?: {
|
|
52
|
+
current: ((isCollapsed: boolean) => void) | null | undefined;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* The current value for the item in the grid
|
|
56
|
+
*/
|
|
57
|
+
currentValue: ParsedUnit;
|
|
58
|
+
/** Whether the panel is currently collapsed */
|
|
59
|
+
collapsed: boolean | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The size the panel was before being collapsed.
|
|
62
|
+
* This is used to re-open the panel at the same size.
|
|
63
|
+
* If the panel starts out collapsed it will use the `min`.
|
|
64
|
+
*/
|
|
65
|
+
sizeBeforeCollapse: number | undefined;
|
|
66
|
+
/** Animate the collapse/expand */
|
|
67
|
+
collapseAnimation?: CollapseAnimation | {
|
|
68
|
+
duration: number;
|
|
69
|
+
easing: CollapseAnimation | ((t: number) => number);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
declare const collapseAnimations: {
|
|
73
|
+
"ease-in-out": typeof easings.easeQuadInOut;
|
|
74
|
+
bounce: easings.BackEasingFactory;
|
|
75
|
+
linear: typeof easings.easeLinear;
|
|
76
|
+
};
|
|
77
|
+
type CollapseAnimation = keyof typeof collapseAnimations;
|
|
78
|
+
export interface PanelHandleData extends Order {
|
|
79
|
+
type: "handle";
|
|
80
|
+
id: string;
|
|
81
|
+
/**
|
|
82
|
+
* The size of the panel handle.
|
|
83
|
+
* Needed to correctly calculate the percentage of modified panels.
|
|
84
|
+
*/
|
|
85
|
+
size: ParsedPixelUnit;
|
|
86
|
+
}
|
|
87
|
+
export type Item = PanelData | PanelHandleData;
|
|
88
|
+
interface RegisterPanelEvent {
|
|
89
|
+
/** Register a new panel with the state machine */
|
|
90
|
+
type: "registerPanel";
|
|
91
|
+
data: Omit<PanelData, "type" | "currentValue" | "defaultCollapsed">;
|
|
92
|
+
}
|
|
93
|
+
interface RegisterDynamicPanelEvent extends Omit<RegisterPanelEvent, "type"> {
|
|
94
|
+
/** Register a new panel with the state machine */
|
|
95
|
+
type: "registerDynamicPanel";
|
|
96
|
+
}
|
|
97
|
+
interface UnregisterPanelEvent {
|
|
98
|
+
/** Remove a panel from the state machine */
|
|
99
|
+
type: "unregisterPanel";
|
|
100
|
+
id: string;
|
|
101
|
+
}
|
|
102
|
+
export type InitializePanelHandleData = Omit<PanelHandleData, "type">;
|
|
103
|
+
interface RegisterPanelHandleEvent {
|
|
104
|
+
/** Register a new panel handle with the state machine */
|
|
105
|
+
type: "registerPanelHandle";
|
|
106
|
+
data: InitializePanelHandleData;
|
|
107
|
+
}
|
|
108
|
+
interface UnregisterPanelHandleEvent {
|
|
109
|
+
/** Remove a panel handle from the state machine */
|
|
110
|
+
type: "unregisterPanelHandle";
|
|
111
|
+
id: string;
|
|
112
|
+
}
|
|
113
|
+
interface DragHandleStartEvent {
|
|
114
|
+
/** Start a drag interaction */
|
|
115
|
+
type: "dragHandleStart";
|
|
116
|
+
/** The handle being interacted with */
|
|
117
|
+
handleId: string;
|
|
118
|
+
}
|
|
119
|
+
interface DragHandleEvent {
|
|
120
|
+
/** Update the layout according to how the handle moved */
|
|
121
|
+
type: "dragHandle";
|
|
122
|
+
/** The handle being interacted with */
|
|
123
|
+
handleId: string;
|
|
124
|
+
value: MoveMoveEvent;
|
|
125
|
+
}
|
|
126
|
+
interface DragHandleEndEvent {
|
|
127
|
+
/** End a drag interaction */
|
|
128
|
+
type: "dragHandleEnd";
|
|
129
|
+
/** The handle being interacted with */
|
|
130
|
+
handleId: string;
|
|
131
|
+
}
|
|
132
|
+
export interface Rect {
|
|
133
|
+
width: number;
|
|
134
|
+
height: number;
|
|
135
|
+
}
|
|
136
|
+
interface SetSizeEvent {
|
|
137
|
+
/** Set the size of the whole group */
|
|
138
|
+
type: "setSize";
|
|
139
|
+
size: Rect;
|
|
140
|
+
}
|
|
141
|
+
interface SetActualItemsSizeEvent {
|
|
142
|
+
/** Set the size of the whole group */
|
|
143
|
+
type: "setActualItemsSize";
|
|
144
|
+
childrenSizes: Record<string, Rect>;
|
|
145
|
+
}
|
|
146
|
+
interface ApplyDeltaEvent {
|
|
147
|
+
type: "applyDelta";
|
|
148
|
+
delta: number;
|
|
149
|
+
handleId: string;
|
|
150
|
+
}
|
|
151
|
+
interface SetOrientationEvent {
|
|
152
|
+
/** Set the orientation of the group */
|
|
153
|
+
type: "setOrientation";
|
|
154
|
+
orientation: Orientation;
|
|
155
|
+
}
|
|
156
|
+
interface ControlledCollapseToggle {
|
|
157
|
+
/**
|
|
158
|
+
* This is used to react to the controlled panel "collapse" prop updating.
|
|
159
|
+
* This will force an update to be applied and skip calling the user's `onCollapseChanged`
|
|
160
|
+
*/
|
|
161
|
+
controlled?: boolean;
|
|
162
|
+
}
|
|
163
|
+
interface CollapsePanelEvent extends ControlledCollapseToggle {
|
|
164
|
+
/** Collapse a panel */
|
|
165
|
+
type: "collapsePanel";
|
|
166
|
+
/** The panel to collapse */
|
|
167
|
+
panelId: string;
|
|
168
|
+
}
|
|
169
|
+
interface ExpandPanelEvent extends ControlledCollapseToggle {
|
|
170
|
+
/** Expand a panel */
|
|
171
|
+
type: "expandPanel";
|
|
172
|
+
/** The panel to expand */
|
|
173
|
+
panelId: string;
|
|
174
|
+
}
|
|
175
|
+
interface SetPanelPixelSizeEvent {
|
|
176
|
+
/**
|
|
177
|
+
* This event is used by the imperative panel API.
|
|
178
|
+
* With this the user can set the panel's size to an explicit value.
|
|
179
|
+
* This is done by faking interaction with the handles so min/max will still
|
|
180
|
+
* be respected.
|
|
181
|
+
*/
|
|
182
|
+
type: "setPanelPixelSize";
|
|
183
|
+
/** The panel to apply the size to */
|
|
184
|
+
panelId: string;
|
|
185
|
+
/** The size to apply to the panel */
|
|
186
|
+
size: Unit;
|
|
187
|
+
}
|
|
188
|
+
export interface GroupMachineContextValue {
|
|
189
|
+
/** The items in the group */
|
|
190
|
+
items: Array<Item>;
|
|
191
|
+
/** The available space in the group */
|
|
192
|
+
size: Rect;
|
|
193
|
+
/** The orientation of the grid */
|
|
194
|
+
orientation: Orientation;
|
|
195
|
+
/** How much the drag has overshot the handle */
|
|
196
|
+
dragOvershoot: number;
|
|
197
|
+
/** An id to use for autosaving the layout */
|
|
198
|
+
autosaveId?: string;
|
|
199
|
+
groupId: string;
|
|
200
|
+
}
|
|
201
|
+
export type GroupMachineEvent = RegisterPanelEvent | RegisterDynamicPanelEvent | UnregisterPanelEvent | RegisterPanelHandleEvent | UnregisterPanelHandleEvent | DragHandleEvent | SetSizeEvent | SetOrientationEvent | DragHandleStartEvent | DragHandleEndEvent | CollapsePanelEvent | ExpandPanelEvent | SetPanelPixelSizeEvent | ApplyDeltaEvent | SetActualItemsSizeEvent;
|
|
202
|
+
/** Determine if an item is a panel */
|
|
203
|
+
export declare function isPanelData(value: unknown): value is PanelData;
|
|
204
|
+
/** Determine if an item is a panel handle */
|
|
205
|
+
export declare function isPanelHandle(value: unknown): value is PanelHandleData;
|
|
206
|
+
interface InitializePanelOptions {
|
|
207
|
+
min?: Unit;
|
|
208
|
+
max?: Unit;
|
|
209
|
+
default?: Unit;
|
|
210
|
+
collapsible?: boolean;
|
|
211
|
+
collapsed?: boolean;
|
|
212
|
+
collapsedSize?: Unit;
|
|
213
|
+
onCollapseChange?: {
|
|
214
|
+
current: ((isCollapsed: boolean) => void) | null | undefined;
|
|
215
|
+
};
|
|
216
|
+
collapseAnimation?: PanelData["collapseAnimation"];
|
|
217
|
+
defaultCollapsed?: boolean;
|
|
218
|
+
id?: string;
|
|
219
|
+
}
|
|
220
|
+
type InitializePanelOptionsWithId = InitializePanelOptions & {
|
|
221
|
+
id: string;
|
|
222
|
+
};
|
|
223
|
+
export declare function initializePanel(item: InitializePanelOptionsWithId): PanelData;
|
|
224
|
+
export declare function initializePanel(item: InitializePanelOptions): Omit<PanelData, "id">;
|
|
225
|
+
/** Parse a `Unit` string or `clamp` value */
|
|
226
|
+
export declare function parseUnit(unit: Unit | "1fr"): ParsedUnit;
|
|
227
|
+
/** Convert a `Unit` to a percentage of the group size */
|
|
228
|
+
export declare function getUnitPercentageValue(groupsSize: number, unit: ParsedUnit): number;
|
|
229
|
+
export declare function getGroupSize(context: GroupMachineContextValue): number;
|
|
230
|
+
/** Get the size of a panel in pixels */
|
|
231
|
+
export declare function getUnitPixelValue(context: GroupMachineContextValue, unit: ParsedUnit | "1fr"): number;
|
|
232
|
+
/** Get a panel with a particular ID. */
|
|
233
|
+
export declare function getPanelWithId(context: GroupMachineContextValue, panelId: string): PanelData;
|
|
234
|
+
/**
|
|
235
|
+
* Get the panel that's collapsible next to a resize handle.
|
|
236
|
+
* Will first check the left panel then the right.
|
|
237
|
+
*/
|
|
238
|
+
export declare function getCollapsiblePanelForHandleId(context: GroupMachineContextValue, handleId: string): PanelData;
|
|
239
|
+
/** Build the grid template from the item values. */
|
|
240
|
+
export declare function buildTemplate(context: GroupMachineContextValue): string;
|
|
241
|
+
/**
|
|
242
|
+
* This is the main meat of the layout logic.
|
|
243
|
+
* It's responsible for figuring out how to distribute the space
|
|
244
|
+
* amongst the panels.
|
|
245
|
+
*
|
|
246
|
+
* It's built around applying small deltas to panels relative to their
|
|
247
|
+
* the resize handles.
|
|
248
|
+
*
|
|
249
|
+
* As much as possible we try to rely on the browser to do the layout.
|
|
250
|
+
* During the initial layout we rely on CSS grid and a group might be
|
|
251
|
+
* defined like this:
|
|
252
|
+
*
|
|
253
|
+
* ```css
|
|
254
|
+
* grid-template-columns: minmax(100px, 1fr) 1px minmax(100px, 300px);
|
|
255
|
+
* ```
|
|
256
|
+
*
|
|
257
|
+
* Without any resizing this is nice and simple and the components don't do much.
|
|
258
|
+
*
|
|
259
|
+
* Once the user starts resizing the layout will be more complex.
|
|
260
|
+
*
|
|
261
|
+
* It's broken down into 3 phases:
|
|
262
|
+
*
|
|
263
|
+
* 1. `prepareItems` - The size of the group has been measure and we
|
|
264
|
+
* can convert all the panel sizes into pixels. Converting into pixels
|
|
265
|
+
* makes doing the math for the updates easier.
|
|
266
|
+
*
|
|
267
|
+
* ```css
|
|
268
|
+
* grid-template-columns: 500px 1px 300px;
|
|
269
|
+
* ```
|
|
270
|
+
*
|
|
271
|
+
* 2. `updateLayout` - This is where the actual updates are applied.
|
|
272
|
+
* This is where the user's drag interactions are applied. We also
|
|
273
|
+
* use this to collapse/expand panels by simulating a drag interaction.
|
|
274
|
+
*
|
|
275
|
+
* ```css
|
|
276
|
+
* grid-template-columns: 490px 1px 310px;
|
|
277
|
+
* ```
|
|
278
|
+
*
|
|
279
|
+
* 3. `commitLayout` - Once the updates have been applied we convert the
|
|
280
|
+
* updated sizes back into a format that allows for easy resizing without
|
|
281
|
+
* lots of updates.
|
|
282
|
+
*
|
|
283
|
+
* ```css
|
|
284
|
+
* grid-template-columns: minmax(100px, min(calc(0.06117 * (100% - 1px)), 100%)) 1px minmax(100px, min(calc(0.0387 * (100% - 1px)), 300px));
|
|
285
|
+
* ```
|
|
286
|
+
*
|
|
287
|
+
* When another update loop is triggered the above template will be converted back to pixels.
|
|
288
|
+
*/
|
|
289
|
+
/** Converts the items to pixels */
|
|
290
|
+
export declare function prepareItems(context: GroupMachineContextValue): Item[];
|
|
291
|
+
/** Converts the items to percentages */
|
|
292
|
+
export declare function commitLayout(context: GroupMachineContextValue): Item[];
|
|
293
|
+
export declare function dragHandlePayload({ delta, orientation, shiftKey, }: {
|
|
294
|
+
delta: number;
|
|
295
|
+
orientation: Orientation;
|
|
296
|
+
shiftKey?: boolean;
|
|
297
|
+
}): {
|
|
298
|
+
readonly type: "move";
|
|
299
|
+
readonly pointerType: "keyboard";
|
|
300
|
+
readonly shiftKey: boolean;
|
|
301
|
+
readonly ctrlKey: false;
|
|
302
|
+
readonly altKey: false;
|
|
303
|
+
readonly metaKey: false;
|
|
304
|
+
readonly deltaX: number;
|
|
305
|
+
readonly deltaY: number;
|
|
306
|
+
};
|
|
307
|
+
export declare const groupMachine: import("xstate").StateMachine<GroupMachineContextValue, RegisterPanelEvent | RegisterDynamicPanelEvent | UnregisterPanelEvent | RegisterPanelHandleEvent | UnregisterPanelHandleEvent | DragHandleStartEvent | DragHandleEvent | DragHandleEndEvent | SetSizeEvent | SetActualItemsSizeEvent | ApplyDeltaEvent | SetOrientationEvent | CollapsePanelEvent | ExpandPanelEvent | SetPanelPixelSizeEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").ProvidedActor, import("xstate").ParameterizedObject, import("xstate").ParameterizedObject, string, import("xstate").StateValue, string, {
|
|
308
|
+
autosaveId?: string;
|
|
309
|
+
orientation?: Orientation;
|
|
310
|
+
groupId: string;
|
|
311
|
+
initialItems?: Item[];
|
|
312
|
+
}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, any>;
|
|
313
|
+
export {};
|
|
314
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAWnC,KAAK,SAAS,GAAG,GAAG,MAAM,IAAI,CAAC;AAC/B,KAAK,WAAW,GAAG,GAAG,MAAM,GAAG,CAAC;AAChC,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,WAAW,CAAC;AAC3C,KAAK,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAE7C,UAAU,iBAAiB;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,KAAK,UAAU,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAUtD,UAAU,aAAa;IACrB,QAAQ,EAAE,OAAO,CAAC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