@tileflow/core 0.1.0-alpha.30 → 0.1.0-alpha.32
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 +11 -1
- package/dist/browser.d.ts +747 -15
- package/dist/browser.js +1015 -53
- package/dist/build.d.ts +62 -55
- package/dist/build.js +100 -53
- package/dist/{capture-scene-D6soWztE.d.ts → capture-scene-BaAJjGq7.d.ts} +11 -1
- package/dist/capture.d.ts +1 -1
- package/dist/capture.js +12 -0
- package/dist/config-reference.json +1411 -1367
- package/dist/{icon-composition-BiOTwrvD.d.ts → icon-composition-Befmn-zZ.d.ts} +40 -32
- package/dist/index.d.ts +13 -11
- package/dist/index.js +108 -53
- package/dist/{manifest-types-CTT2eLbp.d.ts → manifest-types-E7m23eXL.d.ts} +18 -1
- package/dist/manifest.d.ts +2 -2
- package/dist/native-profile.d.ts +25 -11
- package/dist/native-profile.js +21 -1
- package/dist/native.d.ts +134 -1
- package/dist/native.js +691 -1
- package/dist/runtime.d.ts +1 -1
- package/docs/authoring-model.md +20 -4
- package/docs/capture-scenes.md +1 -1
- package/docs/compiled-style-performance.md +4 -1
- package/docs/data-is-separate-from-design.md +103 -9
- package/docs/dynamic-style-images.md +100 -0
- package/docs/map-emphasis.md +89 -0
- package/docs/native-artifact-profile.md +5 -3
- package/docs/shared-visual-primitives.md +20 -0
- package/docs/style-states.md +73 -0
- package/docs/theme-transitions-and-blends.md +100 -5
- package/package.json +1 -1
package/dist/capture.js
CHANGED
|
@@ -204,8 +204,19 @@ var tileflowCaptureSceneSchema = z3.object({
|
|
|
204
204
|
viewport: tileflowCaptureViewportSchema,
|
|
205
205
|
target: tileflowCaptureTargetSchema.optional()
|
|
206
206
|
}).strict();
|
|
207
|
+
function tileflowCaptureSceneFitIssue(scene) {
|
|
208
|
+
if (scene.camera.type !== "bounds" || scene.camera.padding === void 0) return void 0;
|
|
209
|
+
const room = Math.min(scene.viewport.width, scene.viewport.height);
|
|
210
|
+
if (scene.camera.padding * 2 < room) return void 0;
|
|
211
|
+
return {
|
|
212
|
+
message: `Expected bounds padding less than half the viewport's shorter side (${room / 2} pixels)`,
|
|
213
|
+
path: ["camera", "padding"]
|
|
214
|
+
};
|
|
215
|
+
}
|
|
207
216
|
function normalizeTileflowCaptureScene(input) {
|
|
208
217
|
const scene = tileflowCaptureSceneSchema.parse(input);
|
|
218
|
+
const fit = tileflowCaptureSceneFitIssue(scene);
|
|
219
|
+
if (fit) throw new RangeError(`${fit.path.join(".")}: ${fit.message}`);
|
|
209
220
|
const camera = scene.camera.type === "center" ? {
|
|
210
221
|
type: scene.camera.type,
|
|
211
222
|
center: scene.camera.center,
|
|
@@ -265,6 +276,7 @@ export {
|
|
|
265
276
|
tileflowCaptureCenterCameraSchema,
|
|
266
277
|
tileflowCaptureIdSchema,
|
|
267
278
|
tileflowCaptureMapTargetSchema,
|
|
279
|
+
tileflowCaptureSceneFitIssue,
|
|
268
280
|
tileflowCaptureSceneLimits,
|
|
269
281
|
tileflowCaptureSceneNameSchema,
|
|
270
282
|
tileflowCaptureSceneSchema,
|