@volter/editor-react 0.5.201 → 0.5.203
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/contributions/component-contracts.service.ts +2 -2
- package/dist-node/serving.mjs +24 -8
- package/package.json +3 -3
- package/serving/component-prop-worker.ts +1 -1
- package/serving/index.ts +2 -2
- package/serving/ui-oid-plugin.ts +34 -10
- package/src/source/component-prop-types.ts +1 -1
- package/src/source/oid-transform.ts +3 -3
- package/src/source/r3f-environment-binding.ts +2 -2
- package/src/source/r3f-joint-binding.ts +2 -2
- package/src/source/r3f-lod-binding.ts +2 -2
- package/src/source/r3f-particle-binding.ts +2 -2
- package/src/source/r3f-physics-binding.ts +3 -3
- package/src/source/reparent-guard.ts +2 -2
- package/src/source/source-edit-request.ts +1 -1
- package/src/source/writer.ts +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The component-contract analyzer, registered for the browser (a `workspace.service`
|
|
3
3
|
* contribution): what the kit's Content index reads when it indexes a project from storage,
|
|
4
|
-
* with no session server to ask (`@volter/
|
|
4
|
+
* with no session server to ask (`@volter/sdk/source-analysis`). The session's server
|
|
5
5
|
* registers the same analyzer through this package's `volter.serving` module.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { registerComponentContractAnalyzer } from '@volter/
|
|
8
|
+
import { registerComponentContractAnalyzer } from '@volter/sdk/source-analysis';
|
|
9
9
|
import { analyzeR3fComponentContracts, builtinR3fContractsForSource } from '../src/source/oid-transform';
|
|
10
10
|
|
|
11
11
|
export const point = 'workspace.service';
|
package/dist-node/serving.mjs
CHANGED
|
@@ -3510,6 +3510,7 @@ function r3fAuthoringDiagnostics(code, file, opts) {
|
|
|
3510
3510
|
|
|
3511
3511
|
// serving/ui-oid-plugin.ts
|
|
3512
3512
|
import { createHash } from "node:crypto";
|
|
3513
|
+
import { createRequire } from "node:module";
|
|
3513
3514
|
import {
|
|
3514
3515
|
existsSync as existsSync3,
|
|
3515
3516
|
mkdirSync,
|
|
@@ -3520,11 +3521,11 @@ import {
|
|
|
3520
3521
|
import { basename, dirname as dirname2, isAbsolute, join as join2, relative, resolve as resolve2, sep } from "node:path";
|
|
3521
3522
|
import { Worker } from "node:worker_threads";
|
|
3522
3523
|
|
|
3523
|
-
// ../
|
|
3524
|
+
// ../project/src/manifest/locate.ts
|
|
3524
3525
|
import { existsSync as existsSync2 } from "node:fs";
|
|
3525
3526
|
import { join } from "node:path";
|
|
3526
3527
|
|
|
3527
|
-
// ../
|
|
3528
|
+
// ../project/src/manifest/filename.ts
|
|
3528
3529
|
var MANIFEST_FILENAME = "volter.project.json";
|
|
3529
3530
|
var REMOVED_MANIFEST_FILENAME = "volter.game.json";
|
|
3530
3531
|
function removedManifestFilenameMessage(where) {
|
|
@@ -3532,7 +3533,7 @@ function removedManifestFilenameMessage(where) {
|
|
|
3532
3533
|
Fix: rename it \u2014 \`git mv ${REMOVED_MANIFEST_FILENAME} ${MANIFEST_FILENAME}\`. The contents are unchanged; only the filename moved.`;
|
|
3533
3534
|
}
|
|
3534
3535
|
|
|
3535
|
-
// ../
|
|
3536
|
+
// ../project/src/manifest/locate.ts
|
|
3536
3537
|
function assertNoRemovedManifestFilename(dir) {
|
|
3537
3538
|
if (existsSync2(join(dir, MANIFEST_FILENAME))) return;
|
|
3538
3539
|
if (!existsSync2(join(dir, REMOVED_MANIFEST_FILENAME))) return;
|
|
@@ -3543,10 +3544,10 @@ function resolveManifestPath(dir) {
|
|
|
3543
3544
|
return join(dir, MANIFEST_FILENAME);
|
|
3544
3545
|
}
|
|
3545
3546
|
|
|
3546
|
-
// ../
|
|
3547
|
+
// ../sdk/src/session/project-serving.ts
|
|
3547
3548
|
var SOURCE_WRITE_ROUTES_PLUGIN = "volter-ui-oid";
|
|
3548
3549
|
|
|
3549
|
-
// ../
|
|
3550
|
+
// ../sdk/src/css-numeric-style.ts
|
|
3550
3551
|
var UNITLESS_NUMBER_PROPS = /* @__PURE__ */ new Set([
|
|
3551
3552
|
"opacity",
|
|
3552
3553
|
"zIndex",
|
|
@@ -5048,7 +5049,22 @@ function fileDiagnosticJoin(fileEntries, fileDiagnostics) {
|
|
|
5048
5049
|
|
|
5049
5050
|
// serving/ui-oid-plugin.ts
|
|
5050
5051
|
var NODE_MODULES_RE = /\/node_modules\//;
|
|
5051
|
-
var TOOLING_SRC_RE = /\/packages\/(engine\/src|create-volter-project|volter-cli
|
|
5052
|
+
var TOOLING_SRC_RE = /\/packages\/(engine\/src|create-volter-project|volter-cli)\//;
|
|
5053
|
+
var SDK_ROOT = (() => {
|
|
5054
|
+
try {
|
|
5055
|
+
const entry = realpathSync(createRequire(import.meta.url).resolve("@volter/sdk"));
|
|
5056
|
+
return `${dirname2(dirname2(entry)).replace(/\\/g, "/")}/`;
|
|
5057
|
+
} catch (error) {
|
|
5058
|
+
console.warn(
|
|
5059
|
+
`[volter] @volter/sdk does not resolve from ${import.meta.url} (${error instanceof Error ? error.message : String(error)}); the SDK's source folder is not excluded from UI source stamping.`
|
|
5060
|
+
);
|
|
5061
|
+
return null;
|
|
5062
|
+
}
|
|
5063
|
+
})();
|
|
5064
|
+
var foldCase = (file) => process.platform === "win32" ? file.toLowerCase() : file;
|
|
5065
|
+
function isToolingSource(clean) {
|
|
5066
|
+
return TOOLING_SRC_RE.test(clean) || SDK_ROOT !== null && foldCase(clean).startsWith(foldCase(SDK_ROOT));
|
|
5067
|
+
}
|
|
5052
5068
|
var EDITOR_SRC_RE = /\/packages\/editor\/src\//;
|
|
5053
5069
|
var EDITABLE_COMPONENTS_RE = /\/ui-editor\/editable-components\/.*\.tsx$/;
|
|
5054
5070
|
var VENDOR_RE = /\/vendor\//;
|
|
@@ -5094,7 +5110,7 @@ function isEditableCssFile(id) {
|
|
|
5094
5110
|
if (!clean.endsWith(".css")) return false;
|
|
5095
5111
|
if (NODE_MODULES_RE.test(clean)) return false;
|
|
5096
5112
|
if (VENDOR_RE.test(clean)) return false;
|
|
5097
|
-
if (
|
|
5113
|
+
if (isToolingSource(clean)) return false;
|
|
5098
5114
|
if (EDITOR_SRC_RE.test(clean)) return false;
|
|
5099
5115
|
return true;
|
|
5100
5116
|
}
|
|
@@ -5353,7 +5369,7 @@ function defaultProjectScopeInclude(id) {
|
|
|
5353
5369
|
if (!clean.endsWith(".tsx")) return false;
|
|
5354
5370
|
if (NODE_MODULES_RE.test(clean)) return false;
|
|
5355
5371
|
if (VENDOR_RE.test(clean) && !VENDORED_GAME_SRC_RE.test(clean)) return false;
|
|
5356
|
-
if (
|
|
5372
|
+
if (isToolingSource(clean)) return false;
|
|
5357
5373
|
if (EDITOR_SRC_RE.test(clean) && !EDITABLE_COMPONENTS_RE.test(clean)) return false;
|
|
5358
5374
|
if (nearestManifestExcludesIngestReact(dirname2(clean))) return false;
|
|
5359
5375
|
return true;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@volter/editor-react",
|
|
3
3
|
"author": "Volter AI, Inc.",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.203",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"serving": "./dist-node/serving.mjs"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@volter/
|
|
42
|
-
"@volter/
|
|
41
|
+
"@volter/sdk": "0.5.203",
|
|
42
|
+
"@volter/project": "0.5.203",
|
|
43
43
|
"typescript": "5.9.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { parentPort } from 'node:worker_threads';
|
|
21
21
|
import { ComponentPropResolver } from '../src/source/component-prop-types';
|
|
22
|
-
import type { ComponentPropSpec } from '@volter/
|
|
22
|
+
import type { ComponentPropSpec } from '@volter/sdk/source-authoring';
|
|
23
23
|
|
|
24
24
|
interface PropRequest {
|
|
25
25
|
key: string;
|
package/serving/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@volter/editor-react`'s server half (`package.json#volter.serving`, the project-serving door in
|
|
3
|
-
* `@volter/
|
|
3
|
+
* `@volter/sdk/session/project-serving`): the JSX identity stamp and the `/__ui-source/*`
|
|
4
4
|
* authoring routes over a project's React and React Three Fiber source, and the source answers
|
|
5
5
|
* the kit's region decision, validation and Content index ask of a JSX lane.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { ProjectServingModule } from '@volter/
|
|
8
|
+
import type { ProjectServingModule } from '@volter/sdk/session/project-serving';
|
|
9
9
|
import { analyzeR3fComponentContracts, builtinR3fContractsForSource, sourceDialectEvidence } from '../src/source/oid-transform';
|
|
10
10
|
import { r3fAuthoringDiagnostics } from '../src/source/r3f-project-contracts';
|
|
11
11
|
import { uiOidPlugin } from './ui-oid-plugin';
|
package/serving/ui-oid-plugin.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* `defaultProjectScopeInclude` widens to PROJECT scope, not repo-global: any `.tsx`
|
|
22
22
|
* file outside `node_modules`, EXCEPT the Volter tooling/engine source trees this repo
|
|
23
23
|
* itself is built from (`packages/engine/src`, `packages/create-volter-project`,
|
|
24
|
-
* `packages/volter-cli`, `packages/
|
|
24
|
+
* `packages/volter-cli`, `packages/sdk`, and `packages/editor/src` generally —
|
|
25
25
|
* carving OUT `ui-editor/editable-components` so the existing UI-edit-mode surface
|
|
26
26
|
* keeps working unchanged). This does NOT depend on which project happens to be
|
|
27
27
|
* open — `fs.allow` already bounds what Vite can even reach, and this predicate
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
73
|
import { createHash } from 'node:crypto';
|
|
74
|
+
import { createRequire } from 'node:module';
|
|
74
75
|
import {
|
|
75
76
|
existsSync,
|
|
76
77
|
mkdirSync,
|
|
@@ -81,12 +82,12 @@ import {
|
|
|
81
82
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
82
83
|
import { Worker } from 'node:worker_threads';
|
|
83
84
|
import type { Plugin, ViteDevServer } from 'vite';
|
|
84
|
-
import { resolveManifestPath } from '@volter/
|
|
85
|
+
import { resolveManifestPath } from '@volter/project/manifest/locate';
|
|
85
86
|
import {
|
|
86
87
|
type ProjectServingServices,
|
|
87
88
|
SOURCE_WRITE_ROUTES_PLUGIN,
|
|
88
|
-
} from '@volter/
|
|
89
|
-
import { cssTextForStyleValue } from '@volter/
|
|
89
|
+
} from '@volter/sdk/session/project-serving';
|
|
90
|
+
import { cssTextForStyleValue } from '@volter/sdk/css-numeric-style';
|
|
90
91
|
import {
|
|
91
92
|
type ComponentPropSpec,
|
|
92
93
|
lineColToOffset,
|
|
@@ -146,7 +147,30 @@ import {
|
|
|
146
147
|
export { applyStyleWriteRequest, oidAttributeForSurface };
|
|
147
148
|
|
|
148
149
|
const NODE_MODULES_RE = /\/node_modules\//;
|
|
149
|
-
const TOOLING_SRC_RE = /\/packages\/(engine\/src|create-volter-project|volter-cli
|
|
150
|
+
const TOOLING_SRC_RE = /\/packages\/(engine\/src|create-volter-project|volter-cli)\//;
|
|
151
|
+
/** The SDK's own folder, where a workspace keeps its source: tooling, never a game's UI. Named by
|
|
152
|
+
* where `@volter/sdk` resolves from here (its entry module is `src/index.ts`), with forward
|
|
153
|
+
* slashes; `null` when it does not resolve. A project's own `packages/sdk` is not this folder. */
|
|
154
|
+
const SDK_ROOT = ((): string | null => {
|
|
155
|
+
try {
|
|
156
|
+
const entry = realpathSync(createRequire(import.meta.url).resolve('@volter/sdk'));
|
|
157
|
+
return `${dirname(dirname(entry)).replace(/\\/g, '/')}/`;
|
|
158
|
+
} catch (error) {
|
|
159
|
+
// Said once, when this module loads: without the folder, the SDK's own source in a workspace is
|
|
160
|
+
// not told apart from a game's and would be stamped as editable UI.
|
|
161
|
+
console.warn(
|
|
162
|
+
`[volter] @volter/sdk does not resolve from ${import.meta.url} (${error instanceof Error ? error.message : String(error)}); ` +
|
|
163
|
+
"the SDK's source folder is not excluded from UI source stamping.",
|
|
164
|
+
);
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
})();
|
|
168
|
+
/** Windows names one file with either case of its drive letter and folders. */
|
|
169
|
+
const foldCase = (file: string): string => (process.platform === 'win32' ? file.toLowerCase() : file);
|
|
170
|
+
/** `clean` is a file with forward slashes. */
|
|
171
|
+
function isToolingSource(clean: string): boolean {
|
|
172
|
+
return TOOLING_SRC_RE.test(clean) || (SDK_ROOT !== null && foldCase(clean).startsWith(foldCase(SDK_ROOT)));
|
|
173
|
+
}
|
|
150
174
|
const EDITOR_SRC_RE = /\/packages\/editor\/src\//;
|
|
151
175
|
const EDITABLE_COMPONENTS_RE = /\/ui-editor\/editable-components\/.*\.tsx$/;
|
|
152
176
|
/** Track N, D-N4 item 2 — see the module doc comment's "Vendored-tree exclusion". */
|
|
@@ -176,7 +200,7 @@ const VENDORED_GAME_SRC_RE = /\/vendor\/games\/[^/]+\//;
|
|
|
176
200
|
* Defensive against
|
|
177
201
|
* any shape (never trusts the manifest is even an object) — this is a
|
|
178
202
|
* best-effort identity probe for a WRITE-BACK BAN, not manifest validation
|
|
179
|
-
* (the real Zod schema/loader is `@volter/
|
|
203
|
+
* (the real Zod schema/loader is `@volter/project/manifest/load`, not reachable
|
|
180
204
|
* from this vite-config-time, dependency-light file by design). */
|
|
181
205
|
function manifestDeclaresIngestReactWorld(parsed: unknown): boolean {
|
|
182
206
|
if (!parsed || typeof parsed !== 'object') return false;
|
|
@@ -246,7 +270,7 @@ export function isEditableCssFile(id: string): boolean {
|
|
|
246
270
|
if (!clean.endsWith('.css')) return false;
|
|
247
271
|
if (NODE_MODULES_RE.test(clean)) return false;
|
|
248
272
|
if (VENDOR_RE.test(clean)) return false;
|
|
249
|
-
if (
|
|
273
|
+
if (isToolingSource(clean)) return false;
|
|
250
274
|
if (EDITOR_SRC_RE.test(clean)) return false;
|
|
251
275
|
return true;
|
|
252
276
|
}
|
|
@@ -693,7 +717,7 @@ export function __oidIndexEnrichStateForTest(): { queued: boolean; hasEnriched:
|
|
|
693
717
|
* stops matching its lock.
|
|
694
718
|
*/
|
|
695
719
|
/** The kit's server capabilities this plugin was constructed with
|
|
696
|
-
* (`@volter/
|
|
720
|
+
* (`@volter/sdk/session/project-serving`). */
|
|
697
721
|
let servingServices: ProjectServingServices | null = null;
|
|
698
722
|
|
|
699
723
|
function serving(): ProjectServingServices {
|
|
@@ -738,7 +762,7 @@ export function defaultProjectScopeInclude(id: string): boolean {
|
|
|
738
762
|
// inspector; refusing it here is what used to make a vendored game
|
|
739
763
|
// permanently unauthorable.
|
|
740
764
|
if (VENDOR_RE.test(clean) && !VENDORED_GAME_SRC_RE.test(clean)) return false;
|
|
741
|
-
if (
|
|
765
|
+
if (isToolingSource(clean)) return false;
|
|
742
766
|
if (EDITOR_SRC_RE.test(clean) && !EDITABLE_COMPONENTS_RE.test(clean)) return false;
|
|
743
767
|
if (nearestManifestExcludesIngestReact(dirname(clean))) return false;
|
|
744
768
|
return true;
|
|
@@ -1566,7 +1590,7 @@ export function uiOidPlugin(
|
|
|
1566
1590
|
// W1 — R3F-dialect files get ` userData-oid` (fiber pierces it into
|
|
1567
1591
|
// `object.userData.oid`); react-dom files keep ` data-oid` unchanged.
|
|
1568
1592
|
// WHICH REGION owns this exact file decides: a declaration the project
|
|
1569
|
-
// made (an `include` glob or a `mounts` entry in `volter.adapter.ts`), the
|
|
1593
|
+
// made (an `include` glob or a `mounts` entry in `editor/volter.adapter.ts`), the
|
|
1570
1594
|
// manifest root whose `entry` it is, or reach from one through the live
|
|
1571
1595
|
// import graph. Nothing is inferred from the file's own bytes; a file
|
|
1572
1596
|
// nothing places gets the documented `data-oid` default, said out loud.
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
import { statSync } from 'node:fs';
|
|
43
43
|
import { dirname, resolve } from 'node:path';
|
|
44
44
|
import ts from 'typescript';
|
|
45
|
-
import type { ComponentPropSpec } from '@volter/
|
|
45
|
+
import type { ComponentPropSpec } from '@volter/sdk/source-authoring';
|
|
46
46
|
|
|
47
47
|
export type { ComponentPropSpec };
|
|
48
48
|
|
|
@@ -23,8 +23,8 @@ import { particleBindingsByElement, type R3fParticleBinding } from './r3f-partic
|
|
|
23
23
|
import { physicsBindingsByElement, type R3fPhysicsBinding } from './r3f-physics-binding';
|
|
24
24
|
import { parseAuthoringTsx, refIdentifier } from './ts-ast';
|
|
25
25
|
|
|
26
|
-
import type { DeclaredRootSurface, OidEntry, R3fComponentContract, R3fTransformProp, SourceDialectEvidence } from '@volter/
|
|
27
|
-
export type { ComponentPropSpec, DeclaredRootSurface, OidEntry, R3fAuthoringDiagnostic, R3fComponentContract, R3fTransformProp, SourceDialectEvidence } from '@volter/
|
|
26
|
+
import type { DeclaredRootSurface, OidEntry, R3fComponentContract, R3fTransformProp, SourceDialectEvidence } from '@volter/sdk/source-authoring';
|
|
27
|
+
export type { ComponentPropSpec, DeclaredRootSurface, OidEntry, R3fAuthoringDiagnostic, R3fComponentContract, R3fTransformProp, SourceDialectEvidence } from '@volter/sdk/source-authoring';
|
|
28
28
|
|
|
29
29
|
export type {
|
|
30
30
|
R3fEnvironmentBinding,
|
|
@@ -1075,7 +1075,7 @@ export function sourceProvesR3f(evidence: SourceDialectEvidence): boolean {
|
|
|
1075
1075
|
* for a file it could not place, silently, and being wrong that way is
|
|
1076
1076
|
* indistinguishable from being right. Zero inference (ARCHITECTURE-CORE
|
|
1077
1077
|
* §The editor protocol) makes the fix a declaration — an `include` glob or
|
|
1078
|
-
* a `mounts` entry in `volter.adapter.ts` — not a better heuristic.
|
|
1078
|
+
* a `mounts` entry in `editor/volter.adapter.ts` — not a better heuristic.
|
|
1079
1079
|
*
|
|
1080
1080
|
* Nothing about a file's own bytes outranks the region — not even a file that
|
|
1081
1081
|
* renders THREE host elements while its region says `dom`. That disagreement is
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
import ts from 'typescript';
|
|
11
11
|
import { jsxAttribute, numericLiteral } from './ts-ast';
|
|
12
12
|
|
|
13
|
-
import type { R3fEnvironmentBinding, R3fEnvironmentNumberBinding, R3fEnvironmentStringBinding } from '@volter/
|
|
14
|
-
export type { R3fEnvironmentBinding, R3fEnvironmentNumberBinding, R3fEnvironmentStringBinding } from '@volter/
|
|
13
|
+
import type { R3fEnvironmentBinding, R3fEnvironmentNumberBinding, R3fEnvironmentStringBinding } from '@volter/sdk/source-authoring';
|
|
14
|
+
export type { R3fEnvironmentBinding, R3fEnvironmentNumberBinding, R3fEnvironmentStringBinding } from '@volter/sdk/source-authoring';
|
|
15
15
|
|
|
16
16
|
function attributeString(attribute: ts.JsxAttribute | undefined): string | undefined {
|
|
17
17
|
const initializer = attribute?.initializer;
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
import ts from 'typescript';
|
|
13
13
|
import { enclosingScope, numericLiteral, refIdentifier } from './ts-ast';
|
|
14
14
|
|
|
15
|
-
import type { R3fJointBinding, R3fJointHook, R3fJointLiteral, R3fJointLiteralRange } from '@volter/
|
|
16
|
-
export type { R3fJointBinding, R3fJointHook, R3fJointLiteral, R3fJointLiteralRange } from '@volter/
|
|
15
|
+
import type { R3fJointBinding, R3fJointHook, R3fJointLiteral, R3fJointLiteralRange } from '@volter/sdk/source-authoring';
|
|
16
|
+
export type { R3fJointBinding, R3fJointHook, R3fJointLiteral, R3fJointLiteralRange } from '@volter/sdk/source-authoring';
|
|
17
17
|
|
|
18
18
|
const JOINT_HOOKS = new Set<R3fJointHook>([
|
|
19
19
|
'useFixedJoint',
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import ts from 'typescript';
|
|
4
4
|
import { jsxAttribute, numericLiteral } from './ts-ast';
|
|
5
5
|
|
|
6
|
-
import type { R3fLodBinding, R3fLodNumberBinding } from '@volter/
|
|
7
|
-
export type { R3fLodBinding, R3fLodNumberBinding } from '@volter/
|
|
6
|
+
import type { R3fLodBinding, R3fLodNumberBinding } from '@volter/sdk/source-authoring';
|
|
7
|
+
export type { R3fLodBinding, R3fLodNumberBinding } from '@volter/sdk/source-authoring';
|
|
8
8
|
|
|
9
9
|
function detailedNames(sf: ts.SourceFile): Set<string> {
|
|
10
10
|
const names = new Set<string>();
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import ts from 'typescript';
|
|
4
4
|
import { enclosingScope, numericLiteral } from './ts-ast';
|
|
5
5
|
|
|
6
|
-
import type { QuarksEmitterShape, R3fParticleBinding, R3fParticleNumberBinding } from '@volter/
|
|
7
|
-
export type { QuarksEmitterShape, R3fParticleBinding, R3fParticleNumberBinding } from '@volter/
|
|
6
|
+
import type { QuarksEmitterShape, R3fParticleBinding, R3fParticleNumberBinding } from '@volter/sdk/source-authoring';
|
|
7
|
+
export type { QuarksEmitterShape, R3fParticleBinding, R3fParticleNumberBinding } from '@volter/sdk/source-authoring';
|
|
8
8
|
|
|
9
9
|
const SHAPES: Record<string, QuarksEmitterShape> = {
|
|
10
10
|
PointEmitter: 'point',
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
import ts from 'typescript';
|
|
64
64
|
import { enclosingScope, refIdentifier } from './ts-ast';
|
|
65
65
|
|
|
66
|
-
import type { PhysicsChannel, R3fPhysicsBinding } from '@volter/
|
|
67
|
-
export type { PhysicsChannel, R3fPhysicsBinding } from '@volter/
|
|
66
|
+
import type { PhysicsChannel, R3fPhysicsBinding } from '@volter/sdk/source-authoring';
|
|
67
|
+
export type { PhysicsChannel, R3fPhysicsBinding } from '@volter/sdk/source-authoring';
|
|
68
68
|
|
|
69
69
|
/** What an element carrying a binding looks like to a writer. Structural rather
|
|
70
70
|
* than the whole `OidEntry`, so this stays the browser-safe half. */
|
|
@@ -81,7 +81,7 @@ export interface PhysicsBoundElement {
|
|
|
81
81
|
/**
|
|
82
82
|
* Is this element's `channel` PLACED BY A SIMULATED BODY — the fact that makes
|
|
83
83
|
* an edit here a `physics-binding` write rather than an ordinary `source-prop`
|
|
84
|
-
* one, in `WriteAnchorKind`'s vocabulary (`@volter/
|
|
84
|
+
* one, in `WriteAnchorKind`'s vocabulary (`@volter/project/adapter`'s `authoring.ts`).
|
|
85
85
|
*
|
|
86
86
|
* Two shapes, and both are the same question ("does a body read this value?")
|
|
87
87
|
* asked of the two places a body can be attached, which is why they answer from
|
|
@@ -44,8 +44,8 @@ import {
|
|
|
44
44
|
writePropChange,
|
|
45
45
|
} from './writer';
|
|
46
46
|
|
|
47
|
-
import type { ReparentChannel, ReparentRebase } from '@volter/
|
|
48
|
-
export type { ReparentChannel, ReparentRebase } from '@volter/
|
|
47
|
+
import type { ReparentChannel, ReparentRebase } from '@volter/sdk/source-authoring';
|
|
48
|
+
export type { ReparentChannel, ReparentRebase } from '@volter/sdk/source-authoring';
|
|
49
49
|
|
|
50
50
|
const CHANNELS: readonly ReparentChannel[] = ['position', 'rotation', 'scale'];
|
|
51
51
|
const NUMBER_RE = /^-?\d+(\.\d+)?$/;
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
* it is read by both.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
export type { PreparedSourceEdit, SourceEditRequest, StructReparentContext } from '@volter/
|
|
22
|
+
export type { PreparedSourceEdit, SourceEditRequest, StructReparentContext } from '@volter/sdk/source-authoring';
|
package/src/source/writer.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
import { UTILITY_CLASSES_UNPROVEN, type UtilityClassSupport } from './utility-class-support';
|
|
11
11
|
|
|
12
|
-
import type { DuplicateRewrite } from '@volter/
|
|
13
|
-
export type { DuplicateRewrite } from '@volter/
|
|
12
|
+
import type { DuplicateRewrite } from '@volter/sdk/source-authoring';
|
|
13
|
+
export type { DuplicateRewrite } from '@volter/sdk/source-authoring';
|
|
14
14
|
|
|
15
15
|
export interface StyleProperty {
|
|
16
16
|
name: string;
|