@tileflow/static 0.1.0-alpha.17 → 0.1.0-alpha.18
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/GENERATED_OUTPUT_LICENSE.md +21 -0
- package/LICENSE +201 -0
- package/NOTICE +9 -0
- package/README.md +33 -0
- package/TRADEMARKS.md +10 -0
- package/dist/chunk-35WXL2YI.js +82 -0
- package/dist/chunk-43QGLF6K.js +304 -0
- package/dist/chunk-LGEYA6FQ.js +106 -0
- package/dist/chunk-ROBEGDDY.js +63 -0
- package/dist/chunk-YUG3PBK2.js +198 -0
- package/dist/client.d.ts +58 -0
- package/dist/client.js +25 -0
- package/dist/index.d.ts +6 -278
- package/dist/index.js +38 -565
- package/dist/manifest.d.ts +85 -0
- package/dist/manifest.js +18 -0
- package/dist/overlays.d.ts +14 -0
- package/dist/overlays.js +18 -0
- package/dist/scene-contract-DzsUeJ_V.d.ts +141 -0
- package/dist/scene.d.ts +14 -0
- package/dist/scene.js +16 -0
- package/package.json +28 -3
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createRenderManifest,
|
|
3
|
+
hashRenderManifest,
|
|
4
|
+
hashStaticSceneRequest,
|
|
5
|
+
staticRenderManifestSchema,
|
|
6
|
+
staticRendererSchemaVersion,
|
|
7
|
+
validateStaticRenderManifest
|
|
8
|
+
} from "./chunk-35WXL2YI.js";
|
|
9
|
+
import "./chunk-ROBEGDDY.js";
|
|
10
|
+
import "./chunk-YUG3PBK2.js";
|
|
11
|
+
export {
|
|
12
|
+
createRenderManifest,
|
|
13
|
+
hashRenderManifest,
|
|
14
|
+
hashStaticSceneRequest,
|
|
15
|
+
staticRenderManifestSchema,
|
|
16
|
+
staticRendererSchemaVersion,
|
|
17
|
+
validateStaticRenderManifest
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { h as circleOverlaySchema, a as StaticOverlay, l as lineOverlaySchema, m as markerOverlaySchema, p as polygonOverlaySchema } from './scene-contract-DzsUeJ_V.js';
|
|
3
|
+
export { b as StaticOverlayInput, s as staticOverlaySchema } from './scene-contract-DzsUeJ_V.js';
|
|
4
|
+
|
|
5
|
+
declare function line(input: Omit<z.input<typeof lineOverlaySchema>, 'type'>): StaticOverlay;
|
|
6
|
+
declare function circle(input: Omit<z.input<typeof circleOverlaySchema>, 'type'>): StaticOverlay;
|
|
7
|
+
declare function marker(input: Omit<z.input<typeof markerOverlaySchema>, 'type'>): StaticOverlay;
|
|
8
|
+
declare function polygon(input: Omit<z.input<typeof polygonOverlaySchema>, 'type'>): StaticOverlay;
|
|
9
|
+
declare function compileStaticOverlays(overlays: StaticOverlay[]): {
|
|
10
|
+
layers: Record<string, unknown>[];
|
|
11
|
+
sources: Record<string, Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { StaticOverlay, circle, compileStaticOverlays, line, marker, polygon };
|
package/dist/overlays.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
circle,
|
|
3
|
+
compileStaticOverlays,
|
|
4
|
+
line,
|
|
5
|
+
marker,
|
|
6
|
+
polygon
|
|
7
|
+
} from "./chunk-LGEYA6FQ.js";
|
|
8
|
+
import {
|
|
9
|
+
staticOverlaySchema
|
|
10
|
+
} from "./chunk-YUG3PBK2.js";
|
|
11
|
+
export {
|
|
12
|
+
circle,
|
|
13
|
+
compileStaticOverlays,
|
|
14
|
+
line,
|
|
15
|
+
marker,
|
|
16
|
+
polygon,
|
|
17
|
+
staticOverlaySchema
|
|
18
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const staticSceneSchemaVersion = 1;
|
|
4
|
+
declare const staticSceneLimits: {
|
|
5
|
+
readonly maxDimension: 1280;
|
|
6
|
+
readonly maxGeoJsonBytes: 96000;
|
|
7
|
+
readonly maxOverlays: 24;
|
|
8
|
+
readonly maxPathCoordinates: 2000;
|
|
9
|
+
readonly maxPhysicalPixels: number;
|
|
10
|
+
readonly minDimension: 64;
|
|
11
|
+
};
|
|
12
|
+
declare const coordinateSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
13
|
+
declare const lineOverlaySchema: z.ZodObject<{
|
|
14
|
+
color: z.ZodDefault<z.ZodString>;
|
|
15
|
+
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
16
|
+
id: z.ZodOptional<z.ZodString>;
|
|
17
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
type: z.ZodLiteral<"line">;
|
|
19
|
+
width: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
declare const circleOverlaySchema: z.ZodObject<{
|
|
22
|
+
color: z.ZodDefault<z.ZodString>;
|
|
23
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
24
|
+
id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
26
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
strokeColor: z.ZodOptional<z.ZodString>;
|
|
28
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
29
|
+
type: z.ZodLiteral<"circle">;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
declare const markerOverlaySchema: z.ZodObject<{
|
|
32
|
+
color: z.ZodDefault<z.ZodString>;
|
|
33
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
34
|
+
id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
36
|
+
strokeColor: z.ZodDefault<z.ZodString>;
|
|
37
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
38
|
+
type: z.ZodLiteral<"marker">;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
declare const polygonOverlaySchema: z.ZodObject<{
|
|
41
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
42
|
+
fill: z.ZodDefault<z.ZodString>;
|
|
43
|
+
id: z.ZodOptional<z.ZodString>;
|
|
44
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
stroke: z.ZodOptional<z.ZodString>;
|
|
46
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
47
|
+
type: z.ZodLiteral<"polygon">;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
declare const staticOverlaySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
50
|
+
color: z.ZodDefault<z.ZodString>;
|
|
51
|
+
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
52
|
+
id: z.ZodOptional<z.ZodString>;
|
|
53
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
54
|
+
type: z.ZodLiteral<"line">;
|
|
55
|
+
width: z.ZodDefault<z.ZodNumber>;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
color: z.ZodDefault<z.ZodString>;
|
|
58
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
59
|
+
id: z.ZodOptional<z.ZodString>;
|
|
60
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
61
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
62
|
+
strokeColor: z.ZodOptional<z.ZodString>;
|
|
63
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
64
|
+
type: z.ZodLiteral<"circle">;
|
|
65
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
66
|
+
color: z.ZodDefault<z.ZodString>;
|
|
67
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
68
|
+
id: z.ZodOptional<z.ZodString>;
|
|
69
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
70
|
+
strokeColor: z.ZodDefault<z.ZodString>;
|
|
71
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
72
|
+
type: z.ZodLiteral<"marker">;
|
|
73
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
74
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
75
|
+
fill: z.ZodDefault<z.ZodString>;
|
|
76
|
+
id: z.ZodOptional<z.ZodString>;
|
|
77
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
78
|
+
stroke: z.ZodOptional<z.ZodString>;
|
|
79
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
80
|
+
type: z.ZodLiteral<"polygon">;
|
|
81
|
+
}, z.core.$strip>], "type">;
|
|
82
|
+
declare const staticSceneSchema: z.ZodObject<{
|
|
83
|
+
camera: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
84
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
86
|
+
type: z.ZodLiteral<"center">;
|
|
87
|
+
zoom: z.ZodNumber;
|
|
88
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
+
bearing: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
bounds: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
91
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
type: z.ZodLiteral<"bounds">;
|
|
93
|
+
}, z.core.$strip>], "type">;
|
|
94
|
+
map: z.ZodString;
|
|
95
|
+
overlays: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
96
|
+
color: z.ZodDefault<z.ZodString>;
|
|
97
|
+
coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
98
|
+
id: z.ZodOptional<z.ZodString>;
|
|
99
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
100
|
+
type: z.ZodLiteral<"line">;
|
|
101
|
+
width: z.ZodDefault<z.ZodNumber>;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
color: z.ZodDefault<z.ZodString>;
|
|
104
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
105
|
+
id: z.ZodOptional<z.ZodString>;
|
|
106
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
107
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
108
|
+
strokeColor: z.ZodOptional<z.ZodString>;
|
|
109
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
110
|
+
type: z.ZodLiteral<"circle">;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
color: z.ZodDefault<z.ZodString>;
|
|
113
|
+
coordinate: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
114
|
+
id: z.ZodOptional<z.ZodString>;
|
|
115
|
+
radius: z.ZodDefault<z.ZodNumber>;
|
|
116
|
+
strokeColor: z.ZodDefault<z.ZodString>;
|
|
117
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
118
|
+
type: z.ZodLiteral<"marker">;
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
+
coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
121
|
+
fill: z.ZodDefault<z.ZodString>;
|
|
122
|
+
id: z.ZodOptional<z.ZodString>;
|
|
123
|
+
opacity: z.ZodDefault<z.ZodNumber>;
|
|
124
|
+
stroke: z.ZodOptional<z.ZodString>;
|
|
125
|
+
strokeWidth: z.ZodDefault<z.ZodNumber>;
|
|
126
|
+
type: z.ZodLiteral<"polygon">;
|
|
127
|
+
}, z.core.$strip>], "type">>>;
|
|
128
|
+
size: z.ZodObject<{
|
|
129
|
+
dpr: z.ZodOptional<z.ZodLiteral<1>>;
|
|
130
|
+
height: z.ZodNumber;
|
|
131
|
+
width: z.ZodNumber;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
theme: z.ZodString;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
type StaticCoordinate = z.infer<typeof coordinateSchema>;
|
|
136
|
+
type StaticSceneInput = z.input<typeof staticSceneSchema>;
|
|
137
|
+
type StaticScene = z.infer<typeof staticSceneSchema>;
|
|
138
|
+
type StaticOverlayInput = z.input<typeof staticOverlaySchema>;
|
|
139
|
+
type StaticOverlay = z.infer<typeof staticOverlaySchema>;
|
|
140
|
+
|
|
141
|
+
export { type StaticCoordinate as S, type StaticOverlay as a, type StaticOverlayInput as b, type StaticScene as c, type StaticSceneInput as d, staticSceneLimits as e, staticSceneSchema as f, staticSceneSchemaVersion as g, circleOverlaySchema as h, lineOverlaySchema as l, markerOverlaySchema as m, polygonOverlaySchema as p, staticOverlaySchema as s };
|
package/dist/scene.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { d as StaticSceneInput, c as StaticScene } from './scene-contract-DzsUeJ_V.js';
|
|
2
|
+
export { S as StaticCoordinate, e as staticSceneLimits, f as staticSceneSchema, g as staticSceneSchemaVersion } from './scene-contract-DzsUeJ_V.js';
|
|
3
|
+
import 'zod';
|
|
4
|
+
|
|
5
|
+
declare function validateStaticScene(input: unknown): {
|
|
6
|
+
ok: true;
|
|
7
|
+
scene: StaticScene;
|
|
8
|
+
} | {
|
|
9
|
+
error: string;
|
|
10
|
+
ok: false;
|
|
11
|
+
};
|
|
12
|
+
declare function normalizeStaticScene(scene: StaticSceneInput): StaticScene;
|
|
13
|
+
|
|
14
|
+
export { StaticScene, StaticSceneInput, normalizeStaticScene, validateStaticScene };
|
package/dist/scene.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeStaticScene,
|
|
3
|
+
validateStaticScene
|
|
4
|
+
} from "./chunk-ROBEGDDY.js";
|
|
5
|
+
import {
|
|
6
|
+
staticSceneLimits,
|
|
7
|
+
staticSceneSchema,
|
|
8
|
+
staticSceneSchemaVersion
|
|
9
|
+
} from "./chunk-YUG3PBK2.js";
|
|
10
|
+
export {
|
|
11
|
+
normalizeStaticScene,
|
|
12
|
+
staticSceneLimits,
|
|
13
|
+
staticSceneSchema,
|
|
14
|
+
staticSceneSchemaVersion,
|
|
15
|
+
validateStaticScene
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tileflow/static",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.18",
|
|
4
|
+
"license": "Apache-2.0",
|
|
4
5
|
"description": "Static map request schemas and helpers for Tileflow.",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"sideEffects": false,
|
|
@@ -23,13 +24,37 @@
|
|
|
23
24
|
"main": "./dist/index.js",
|
|
24
25
|
"types": "./dist/index.d.ts",
|
|
25
26
|
"files": [
|
|
26
|
-
"dist"
|
|
27
|
+
"dist",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"NOTICE",
|
|
30
|
+
"GENERATED_OUTPUT_LICENSE.md",
|
|
31
|
+
"TRADEMARKS.md"
|
|
27
32
|
],
|
|
28
33
|
"exports": {
|
|
29
34
|
".": {
|
|
30
35
|
"types": "./dist/index.d.ts",
|
|
31
36
|
"import": "./dist/index.js",
|
|
32
37
|
"default": "./dist/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./client": {
|
|
40
|
+
"types": "./dist/client.d.ts",
|
|
41
|
+
"import": "./dist/client.js",
|
|
42
|
+
"default": "./dist/client.js"
|
|
43
|
+
},
|
|
44
|
+
"./manifest": {
|
|
45
|
+
"types": "./dist/manifest.d.ts",
|
|
46
|
+
"import": "./dist/manifest.js",
|
|
47
|
+
"default": "./dist/manifest.js"
|
|
48
|
+
},
|
|
49
|
+
"./overlays": {
|
|
50
|
+
"types": "./dist/overlays.d.ts",
|
|
51
|
+
"import": "./dist/overlays.js",
|
|
52
|
+
"default": "./dist/overlays.js"
|
|
53
|
+
},
|
|
54
|
+
"./scene": {
|
|
55
|
+
"types": "./dist/scene.d.ts",
|
|
56
|
+
"import": "./dist/scene.js",
|
|
57
|
+
"default": "./dist/scene.js"
|
|
33
58
|
}
|
|
34
59
|
},
|
|
35
60
|
"publishConfig": {
|
|
@@ -39,7 +64,7 @@
|
|
|
39
64
|
"zod": "^4.4.3"
|
|
40
65
|
},
|
|
41
66
|
"scripts": {
|
|
42
|
-
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
67
|
+
"build": "tsup src/index.ts src/scene.ts src/overlays.ts src/manifest.ts src/client.ts --format esm --dts --clean --splitting",
|
|
43
68
|
"verify": "tsx --test test/*.test.ts",
|
|
44
69
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
45
70
|
"lint": "tsc -p tsconfig.json --noEmit"
|