inkbridge 0.1.0-beta.17 → 0.1.0-beta.19
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/README.md +15 -11
- package/bin/inkbridge.mjs +0 -0
- package/code.js +24 -24
- package/package.json +46 -23
- package/scanner/block-cache-regression.ts +195 -0
- package/scanner/child-sizing-matrix-regression.ts +303 -0
- package/scanner/component-scanner.ts +230 -3
- package/scanner/component-sections-regression.ts +198 -0
- package/scanner/compound-classes-lookup-regression.ts +163 -0
- package/scanner/cva-jsx-child-fallback-regression.ts +98 -0
- package/scanner/cva-master-icon-regression.ts +315 -0
- package/scanner/data-attr-prop-alias-regression.ts +129 -0
- package/scanner/explicit-size-root-regression.ts +102 -0
- package/scanner/framework-adapter-shadcn-regression.ts +385 -0
- package/scanner/full-width-matrix-regression.ts +338 -0
- package/scanner/image-src-collector-regression.ts +204 -0
- package/scanner/instance-rendering-regression.ts +224 -0
- package/scanner/layout-sizing-regression.ts +71 -0
- package/scanner/provider-cascade-regression.ts +224 -0
- package/scanner/provider-flatten-regression.ts +235 -0
- package/scanner/render-prop-parser-regression.ts +161 -0
- package/scanner/sandbox-spread-regression.ts +125 -0
- package/scanner/selection-pressed-regression.ts +241 -0
- package/scanner/size-full-normalization-regression.ts +127 -0
- package/scanner/story-diagnostics-regression.ts +216 -0
- package/scanner/story-dimensioning-regression.ts +298 -0
- package/scanner/story-render-strategy-regression.ts +205 -0
- package/scanner/stretch-to-parent-width-regression.ts +113 -0
- package/scanner/text-resize-matrix-regression.ts +173 -0
- package/src/components/component-instance.ts +148 -0
- package/src/components/component-lookup.ts +4 -0
- package/src/design-system/block-cache.ts +130 -0
- package/src/design-system/component-sections.ts +107 -0
- package/src/design-system/cva-master.ts +16 -0
- package/src/design-system/instance-rendering.ts +307 -0
- package/src/design-system/node-helpers.ts +1 -1
- package/src/design-system/node-variants.ts +42 -3
- package/src/design-system/preview-builder.ts +35 -0
- package/src/design-system/render-prop-parser.ts +50 -0
- package/src/design-system/story-builder.ts +27 -854
- package/src/design-system/story-diagnostics.ts +80 -0
- package/src/design-system/story-dimensioning.ts +272 -0
- package/src/design-system/story-frames.ts +22 -0
- package/src/design-system/story-render-strategy.ts +150 -0
- package/src/design-system/symbol-source.ts +26 -1
- package/src/design-system/ui-builder.ts +171 -51
- package/src/effects/portal-panel.ts +7 -3
- package/src/framework-adapters/index.ts +34 -0
- package/src/framework-adapters/shadcn.ts +525 -0
- package/src/layout/deferred-layout.ts +7 -0
- package/src/layout/index.ts +1 -0
- package/src/layout/layout-parser.ts +26 -0
- package/src/layout/parser/ir.ts +2 -0
- package/src/layout/parser/sizing.ts +57 -0
- package/src/layout/parser/spacing.ts +10 -6
- package/src/layout/text-resize-decision.ts +51 -0
- package/src/layout/width-solver.ts +10 -2
- package/src/main.ts +1 -34
- package/src/plugin/dev-server.ts +1 -1
- package/src/plugin/image-src-collector.ts +52 -0
- package/src/render-engine-version.ts +1 -1
- package/src/tailwind/class-utils.ts +15 -0
- package/src/tailwind/jsx-utils.ts +1 -1
- package/src/tailwind/node-ir.ts +23 -5
- package/src/tailwind/tailwind.ts +172 -6
- package/src/tokens/colors.ts +6 -2
- package/src/tokens/tokens.ts +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
Generates native Figma frames and reusable Figma component instances from your Tailwind React components, and syncs design tokens back to your codebase via GitHub PRs.
|
|
6
6
|
|
|
7
|
+
<img src="https://inkbridge.ink/docs/mediacards-figma.png" alt="An Inkbridge-generated Figma page showing component variants rendered as native Figma frames" />
|
|
8
|
+
|
|
9
|
+
> Read the methodology behind this — stories as the single source of truth between design and code: [inkbridge.ink/methodology](https://inkbridge.ink/methodology). Browse the full docs at [inkbridge.ink/docs](https://inkbridge.ink/docs).
|
|
10
|
+
|
|
7
11
|
## What it does
|
|
8
12
|
|
|
9
13
|
| Feature | Description |
|
|
@@ -85,9 +89,9 @@ pnpm inkbridge:scan
|
|
|
85
89
|
|
|
86
90
|
Writes `.inkbridge/component-definitions.json`. Useful for debugging scanner output.
|
|
87
91
|
|
|
88
|
-
### Push to Code
|
|
92
|
+
### Push to Code
|
|
89
93
|
|
|
90
|
-
|
|
94
|
+
Sync token edits from Figma back to your codebase as a GitHub PR.
|
|
91
95
|
|
|
92
96
|
1. **Plugins → Development → Inkbridge → Settings**
|
|
93
97
|
2. Fill in:
|
|
@@ -101,7 +105,6 @@ Requires a Pro license and GitHub configuration.
|
|
|
101
105
|
- **Allow New Tokens from Figma** — optional; permits creating new token keys on push (off by default)
|
|
102
106
|
- **New Token Prefixes** — optional comma-separated allowlist (for example `chart-, brand-`)
|
|
103
107
|
- **GitHub token** — a [fine-grained PAT](https://github.com/settings/tokens?type=beta) with `Contents` and `Pull requests` read & write
|
|
104
|
-
- **License key** — from your Inkbridge account
|
|
105
108
|
3. **Save Settings**
|
|
106
109
|
4. **Plugins → Development → Inkbridge → Push to Code**
|
|
107
110
|
5. Enter a commit message and click **Push Tokens to Code** (it auto-detects token changes and opens the PR step)
|
|
@@ -177,13 +180,13 @@ ignores:
|
|
|
177
180
|
"react/forbid-dom-props": ["error", {
|
|
178
181
|
"forbid": [{
|
|
179
182
|
"propName": "style",
|
|
180
|
-
"message": "
|
|
183
|
+
"message": "Use Tailwind classes — Inkbridge ignores inline styles."
|
|
181
184
|
}]
|
|
182
185
|
}],
|
|
183
186
|
"react/forbid-component-props": ["error", {
|
|
184
187
|
"forbid": [{
|
|
185
188
|
"propName": "style",
|
|
186
|
-
"message": "
|
|
189
|
+
"message": "Use Tailwind classes — Inkbridge ignores inline styles."
|
|
187
190
|
}]
|
|
188
191
|
}]
|
|
189
192
|
}
|
|
@@ -258,15 +261,16 @@ Component data is always scanned live — you only need to update when a new `in
|
|
|
258
261
|
|
|
259
262
|
```
|
|
260
263
|
Figma plugin (sandboxed)
|
|
261
|
-
└── code.js
|
|
262
|
-
└── ui.html
|
|
264
|
+
└── code.js Main logic — no direct network access
|
|
265
|
+
└── ui.html Hidden iframe — relays I/O for code.js
|
|
263
266
|
|
|
264
|
-
code.js
|
|
265
|
-
|
|
266
|
-
|
|
267
|
+
code.js → ui.html → localhost:4000/api/inkbridge/scan-components
|
|
268
|
+
→ localhost:4000/api/inkbridge/patch-tokens
|
|
269
|
+
→ https://api.github.com
|
|
267
270
|
```
|
|
268
271
|
|
|
269
|
-
All network I/O is relayed through the UI iframe via `postMessage`
|
|
272
|
+
All network I/O is relayed through the UI iframe via `postMessage`
|
|
273
|
+
because the Figma plugin sandbox can't make requests directly.
|
|
270
274
|
|
|
271
275
|
---
|
|
272
276
|
|
package/bin/inkbridge.mjs
CHANGED
|
File without changes
|