foundry-design-react-native-adapter 0.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +98 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sean Lynch
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Foundry Design Control
|
|
2
|
+
|
|
3
|
+
Foundry is a local-first precision design workbench for Codex, Cursor, and Claude Code. It lets design engineers manipulate rendered interface elements, resolve each gesture to the right project-native source intent, review one structured change batch, and verify the rebuilt result across recorded states.
|
|
4
|
+
|
|
5
|
+
## Beta installation
|
|
6
|
+
|
|
7
|
+
Foundry `0.2.0-beta.1` is the first shareable beta. From the project you want to inspect, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx foundry-design@beta setup
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Setup detects the platform, framework, package manager, development command, and installed coding agents. It previews every file it will manage, adds development-only instrumentation for supported web frameworks, configures the selected MCP clients, and records a reversible install manifest.
|
|
14
|
+
|
|
15
|
+
Then start a session with:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx foundry-design@beta start
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Foundry reuses an available project server or starts the detected development command, launches the loopback runtime, and opens an authenticated visual preview. Remove only Foundry-managed integration with:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx foundry-design@beta uninstall
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Supported automatic web integration currently includes Next.js App Router, Vite, and plain HTML. Generic web, SwiftUI, and React Native projects receive explicit setup guidance when a safe automatic edit is not available.
|
|
28
|
+
|
|
29
|
+
Codex, Cursor, and Claude Code users can alternatively install the bundled plugin from this repository. The plugin contains the Foundry skill and MCP server definition, so project setup uses `--agent none` and does not create duplicate MCP configuration.
|
|
30
|
+
|
|
31
|
+
The beta supports Node.js 20 or newer. Read [Privacy](PRIVACY.md), [Security](SECURITY.md), and the [beta changelog](CHANGELOG.md) before using it with sensitive work.
|
|
32
|
+
|
|
33
|
+
## Agent plugin
|
|
34
|
+
|
|
35
|
+
The portable plugin lives at `plugins/foundry-design-control`. The repository also includes marketplace manifests for Codex, Cursor, and Claude-compatible plugin import. Once installed, ask your agent:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
Start Foundry for this project.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Foundry remains local-first. Installing the plugin does not create an account, enable telemetry, or send project data to a Foundry service.
|
|
42
|
+
|
|
43
|
+
## Current capabilities
|
|
44
|
+
|
|
45
|
+
- Measured browser selection with overlap cycling, parent/child traversal, hover previews, and an isolated Shadow DOM inspector
|
|
46
|
+
- A searchable, collapsible, virtualized live layer hierarchy with mapped-source context, Shadow DOM traversal, drag reordering, and selection persistence across HMR
|
|
47
|
+
- Multi-selection, measured spacing annotations, sibling-aware resize snapping, keyboard nudging, alignment, distribution, and preview undo/redo
|
|
48
|
+
- A revisioned local design graph for CSS tokens, components, Storybook variants, breakpoints, themes, states, and motion presets
|
|
49
|
+
- Semantic source-mapping choices that block ambiguous changes until the user selects the intended implementation
|
|
50
|
+
- Fixed, hug, fill, and min/max sizing; flex and grid flow; linked spacing; aspect ratio; overflow; and positional controls
|
|
51
|
+
- Project-native spacing, radius, typography, and color choices with token-only filtering, exact token suggestions, component variants, type presets, gradients, opacity, and live contrast guidance
|
|
52
|
+
- Layout, typography, color, content, asset, accessibility, responsive, and motion controls
|
|
53
|
+
- Before/after toggles, continuous comparison scrubbing, side-by-side source comparison, isolation, per-element reset, keyboard shortcuts, and a searchable command palette
|
|
54
|
+
- Design Health scans for contrast, overflow and clipping, touch targets, accessible names, reduced-motion coverage, and project spacing consistency, with evidence, intentional-issue ignores, and safe corrections routed into review
|
|
55
|
+
- An in-app state workbench with real viewport frames, theme switching, forced interaction states, motion controls, and contextual verification
|
|
56
|
+
- Persistent, coalescing change ledger with JSON and consolidated prompt export
|
|
57
|
+
- Compact in-preview review with editable approved batches and unresolved-target blocking
|
|
58
|
+
- Persistent Apply with agent runs across Codex, Cursor, and Claude Code through MCP
|
|
59
|
+
- Live source, rebuild, validation, retry, and rendered-verification progress
|
|
60
|
+
- Local MCP bridge for agent access
|
|
61
|
+
- Debug adapters for web, SwiftUI, and React Native on iOS Simulator
|
|
62
|
+
- Verification records that compare requested and rendered values
|
|
63
|
+
|
|
64
|
+
The review surface explains the blast radius of every proposed change, including component instance count, token versus literal use, responsive and theme scope, and unresolved mapping risk. It never applies a source change merely because a preview override looks correct.
|
|
65
|
+
|
|
66
|
+
Foundry protocol `1.2.0` reads existing `1.0.0` and `1.1.0` sessions with migration defaults. All graph, operation, run, and verification data remains local and is available through `foundry-design export --format full`.
|
|
67
|
+
|
|
68
|
+
## Local development
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pnpm install
|
|
72
|
+
pnpm check
|
|
73
|
+
pnpm release:check
|
|
74
|
+
pnpm release:pack
|
|
75
|
+
pnpm release:test-install
|
|
76
|
+
pnpm build
|
|
77
|
+
pnpm foundry setup --project /path/to/project --agent codex --local-mcp
|
|
78
|
+
pnpm foundry index --project /path/to/project --output /tmp/foundry-design-graph.json
|
|
79
|
+
pnpm foundry start --project /path/to/project
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The runtime binds to `127.0.0.1:4387`. Inspector preview changes remain temporary. Setup edits only the development integration and coding-agent configuration it shows before confirmation.
|
|
83
|
+
|
|
84
|
+
## Repository layout
|
|
85
|
+
|
|
86
|
+
- `packages/protocol`: versioned schemas and ledger rules
|
|
87
|
+
- `packages/runtime`: localhost session service and persistence
|
|
88
|
+
- `packages/cli`: project detection, initialization, launch, export, and doctor commands
|
|
89
|
+
- `packages/web-adapter`: injected browser inspector
|
|
90
|
+
- `packages/react-native-adapter`: React Native debug bridge
|
|
91
|
+
- `packages/mcp-server`: agent tools backed by the runtime
|
|
92
|
+
- `packages/swiftui-adapter`: Swift package for inspectable SwiftUI views
|
|
93
|
+
- `apps/inspector`: session dashboard and review surface
|
|
94
|
+
- `examples/web-fixture`: end-to-end browser fixture
|
|
95
|
+
|
|
96
|
+
## Safety model
|
|
97
|
+
|
|
98
|
+
Foundry stores sessions locally under the operating system application-support directory, binds only to loopback, and requires a per-session token. Preview overrides are temporary. The coding agent must propose a normal source diff and run project validation before a change can be marked applied.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface NativeGeometry {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
scale?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface NativeSourceRef {
|
|
9
|
+
file: string;
|
|
10
|
+
line?: number;
|
|
11
|
+
column?: number;
|
|
12
|
+
symbol?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface NativeControl {
|
|
15
|
+
id: string;
|
|
16
|
+
category: 'layout' | 'spacing' | 'typography' | 'color' | 'border' | 'effect' | 'content' | 'asset' | 'visibility' | 'accessibility' | 'responsive' | 'state' | 'motion';
|
|
17
|
+
property: string;
|
|
18
|
+
label: string;
|
|
19
|
+
valueType: 'number' | 'string' | 'boolean' | 'color' | 'length' | 'select' | 'asset' | 'motion';
|
|
20
|
+
value: unknown;
|
|
21
|
+
min?: number;
|
|
22
|
+
max?: number;
|
|
23
|
+
step?: number;
|
|
24
|
+
unit?: string;
|
|
25
|
+
options?: Array<{
|
|
26
|
+
label: string;
|
|
27
|
+
value: unknown;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
export interface NativeInspectable {
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
semanticRole: string;
|
|
34
|
+
componentPath?: string[];
|
|
35
|
+
source?: NativeSourceRef;
|
|
36
|
+
measure(): Promise<NativeGeometry>;
|
|
37
|
+
controls: NativeControl[];
|
|
38
|
+
applyPreview(property: string, value: unknown): void | Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
export interface ReactNativeAdapterOptions {
|
|
41
|
+
sessionId: string;
|
|
42
|
+
token: string;
|
|
43
|
+
runtimeUrl?: string;
|
|
44
|
+
width: number;
|
|
45
|
+
height: number;
|
|
46
|
+
captureFrame?: () => Promise<string | undefined>;
|
|
47
|
+
publishIntervalMs?: number;
|
|
48
|
+
pollIntervalMs?: number;
|
|
49
|
+
}
|
|
50
|
+
export declare class FoundryReactNativeAdapter {
|
|
51
|
+
private readonly options;
|
|
52
|
+
private readonly runtimeUrl;
|
|
53
|
+
private readonly inspectables;
|
|
54
|
+
private publishTimer?;
|
|
55
|
+
private commandTimer?;
|
|
56
|
+
private lastCommand;
|
|
57
|
+
constructor(options: ReactNativeAdapterOptions);
|
|
58
|
+
register(inspectable: NativeInspectable): () => void;
|
|
59
|
+
publishSurface(): Promise<void>;
|
|
60
|
+
pollCommands(): Promise<void>;
|
|
61
|
+
start(): void;
|
|
62
|
+
stop(): void;
|
|
63
|
+
private request;
|
|
64
|
+
}
|
|
65
|
+
export declare function createFoundryNativeAdapter(options: ReactNativeAdapterOptions): FoundryReactNativeAdapter;
|
|
66
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EACJ,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,OAAO,GACP,QAAQ,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,QAAQ,GAAG,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AAC,YAAY,CAAwC;IACrE,OAAO,CAAC,YAAY,CAAC,CAAiC;IACtD,OAAO,CAAC,YAAY,CAAC,CAAiC;IACtD,OAAO,CAAC,WAAW,CAAM;gBAEI,OAAO,EAAE,yBAAyB;IAI/D,QAAQ,CAAC,WAAW,EAAE,iBAAiB,GAAG,MAAM,IAAI;IAK9C,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAoC/B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAanC,KAAK,IAAI,IAAI;IAcb,IAAI,IAAI,IAAI;YAOE,OAAO;CAetB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,yBAAyB,GACjC,yBAAyB,CAE3B"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export class FoundryReactNativeAdapter {
|
|
2
|
+
options;
|
|
3
|
+
runtimeUrl;
|
|
4
|
+
inspectables = new Map();
|
|
5
|
+
publishTimer;
|
|
6
|
+
commandTimer;
|
|
7
|
+
lastCommand = '';
|
|
8
|
+
constructor(options) {
|
|
9
|
+
this.options = options;
|
|
10
|
+
this.runtimeUrl = (options.runtimeUrl ?? 'http://127.0.0.1:4387').replace(/\/$/, '');
|
|
11
|
+
}
|
|
12
|
+
register(inspectable) {
|
|
13
|
+
this.inspectables.set(inspectable.id, inspectable);
|
|
14
|
+
return () => this.inspectables.delete(inspectable.id);
|
|
15
|
+
}
|
|
16
|
+
async publishSurface() {
|
|
17
|
+
const entries = await Promise.all([...this.inspectables.values()].map(async (item) => ({
|
|
18
|
+
item,
|
|
19
|
+
geometry: await item.measure(),
|
|
20
|
+
})));
|
|
21
|
+
const frameDataUrl = await this.options.captureFrame?.();
|
|
22
|
+
const payload = {
|
|
23
|
+
platform: 'react-native',
|
|
24
|
+
width: this.options.width,
|
|
25
|
+
height: this.options.height,
|
|
26
|
+
frameDataUrl,
|
|
27
|
+
updatedAt: new Date().toISOString(),
|
|
28
|
+
targets: entries.map(({ item, geometry }) => ({
|
|
29
|
+
id: item.id,
|
|
30
|
+
platform: 'react-native',
|
|
31
|
+
semanticRole: item.semanticRole,
|
|
32
|
+
label: item.label,
|
|
33
|
+
componentPath: item.componentPath ?? [],
|
|
34
|
+
source: item.source,
|
|
35
|
+
geometry: { ...geometry, scale: geometry.scale ?? 1 },
|
|
36
|
+
locator: { nativeId: item.id },
|
|
37
|
+
confidence: item.source ? 'instrumented' : 'measured',
|
|
38
|
+
evidence: ['measureInWindow', 'Foundry debug registration'],
|
|
39
|
+
})),
|
|
40
|
+
controlsByTarget: Object.fromEntries(entries.map(({ item }) => [
|
|
41
|
+
item.id,
|
|
42
|
+
item.controls.map((control) => ({ ...control, previewable: true, supported: true })),
|
|
43
|
+
])),
|
|
44
|
+
};
|
|
45
|
+
await this.request('/surface', { method: 'POST', body: JSON.stringify(payload) });
|
|
46
|
+
}
|
|
47
|
+
async pollCommands() {
|
|
48
|
+
const data = (await this.request(`/commands?after=${encodeURIComponent(this.lastCommand)}`));
|
|
49
|
+
for (const command of data.commands) {
|
|
50
|
+
const target = this.inspectables.get(command.targetId);
|
|
51
|
+
if (target)
|
|
52
|
+
await target.applyPreview(command.property, command.value);
|
|
53
|
+
this.lastCommand = command.createdAt;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
start() {
|
|
57
|
+
if (this.publishTimer)
|
|
58
|
+
return;
|
|
59
|
+
void this.publishSurface();
|
|
60
|
+
void this.pollCommands();
|
|
61
|
+
this.publishTimer = setInterval(() => void this.publishSurface(), this.options.publishIntervalMs ?? 1000);
|
|
62
|
+
this.commandTimer = setInterval(() => void this.pollCommands(), this.options.pollIntervalMs ?? 350);
|
|
63
|
+
}
|
|
64
|
+
stop() {
|
|
65
|
+
if (this.publishTimer)
|
|
66
|
+
clearInterval(this.publishTimer);
|
|
67
|
+
if (this.commandTimer)
|
|
68
|
+
clearInterval(this.commandTimer);
|
|
69
|
+
this.publishTimer = undefined;
|
|
70
|
+
this.commandTimer = undefined;
|
|
71
|
+
}
|
|
72
|
+
async request(path, options = {}) {
|
|
73
|
+
const response = await fetch(`${this.runtimeUrl}/v1/sessions/${this.options.sessionId}${path}`, {
|
|
74
|
+
...options,
|
|
75
|
+
headers: {
|
|
76
|
+
'content-type': 'application/json',
|
|
77
|
+
'x-foundry-token': this.options.token,
|
|
78
|
+
...options.headers,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
if (!response.ok)
|
|
82
|
+
throw new Error(`Foundry native bridge failed: ${response.status}`);
|
|
83
|
+
return response.json();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export function createFoundryNativeAdapter(options) {
|
|
87
|
+
return new FoundryReactNativeAdapter(options);
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA4DA,MAAM,OAAO,yBAAyB;IAOP;IANZ,UAAU,CAAS;IACnB,YAAY,GAAG,IAAI,GAAG,EAA6B,CAAC;IAC7D,YAAY,CAAkC;IAC9C,YAAY,CAAkC;IAC9C,WAAW,GAAG,EAAE,CAAC;IAEzB,YAA6B,OAAkC;QAAlC,YAAO,GAAP,OAAO,CAA2B;QAC7D,IAAI,CAAC,UAAU,GAAG,CAAC,OAAO,CAAC,UAAU,IAAI,uBAAuB,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACvF,CAAC;IAED,QAAQ,CAAC,WAA8B;QACrC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;QACnD,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,CAAC,GAAG,IAAI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AAI,CAAC,YAAY,EAAE,EAC9B,IAAI,CAAC,OAAO,CAAC,cAAc,IAAI,GAAG,CACnC,CAAC;IACJ,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,YAAY;YAAE,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxD,IAAI,IAAI,CAAC,YAAY;YAAE,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxD,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAC9B,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;IAChC,CAAC;IAEO,KAAK,CAAC,OAAO,CAAC,IAAY,EAAE,UAAuB,EAAE;QAC3D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,GAAG,IAAI,CAAC,UAAU,gBAAgB,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,EAAE,EACjE;YACE,GAAG,OAAO;YACV,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK;gBACrC,GAAG,OAAO,CAAC,OAAO;aACnB;SACF,CACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QACtF,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;CACF;AAED,MAAM,UAAU,0BAA0B,CACxC,OAAkC;IAElC,OAAO,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;AAChD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "foundry-design-react-native-adapter",
|
|
3
|
+
"version": "0.2.0-beta.1",
|
|
4
|
+
"description": "React Native adapter for Foundry Design Control",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"!dist/*.test.*",
|
|
17
|
+
"!dist/**/*.test.*"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"homepage": "https://github.com/seanx24x/foundry-design-control#readme",
|
|
24
|
+
"bugs": "https://github.com/seanx24x/foundry-design-control/issues",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/seanx24x/foundry-design-control.git",
|
|
28
|
+
"directory": "packages/react-native-adapter"
|
|
29
|
+
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc -p tsconfig.json",
|
|
35
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
36
|
+
"test": "node --import tsx --test src/*.test.ts"
|
|
37
|
+
}
|
|
38
|
+
}
|