machinalayout 0.1.0 → 0.3.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 (61) hide show
  1. package/README.md +295 -49
  2. package/dist/chunk-2ZQ2RFFI.js +400 -0
  3. package/dist/chunk-33CKBEJH.js +186 -0
  4. package/dist/chunk-BJOQRPPX.js +382 -0
  5. package/dist/chunk-KYWOCAHK.js +205 -0
  6. package/dist/chunk-RJYRJ3LD.js +0 -0
  7. package/dist/chunk-SVWYWI7I.js +59 -0
  8. package/dist/chunk-VREK57S3.js +13 -0
  9. package/dist/chunk-ZVDE7PX4.js +222 -0
  10. package/dist/debugOverlay-pJpj0n5H.d.ts +125 -0
  11. package/dist/deus/index.d.ts +14 -0
  12. package/dist/deus/index.js +26 -0
  13. package/dist/dispatch/index.d.ts +49 -0
  14. package/dist/dispatch/index.js +217 -0
  15. package/dist/handoff/index.d.ts +44 -0
  16. package/dist/handoff/index.js +83 -0
  17. package/dist/index.d.ts +54 -236
  18. package/dist/index.js +753 -583
  19. package/dist/inspect/index.d.ts +8 -0
  20. package/dist/inspect/index.js +97 -0
  21. package/dist/react/index.d.ts +41 -0
  22. package/dist/react/index.js +9 -0
  23. package/dist/react-native/index.d.ts +30 -0
  24. package/dist/react-native/index.js +84 -0
  25. package/dist/screenCatalog-ZjonGiOi.d.ts +46 -0
  26. package/dist/text/index.d.ts +10 -0
  27. package/dist/text/index.js +9 -0
  28. package/dist/text/react/index.d.ts +14 -0
  29. package/dist/text/react/index.js +7 -0
  30. package/dist/text/react-native/index.d.ts +16 -0
  31. package/dist/text/react-native/index.js +155 -0
  32. package/dist/text/vue/index.d.ts +113 -0
  33. package/dist/text/vue/index.js +202 -0
  34. package/dist/types-B90jb3RW.d.ts +184 -0
  35. package/dist/types-C4poVJpR.d.ts +74 -0
  36. package/dist/types-DLYAhNXw.d.ts +32 -0
  37. package/dist/vue/index.d.ts +173 -0
  38. package/dist/vue/index.js +112 -0
  39. package/docs/adapter-packaging-a0-plan.md +352 -0
  40. package/docs/adapters.md +19 -0
  41. package/docs/api-coherence-m8-audit.md +397 -0
  42. package/docs/deusmachina.md +108 -0
  43. package/docs/error-codes.md +95 -0
  44. package/docs/grid-arrange-m5a-contract.md +480 -0
  45. package/docs/grid-arrange.md +51 -0
  46. package/docs/inspection-and-handoff.md +126 -0
  47. package/docs/layout-interpolation.md +52 -0
  48. package/docs/machina-dispatch-d0-contract.md +496 -0
  49. package/docs/machina-dispatch.md +143 -0
  50. package/docs/named-layers.md +40 -0
  51. package/docs/react-adapter.md +63 -58
  52. package/docs/react-native-adapter.md +56 -0
  53. package/docs/react-native-text-renderer.md +50 -0
  54. package/docs/reference-alignment-m7a-contract.md +384 -0
  55. package/docs/reference-alignment.md +44 -0
  56. package/docs/responsive-variants.md +54 -0
  57. package/docs/screen-catalog-and-viewports.md +124 -0
  58. package/docs/stack-geometry-helpers.md +115 -0
  59. package/docs/vue-adapter.md +55 -0
  60. package/docs/vue-text-renderer.md +55 -0
  61. package/package.json +127 -60
@@ -0,0 +1,44 @@
1
+ # Reference alignment (M7b runtime)
2
+
3
+ `GuideFrame` provides narrow reference-based placement without changing parent ownership.
4
+
5
+ - **Parent owns coordinates**.
6
+ - **Reference target is read-only geometry input**.
7
+
8
+ ## GuideFrame
9
+ - Two-of-three per axis (`left/right/width`, `top/bottom/height`).
10
+ - `width`/`height` are `UiLength` only.
11
+ - `left/right/top/bottom` can be `UiLength` or `EdgeRef`.
12
+
13
+ ## Edge refs
14
+ - Horizontal fields allow `left/right/centerX`.
15
+ - Vertical fields allow `top/bottom/centerY`.
16
+ - Max one reference per axis.
17
+
18
+ ## Coordinate semantics
19
+ - Ui lengths resolve against parent axis.
20
+ - Ui positional values convert to root-space with parent origin.
21
+ - Edge refs read target resolved rect edge in root-space.
22
+ - Edge ref offset resolves against referencing parent axis.
23
+ - Node `offset` applies after guide placement.
24
+
25
+ ## Dependency model
26
+ - Non-guide nodes resolve first.
27
+ - Guide nodes are queued until parent + all referenced targets are resolved.
28
+ - Remaining unresolved guides classify as `GuideReferenceCycle` or `GuideTargetUnresolved`.
29
+
30
+ ## Errors
31
+ `GuideTargetNotFound`, `GuideSelfReference`, `GuideReferenceCycle`, `GuideInvalidEdgeForAxis`, `GuideTooManyReferencesPerAxis`, `InvalidGuideFrame`, `GuideTargetUnresolved`.
32
+
33
+ ## Examples
34
+ - Start after inspector edge (`left: { ref: "inspector", edge: "right", offset: 8 }`).
35
+ - Tooltip below button (`top: { ref: "button", edge: "bottom", offset: 6 }`).
36
+ - Badge at card corner (`left` from `card.right`, `top` from `card.top`).
37
+ - Responsive variant swaps anchor to guide frame.
38
+
39
+ ## Limitations
40
+ - No refs in `AnchorFrame`.
41
+ - No `AttachFrame`.
42
+ - No portals/reparenting or clipping escape.
43
+ - No general solver.
44
+ - No width/height refs.
@@ -0,0 +1,54 @@
1
+ # Responsive variants (M4b)
2
+
3
+ Responsive variants let a single flat `LayoutRow[]` express row-local overrides selected by `rootRect` dimensions.
4
+
5
+ ## Purpose
6
+
7
+ - Keep responsive behavior explicit and deterministic.
8
+ - Keep selection resolver-owned and driven only by caller-provided root geometry.
9
+ - Avoid userland row-array branching for common desktop/tablet/mobile style differences.
10
+
11
+ ## Authoring model
12
+
13
+ Add `variants` to a `LayoutRow`. Each variant has a `when` condition plus optional override fields.
14
+
15
+ ```ts
16
+ {
17
+ id: "sidebar",
18
+ parent: "root",
19
+ frame: { kind: "anchor", left: 0, top: 64, bottom: 0, width: 280 },
20
+ variants: [
21
+ {
22
+ when: { maxWidth: 800 },
23
+ frame: { kind: "anchor", left: 0, right: 0, top: 64, height: 56 },
24
+ slot: "mobileNav",
25
+ },
26
+ {
27
+ when: {},
28
+ slot: "desktopSidebar",
29
+ },
30
+ ],
31
+ }
32
+ ```
33
+
34
+ ## Selection semantics
35
+
36
+ - `resolveLayoutRows(rows, rootRect)` calls `selectLayoutRowsForRoot(rows, rootRect)` first.
37
+ - Conditions are inclusive (`>= min*`, `<= max*`).
38
+ - First matching variant wins.
39
+ - `when: {}` matches all root rects and can be used as a fallback.
40
+ - Effective rows are fresh copies and do not include `variants`.
41
+
42
+ ## Phase separation
43
+
44
+ - `compileLayoutRows(rows)` directly uses base row values only.
45
+ - Variants are an authoring-time input feature, not part of compiled or resolved node types.
46
+
47
+ ## Constraints and non-goals
48
+
49
+ M4b variants can override row metadata (`frame`, `arrange`, `offset`, `z`, `view`, `slot`, `debugLabel`) but cannot:
50
+
51
+ - change graph identity (`id`, `parent`, `order`),
52
+ - add/remove rows,
53
+ - use DOM measurement,
54
+ - use CSS media query semantics.
@@ -0,0 +1,124 @@
1
+ # Screen catalog and viewport matrix
2
+
3
+ Machina screen catalog helpers describe named app screens and responsive viewport presets as plain TypeScript data. They are intended for future capture, inspection, and handoff tooling, but they do not perform any browser automation themselves.
4
+
5
+ These utilities model this relationship:
6
+
7
+ ```ts
8
+ screen + viewport -> task metadata
9
+ ```
10
+
11
+ A future runner can consume each task to navigate an app route, set a viewport, capture screenshots, inspect DOM, collect layout snapshots, or write handoff bundles.
12
+
13
+ ## Screen catalog
14
+
15
+ A `MachinaScreen` is a stable, named screen entry:
16
+
17
+ ```ts
18
+ const screens = defineMachinaScreens([
19
+ {
20
+ key: "provider-setup",
21
+ route: "/apps/scheduling/setup",
22
+ fixture: "provider-setup",
23
+ viewports: ["desktop", "tablet", "phone"],
24
+ tags: ["scheduling", "setup"],
25
+ },
26
+ ]);
27
+ ```
28
+
29
+ The `route` value is opaque app metadata. Machina does not parse it, validate URL semantics, or integrate with a router. `fixture`, `tags`, `title`, and `metadata` are also app-owned metadata for downstream tools.
30
+
31
+ `defineMachinaScreens` validates screen keys and routes, rejects duplicate keys, returns fresh screen objects, and preserves author order in `catalog.order`.
32
+
33
+ ## Viewport matrix
34
+
35
+ A `MachinaViewport` is a stable viewport preset:
36
+
37
+ ```ts
38
+ const viewports = createViewportMatrix("standard-responsive");
39
+ ```
40
+
41
+ Built-in presets:
42
+
43
+ | Preset | Order | Sizes |
44
+ | --- | --- | --- |
45
+ | `standard-responsive` | desktop, tablet, phone | 1440×900, 1024×768, 390×844 |
46
+ | `desktop-only` | desktop | 1440×900 |
47
+ | `mobile-first` | phone, tablet, desktop | 390×844, 1024×768, 1440×900 |
48
+
49
+ Default preset is `standard-responsive`. Built-in viewport tags are:
50
+
51
+ - desktop: `desktop`
52
+ - tablet: `tablet`
53
+ - phone: `phone`, `mobile`
54
+
55
+ Use `defineMachinaViewports` for custom matrices. It validates unique non-empty keys, positive finite width/height, optional positive finite `deviceScaleFactor`, and preserves input order.
56
+
57
+ ## Task expansion
58
+
59
+ `expandScreenViewportTasks` expands a screen catalog and viewport matrix into deterministic `MachinaScreenViewportTask[]` values:
60
+
61
+ ```ts
62
+ const screens = defineMachinaScreens([
63
+ {
64
+ key: "provider-setup",
65
+ route: "/apps/scheduling/setup",
66
+ fixture: "provider-setup",
67
+ viewports: ["desktop", "tablet", "phone"],
68
+ tags: ["scheduling", "setup"],
69
+ },
70
+ ]);
71
+
72
+ const viewports = createViewportMatrix("standard-responsive");
73
+ const tasks = expandScreenViewportTasks(screens, viewports);
74
+ ```
75
+
76
+ Task ordering is always catalog order first, then viewport matrix order. One task represents one screen at one viewport and includes the raw screen route, fixture, copied screen/viewport references, merged tags, a deterministic task key, and a filesystem-safe artifact base name.
77
+
78
+ ## Filtering semantics
79
+
80
+ Expansion accepts optional filters:
81
+
82
+ ```ts
83
+ const phoneSchedulingTasks = expandScreenViewportTasks(screens, viewports, {
84
+ screenKeys: ["provider-setup"],
85
+ viewportKeys: ["phone"],
86
+ tags: ["scheduling", "mobile"],
87
+ });
88
+ ```
89
+
90
+ Filtering is deterministic:
91
+
92
+ 1. Start with screens in catalog order.
93
+ 2. If `screenKeys` is present, include only those screens. Unknown requested screen keys throw `UnknownScreenKey`.
94
+ 3. A screen's `viewports` list limits the default eligible viewport set for that screen.
95
+ 4. If `viewportKeys` is present, it further filters eligible viewport keys. Unknown requested viewport keys throw `UnknownViewportKey`.
96
+ 5. Screen-referenced viewport keys must exist in the provided viewport matrix or expansion throws `UnknownViewportKey`.
97
+ 6. Tags merge screen tags first, then viewport tags, with duplicates removed while preserving order.
98
+ 7. If `tags` is present, a task is included only when every requested tag is in the merged task tags.
99
+
100
+ ## Artifact base names
101
+
102
+ Task keys use raw keys joined by `__`, for example `provider-setup__phone`. Artifact base names slug each side independently:
103
+
104
+ ```ts
105
+ slugMachinaArtifactName("Provider Setup!"); // "provider-setup"
106
+ ```
107
+
108
+ A task for screen key `Provider Setup` and viewport key `Phone XL` receives `artifactBaseName: "provider-setup__phone-xl"`.
109
+
110
+ ## Limitations
111
+
112
+ This is a framework-independent metadata layer only. It intentionally does not include:
113
+
114
+ - browser automation,
115
+ - screenshot capture,
116
+ - DOM inspection or DOM summaries,
117
+ - handoff bundle writing,
118
+ - router integration,
119
+ - route parsing,
120
+ - fixture serving,
121
+ - adapter behavior,
122
+ - layout resolver semantic changes.
123
+
124
+ The helpers work in Node or the browser and have no Playwright, DOM, React, Vue, or React Native dependency.
@@ -0,0 +1,115 @@
1
+ # Stack geometry helpers
2
+
3
+ MachinaLayout stack geometry helpers are pure query utilities for resolved layout documents. They make common stack arithmetic inspectable without introducing new layout primitives or changing resolver behavior.
4
+
5
+ ## Why these helpers exist
6
+
7
+ Apps with fixed chrome, content panes, sidebars, and inspectors often need to ask questions like:
8
+
9
+ - What rectangle is left after stack padding?
10
+ - How much of a stack main axis is consumed by direct children and gaps?
11
+ - Where is the interval between a header-like child and an inspector-like child?
12
+
13
+ The resolver already computes deterministic rectangles. These helpers expose that resolved state so humans and LLMs do not have to hand-copy padding, gap, and fixed/fill calculations.
14
+
15
+ ## Resolved-document query boundary
16
+
17
+ These helpers inspect existing rectangles. They do not:
18
+
19
+ - mutate the resolved layout document,
20
+ - recompute layout from `LayoutRow[]`,
21
+ - account for DOM measurements,
22
+ - inspect descendants when a helper is scoped to direct stack children,
23
+ - change `StackArrange` or `GridArrange` semantics.
24
+
25
+ They report resolved state, including resolved fill allocations, rather than pre-resolution authoring guesses.
26
+
27
+ ## `getArrangeContentRect(parentRect, arrange)`
28
+
29
+ `getArrangeContentRect` returns a fresh content rectangle for an arranger:
30
+
31
+ - `stack`: subtracts normalized stack padding and throws `StackContentNegative` if padding makes content negative.
32
+ - `grid`: subtracts normalized grid padding and throws `GridContentNegative` if padding makes content negative.
33
+ - omitted or unsupported arranger: returns a fresh copy of the parent rectangle.
34
+
35
+ ```ts
36
+ const contentRect = getArrangeContentRect(parent.rect, parent.arrange);
37
+ ```
38
+
39
+ ## `getStackContentRect(layout, parentId)`
40
+
41
+ `getStackContentRect` looks up a resolved stack parent and returns its content rectangle after stack padding.
42
+
43
+ ```ts
44
+ const content = getStackContentRect(layout, "scheduling-content");
45
+ ```
46
+
47
+ The parent must exist and must have `arrange.kind === "stack"`. A non-stack parent throws `ExpectedStackArrange`.
48
+
49
+ ## `getStackMainAxisMetrics(layout, parentId)`
50
+
51
+ `getStackMainAxisMetrics` returns main-axis and cross-axis data for a resolved stack parent:
52
+
53
+ - parent and content rectangles,
54
+ - normalized padding and gap,
55
+ - direct child ids in resolved child order,
56
+ - per-child rectangles and main/cross starts, ends, and sizes relative to the content rectangle,
57
+ - content main/cross sizes,
58
+ - total child main size,
59
+ - total gap size,
60
+ - used main size,
61
+ - unused main size.
62
+
63
+ Because the input is a resolved document, fill children are reported at their actual resolved sizes.
64
+
65
+ ```ts
66
+ const metrics = getStackMainAxisMetrics(layout, "root");
67
+ const remaining = metrics.unusedMainSize;
68
+ ```
69
+
70
+ ## `getStackChildRects(layout, parentId)`
71
+
72
+ `getStackChildRects` returns fresh direct-child rectangle copies keyed by child id.
73
+
74
+ ```ts
75
+ const childRects = getStackChildRects(layout, "root");
76
+ const sidebar = childRects.sidebar;
77
+ ```
78
+
79
+ Only direct stack children are returned. Descendant rectangles should be queried from `layout.nodes` or from a helper scoped to their own parent.
80
+
81
+ ## `getRemainingStackRect(layout, options)`
82
+
83
+ `getRemainingStackRect` is a narrow interval query over direct children of one resolved stack parent.
84
+
85
+ It computes the interval between:
86
+
87
+ - the latest `mainEnd` among `afterChildren`, or the content start when no `afterChildren` are provided, and
88
+ - the earliest `mainStart` among `beforeChildren`, or the content end when no `beforeChildren` are provided.
89
+
90
+ The returned rectangle preserves the full content cross-axis size.
91
+
92
+ ```ts
93
+ const shellContent = getRemainingStackRect(layout, {
94
+ parentId: "root",
95
+ afterChildren: ["hero"],
96
+ beforeChildren: ["inspector"],
97
+ });
98
+ ```
99
+
100
+ If the computed interval is negative, the helper throws `StackQueryInvalidRange`. This helper is a query helper, not a solver; it does not move children or search descendants.
101
+
102
+ ## Inspector/content shell example
103
+
104
+ ```ts
105
+ const metrics = getStackMainAxisMetrics(layout, "root");
106
+ const content = getStackContentRect(layout, "scheduling-content");
107
+
108
+ const interactiveRegion = getRemainingStackRect(layout, {
109
+ parentId: "root",
110
+ afterChildren: ["toolbar"],
111
+ beforeChildren: ["inspector"],
112
+ });
113
+ ```
114
+
115
+ This pattern is useful for app shells that place fixed controls around an interactive content region while still keeping all geometry framework-independent.
@@ -0,0 +1,55 @@
1
+ # Vue adapter (`machinalayout/vue`)
2
+
3
+ `MachinaVueView` renders a `ResolvedLayoutDocument` into DOM wrappers plus Vue view components.
4
+
5
+ - Import path: `import { MachinaVueView } from "machinalayout/vue";`
6
+ - Peer dependency: `vue` (`>=3.4 <4`).
7
+ - Machina layout stays record-shaped (`LayoutRow[]` -> resolved rectangles) across frameworks.
8
+
9
+ ## Shared model boundary
10
+
11
+ MachinaVueView uses Vue render functions internally so application code can stay record-shaped: layout rows describe geometry, and Vue components render inside the resolved rectangles.
12
+
13
+ You do not need to write `h()` calls, template layout loops, or directive ceremony to place boxes. Users can keep normal Vue SFC/template authoring for component internals, reactivity, and lifecycle.
14
+
15
+ ## Basic usage
16
+
17
+ ```vue
18
+ <script setup lang="ts">
19
+ import { MachinaVueView } from "machinalayout/vue";
20
+
21
+ const views = { Panel };
22
+ </script>
23
+
24
+ <template>
25
+ <MachinaVueView :layout="layout" :views="views" :view-data="viewData" :node-data="nodeData" />
26
+ </template>
27
+ ```
28
+
29
+ ## Stable view registry and data channels
30
+
31
+ Keep stable component references in `views`. Pass reactive/computed dynamic values through `viewData` and `nodeData`.
32
+
33
+ Avoid rebuilding component definitions as data carriers.
34
+
35
+ ## Props note
36
+
37
+ To avoid conflicts with Vue fallthrough attrs, root/node styling props are:
38
+
39
+ - `rootClass`, `rootStyle`
40
+ - `nodeClass`, `nodeStyle`
41
+
42
+ ## Supported
43
+
44
+ - `view ?? slot` lookup
45
+ - `viewData` / `nodeData`
46
+ - layer/z sorting (`layer z`, then `node z`, then sibling order)
47
+ - DOM containment/content-visibility policy
48
+ - debug mode
49
+ - parent-local coordinate normalization
50
+
51
+ ## Not included
52
+
53
+ - this package only renders layout boxes; text rendering is provided separately by `machinalayout/text/vue`
54
+ - portals/reparenting
55
+ - router/state abstraction layers
@@ -0,0 +1,55 @@
1
+ # Vue MachinaText renderer
2
+
3
+ `MachinaVueTextView` renders MachinaText content into DOM elements inside an already-owned rectangle.
4
+
5
+ ## Import
6
+
7
+ ```ts
8
+ import { MachinaVueTextView } from "machinalayout/text/vue";
9
+ ```
10
+
11
+ ## Peer dependency
12
+
13
+ - `vue` (Vue 3)
14
+
15
+ ## Accepted `text` inputs
16
+
17
+ - `string`
18
+ - `MachinaTextSource`
19
+ - `MachinaTextSpec`
20
+ - `MachinaTextDocument`
21
+
22
+ ## Supported rendering
23
+
24
+ - paragraphs (`p`)
25
+ - bullet lists (`ul`/`li`)
26
+ - inline strong/emphasis/code/link
27
+
28
+ ## Policy support
29
+
30
+ - `variant`
31
+ - `wrap`
32
+ - `overflow`
33
+ - `align`
34
+ - `leading`
35
+ - `blockGap`
36
+ - `listGap`
37
+ - `valign`
38
+
39
+ ## Notes
40
+
41
+ - Uses Vue `h()` internally so app code does not need render-function loops for the text AST.
42
+ - Supports `rootClass`/`rootStyle` plus `linkClass`/`linkStyle` and `codeClass`/`codeStyle` hooks.
43
+ - Link handling uses `onLinkClick` only (no routing dispatch integration).
44
+
45
+ ## Difference from React DOM text renderer
46
+
47
+ - Vue component API (`rootClass`/`rootStyle`) instead of React `className`/`style` prop names.
48
+ - Same parser/document model and text policy behavior.
49
+
50
+ ## Non-goals
51
+
52
+ - text measurement
53
+ - intrinsic sizing
54
+ - routing behavior
55
+ - editor/caret/selection behavior
package/package.json CHANGED
@@ -1,60 +1,127 @@
1
- {
2
- "name": "machinalayout",
3
- "version": "0.1.0",
4
- "type": "module",
5
- "scripts": {
6
- "typecheck": "tsc --noEmit",
7
- "build": "npm run typecheck && tsup --config tsup.config.ts --tsconfig tsconfig.build.json",
8
- "test": "vitest run"
9
- },
10
- "devDependencies": {
11
- "@testing-library/jest-dom": "^6.9.1",
12
- "@testing-library/react": "^16.3.2",
13
- "@types/react": "^19.2.14",
14
- "@types/react-dom": "^19.2.3",
15
- "jsdom": "^29.1.1",
16
- "typescript": "^5.6.3",
17
- "vitest": "^2.1.8",
18
- "tsup": "^8.5.1"
19
- },
20
- "peerDependencies": {
21
- "react": ">=18 <20",
22
- "react-dom": ">=18 <20"
23
- },
24
- "description": "Machine-native layout and text primitives for deterministic app UI records.",
25
- "license": "MIT",
26
- "author": "MachinaLayout contributors",
27
- "repository": {
28
- "type": "git",
29
- "url": "https://github.com/machinalayout/MachinaLayout.JS.git"
30
- },
31
- "homepage": "https://github.com/machinalayout/MachinaLayout.JS#readme",
32
- "bugs": {
33
- "url": "https://github.com/machinalayout/MachinaLayout.JS/issues"
34
- },
35
- "keywords": [
36
- "layout",
37
- "ui",
38
- "react",
39
- "typescript",
40
- "machina",
41
- "text",
42
- "rectangles"
43
- ],
44
- "main": "./dist/index.js",
45
- "module": "./dist/index.js",
46
- "types": "./dist/index.d.ts",
47
- "exports": {
48
- ".": {
49
- "types": "./dist/index.d.ts",
50
- "import": "./dist/index.js"
51
- }
52
- },
53
- "files": [
54
- "dist",
55
- "README.md",
56
- "LICENSE",
57
- "docs"
58
- ],
59
- "sideEffects": false
60
- }
1
+ {
2
+ "name": "machinalayout",
3
+ "version": "0.3.0",
4
+ "type": "module",
5
+ "scripts": {
6
+ "typecheck": "tsc --noEmit",
7
+ "build": "npm run typecheck && tsup --config tsup.config.ts --tsconfig tsconfig.build.json",
8
+ "test": "vitest run",
9
+ "format": "biome format --write .",
10
+ "format:check": "biome format .",
11
+ "lint": "biome lint .",
12
+ "check": "biome check ."
13
+ },
14
+ "devDependencies": {
15
+ "@biomejs/biome": "^2.4.15",
16
+ "@testing-library/jest-dom": "^6.9.1",
17
+ "@testing-library/react": "^16.3.2",
18
+ "@types/react": "^19.2.14",
19
+ "@types/react-dom": "^19.2.3",
20
+ "@types/react-test-renderer": "^19.1.0",
21
+ "@vue/test-utils": "^2.4.6",
22
+ "jsdom": "^29.1.1",
23
+ "react": "^19.2.6",
24
+ "react-dom": "^19.2.6",
25
+ "react-native": "^0.82.0",
26
+ "react-test-renderer": "^19.2.6",
27
+ "tsup": "^8.5.1",
28
+ "typescript": "^5.6.3",
29
+ "vitest": "^2.1.8",
30
+ "vue": "^3.5.22"
31
+ },
32
+ "peerDependencies": {
33
+ "react": ">=18 <20",
34
+ "react-dom": ">=18 <20",
35
+ "react-native": ">=0.72 <1",
36
+ "vue": ">=3.4 <4"
37
+ },
38
+ "description": "Machine-native layout and text primitives for deterministic app UI records.",
39
+ "license": "MIT",
40
+ "author": "MachinaLayout contributors",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "https://github.com/machinalayout/MachinaLayout.JS.git"
44
+ },
45
+ "homepage": "https://github.com/machinalayout/MachinaLayout.JS#readme",
46
+ "bugs": {
47
+ "url": "https://github.com/machinalayout/MachinaLayout.JS/issues"
48
+ },
49
+ "keywords": [
50
+ "layout",
51
+ "ui",
52
+ "react",
53
+ "typescript",
54
+ "machina",
55
+ "text",
56
+ "rectangles"
57
+ ],
58
+ "main": "./dist/index.js",
59
+ "module": "./dist/index.js",
60
+ "types": "./dist/index.d.ts",
61
+ "exports": {
62
+ ".": {
63
+ "types": "./dist/index.d.ts",
64
+ "import": "./dist/index.js"
65
+ },
66
+ "./inspect": {
67
+ "types": "./dist/inspect/index.d.ts",
68
+ "import": "./dist/inspect/index.js"
69
+ },
70
+ "./handoff": {
71
+ "types": "./dist/handoff/index.d.ts",
72
+ "import": "./dist/handoff/index.js"
73
+ },
74
+ "./deus": {
75
+ "types": "./dist/deus/index.d.ts",
76
+ "import": "./dist/deus/index.js"
77
+ },
78
+ "./react": {
79
+ "types": "./dist/react/index.d.ts",
80
+ "import": "./dist/react/index.js"
81
+ },
82
+ "./text": {
83
+ "types": "./dist/text/index.d.ts",
84
+ "import": "./dist/text/index.js"
85
+ },
86
+ "./text/react": {
87
+ "types": "./dist/text/react/index.d.ts",
88
+ "import": "./dist/text/react/index.js"
89
+ },
90
+ "./package.json": "./package.json",
91
+ "./react-native": {
92
+ "types": "./dist/react-native/index.d.ts",
93
+ "import": "./dist/react-native/index.js"
94
+ },
95
+ "./vue": {
96
+ "types": "./dist/vue/index.d.ts",
97
+ "import": "./dist/vue/index.js"
98
+ },
99
+ "./text/react-native": {
100
+ "types": "./dist/text/react-native/index.d.ts",
101
+ "import": "./dist/text/react-native/index.js"
102
+ },
103
+ "./text/vue": {
104
+ "types": "./dist/text/vue/index.d.ts",
105
+ "import": "./dist/text/vue/index.js"
106
+ },
107
+ "./dispatch": {
108
+ "types": "./dist/dispatch/index.d.ts",
109
+ "import": "./dist/dispatch/index.js"
110
+ }
111
+ },
112
+ "files": [
113
+ "dist",
114
+ "README.md",
115
+ "LICENSE",
116
+ "docs"
117
+ ],
118
+ "sideEffects": false,
119
+ "peerDependenciesMeta": {
120
+ "react-native": {
121
+ "optional": true
122
+ },
123
+ "vue": {
124
+ "optional": true
125
+ }
126
+ }
127
+ }