@motionscript/layout-grid 0.0.0-stage → 0.1.0-alpha.0

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.
Files changed (132) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +201 -0
  3. package/dist/browser/chunks/chunk-PB3E5HQV.js +2 -0
  4. package/dist/browser/chunks/chunk-PB3E5HQV.js.map +7 -0
  5. package/dist/browser/index.js +2 -0
  6. package/dist/browser/index.js.map +7 -0
  7. package/dist/browser/kit.js +2 -0
  8. package/dist/browser/kit.js.map +7 -0
  9. package/dist/browser/manifest.json +12 -0
  10. package/dist/engine.d.ts +13 -0
  11. package/dist/engine.d.ts.map +1 -0
  12. package/dist/engine.js +13 -0
  13. package/dist/engine.js.map +1 -0
  14. package/dist/index.d.ts +7 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +7 -0
  17. package/dist/index.js.map +1 -0
  18. package/dist/kit/index.d.ts +7 -0
  19. package/dist/kit/index.d.ts.map +1 -0
  20. package/dist/kit/index.js +7 -0
  21. package/dist/kit/index.js.map +1 -0
  22. package/dist/kit/item-effects.d.ts +37 -0
  23. package/dist/kit/item-effects.d.ts.map +1 -0
  24. package/dist/kit/item-effects.js +76 -0
  25. package/dist/kit/item-effects.js.map +1 -0
  26. package/dist/kit/layout-grid.d.ts +243 -0
  27. package/dist/kit/layout-grid.d.ts.map +1 -0
  28. package/dist/kit/layout-grid.js +542 -0
  29. package/dist/kit/layout-grid.js.map +1 -0
  30. package/dist/kit/order.d.ts +13 -0
  31. package/dist/kit/order.d.ts.map +1 -0
  32. package/dist/kit/order.js +43 -0
  33. package/dist/kit/order.js.map +1 -0
  34. package/dist/kit/random.d.ts +7 -0
  35. package/dist/kit/random.d.ts.map +1 -0
  36. package/dist/kit/random.js +29 -0
  37. package/dist/kit/random.js.map +1 -0
  38. package/dist/kit/slots/index.d.ts +22 -0
  39. package/dist/kit/slots/index.d.ts.map +1 -0
  40. package/dist/kit/slots/index.js +28 -0
  41. package/dist/kit/slots/index.js.map +1 -0
  42. package/dist/kit/slots/path-templates.d.ts +15 -0
  43. package/dist/kit/slots/path-templates.d.ts.map +1 -0
  44. package/dist/kit/slots/path-templates.js +113 -0
  45. package/dist/kit/slots/path-templates.js.map +1 -0
  46. package/dist/kit/slots/path.d.ts +45 -0
  47. package/dist/kit/slots/path.d.ts.map +1 -0
  48. package/dist/kit/slots/path.js +87 -0
  49. package/dist/kit/slots/path.js.map +1 -0
  50. package/dist/kit/slots/radial.d.ts +30 -0
  51. package/dist/kit/slots/radial.d.ts.map +1 -0
  52. package/dist/kit/slots/radial.js +45 -0
  53. package/dist/kit/slots/radial.js.map +1 -0
  54. package/dist/kit/slots/rectangular.d.ts +42 -0
  55. package/dist/kit/slots/rectangular.d.ts.map +1 -0
  56. package/dist/kit/slots/rectangular.js +79 -0
  57. package/dist/kit/slots/rectangular.js.map +1 -0
  58. package/dist/kit/slots/slot.d.ts +62 -0
  59. package/dist/kit/slots/slot.d.ts.map +1 -0
  60. package/dist/kit/slots/slot.js +41 -0
  61. package/dist/kit/slots/slot.js.map +1 -0
  62. package/dist/kit/slots/sphere.d.ts +36 -0
  63. package/dist/kit/slots/sphere.d.ts.map +1 -0
  64. package/dist/kit/slots/sphere.js +68 -0
  65. package/dist/kit/slots/sphere.js.map +1 -0
  66. package/dist/kit/stagger.d.ts +24 -0
  67. package/dist/kit/stagger.d.ts.map +1 -0
  68. package/dist/kit/stagger.js +90 -0
  69. package/dist/kit/stagger.js.map +1 -0
  70. package/dist/nodes.d.ts +15 -0
  71. package/dist/nodes.d.ts.map +1 -0
  72. package/dist/nodes.js +15 -0
  73. package/dist/nodes.js.map +1 -0
  74. package/dist/path-grid/index.d.ts +2 -0
  75. package/dist/path-grid/index.d.ts.map +1 -0
  76. package/dist/path-grid/index.js +2 -0
  77. package/dist/path-grid/index.js.map +1 -0
  78. package/dist/path-grid/path-grid.d.ts +82 -0
  79. package/dist/path-grid/path-grid.d.ts.map +1 -0
  80. package/dist/path-grid/path-grid.js +192 -0
  81. package/dist/path-grid/path-grid.js.map +1 -0
  82. package/dist/radial-grid/index.d.ts +2 -0
  83. package/dist/radial-grid/index.d.ts.map +1 -0
  84. package/dist/radial-grid/index.js +2 -0
  85. package/dist/radial-grid/index.js.map +1 -0
  86. package/dist/radial-grid/radial-grid.d.ts +51 -0
  87. package/dist/radial-grid/radial-grid.d.ts.map +1 -0
  88. package/dist/radial-grid/radial-grid.js +95 -0
  89. package/dist/radial-grid/radial-grid.js.map +1 -0
  90. package/dist/rectangular-grid/index.d.ts +2 -0
  91. package/dist/rectangular-grid/index.d.ts.map +1 -0
  92. package/dist/rectangular-grid/index.js +2 -0
  93. package/dist/rectangular-grid/index.js.map +1 -0
  94. package/dist/rectangular-grid/rectangular-grid.d.ts +79 -0
  95. package/dist/rectangular-grid/rectangular-grid.d.ts.map +1 -0
  96. package/dist/rectangular-grid/rectangular-grid.js +156 -0
  97. package/dist/rectangular-grid/rectangular-grid.js.map +1 -0
  98. package/dist/sphere-grid/index.d.ts +2 -0
  99. package/dist/sphere-grid/index.d.ts.map +1 -0
  100. package/dist/sphere-grid/index.js +2 -0
  101. package/dist/sphere-grid/index.js.map +1 -0
  102. package/dist/sphere-grid/sphere-grid.d.ts +68 -0
  103. package/dist/sphere-grid/sphere-grid.d.ts.map +1 -0
  104. package/dist/sphere-grid/sphere-grid.js +149 -0
  105. package/dist/sphere-grid/sphere-grid.js.map +1 -0
  106. package/package.json +69 -3
  107. package/registry.json +32 -0
  108. package/src/engine.ts +12 -0
  109. package/src/index.ts +6 -0
  110. package/src/kit/index.ts +6 -0
  111. package/src/kit/item-effects.ts +114 -0
  112. package/src/kit/layout-grid.ts +605 -0
  113. package/src/kit/order.ts +41 -0
  114. package/src/kit/random.ts +29 -0
  115. package/src/kit/slots/index.ts +39 -0
  116. package/src/kit/slots/path-templates.ts +120 -0
  117. package/src/kit/slots/path.ts +120 -0
  118. package/src/kit/slots/radial.ts +62 -0
  119. package/src/kit/slots/rectangular.ts +108 -0
  120. package/src/kit/slots/slot.ts +82 -0
  121. package/src/kit/slots/sphere.ts +94 -0
  122. package/src/kit/stagger.ts +96 -0
  123. package/src/nodes.ts +15 -0
  124. package/src/path-grid/index.ts +1 -0
  125. package/src/path-grid/path-grid.ts +213 -0
  126. package/src/radial-grid/index.ts +1 -0
  127. package/src/radial-grid/radial-grid.ts +90 -0
  128. package/src/rectangular-grid/index.ts +1 -0
  129. package/src/rectangular-grid/rectangular-grid.ts +160 -0
  130. package/src/sphere-grid/index.ts +1 -0
  131. package/src/sphere-grid/sphere-grid.ts +143 -0
  132. package/README.md +0 -4
@@ -0,0 +1,156 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { command, easeInOut, node, property, } from "@motionscript/core";
8
+ import { CELL_MODES, contentBoxOf, FILL_DIRECTIONS, LINE_ALIGNS, LayoutGrid, rectangularCell, staggerArgs, TRANSITION_STAGGER, } from "../kit/index.js";
9
+ /**
10
+ * Children in rows and columns — the grid the other three are variations on.
11
+ *
12
+ * Cells are as big as the largest child (`fit`), a size of their own
13
+ * (`fixed`), or an equal share of the node's box (`fill`), which is also the
14
+ * room a child set to fill grows into. Shift every other row by half a cell
15
+ * for a brick bond or a hex pack.
16
+ */
17
+ let RectangularGrid = class RectangularGrid extends LayoutGrid {
18
+ constructor(props) {
19
+ super(props);
20
+ }
21
+ /** Re-flow the items into `columns` columns, each moving to its new cell. */
22
+ columnsTo(args) {
23
+ const columns = Math.max(1, Math.round(args.data?.columns ?? this.columns));
24
+ return this._transitionTo({ columns }, args);
25
+ }
26
+ /** Animate the spacing between columns and rows. */
27
+ gapTo(args) {
28
+ const data = {};
29
+ if (args.data?.columnGap !== undefined)
30
+ data.columnGap = args.data.columnGap;
31
+ if (args.data?.rowGap !== undefined)
32
+ data.rowGap = args.data.rowGap;
33
+ return this.to({ data, duration: args.duration, easing: args.easing });
34
+ }
35
+ /**
36
+ * Animate the cell size, from whatever the cells measure now. The grid
37
+ * switches to `fixed` cells as it starts, since a size of its own is what
38
+ * `fixed` means.
39
+ */
40
+ cellSizeTo(args) {
41
+ const sizes = this._itemSizes();
42
+ const from = rectangularCell(this.arrangementFor(), sizes.length, sizes, contentBoxOf(this));
43
+ const width = args.data?.cellWidth ?? from.width;
44
+ const height = args.data?.cellHeight ?? from.height;
45
+ return this.command((t) => ({
46
+ cellMode: "fixed",
47
+ cellWidth: from.width + (width - from.width) * t,
48
+ cellHeight: from.height + (height - from.height) * t,
49
+ }), args.duration, args.easing ?? easeInOut("cubic"));
50
+ }
51
+ /** Bring one row (from 0 at the top) forward and push the rest back. */
52
+ focusRow(args) {
53
+ const slots = this._itemSlots();
54
+ const row = Math.round(args.data?.row ?? 0);
55
+ return this._focusOn((i) => slots[i]?.meta.kind === "rectangular" && slots[i].meta.row === row, slots.length, args);
56
+ }
57
+ /** Bring one column (from 0 at the left) forward and push the rest back. */
58
+ focusColumn(args) {
59
+ const slots = this._itemSlots();
60
+ const column = Math.round(args.data?.column ?? 0);
61
+ return this._focusOn((i) => slots[i]?.meta.kind === "rectangular" && slots[i].meta.column === column, slots.length, args);
62
+ }
63
+ arrangementFor() {
64
+ return {
65
+ kind: "rectangular",
66
+ columns: this.columns,
67
+ fillDirection: this.fillDirection,
68
+ cellMode: this.cellMode,
69
+ cellWidth: this.cellWidth,
70
+ cellHeight: this.cellHeight,
71
+ columnGap: this.columnGap,
72
+ rowGap: this.rowGap,
73
+ lastLineAlign: this.lastLineAlign,
74
+ rowOffset: this.rowOffset,
75
+ columnOffset: this.columnOffset,
76
+ };
77
+ }
78
+ /** A child set to fill takes its cell, where the cell is not simply the largest child. */
79
+ itemSpace(count, space) {
80
+ if (this.cellMode === "fit")
81
+ return space;
82
+ return rectangularCell(this.arrangementFor(), count, [], space);
83
+ }
84
+ };
85
+ __decorate([
86
+ property({ default: 3, min: 1, step: 1 })
87
+ ], RectangularGrid.prototype, "columns", void 0);
88
+ __decorate([
89
+ property({ default: "row", kind: "enum", options: FILL_DIRECTIONS })
90
+ ], RectangularGrid.prototype, "fillDirection", void 0);
91
+ __decorate([
92
+ property({ default: "fit", kind: "enum", options: CELL_MODES })
93
+ ], RectangularGrid.prototype, "cellMode", void 0);
94
+ __decorate([
95
+ property({ default: 120, min: 0, step: 1 })
96
+ ], RectangularGrid.prototype, "cellWidth", void 0);
97
+ __decorate([
98
+ property({ default: 120, min: 0, step: 1 })
99
+ ], RectangularGrid.prototype, "cellHeight", void 0);
100
+ __decorate([
101
+ property({ default: 24, step: 1 })
102
+ ], RectangularGrid.prototype, "columnGap", void 0);
103
+ __decorate([
104
+ property({ default: 24, step: 1 })
105
+ ], RectangularGrid.prototype, "rowGap", void 0);
106
+ __decorate([
107
+ property({ default: "start", kind: "enum", options: LINE_ALIGNS })
108
+ ], RectangularGrid.prototype, "lastLineAlign", void 0);
109
+ __decorate([
110
+ property({ default: 0, min: -1, max: 1, step: 0.05 })
111
+ ], RectangularGrid.prototype, "rowOffset", void 0);
112
+ __decorate([
113
+ property({ default: 0, min: -1, max: 1, step: 0.05 })
114
+ ], RectangularGrid.prototype, "columnOffset", void 0);
115
+ __decorate([
116
+ command({ args: [{ key: "columns", min: 1, step: 1, default: 4 }, ...staggerArgs(TRANSITION_STAGGER)] })
117
+ ], RectangularGrid.prototype, "columnsTo", null);
118
+ __decorate([
119
+ command({ args: [{ key: "columnGap", default: 48 }, { key: "rowGap", default: 48 }] })
120
+ ], RectangularGrid.prototype, "gapTo", null);
121
+ __decorate([
122
+ command({ args: [{ key: "cellWidth", min: 0, default: 160 }, { key: "cellHeight", min: 0, default: 160 }] })
123
+ ], RectangularGrid.prototype, "cellSizeTo", null);
124
+ __decorate([
125
+ command({
126
+ args: [
127
+ { key: "row", min: 0, step: 1, default: 0 },
128
+ { key: "dim", min: 0, max: 1, step: 0.05, default: 0.7 },
129
+ { key: "grow", min: 0, max: 1, step: 0.05, default: 0.1 },
130
+ ],
131
+ })
132
+ ], RectangularGrid.prototype, "focusRow", null);
133
+ __decorate([
134
+ command({
135
+ args: [
136
+ { key: "column", min: 0, step: 1, default: 0 },
137
+ { key: "dim", min: 0, max: 1, step: 0.05, default: 0.7 },
138
+ { key: "grow", min: 0, max: 1, step: 0.05, default: 0.1 },
139
+ ],
140
+ })
141
+ ], RectangularGrid.prototype, "focusColumn", null);
142
+ RectangularGrid = __decorate([
143
+ node({
144
+ key: "rectangularGrid",
145
+ parentKey: "node",
146
+ forkable: true,
147
+ layout: {
148
+ children: "grid",
149
+ acceptsChildren: true,
150
+ defaultWidthMode: "hug",
151
+ defaultHeightMode: "hug",
152
+ },
153
+ })
154
+ ], RectangularGrid);
155
+ export { RectangularGrid };
156
+ //# sourceMappingURL=rectangular-grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rectangular-grid.js","sourceRoot":"","sources":["../../src/rectangular-grid/rectangular-grid.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,OAAO,EACP,SAAS,EACT,IAAI,EACJ,QAAQ,GAKT,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EACL,UAAU,EACV,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,EACV,eAAe,EACf,WAAW,EACX,kBAAkB,GAOnB,MAAM,QAAQ,CAAA;AAef;;;;;;;GAOG;AAYI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAgC;IAYnE,YAAY,KAAyD;QACnE,KAAK,CAAC,KAAK,CAAC,CAAA;IACd,CAAC;IAED,6EAA6E;IAE7E,SAAS,CAAC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gs,\n type NodeConfig,\n type Size2D,\n} from \"@motionscript/core\"\n\nimport {\n CELL_MODES,\n contentBoxOf,\n FILL_DIRECTIONS,\n LINE_ALIGNS,\n LayoutGrid,\n rectangularCell,\n staggerArgs,\n TRANSITION_STAGGER,\n type CellMode,\n type FillDirection,\n type LayoutGridProps,\n type LineAlign,\n type RectangularArrangement,\n type StaggerArgs,\n} from \"../kit\"\n\nexport interface RectangularGridProps extends LayoutGridProps {\n columns: number\n fillDirection: FillDirection\n cellMode: CellMode\n cellWidth: number\n cellHeight: number\n columnGap: number\n rowGap: number\n lastLineAlign: LineAlign\n rowOffset: number\n columnOffset: number\n}\n\n/**\n * Children in rows and columns — the grid the other three are variations on.\n *\n * Cells are as big as the largest child (`fit`), a size of their own\n * (`fixed`), or an equal share of the node's box (`fill`), which is also the\n * room a child set to fill grows into. Shift every other row by half a cell\n * for a brick bond or a hex pack.\n */\n@node({\n key: \"rectangularGrid\",\n parentKey: \"node\",\n forkable: true,\n layout: {\n children: \"grid\",\n acceptsChildren: true,\n defaultWidthMode: \"hug\",\n defaultHeightMode: \"hug\",\n },\n})\nexport class RectangularGrid extends LayoutGrid<RectangularGridProps> {\n @property({ default: 3, min: 1, step: 1 }) declare columns: number\n @property({ default: \"row\", kind: \"enum\", options: FILL_DIRECTIONS }) declare fillDirection: FillDirection\n @property({ default: \"fit\", kind: \"enum\", options: CELL_MODES }) declare cellMode: CellMode\n @property({ default: 120, min: 0, step: 1 }) declare cellWidth: number\n @property({ default: 120, min: 0, step: 1 }) declare cellHeight: number\n @property({ default: 24, step: 1 }) declare columnGap: number\n @property({ default: 24, step: 1 }) declare rowGap: number\n @property({ default: \"start\", kind: \"enum\", options: LINE_ALIGNS }) declare lastLineAlign: LineAlign\n @property({ default: 0, min: -1, max: 1, step: 0.05 }) declare rowOffset: number\n @property({ default: 0, min: -1, max: 1, step: 0.05 }) declare columnOffset: number\n\n constructor(props?: NodeConfig<RectangularGrid, RectangularGridProps>) {\n super(props)\n }\n\n /** Re-flow the items into `columns` columns, each moving to its new cell. */\n @command({ args: [{ key: \"columns\", min: 1, step: 1, default: 4 }, ...staggerArgs(TRANSITION_STAGGER)] })\n columnsTo(args: CommandArgs<{ columns: number } & StaggerArgs> & { duration: number }): Command<RectangularGridProps> {\n const columns = Math.max(1, Math.round(args.data?.columns ?? this.columns))\n return this._transitionTo({ columns }, args)\n }\n\n /** Animate the spacing between columns and rows. */\n @command({ args: [{ key: \"columnGap\", default: 48 }, { key: \"rowGap\", default: 48 }] })\n gapTo(args: CommandArgs<{ columnGap?: number; rowGap?: number }> & { duration: number }): Command<RectangularGridProps> {\n const data: Partial<RectangularGridProps> = {}\n if (args.data?.columnGap !== undefined) data.columnGap = args.data.columnGap\n if (args.data?.rowGap !== undefined) data.rowGap = args.data.rowGap\n return this.to({ data, duration: args.duration, easing: args.easing })\n }\n\n /**\n * Animate the cell size, from whatever the cells measure now. The grid\n * switches to `fixed` cells as it starts, since a size of its own is what\n * `fixed` means.\n */\n @command({ args: [{ key: \"cellWidth\", min: 0, default: 160 }, { key: \"cellHeight\", min: 0, default: 160 }] })\n cellSizeTo(args: CommandArgs<{ cellWidth?: number; cellHeight?: number }> & { duration: number }): Command<RectangularGridProps> {\n const sizes = this._itemSizes()\n const from = rectangularCell(this.arrangementFor(), sizes.length, sizes, contentBoxOf(this))\n const width = args.data?.cellWidth ?? from.width\n const height = args.data?.cellHeight ?? from.height\n return this.command<RectangularGridProps>((t) => ({\n cellMode: \"fixed\",\n cellWidth: from.width + (width - from.width) * t,\n cellHeight: from.height + (height - from.height) * t,\n }), args.duration, args.easing ?? easeInOut(\"cubic\"))\n }\n\n /** Bring one row (from 0 at the top) forward and push the rest back. */\n @command({\n args: [\n { key: \"row\", min: 0, step: 1, default: 0 },\n { key: \"dim\", min: 0, max: 1, step: 0.05, default: 0.7 },\n { key: \"grow\", min: 0, max: 1, step: 0.05, default: 0.1 },\n ],\n })\n focusRow(args: CommandArgs<{ row?: number; dim?: number; grow?: number }> & { duration: number }): Command<LayoutGridProps> {\n const slots = this._itemSlots()\n const row = Math.round(args.data?.row ?? 0)\n return this._focusOn((i) => slots[i]?.meta.kind === \"rectangular\" && slots[i].meta.row === row, slots.length, args)\n }\n\n /** Bring one column (from 0 at the left) forward and push the rest back. */\n @command({\n args: [\n { key: \"column\", min: 0, step: 1, default: 0 },\n { key: \"dim\", min: 0, max: 1, step: 0.05, default: 0.7 },\n { key: \"grow\", min: 0, max: 1, step: 0.05, default: 0.1 },\n ],\n })\n focusColumn(args: CommandArgs<{ column?: number; dim?: number; grow?: number }> & { duration: number }): Command<LayoutGridProps> {\n const slots = this._itemSlots()\n const column = Math.round(args.data?.column ?? 0)\n return this._focusOn((i) => slots[i]?.meta.kind === \"rectangular\" && slots[i].meta.column === column, slots.length, args)\n }\n\n protected override arrangementFor(): RectangularArrangement {\n return {\n kind: \"rectangular\",\n columns: this.columns,\n fillDirection: this.fillDirection,\n cellMode: this.cellMode,\n cellWidth: this.cellWidth,\n cellHeight: this.cellHeight,\n columnGap: this.columnGap,\n rowGap: this.rowGap,\n lastLineAlign: this.lastLineAlign,\n rowOffset: this.rowOffset,\n columnOffset: this.columnOffset,\n }\n }\n\n /** A child set to fill takes its cell, where the cell is not simply the largest child. */\n protected override itemSpace(count: number, space: Size2D): Size2D {\n if (this.cellMode === \"fit\") return space\n return rectangularCell(this.arrangementFor(), count, [], space)\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from "./sphere-grid.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sphere-grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from "./sphere-grid.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sphere-grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA","sourcesContent":["export * from \"./sphere-grid\"\n"]}
@@ -0,0 +1,68 @@
1
+ import { type Command, type CommandArgs, type NodeConfig } from "@motionscript/core";
2
+ import { LayoutGrid, type LayoutGridProps, type SphereArrangement, type SphereAxis, type SphereFacing } from "../kit/index.js";
3
+ export interface SphereGridProps extends LayoutGridProps {
4
+ radius: number;
5
+ yaw: number;
6
+ pitch: number;
7
+ roll: number;
8
+ facing: SphereFacing;
9
+ focalLength: number;
10
+ depthFade: number;
11
+ cullBackfaces: boolean;
12
+ spinSpeed: number;
13
+ }
14
+ /**
15
+ * Children spread over a sphere — a Fibonacci lattice, as even as any number
16
+ * of points gets — and seen through a camera of the grid's own, so the far
17
+ * side is smaller, drawn first, and hidden where a face turns away.
18
+ *
19
+ * `outward` lays each item flat on the surface; `billboard` keeps each one
20
+ * facing the viewer, like labels on a globe. {@link turnTo} brings any item
21
+ * round to the front.
22
+ */
23
+ export declare class SphereGrid extends LayoutGrid<SphereGridProps> {
24
+ radius: number;
25
+ yaw: number;
26
+ pitch: number;
27
+ roll: number;
28
+ facing: SphereFacing;
29
+ focalLength: number;
30
+ depthFade: number;
31
+ cullBackfaces: boolean;
32
+ spinSpeed: number;
33
+ constructor(props?: NodeConfig<SphereGrid, SphereGridProps>);
34
+ /** Turn the sphere about an axis by `degrees` — `y` spins it like a globe. */
35
+ spin(args: CommandArgs<{
36
+ axis?: SphereAxis;
37
+ degrees?: number;
38
+ }> & {
39
+ duration: number;
40
+ }): Command<SphereGridProps>;
41
+ /** Turn the sphere to a set orientation. */
42
+ orientTo(args: CommandArgs<{
43
+ yaw?: number;
44
+ pitch?: number;
45
+ roll?: number;
46
+ }> & {
47
+ duration: number;
48
+ }): Command<SphereGridProps>;
49
+ /** Turn the sphere the shorter way until an item (by its place in the layers) faces the viewer. */
50
+ turnTo(args: CommandArgs<{
51
+ item?: number;
52
+ }> & {
53
+ duration: number;
54
+ }): Command<SphereGridProps>;
55
+ radiusTo(args: CommandArgs<{
56
+ radius: number;
57
+ }> & {
58
+ duration: number;
59
+ }): Command<SphereGridProps>;
60
+ /** Dolly the camera: a shorter focal length exaggerates the depth, a longer one flattens it. */
61
+ focalLengthTo(args: CommandArgs<{
62
+ focalLength: number;
63
+ }> & {
64
+ duration: number;
65
+ }): Command<SphereGridProps>;
66
+ protected arrangementFor(): SphereArrangement;
67
+ }
68
+ //# sourceMappingURL=sphere-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sphere-grid.d.ts","sourceRoot":"","sources":["../../src/sphere-grid/sphere-grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAE7G,OAAO,EACL,UAAU,EAMV,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,QAAQ,CAAA;AAEf,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,OAAO,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;CAClB;AAID;;;;;;;;GAQG;AACH,qBAWa,UAAW,SAAQ,UAAU,CAAC,eAAe,CAAC;IACJ,MAAM,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACe,MAAM,EAAE,YAAY,CAAA;IAC7C,WAAW,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;IAC3C,aAAa,EAAE,OAAO,CAAA;IACJ,SAAS,EAAE,MAAM,CAAA;gBAE7D,KAAK,CAAC,EAAE,UAAU,CAAC,UAAU,EAAE,eAAe,CAAC;IAI3D,8EAA8E;IAO9E,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC;QAAE,IAAI,CAAC,EAAE,UAAU,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAMjH,4CAA4C;IAQ5C,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAQ7H,mGAAmG;IAEnG,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAmB7F,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAIhG,gGAAgG;IAEhG,aAAa,CAAC,IAAI,EAAE,WAAW,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;cAQvF,cAAc,IAAI,iBAAiB;CAcvD"}
@@ -0,0 +1,149 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { command, node, property } from "@motionscript/core";
8
+ import { LayoutGrid, normalizeOrder, SPHERE_AXES, SPHERE_FACINGS, sphereFaceForward, wrapDegrees, } from "../kit/index.js";
9
+ const AXIS_PROP = { x: "pitch", y: "yaw", z: "roll" };
10
+ /**
11
+ * Children spread over a sphere — a Fibonacci lattice, as even as any number
12
+ * of points gets — and seen through a camera of the grid's own, so the far
13
+ * side is smaller, drawn first, and hidden where a face turns away.
14
+ *
15
+ * `outward` lays each item flat on the surface; `billboard` keeps each one
16
+ * facing the viewer, like labels on a globe. {@link turnTo} brings any item
17
+ * round to the front.
18
+ */
19
+ let SphereGrid = class SphereGrid extends LayoutGrid {
20
+ constructor(props) {
21
+ super(props);
22
+ }
23
+ /** Turn the sphere about an axis by `degrees` — `y` spins it like a globe. */
24
+ spin(args) {
25
+ const key = AXIS_PROP[args.data?.axis ?? "y"] ?? "yaw";
26
+ const degrees = args.data?.degrees ?? 360;
27
+ return this.to({ data: { [key]: this[key] + degrees }, duration: args.duration, easing: args.easing });
28
+ }
29
+ /** Turn the sphere to a set orientation. */
30
+ orientTo(args) {
31
+ return this.to({
32
+ data: { yaw: args.data?.yaw ?? this.yaw, pitch: args.data?.pitch ?? this.pitch, roll: args.data?.roll ?? this.roll },
33
+ duration: args.duration,
34
+ easing: args.easing,
35
+ });
36
+ }
37
+ /** Turn the sphere the shorter way until an item (by its place in the layers) faces the viewer. */
38
+ turnTo(args) {
39
+ const count = this._itemCount();
40
+ const slot = normalizeOrder(this.order, count).indexOf(Math.round(args.data?.item ?? 0));
41
+ if (slot < 0)
42
+ return this.to({ data: {}, duration: args.duration });
43
+ const facing = sphereFaceForward(count, slot);
44
+ // The yaw the clock has added is part of where the item is now.
45
+ const spun = this.spinSpeed * this.time.total;
46
+ return this.to({
47
+ data: {
48
+ yaw: this.yaw + wrapDegrees(facing.yaw - (this.yaw + spun)),
49
+ pitch: this.pitch + wrapDegrees(facing.pitch - this.pitch),
50
+ roll: 0,
51
+ },
52
+ duration: args.duration,
53
+ easing: args.easing,
54
+ });
55
+ }
56
+ radiusTo(args) {
57
+ return this.to({ data: { radius: args.data?.radius ?? this.radius }, duration: args.duration, easing: args.easing });
58
+ }
59
+ /** Dolly the camera: a shorter focal length exaggerates the depth, a longer one flattens it. */
60
+ focalLengthTo(args) {
61
+ return this.to({
62
+ data: { focalLength: args.data?.focalLength ?? this.focalLength },
63
+ duration: args.duration,
64
+ easing: args.easing,
65
+ });
66
+ }
67
+ arrangementFor() {
68
+ return {
69
+ kind: "sphere",
70
+ radius: this.radius,
71
+ yaw: this.yaw,
72
+ pitch: this.pitch,
73
+ roll: this.roll,
74
+ facing: this.facing,
75
+ focalLength: this.focalLength,
76
+ depthFade: this.depthFade,
77
+ cullBackfaces: this.cullBackfaces,
78
+ spinSpeed: this.spinSpeed,
79
+ };
80
+ }
81
+ };
82
+ __decorate([
83
+ property({ default: 220, min: 0, step: 1 })
84
+ ], SphereGrid.prototype, "radius", void 0);
85
+ __decorate([
86
+ property({ default: 0, step: 1, unit: "°" })
87
+ ], SphereGrid.prototype, "yaw", void 0);
88
+ __decorate([
89
+ property({ default: 0, step: 1, unit: "°" })
90
+ ], SphereGrid.prototype, "pitch", void 0);
91
+ __decorate([
92
+ property({ default: 0, step: 1, unit: "°" })
93
+ ], SphereGrid.prototype, "roll", void 0);
94
+ __decorate([
95
+ property({ default: "outward", kind: "enum", options: SPHERE_FACINGS })
96
+ ], SphereGrid.prototype, "facing", void 0);
97
+ __decorate([
98
+ property({ default: 900, min: 100, step: 10 })
99
+ ], SphereGrid.prototype, "focalLength", void 0);
100
+ __decorate([
101
+ property({ default: 0.5, min: 0, max: 1, step: 0.05 })
102
+ ], SphereGrid.prototype, "depthFade", void 0);
103
+ __decorate([
104
+ property({ default: false })
105
+ ], SphereGrid.prototype, "cullBackfaces", void 0);
106
+ __decorate([
107
+ property({ default: 0, step: 1, unit: "°/s" })
108
+ ], SphereGrid.prototype, "spinSpeed", void 0);
109
+ __decorate([
110
+ command({
111
+ args: [
112
+ { key: "axis", kind: "enum", options: SPHERE_AXES, default: "y" },
113
+ { key: "degrees", step: 15, unit: "°", default: 360 },
114
+ ],
115
+ })
116
+ ], SphereGrid.prototype, "spin", null);
117
+ __decorate([
118
+ command({
119
+ args: [
120
+ { key: "yaw", unit: "°", default: 45 },
121
+ { key: "pitch", unit: "°", default: 20 },
122
+ { key: "roll", unit: "°", default: 0 },
123
+ ],
124
+ })
125
+ ], SphereGrid.prototype, "orientTo", null);
126
+ __decorate([
127
+ command({ args: [{ key: "item", min: 0, step: 1, default: 0 }] })
128
+ ], SphereGrid.prototype, "turnTo", null);
129
+ __decorate([
130
+ command({ args: [{ key: "radius", min: 0, default: 300 }] })
131
+ ], SphereGrid.prototype, "radiusTo", null);
132
+ __decorate([
133
+ command({ args: [{ key: "focalLength", min: 100, default: 600 }] })
134
+ ], SphereGrid.prototype, "focalLengthTo", null);
135
+ SphereGrid = __decorate([
136
+ node({
137
+ key: "sphereGrid",
138
+ parentKey: "node",
139
+ forkable: true,
140
+ layout: {
141
+ children: "flow",
142
+ acceptsChildren: true,
143
+ defaultWidthMode: "hug",
144
+ defaultHeightMode: "hug",
145
+ },
146
+ })
147
+ ], SphereGrid);
148
+ export { SphereGrid };
149
+ //# sourceMappingURL=sphere-grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sphere-grid.js","sourceRoot":"","sources":["../../src/sphere-grid/sphere-grid.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAmD,MAAM,oBAAoB,CAAA;AAE7G,OAAO,EACL,UAAU,EACV,cAAc,EACd,WAAW,EACX,cAAc,EACd,iB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E;AAGD;IADC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;0CAG5D;AAID;IADC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;+CAOnE;AA7EU,UAAU;IAXtB,IAAI,CAAC;QACJ,GAAG,EAAE,YAAY;QACjB,SAAS,EAAE,MAAM;QACjB,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE;YACN,QAAQ,EAAE,MAAM;YAChB,eAAe,EAAE,IAAI;YACrB,gBAAgB,EAAE,KAAK;YACvB,iBAAiB,EAAE,KAAK;SACzB;KACF,CAAC;GACW,UAAU,CA6FtB","sourcesContent":["import { command, node, property, type Command, type CommandArgs, type NodeConfig } from \"@motionscript/core\"\n\nimport {\n LayoutGrid,\n normalizeOrder,\n SPHERE_AXES,\n SPHERE_FACINGS,\n sphereFaceForward,\n wrapDegrees,\n type LayoutGridProps,\n type SphereArrangement,\n type SphereAxis,\n type SphereFacing,\n} from \"../kit\"\n\nexport interface SphereGridProps extends LayoutGridProps {\n radius: number\n yaw: number\n pitch: number\n roll: number\n facing: SphereFacing\n focalLength: number\n depthFade: number\n cullBackfaces: boolean\n spinSpeed: number\n}\n\nconst AXIS_PROP: Record<SphereAxis, \"yaw\" | \"pitch\" | \"roll\"> = { x: \"pitch\", y: \"yaw\", z: \"roll\" }\n\n/**\n * Children spread over a sphere — a Fibonacci lattice, as even as any number\n * of points gets — and seen through a camera of the grid's own, so the far\n * side is smaller, drawn first, and hidden where a face turns away.\n *\n * `outward` lays each item flat on the surface; `billboard` keeps each one\n * facing the viewer, like labels on a globe. {@link turnTo} brings any item\n * round to the front.\n */\n@node({\n key: \"sphereGrid\",\n parentKey: \"node\",\n forkable: true,\n layout: {\n children: \"flow\",\n acceptsChildren: true,\n defaultWidthMode: \"hug\",\n defaultHeightMode: \"hug\",\n },\n})\nexport class SphereGrid extends LayoutGrid<SphereGridProps> {\n @property({ default: 220, min: 0, step: 1 }) declare radius: number\n @property({ default: 0, step: 1, unit: \"°\" }) declare yaw: number\n @property({ default: 0, step: 1, unit: \"°\" }) declare pitch: number\n @property({ default: 0, step: 1, unit: \"°\" }) declare roll: number\n @property({ default: \"outward\", kind: \"enum\", options: SPHERE_FACINGS }) declare facing: SphereFacing\n @property({ default: 900, min: 100, step: 10 }) declare focalLength: number\n @property({ default: 0.5, min: 0, max: 1, step: 0.05 }) declare depthFade: number\n @property({ default: false }) declare cullBackfaces: boolean\n @property({ default: 0, step: 1, unit: \"°/s\" }) declare spinSpeed: number\n\n constructor(props?: NodeConfig<SphereGrid, SphereGridProps>) {\n super(props)\n }\n\n /** Turn the sphere about an axis by `degrees` — `y` spins it like a globe. */\n @command({\n args: [\n { key: \"axis\", kind: \"enum\", options: SPHERE_AXES, default: \"y\" },\n { key: \"degrees\", step: 15, unit: \"°\", default: 360 },\n ],\n })\n spin(args: CommandArgs<{ axis?: SphereAxis; degrees?: number }> & { duration: number }): Command<SphereGridProps> {\n const key = AXIS_PROP[args.data?.axis ?? \"y\"] ?? \"yaw\"\n const degrees = args.data?.degrees ?? 360\n return this.to({ data: { [key]: this[key] + degrees }, duration: args.duration, easing: args.easing })\n }\n\n /** Turn the sphere to a set orientation. */\n @command({\n args: [\n { key: \"yaw\", unit: \"°\", default: 45 },\n { key: \"pitch\", unit: \"°\", default: 20 },\n { key: \"roll\", unit: \"°\", default: 0 },\n ],\n })\n orientTo(args: CommandArgs<{ yaw?: number; pitch?: number; roll?: number }> & { duration: number }): Command<SphereGridProps> {\n return this.to({\n data: { yaw: args.data?.yaw ?? this.yaw, pitch: args.data?.pitch ?? this.pitch, roll: args.data?.roll ?? this.roll },\n duration: args.duration,\n easing: args.easing,\n })\n }\n\n /** Turn the sphere the shorter way until an item (by its place in the layers) faces the viewer. */\n @command({ args: [{ key: \"item\", min: 0, step: 1, default: 0 }] })\n turnTo(args: CommandArgs<{ item?: number }> & { duration: number }): Command<SphereGridProps> {\n const count = this._itemCount()\n const slot = normalizeOrder(this.order, count).indexOf(Math.round(args.data?.item ?? 0))\n if (slot < 0) return this.to({ data: {}, duration: args.duration })\n const facing = sphereFaceForward(count, slot)\n // The yaw the clock has added is part of where the item is now.\n const spun = this.spinSpeed * this.time.total\n return this.to({\n data: {\n yaw: this.yaw + wrapDegrees(facing.yaw - (this.yaw + spun)),\n pitch: this.pitch + wrapDegrees(facing.pitch - this.pitch),\n roll: 0,\n },\n duration: args.duration,\n easing: args.easing,\n })\n }\n\n @command({ args: [{ key: \"radius\", min: 0, default: 300 }] })\n radiusTo(args: CommandArgs<{ radius: number }> & { duration: number }): Command<SphereGridProps> {\n return this.to({ data: { radius: args.data?.radius ?? this.radius }, duration: args.duration, easing: args.easing })\n }\n\n /** Dolly the camera: a shorter focal length exaggerates the depth, a longer one flattens it. */\n @command({ args: [{ key: \"focalLength\", min: 100, default: 600 }] })\n focalLengthTo(args: CommandArgs<{ focalLength: number }> & { duration: number }): Command<SphereGridProps> {\n return this.to({\n data: { focalLength: args.data?.focalLength ?? this.focalLength },\n duration: args.duration,\n easing: args.easing,\n })\n }\n\n protected override arrangementFor(): SphereArrangement {\n return {\n kind: \"sphere\",\n radius: this.radius,\n yaw: this.yaw,\n pitch: this.pitch,\n roll: this.roll,\n facing: this.facing,\n focalLength: this.focalLength,\n depthFade: this.depthFade,\n cullBackfaces: this.cullBackfaces,\n spinSpeed: this.spinSpeed,\n }\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,72 @@
1
1
  {
2
2
  "name": "@motionscript/layout-grid",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0-alpha.0",
4
+ "type": "module",
5
+ "description": "Grid layouts for Motion Script: rectangular, radial, path and spherical arrangements of a node's children, with staggered reveals, waves, focus and morphs between them.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/motionscript-dev/motionscript.git",
9
+ "directory": "packages/components/layout-grid"
10
+ },
11
+ "homepage": "https://motionscript.dev",
12
+ "bugs": {
13
+ "url": "https://github.com/motionscript-dev/motionscript/issues"
14
+ },
15
+ "main": "dist/index.js",
16
+ "types": "dist/index.d.ts",
17
+ "sideEffects": false,
18
+ "files": [
19
+ "dist",
20
+ "src",
21
+ "registry.json",
22
+ "CHANGELOG.md",
23
+ "!dist/**/*.tsbuildinfo",
24
+ "!src/**/tests/**",
25
+ "!src/**/*.test.ts",
26
+ "!src/**/*.test.tsx",
27
+ "!src/**/*.fixtures.ts"
28
+ ],
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "exports": {
33
+ ".": {
34
+ "types": "./dist/index.d.ts",
35
+ "default": "./dist/index.js"
36
+ },
37
+ "./kit": {
38
+ "types": "./dist/engine.d.ts",
39
+ "default": "./dist/engine.js"
40
+ }
41
+ },
42
+ "keywords": [
43
+ "motion-script",
44
+ "motion script",
45
+ "grid",
46
+ "layout",
47
+ "animation"
48
+ ],
49
+ "license": "Apache-2.0",
50
+ "peerDependencies": {
51
+ "@motionscript/core": "^0.1.0-alpha.0"
52
+ },
53
+ "devDependencies": {
54
+ "@types/node": "^25.6.2",
55
+ "eslint": "^9.39.4",
56
+ "eslint-import-resolver-typescript": "^4.4.4",
57
+ "eslint-plugin-import-x": "^4.16.1",
58
+ "tsc-alias": "^1.8.16",
59
+ "typescript": "^6.0.3",
60
+ "typescript-eslint": "^8.48.0",
61
+ "vitest": "^4.1.5",
62
+ "@motionscript/core": "0.1.0-alpha.0"
63
+ },
64
+ "scripts": {
65
+ "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json --resolve-full-paths && node ../../../scripts/build-browser.mjs",
66
+ "dev": "tsc -p tsconfig.build.json --watch & tsc-alias -p tsconfig.build.json --resolve-full-paths -w",
67
+ "clean": "rimraf --glob dist .turbo *.tsbuildinfo",
68
+ "test": "vitest --passWithNoTests",
69
+ "lint": "eslint .",
70
+ "typecheck": "tsc -p tsconfig.json --noEmit"
71
+ }
6
72
  }
package/registry.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "kit": {
3
+ "barrel": "src/engine.ts",
4
+ "specifier": "@motionscript/layout-grid/kit"
5
+ },
6
+ "items": [
7
+ {
8
+ "name": "rectangular-grid",
9
+ "description": "Children in rows and columns, with brick offsets and cells that fit, fix or fill.",
10
+ "root": "src/rectangular-grid",
11
+ "files": ["index.ts", "rectangular-grid.ts"]
12
+ },
13
+ {
14
+ "name": "radial-grid",
15
+ "description": "Children round a circle or along an arc, turned to face out if you like.",
16
+ "root": "src/radial-grid",
17
+ "files": ["index.ts", "radial-grid.ts"]
18
+ },
19
+ {
20
+ "name": "path-grid",
21
+ "description": "Children spaced along a template, a path of their own, or a Path node in the scene.",
22
+ "root": "src/path-grid",
23
+ "files": ["index.ts", "path-grid.ts"]
24
+ },
25
+ {
26
+ "name": "sphere-grid",
27
+ "description": "Children spread evenly over a sphere, seen through a camera of its own.",
28
+ "root": "src/sphere-grid",
29
+ "files": ["index.ts", "sphere-grid.ts"]
30
+ }
31
+ ]
32
+ }
package/src/engine.ts ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The layout grid **kit**: what the four grids share, and what a copied one does
3
+ * not copy.
4
+ *
5
+ * `ms add` writes a grid's own files into your project and rewrites its reach for
6
+ * these to `@motionscript/layout-grid`, so the shared parts stay a real
7
+ * dependency. That is not a size decision. The engine keys prop machinery to
8
+ * class identity — `@property` installs against the class it was applied with —
9
+ * so a second copy of `LayoutGrid` is a second class answering to one name, and
10
+ * a morph from one grid to another only finds grids of the class it knows.
11
+ */
12
+ export * from "./kit"
package/src/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from "./rectangular-grid"
2
+ export * from "./radial-grid"
3
+ export * from "./path-grid"
4
+ export * from "./sphere-grid"
5
+ export * from "./engine"
6
+ export { NODES } from "./nodes"
@@ -0,0 +1,6 @@
1
+ export * from "./slots"
2
+ export * from "./stagger"
3
+ export * from "./item-effects"
4
+ export * from "./order"
5
+ export * from "./random"
6
+ export * from "./layout-grid"