sculpted 0.2.3 → 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.
package/README.md CHANGED
@@ -76,6 +76,10 @@ routes for supported saves.
76
76
  In production builds, the plugin is dark: no runtime script is injected, no inspector metadata is
77
77
  added, and no manifest or writeback route is registered.
78
78
 
79
+ React Router 7 framework-mode apps need one extra development-only runtime script in the root
80
+ document because React Router renders HTML outside Vite's `index.html` transform. See
81
+ [React Router 7 framework mode](docs/vite-plugin.md#react-router-7-framework-mode).
82
+
79
83
  See [Vite plugin options](docs/vite-plugin.md) for the full option surface, defaults, and endpoint
80
84
  configuration.
81
85
 
@@ -129,6 +133,8 @@ No editable entries appear:
129
133
  - Confirm the file is included by the plugin `include` patterns.
130
134
  - Confirm the element uses a local static `css({ ... })` object literal imported from your Panda
131
135
  `styled-system/css` path.
136
+ - In React Router 7 framework mode, confirm the root document includes the development-only
137
+ `/@sculpted/runtime` script.
132
138
  - Open `/@sculpted/manifest` while the dev server is running and check whether entries exist.
133
139
 
134
140
  The inspector shows a target as read-only:
@@ -136,7 +142,7 @@ The inspector shows a target as read-only:
136
142
  - Check for variable style objects, object spreads, computed keys, dynamic values, recipes, patterns,
137
143
  `cva()`, or JSX style props.
138
144
  - For TSRX, check that the file uses supported TSRX component syntax and that
139
- `tsrxSourceParserAdapter` is configured.
145
+ `sourceSyntax` from `sculpted/tsrx` is configured.
140
146
 
141
147
  Save fails:
142
148
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { $ as StyleModuleEditRequest, A as RuntimeAttribute, B as SourcePosition, C as OpenSourceLocationRequest, D as PreviewStyleCondition, E as PandaStyleObject, F as RuntimePropertyContext, G as StyleEdit, H as SourceTarget, I as RuntimeStyleEvidence, J as StyleEditError, K as StyleEditBatchRequest, L as SelectedElementInfo, M as RuntimeComponentLayerElement, N as RuntimeCssDeclaration, O as PreviewStyleRule, P as RuntimeElementBounds, Q as StyleEditResponse, R as SelectedElementState, S as OpenSourceLocationErrorCode, T as PandaCssSourceTarget, U as SourceTargetBase, V as SourceRange, W as SourceTargetKind, X as StyleEditOptions, Y as StyleEditErrorCode, Z as StyleEditRequest, _ as InspectorManifest, a as EditorColorTokenMetadata, at as TokenConfigEditResponse, b as JsonValue, c as EditorMetadataUnavailableReason, d as EditorPropertyMetadata, et as StyleModuleSourceAttachRequest, f as EditorTokenSourceSection, g as InspectorEditorMetadata, h as InlineCssSourceCreateRequest, i as DynamicSourceTarget, it as TokenConfigEditRequest, j as RuntimeComponentLayer, k as PreviewStyleSheet, l as EditorMetadataUpdateEvent, m as ExternalSourceTarget, n as ComponentStyleModuleSource, nt as StyleModuleSourceDetachRequest, o as EditorFontTokenMetadata, ot as UnsupportedReason, p as EditorTokenSourceTarget, q as StyleEditBatchResponse, r as Confidence, rt as StyleValueSource, s as EditorMetadataSection, st as UnsupportedSourceTarget, t as ComponentStyleModuleResponse, tt as StyleModuleSourceCreateRequest, u as EditorPropertyCategory, v as InspectorManifestEntry, w as OpenSourceLocationResponse, x as ManifestUpdateEvent, y as JsonPrimitive, z as SourceLocation } from "./types-CdByW0ji.mjs";
2
- import { _ as typescriptPandaAstAdapter, a as SourceAstKind, c as SourceSyntaxAdapter, d as parsePandaSource, f as parseWithSourceParserAdapter, g as tsxSourceSyntaxAdapter, h as tsxSourceParserAdapter, i as ParsedPandaSource, l as SourceSyntaxOption, m as tsrxSourceParserAdapter, n as PandaSourceAstAdapter, o as SourceParseResult, p as resolveSourceParserAdapter, r as ParseSourceSyntaxOptions, s as SourceParserAdapter, t as EstreeNode, u as createEstreePandaAstAdapter } from "./sourceSyntax-DanNzS7Y.mjs";
2
+ import { a as SourceAstKind, c as SourceSyntaxAdapter, d as parsePandaSource, f as parseWithSourceParserAdapter, g as typescriptPandaAstAdapter, h as tsxSourceSyntaxAdapter, i as ParsedPandaSource, l as SourceSyntaxOption, m as tsxSourceParserAdapter, n as PandaSourceAstAdapter, o as SourceParseResult, p as resolveSourceParserAdapter, r as ParseSourceSyntaxOptions, s as SourceParserAdapter, t as EstreeNode, u as createEstreePandaAstAdapter } from "./sourceSyntax-U2iybN9L.mjs";
3
3
 
4
4
  //#region src/analyzer/pandaCssAnalyzer.d.ts
5
5
  type AnalyzePandaCssSourceOptions = {
@@ -126,4 +126,4 @@ declare const SCULPTED_EVENTS: {
126
126
  };
127
127
  type SculptedEventName = (typeof SCULPTED_EVENTS)[keyof typeof SCULPTED_EVENTS];
128
128
  //#endregion
129
- export { AnalyzePandaCssSourceOptions, AnalyzePandaCssSourceResult, ComponentStyleModulePaths, ComponentStyleModuleResponse, ComponentStyleModuleSource, Confidence, CreateInlineCssSourcePatchOptions, CreateStaticCssPatchOptions, CreateTokenConfigPatchOptions, DEFAULT_COMPONENT_ATTRIBUTE, DEFAULT_EDITOR_METADATA_ENDPOINT, DEFAULT_EDIT_ID_ATTRIBUTE, DEFAULT_FORCED_STATE_ATTRIBUTE, DEFAULT_JSX_SOURCE_ATTRIBUTE, DEFAULT_MANIFEST_ENDPOINT, DEFAULT_MARKER_CLASS_PREFIX, DEFAULT_OPEN_SOURCE_ENDPOINT, DEFAULT_SOURCE_ATTRIBUTE, DEFAULT_STYLE_MODULE_ENDPOINT, DEFAULT_TOKEN_WRITEBACK_ENDPOINT, DEFAULT_WRITEBACK_ENDPOINT, DynamicSourceTarget, EditorColorTokenMetadata, EditorFontTokenMetadata, EditorMetadataSection, EditorMetadataUnavailableReason, EditorMetadataUpdateEvent, EditorPropertyCategory, EditorPropertyMetadata, EditorTokenSourceSection, EditorTokenSourceTarget, EstreeNode, ExternalSourceTarget, InlineCssSourceCreateRequest, InspectorEditorMetadata, InspectorManifest, InspectorManifestEntry, JsonPrimitive, JsonValue, ManifestUpdateEvent, OpenSourceLocationErrorCode, OpenSourceLocationRequest, OpenSourceLocationResponse, PandaCssSourceTarget, PandaSourceAstAdapter, PandaStyleObject, ParseSourceSyntaxOptions, ParsedPandaSource, PreviewStyleCondition, PreviewStyleRule, PreviewStyleSheet, RuntimeAttribute, RuntimeComponentLayer, RuntimeComponentLayerElement, RuntimeCssDeclaration, RuntimeElementBounds, RuntimePropertyContext, RuntimeStyleEvidence, SCULPTED_EVENTS, SCULPTED_PROTOCOL_VERSION, SculptedEventName, SelectedElementInfo, SelectedElementState, SourceAstKind, SourceLocation, SourceParseResult, SourceParserAdapter, SourcePosition, SourceRange, SourceSyntaxAdapter, SourceSyntaxOption, SourceTarget, SourceTargetBase, SourceTargetKind, StyleEdit, StyleEditBatchRequest, StyleEditBatchResponse, StyleEditError, StyleEditErrorCode, StyleEditOptions, StyleEditRequest, StyleEditResponse, StyleModuleEditRequest, StyleModuleSourceAttachRequest, StyleModuleSourceCreateRequest, StyleModuleSourceDetachRequest, StyleValueSource, TokenConfigEditRequest, TokenConfigEditResponse, UnsupportedReason, UnsupportedSourceTarget, analyzePandaCssSource, componentStyleModulePaths, createEstreePandaAstAdapter, createInlineCssSourcePatch, createStaticCssBatchPatch, createStaticCssPatch, createStyleModuleAttachPatch, createStyleModuleDetachPatch, createStyleModuleSourcePatch, createTokenConfigPatch, editIdFromMarkerClass, editIdsFromMarkerClassList, hashSource, markerClassForEditId, parsePandaSource, parseWithSourceParserAdapter, readComponentStyleModule, resolveSourceParserAdapter, tsrxSourceParserAdapter, tsxSourceParserAdapter, tsxSourceSyntaxAdapter, typescriptPandaAstAdapter };
129
+ export { AnalyzePandaCssSourceOptions, AnalyzePandaCssSourceResult, ComponentStyleModulePaths, ComponentStyleModuleResponse, ComponentStyleModuleSource, Confidence, CreateInlineCssSourcePatchOptions, CreateStaticCssPatchOptions, CreateTokenConfigPatchOptions, DEFAULT_COMPONENT_ATTRIBUTE, DEFAULT_EDITOR_METADATA_ENDPOINT, DEFAULT_EDIT_ID_ATTRIBUTE, DEFAULT_FORCED_STATE_ATTRIBUTE, DEFAULT_JSX_SOURCE_ATTRIBUTE, DEFAULT_MANIFEST_ENDPOINT, DEFAULT_MARKER_CLASS_PREFIX, DEFAULT_OPEN_SOURCE_ENDPOINT, DEFAULT_SOURCE_ATTRIBUTE, DEFAULT_STYLE_MODULE_ENDPOINT, DEFAULT_TOKEN_WRITEBACK_ENDPOINT, DEFAULT_WRITEBACK_ENDPOINT, DynamicSourceTarget, EditorColorTokenMetadata, EditorFontTokenMetadata, EditorMetadataSection, EditorMetadataUnavailableReason, EditorMetadataUpdateEvent, EditorPropertyCategory, EditorPropertyMetadata, EditorTokenSourceSection, EditorTokenSourceTarget, EstreeNode, ExternalSourceTarget, InlineCssSourceCreateRequest, InspectorEditorMetadata, InspectorManifest, InspectorManifestEntry, JsonPrimitive, JsonValue, ManifestUpdateEvent, OpenSourceLocationErrorCode, OpenSourceLocationRequest, OpenSourceLocationResponse, PandaCssSourceTarget, PandaSourceAstAdapter, PandaStyleObject, ParseSourceSyntaxOptions, ParsedPandaSource, PreviewStyleCondition, PreviewStyleRule, PreviewStyleSheet, RuntimeAttribute, RuntimeComponentLayer, RuntimeComponentLayerElement, RuntimeCssDeclaration, RuntimeElementBounds, RuntimePropertyContext, RuntimeStyleEvidence, SCULPTED_EVENTS, SCULPTED_PROTOCOL_VERSION, SculptedEventName, SelectedElementInfo, SelectedElementState, SourceAstKind, SourceLocation, SourceParseResult, SourceParserAdapter, SourcePosition, SourceRange, SourceSyntaxAdapter, SourceSyntaxOption, SourceTarget, SourceTargetBase, SourceTargetKind, StyleEdit, StyleEditBatchRequest, StyleEditBatchResponse, StyleEditError, StyleEditErrorCode, StyleEditOptions, StyleEditRequest, StyleEditResponse, StyleModuleEditRequest, StyleModuleSourceAttachRequest, StyleModuleSourceCreateRequest, StyleModuleSourceDetachRequest, StyleValueSource, TokenConfigEditRequest, TokenConfigEditResponse, UnsupportedReason, UnsupportedSourceTarget, analyzePandaCssSource, componentStyleModulePaths, createEstreePandaAstAdapter, createInlineCssSourcePatch, createStaticCssBatchPatch, createStaticCssPatch, createStyleModuleAttachPatch, createStyleModuleDetachPatch, createStyleModuleSourcePatch, createTokenConfigPatch, editIdFromMarkerClass, editIdsFromMarkerClassList, hashSource, markerClassForEditId, parsePandaSource, parseWithSourceParserAdapter, readComponentStyleModule, resolveSourceParserAdapter, tsxSourceParserAdapter, tsxSourceSyntaxAdapter, typescriptPandaAstAdapter };
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { _ as markerClassForEditId, a as DEFAULT_JSX_SOURCE_ATTRIBUTE, c as DEFAULT_OPEN_SOURCE_ENDPOINT, d as DEFAULT_TOKEN_WRITEBACK_ENDPOINT, f as DEFAULT_WRITEBACK_ENDPOINT, g as editIdsFromMarkerClassList, h as editIdFromMarkerClass, i as DEFAULT_FORCED_STATE_ATTRIBUTE, l as DEFAULT_SOURCE_ATTRIBUTE, m as SCULPTED_PROTOCOL_VERSION, n as DEFAULT_EDITOR_METADATA_ENDPOINT, o as DEFAULT_MANIFEST_ENDPOINT, p as SCULPTED_EVENTS, r as DEFAULT_EDIT_ID_ATTRIBUTE, s as DEFAULT_MARKER_CLASS_PREFIX, t as DEFAULT_COMPONENT_ATTRIBUTE, u as DEFAULT_STYLE_MODULE_ENDPOINT } from "./protocol-D5heR2QM.mjs";
2
- import { C as tsrxSourceParserAdapter, E as typescriptPandaAstAdapter, S as resolveSourceParserAdapter, T as tsxSourceSyntaxAdapter, _ as analyzePandaCssSource, a as createStyleModuleSourcePatch, b as parsePandaSource, g as createInlineCssSourcePatch, h as createStaticCssPatch, i as createStyleModuleDetachPatch, m as createStaticCssBatchPatch, n as componentStyleModulePaths, o as readComponentStyleModule, r as createStyleModuleAttachPatch, t as createTokenConfigPatch, v as hashSource, w as tsxSourceParserAdapter, x as parseWithSourceParserAdapter, y as createEstreePandaAstAdapter } from "./patcher-BelI8KIj.mjs";
3
- export { DEFAULT_COMPONENT_ATTRIBUTE, DEFAULT_EDITOR_METADATA_ENDPOINT, DEFAULT_EDIT_ID_ATTRIBUTE, DEFAULT_FORCED_STATE_ATTRIBUTE, DEFAULT_JSX_SOURCE_ATTRIBUTE, DEFAULT_MANIFEST_ENDPOINT, DEFAULT_MARKER_CLASS_PREFIX, DEFAULT_OPEN_SOURCE_ENDPOINT, DEFAULT_SOURCE_ATTRIBUTE, DEFAULT_STYLE_MODULE_ENDPOINT, DEFAULT_TOKEN_WRITEBACK_ENDPOINT, DEFAULT_WRITEBACK_ENDPOINT, SCULPTED_EVENTS, SCULPTED_PROTOCOL_VERSION, analyzePandaCssSource, componentStyleModulePaths, createEstreePandaAstAdapter, createInlineCssSourcePatch, createStaticCssBatchPatch, createStaticCssPatch, createStyleModuleAttachPatch, createStyleModuleDetachPatch, createStyleModuleSourcePatch, createTokenConfigPatch, editIdFromMarkerClass, editIdsFromMarkerClassList, hashSource, markerClassForEditId, parsePandaSource, parseWithSourceParserAdapter, readComponentStyleModule, resolveSourceParserAdapter, tsrxSourceParserAdapter, tsxSourceParserAdapter, tsxSourceSyntaxAdapter, typescriptPandaAstAdapter };
2
+ import { C as tsxSourceParserAdapter, S as resolveSourceParserAdapter, T as typescriptPandaAstAdapter, _ as analyzePandaCssSource, a as createStyleModuleSourcePatch, b as parsePandaSource, g as createInlineCssSourcePatch, h as createStaticCssPatch, i as createStyleModuleDetachPatch, m as createStaticCssBatchPatch, n as componentStyleModulePaths, o as readComponentStyleModule, r as createStyleModuleAttachPatch, t as createTokenConfigPatch, v as hashSource, w as tsxSourceSyntaxAdapter, x as parseWithSourceParserAdapter, y as createEstreePandaAstAdapter } from "./patcher-DQgKdozw.mjs";
3
+ export { DEFAULT_COMPONENT_ATTRIBUTE, DEFAULT_EDITOR_METADATA_ENDPOINT, DEFAULT_EDIT_ID_ATTRIBUTE, DEFAULT_FORCED_STATE_ATTRIBUTE, DEFAULT_JSX_SOURCE_ATTRIBUTE, DEFAULT_MANIFEST_ENDPOINT, DEFAULT_MARKER_CLASS_PREFIX, DEFAULT_OPEN_SOURCE_ENDPOINT, DEFAULT_SOURCE_ATTRIBUTE, DEFAULT_STYLE_MODULE_ENDPOINT, DEFAULT_TOKEN_WRITEBACK_ENDPOINT, DEFAULT_WRITEBACK_ENDPOINT, SCULPTED_EVENTS, SCULPTED_PROTOCOL_VERSION, analyzePandaCssSource, componentStyleModulePaths, createEstreePandaAstAdapter, createInlineCssSourcePatch, createStaticCssBatchPatch, createStaticCssPatch, createStyleModuleAttachPatch, createStyleModuleDetachPatch, createStyleModuleSourcePatch, createTokenConfigPatch, editIdFromMarkerClass, editIdsFromMarkerClassList, hashSource, markerClassForEditId, parsePandaSource, parseWithSourceParserAdapter, readComponentStyleModule, resolveSourceParserAdapter, tsxSourceParserAdapter, tsxSourceSyntaxAdapter, typescriptPandaAstAdapter };
@@ -1,5 +1,4 @@
1
1
  import "./protocol-D5heR2QM.mjs";
2
- import { parseModule } from "@tsrx/core";
3
2
  import ts from "typescript";
4
3
  //#region src/sourceSyntax.ts
5
4
  function parseWithSourceParserAdapter(adapter, options) {
@@ -43,25 +42,6 @@ const tsxSourceParserAdapter = {
43
42
  }
44
43
  };
45
44
  const tsxSourceSyntaxAdapter = tsxSourceParserAdapter;
46
- const tsrxSourceParserAdapter = {
47
- languageId: "tsrx",
48
- kind: "estree",
49
- isSupportedFile(filePath) {
50
- return filePath.endsWith(".tsrx");
51
- },
52
- parse(options) {
53
- const comments = [];
54
- return {
55
- kind: "estree",
56
- languageId: "tsrx",
57
- program: parseModule(options.sourceText, options.filePath, {
58
- collect: true,
59
- comments
60
- }),
61
- comments
62
- };
63
- }
64
- };
65
45
  function scriptKindForFile(filePath) {
66
46
  if (/\.[cm]?tsx$/.test(filePath)) return ts.ScriptKind.TSX;
67
47
  if (/\.[cm]?jsx$/.test(filePath)) return ts.ScriptKind.JSX;
@@ -2611,4 +2591,4 @@ function failure(editId, code, message, details) {
2611
2591
  };
2612
2592
  }
2613
2593
  //#endregion
2614
- export { tsrxSourceParserAdapter as C, typescriptPandaAstAdapter as E, resolveSourceParserAdapter as S, tsxSourceSyntaxAdapter as T, analyzePandaCssSource as _, createStyleModuleSourcePatch as a, parsePandaSource as b, resolveProjectPath as c, toRelativeProjectPath as d, trustedManifestFilePath as f, createInlineCssSourcePatch as g, createStaticCssPatch as h, createStyleModuleDetachPatch as i, safeProjectSourcePath as l, createStaticCssBatchPatch as m, componentStyleModulePaths as n, readComponentStyleModule as o, trustedTokenSourceFilePath as p, createStyleModuleAttachPatch as r, normalizePath$2 as s, createTokenConfigPatch as t, stripViteQuery as u, hashSource as v, tsxSourceParserAdapter as w, parseWithSourceParserAdapter as x, createEstreePandaAstAdapter as y };
2594
+ export { tsxSourceParserAdapter as C, resolveSourceParserAdapter as S, typescriptPandaAstAdapter as T, analyzePandaCssSource as _, createStyleModuleSourcePatch as a, parsePandaSource as b, resolveProjectPath as c, toRelativeProjectPath as d, trustedManifestFilePath as f, createInlineCssSourcePatch as g, createStaticCssPatch as h, createStyleModuleDetachPatch as i, safeProjectSourcePath as l, createStaticCssBatchPatch as m, componentStyleModulePaths as n, readComponentStyleModule as o, trustedTokenSourceFilePath as p, createStyleModuleAttachPatch as r, normalizePath$2 as s, createTokenConfigPatch as t, stripViteQuery as u, hashSource as v, tsxSourceSyntaxAdapter as w, parseWithSourceParserAdapter as x, createEstreePandaAstAdapter as y };
@@ -96,8 +96,7 @@ declare function parsePandaSource(adapter: SourceSyntaxOption | undefined, optio
96
96
  declare function resolveSourceParserAdapter(filePath: string, adapter: SourceSyntaxOption | undefined): SourceParserAdapter;
97
97
  declare const tsxSourceParserAdapter: SourceParserAdapter;
98
98
  declare const tsxSourceSyntaxAdapter: SourceParserAdapter;
99
- declare const tsrxSourceParserAdapter: SourceParserAdapter;
100
99
  declare const typescriptPandaAstAdapter: PandaSourceAstAdapter<ts.SourceFile, ts.Node>;
101
100
  declare function createEstreePandaAstAdapter(root: EstreeNode): PandaSourceAstAdapter<EstreeNode, EstreeNode>;
102
101
  //#endregion
103
- export { typescriptPandaAstAdapter as _, SourceAstKind as a, SourceSyntaxAdapter as c, parsePandaSource as d, parseWithSourceParserAdapter as f, tsxSourceSyntaxAdapter as g, tsxSourceParserAdapter as h, ParsedPandaSource as i, SourceSyntaxOption as l, tsrxSourceParserAdapter as m, PandaSourceAstAdapter as n, SourceParseResult as o, resolveSourceParserAdapter as p, ParseSourceSyntaxOptions as r, SourceParserAdapter as s, EstreeNode as t, createEstreePandaAstAdapter as u };
102
+ export { SourceAstKind as a, SourceSyntaxAdapter as c, parsePandaSource as d, parseWithSourceParserAdapter as f, typescriptPandaAstAdapter as g, tsxSourceSyntaxAdapter as h, ParsedPandaSource as i, SourceSyntaxOption as l, tsxSourceParserAdapter as m, PandaSourceAstAdapter as n, SourceParseResult as o, resolveSourceParserAdapter as p, ParseSourceSyntaxOptions as r, SourceParserAdapter as s, EstreeNode as t, createEstreePandaAstAdapter as u };
@@ -0,0 +1,7 @@
1
+ import { s as SourceParserAdapter } from "./sourceSyntax-U2iybN9L.mjs";
2
+
3
+ //#region src/tsrx.d.ts
4
+ declare const sourceSyntax: SourceParserAdapter;
5
+ declare const tsrxSourceParserAdapter: SourceParserAdapter;
6
+ //#endregion
7
+ export { sourceSyntax, tsrxSourceParserAdapter };
package/dist/tsrx.mjs ADDED
@@ -0,0 +1,24 @@
1
+ import { parseModule } from "@tsrx/core";
2
+ //#region src/tsrx.ts
3
+ const sourceSyntax = {
4
+ languageId: "tsrx",
5
+ kind: "estree",
6
+ isSupportedFile(filePath) {
7
+ return filePath.endsWith(".tsrx");
8
+ },
9
+ parse(options) {
10
+ const comments = [];
11
+ return {
12
+ kind: "estree",
13
+ languageId: "tsrx",
14
+ program: parseModule(options.sourceText, options.filePath, {
15
+ collect: true,
16
+ comments
17
+ }),
18
+ comments
19
+ };
20
+ }
21
+ };
22
+ const tsrxSourceParserAdapter = sourceSyntax;
23
+ //#endregion
24
+ export { sourceSyntax, tsrxSourceParserAdapter };
package/dist/ui.mjs CHANGED
@@ -7935,10 +7935,6 @@ function InspectorPanel(props) {
7935
7935
  clearModifierPreview();
7936
7936
  return;
7937
7937
  }
7938
- if (isPanelEditableFocused()) {
7939
- clearModifierPreview();
7940
- return;
7941
- }
7942
7938
  setModifierPreviewCursor();
7943
7939
  hidePanelForModifierPreview();
7944
7940
  const element = inspectableElementFromPoint(runtime, event.clientX, event.clientY);
@@ -7950,6 +7946,7 @@ function InspectorPanel(props) {
7950
7946
  };
7951
7947
  const onModifierKeyDown = (event) => {
7952
7948
  if (!isOnlyShiftAlt(event)) return;
7949
+ if (event.key !== "Shift" && event.key !== "Alt") return;
7953
7950
  if (isPanelEditableFocused()) {
7954
7951
  clearModifierPreview();
7955
7952
  return;
package/dist/vite.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { l as SourceSyntaxOption } from "./sourceSyntax-DanNzS7Y.mjs";
1
+ import { l as SourceSyntaxOption } from "./sourceSyntax-U2iybN9L.mjs";
2
2
 
3
3
  //#region src/vite/types.d.ts
4
4
  type InspectorVitePluginOptions = {
package/dist/vite.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { _ as markerClassForEditId, c as DEFAULT_OPEN_SOURCE_ENDPOINT, d as DEFAULT_TOKEN_WRITEBACK_ENDPOINT, f as DEFAULT_WRITEBACK_ENDPOINT, p as SCULPTED_EVENTS, u as DEFAULT_STYLE_MODULE_ENDPOINT } from "./protocol-D5heR2QM.mjs";
2
- import { S as resolveSourceParserAdapter, _ as analyzePandaCssSource, a as createStyleModuleSourcePatch, b as parsePandaSource, c as resolveProjectPath, d as toRelativeProjectPath$1, f as trustedManifestFilePath, g as createInlineCssSourcePatch, h as createStaticCssPatch, i as createStyleModuleDetachPatch, l as safeProjectSourcePath, m as createStaticCssBatchPatch, n as componentStyleModulePaths, o as readComponentStyleModule, p as trustedTokenSourceFilePath, r as createStyleModuleAttachPatch, s as normalizePath$1, t as createTokenConfigPatch, u as stripViteQuery, v as hashSource } from "./patcher-BelI8KIj.mjs";
2
+ import { S as resolveSourceParserAdapter, _ as analyzePandaCssSource, a as createStyleModuleSourcePatch, b as parsePandaSource, c as resolveProjectPath, d as toRelativeProjectPath$1, f as trustedManifestFilePath, g as createInlineCssSourcePatch, h as createStaticCssPatch, i as createStyleModuleDetachPatch, l as safeProjectSourcePath, m as createStaticCssBatchPatch, n as componentStyleModulePaths, o as readComponentStyleModule, p as trustedTokenSourceFilePath, r as createStyleModuleAttachPatch, s as normalizePath$1, t as createTokenConfigPatch, u as stripViteQuery, v as hashSource } from "./patcher-DQgKdozw.mjs";
3
3
  import ts from "typescript";
4
4
  import { access, mkdir, readFile, writeFile } from "node:fs/promises";
5
5
  import { loadConfigAndCreateContext } from "@pandacss/node";
@@ -17,19 +17,30 @@ TSRX support is opt-in because `.tsrx` files need the ESTree-backed parser adapt
17
17
  ```ts
18
18
  // vite.config.ts
19
19
  import { defineConfig } from 'vite'
20
- import { tsrxSourceParserAdapter } from 'sculpted'
20
+ import { sourceSyntax } from 'sculpted/tsrx'
21
21
  import { sculpted } from 'sculpted/vite'
22
22
 
23
23
  export default defineConfig({
24
24
  plugins: [
25
25
  sculpted({
26
26
  include: ['src/**/*.{ts,tsx,tsrx}'],
27
- sourceSyntax: [tsrxSourceParserAdapter],
27
+ sourceSyntax: [sourceSyntax],
28
28
  }),
29
29
  ],
30
30
  })
31
31
  ```
32
32
 
33
+ When a config imports more than one syntax adapter, alias the TSRX export at the import site:
34
+
35
+ ```ts
36
+ import { sourceSyntax as tsrx } from 'sculpted/tsrx'
37
+
38
+ sculpted({
39
+ include: ['src/**/*.{ts,tsx,tsrx,view}'],
40
+ sourceSyntax: [tsrx, customViewSyntax],
41
+ })
42
+ ```
43
+
33
44
  The supported TSRX authoring shape is a TSRX component with a static Panda `css({ ... })` object:
34
45
 
35
46
  ```ts
@@ -15,6 +15,32 @@ export default defineConfig({
15
15
  The plugin runs with `enforce: 'pre'` so it can instrument supported source before framework
16
16
  plugins transform JSX. Keep it before React, Preact, or other JSX-transforming plugins.
17
17
 
18
+ ## React Router 7 Framework Mode
19
+
20
+ React Router 7 framework mode renders the document from the app's root module instead of serving a
21
+ Vite `index.html` entry. Sculpted can still instrument route modules and serve its manifest,
22
+ runtime, metadata, and writeback endpoints, but Vite does not call `transformIndexHtml` for that
23
+ framework-rendered document. Add the runtime script explicitly in development:
24
+
25
+ ```tsx
26
+ // app/root.tsx
27
+ <Scripts />
28
+ {import.meta.env.DEV && <script src="/@sculpted/runtime" type="module" />}
29
+ ```
30
+
31
+ Keep `sculpted()` before `reactRouter()` in `vite.config.ts` so route modules are instrumented
32
+ before React Router transforms them:
33
+
34
+ ```ts
35
+ import { reactRouter } from '@react-router/dev/vite'
36
+ import { defineConfig } from 'vite'
37
+ import { sculpted } from 'sculpted/vite'
38
+
39
+ export default defineConfig({
40
+ plugins: [sculpted(), reactRouter()],
41
+ })
42
+ ```
43
+
18
44
  ## Development Behavior
19
45
 
20
46
  In development, the plugin:
@@ -239,11 +265,22 @@ Adds one source parser adapter, or an ordered list of adapters, for non-standard
239
265
  can expose original source ranges. See [source syntax adapters](source-syntax-adapters.md).
240
266
 
241
267
  ```ts
242
- import { tsrxSourceParserAdapter } from 'sculpted'
268
+ import { sourceSyntax } from 'sculpted/tsrx'
243
269
 
244
270
  sculpted({
245
271
  include: ['src/**/*.{ts,tsx,tsrx}'],
246
- sourceSyntax: [tsrxSourceParserAdapter],
272
+ sourceSyntax: [sourceSyntax],
273
+ })
274
+ ```
275
+
276
+ If the config combines multiple adapters, alias the TSRX export where it is imported:
277
+
278
+ ```ts
279
+ import { sourceSyntax as tsrx } from 'sculpted/tsrx'
280
+
281
+ sculpted({
282
+ include: ['src/**/*.{ts,tsx,tsrx,view}'],
283
+ sourceSyntax: [tsrx, customViewSyntax],
247
284
  })
248
285
  ```
249
286
 
@@ -1,6 +1,6 @@
1
1
  import preact from '@preact/preset-vite'
2
2
  import tsrx from '@tsrx/vite-plugin-preact'
3
- import { tsrxSourceParserAdapter } from 'sculpted'
3
+ import { sourceSyntax } from 'sculpted/tsrx'
4
4
  import { sculpted } from 'sculpted/vite'
5
5
  import { defineConfig, } from 'vite'
6
6
 
@@ -9,7 +9,7 @@ export default defineConfig({
9
9
  sculpted({
10
10
  projectRoot: import.meta.dirname,
11
11
  include: ['src/**/*.{ts,tsx,tsrx}'],
12
- sourceSyntax: [tsrxSourceParserAdapter],
12
+ sourceSyntax: [sourceSyntax],
13
13
  panda: {
14
14
  cssImportSources: ['../styled-system/css']
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sculpted",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "Experimental alpha dev inspector for editing Panda CSS styles and writing safe source updates.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "author": "Alec Larson",
@@ -32,6 +32,10 @@
32
32
  "types": "./dist/vite.d.mts",
33
33
  "default": "./dist/vite.mjs"
34
34
  },
35
+ "./tsrx": {
36
+ "types": "./dist/tsrx.d.mts",
37
+ "default": "./dist/tsrx.mjs"
38
+ },
35
39
  "./runtime": {
36
40
  "types": "./dist/runtime.d.mts",
37
41
  "default": "./dist/runtime.mjs"
@@ -52,16 +56,22 @@
52
56
  "prepublishOnly": "pnpm check"
53
57
  },
54
58
  "dependencies": {
55
- "@pandacss/node": "1.11.1",
56
- "@tsrx/core": "0.1.25"
59
+ "@pandacss/node": "1.11.1"
57
60
  },
58
61
  "peerDependencies": {
62
+ "@tsrx/core": ">=0.1.0",
59
63
  "typescript": ">=5.0.0"
60
64
  },
65
+ "peerDependenciesMeta": {
66
+ "@tsrx/core": {
67
+ "optional": true
68
+ }
69
+ },
61
70
  "devDependencies": {
62
71
  "@goddard-ai/ui-primitives": "0.1.1",
63
72
  "@pandacss/dev": "^1.11.1",
64
73
  "@preact/signals": "2.9.1",
74
+ "@tsrx/core": "0.1.25",
65
75
  "@types/node": "^25.9.1",
66
76
  "fuzzysort2": "0.1.1",
67
77
  "happy-dom": "^20.9.0",