@tileflow/dev 0.1.0-alpha.30 → 0.1.0-alpha.31
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/dist/artifacts.js +3 -3
- package/dist/{chunk-L56FLV4R.js → chunk-2QXKVQ6O.js} +4 -3
- package/dist/{chunk-6MGFMKG3.js → chunk-AQUGMUZW.js} +43 -3
- package/dist/{chunk-A2VTI43Y.js → chunk-IR22ZTQW.js} +575 -7
- package/dist/config.js +1 -1
- package/dist/icons.d.ts +3 -1
- package/dist/icons.js +1 -1
- package/dist/inspect.js +1 -1
- package/dist/preview.js +85 -1797
- package/dist/server.js +3 -3
- package/docs/local-comparison-workbench-and-compiler-inspection.md +14 -36
- package/package.json +2 -2
package/dist/artifacts.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
usesTileflowLineBackgroundGlyphs,
|
|
28
28
|
writeTileflowArtifactPlan,
|
|
29
29
|
writeTileflowBuildArtifacts
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-2QXKVQ6O.js";
|
|
31
31
|
import {
|
|
32
32
|
getTileflowAssetBasePath,
|
|
33
33
|
getTileflowAssetFileName,
|
|
@@ -35,12 +35,12 @@ import {
|
|
|
35
35
|
normalizeTileflowBasePath,
|
|
36
36
|
resolveTileflowArtifactPublicUrls
|
|
37
37
|
} from "./chunk-UTRO4IBQ.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-IR22ZTQW.js";
|
|
39
39
|
import "./chunk-7C4F6GAX.js";
|
|
40
40
|
import "./chunk-KDFTE4Q5.js";
|
|
41
41
|
import {
|
|
42
42
|
defaultTileflowConfigPath
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-AQUGMUZW.js";
|
|
44
44
|
import "./chunk-D4OE4ITL.js";
|
|
45
45
|
import "./chunk-ONYQNLNA.js";
|
|
46
46
|
export {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
getTileflowIconWatchPaths,
|
|
10
10
|
prepareTileflowCatalogIcons
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IR22ZTQW.js";
|
|
12
12
|
import {
|
|
13
13
|
TileflowStyleValidationError,
|
|
14
14
|
normalizeTileflowStyleValidationIssues,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
defaultTileflowConfigPath,
|
|
20
20
|
getTileflowMapNames,
|
|
21
21
|
loadValidTileflowConfigWithInputs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AQUGMUZW.js";
|
|
23
23
|
import {
|
|
24
24
|
isPathWithin
|
|
25
25
|
} from "./chunk-D4OE4ITL.js";
|
|
@@ -2274,7 +2274,8 @@ async function createTileflowArtifactPlan(prepared, options = {}) {
|
|
|
2274
2274
|
sourceAssets: {
|
|
2275
2275
|
fonts: preparedFonts.sourceIdentities[mapName] ?? [],
|
|
2276
2276
|
icons: prepared.mapIconSources[mapName] ?? [],
|
|
2277
|
-
...prepared.mapIconCompositions[mapName] ? { iconComposition: prepared.mapIconCompositions[mapName] } : {}
|
|
2277
|
+
...prepared.mapIconCompositions[mapName] ? { iconComposition: prepared.mapIconCompositions[mapName] } : {},
|
|
2278
|
+
...prepared.mapModelSources?.[mapName]?.length ? { models: prepared.mapModelSources[mapName] } : {}
|
|
2278
2279
|
},
|
|
2279
2280
|
styles: style
|
|
2280
2281
|
}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
parseResolvedTileflowMap,
|
|
12
12
|
parseTileflowMap,
|
|
13
13
|
tileflowCaptureSceneNameSchema,
|
|
14
|
+
tileflowCaptureShotNameSchema,
|
|
14
15
|
TileflowResolvedMapValidationError
|
|
15
16
|
} from "@tileflow/core";
|
|
16
17
|
import { collectTileflowMapBuildLineage } from "@tileflow/core/build";
|
|
@@ -85,6 +86,15 @@ function assertValidTileflowConfig(project) {
|
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
}
|
|
89
|
+
for (const [shotId, shot] of Object.entries(project.shots ?? {})) {
|
|
90
|
+
if (!Object.hasOwn(project.maps, shot.map)) {
|
|
91
|
+
messages.push({
|
|
92
|
+
level: "error",
|
|
93
|
+
path: `shots.${shotId}.map`,
|
|
94
|
+
message: `Unknown Tileflow map "${shot.map}".`
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
88
98
|
if (messages.length > 0) throw new TileflowValidationError(messages);
|
|
89
99
|
}
|
|
90
100
|
function asTileflowBuildCatalog(input, options = {}) {
|
|
@@ -117,7 +127,8 @@ function asTileflowBuildCatalog(input, options = {}) {
|
|
|
117
127
|
key,
|
|
118
128
|
resolved2,
|
|
119
129
|
collectTileflowMapBuildLineage(map2),
|
|
120
|
-
normalizeSingularMapScenes(map2, resolved2.id)
|
|
130
|
+
normalizeSingularMapScenes(map2, resolved2.id),
|
|
131
|
+
normalizeSingularMapShots(map2, resolved2.id)
|
|
121
132
|
];
|
|
122
133
|
});
|
|
123
134
|
if (entries.length === 0) {
|
|
@@ -138,12 +149,25 @@ function asTileflowBuildCatalog(input, options = {}) {
|
|
|
138
149
|
scenes2.set(sceneId, scene);
|
|
139
150
|
}
|
|
140
151
|
}
|
|
152
|
+
const shots2 = /* @__PURE__ */ new Map();
|
|
153
|
+
for (const [mapId, , , , mapShots] of entries) {
|
|
154
|
+
for (const [shotId, shot] of Object.entries(mapShots ?? {})) {
|
|
155
|
+
if (shots2.has(shotId)) {
|
|
156
|
+
throw tileflowConfigValidationError(
|
|
157
|
+
`maps.${mapId}.shots.${shotId}`,
|
|
158
|
+
new Error(`Tileflow workspace shot "${shotId}" is already defined by another map.`)
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
shots2.set(shotId, shot);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
141
164
|
return {
|
|
142
165
|
mapMetadata: Object.fromEntries(
|
|
143
166
|
entries.map(([id, map2, lineage]) => [id, { id, lineage, version: map2.version }])
|
|
144
167
|
),
|
|
145
168
|
maps: Object.fromEntries(entries.map(([id, map2]) => [id, map2])),
|
|
146
|
-
...scenes2.size > 0 ? { scenes: Object.fromEntries(scenes2) } : {}
|
|
169
|
+
...scenes2.size > 0 ? { scenes: Object.fromEntries(scenes2) } : {},
|
|
170
|
+
...shots2.size > 0 ? { shots: Object.fromEntries(shots2) } : {}
|
|
147
171
|
};
|
|
148
172
|
}
|
|
149
173
|
const map = input;
|
|
@@ -154,6 +178,12 @@ function asTileflowBuildCatalog(input, options = {}) {
|
|
|
154
178
|
} catch (error) {
|
|
155
179
|
throw tileflowConfigValidationError("scenes", error);
|
|
156
180
|
}
|
|
181
|
+
let shots;
|
|
182
|
+
try {
|
|
183
|
+
shots = normalizeSingularMapShots(map, resolved.id);
|
|
184
|
+
} catch (error) {
|
|
185
|
+
throw tileflowConfigValidationError("shots", error);
|
|
186
|
+
}
|
|
157
187
|
return {
|
|
158
188
|
mapMetadata: {
|
|
159
189
|
[resolved.id]: {
|
|
@@ -163,7 +193,8 @@ function asTileflowBuildCatalog(input, options = {}) {
|
|
|
163
193
|
}
|
|
164
194
|
},
|
|
165
195
|
maps: { [resolved.id]: resolved },
|
|
166
|
-
...scenes ? { scenes } : {}
|
|
196
|
+
...scenes ? { scenes } : {},
|
|
197
|
+
...shots ? { shots } : {}
|
|
167
198
|
};
|
|
168
199
|
}
|
|
169
200
|
function parseTileflowCatalogMap(map, path) {
|
|
@@ -215,6 +246,15 @@ function normalizeSingularMapScenes(map, mapId) {
|
|
|
215
246
|
})
|
|
216
247
|
);
|
|
217
248
|
}
|
|
249
|
+
function normalizeSingularMapShots(map, mapId) {
|
|
250
|
+
if (!map.shots) return void 0;
|
|
251
|
+
return Object.fromEntries(
|
|
252
|
+
Object.entries(map.shots).map(([shotId, shot]) => {
|
|
253
|
+
const normalizedShotId = tileflowCaptureShotNameSchema.parse(shotId);
|
|
254
|
+
return [normalizedShotId, { ...shot, map: mapId }];
|
|
255
|
+
})
|
|
256
|
+
);
|
|
257
|
+
}
|
|
218
258
|
function getTileflowMapNames(project) {
|
|
219
259
|
return Object.keys(project.maps);
|
|
220
260
|
}
|