@tileflow/core 0.1.0-alpha.26 → 0.1.0-alpha.27
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 +43 -3
- package/THIRD_PARTY_NOTICES.md +84 -0
- package/dist/build.d.ts +417 -6
- package/dist/build.js +12095 -2197
- package/dist/{capture-scene-BK_0J2oR.d.ts → capture-scene-D6soWztE.d.ts} +1 -1
- package/dist/capture.d.ts +2 -2
- package/dist/capture.js +107 -37
- package/dist/{icon-composition-BssSKOKF.d.ts → icon-composition-C2bVldOJ.d.ts} +89 -7
- package/dist/index.d.ts +156 -27
- package/dist/index.js +5217 -4678
- package/dist/{manifest-B5GKVMFE.d.ts → manifest-types-BdGjIYy-.d.ts} +2 -11
- package/dist/manifest.d.ts +9 -2
- package/dist/manifest.js +316 -193
- package/dist/native-profile.d.ts +187 -0
- package/dist/native-profile.js +9316 -0
- package/dist/native.d.ts +196 -5
- package/dist/native.js +4813 -95
- package/dist/runtime.d.ts +1 -2
- package/dist/runtime.js +338 -221
- package/docs/authoring-model.md +5 -4
- package/docs/data-is-separate-from-design.md +8 -8
- package/docs/hosted-session-authorization.md +11 -2
- package/docs/native-artifact-profile.md +145 -0
- package/docs/native-resource-urls.md +257 -7
- package/docs/public-api-and-browser-subpath.md +14 -8
- package/package.json +10 -4
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/** Static preparation profile, not evidence that an application ran on a device. */
|
|
4
|
+
declare const tileflowNativeProfileSchema: z.ZodLazy<z.core.$ZodObject<{
|
|
5
|
+
id: z.ZodLiteral<"native-v1">;
|
|
6
|
+
renderer: z.ZodLiteral<"native">;
|
|
7
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
8
|
+
styleVersion: z.ZodLiteral<8>;
|
|
9
|
+
validatorStyleSpec: z.ZodLiteral<"24.8.5">;
|
|
10
|
+
reactNativeStyleSpec: z.ZodLiteral<"26.2.1">;
|
|
11
|
+
maplibreReactNative: z.ZodLiteral<"11.3.10">;
|
|
12
|
+
android: z.ZodLiteral<"13.2.0">;
|
|
13
|
+
ios: z.ZodLiteral<"6.26.0">;
|
|
14
|
+
}, z.core.$strict>>;
|
|
15
|
+
type TileflowNativeProfile = z.infer<typeof tileflowNativeProfileSchema>;
|
|
16
|
+
declare const tileflowNativeProfile: Readonly<TileflowNativeProfile>;
|
|
17
|
+
declare const tileflowNativeProfileIdSchema: z.ZodLiteral<"native-v1">;
|
|
18
|
+
declare const tileflowRendererSchema: z.ZodEnum<{
|
|
19
|
+
native: "native";
|
|
20
|
+
web: "web";
|
|
21
|
+
}>;
|
|
22
|
+
type TileflowRenderer = z.infer<typeof tileflowRendererSchema>;
|
|
23
|
+
|
|
24
|
+
type TileflowColor = `#${string}`;
|
|
25
|
+
type MapLibreSprite = string | Array<{
|
|
26
|
+
id: string;
|
|
27
|
+
url: string;
|
|
28
|
+
}>;
|
|
29
|
+
type TileflowProjection = 'globe' | 'mercator';
|
|
30
|
+
type TileflowLight = {
|
|
31
|
+
anchor?: 'map' | 'viewport';
|
|
32
|
+
color?: TileflowColor;
|
|
33
|
+
intensity?: number;
|
|
34
|
+
position?: readonly [number, number, number];
|
|
35
|
+
};
|
|
36
|
+
type MapLibreStyle = {
|
|
37
|
+
version: 8;
|
|
38
|
+
name: string;
|
|
39
|
+
glyphs?: string;
|
|
40
|
+
light?: TileflowLight;
|
|
41
|
+
projection?: {
|
|
42
|
+
type: TileflowProjection;
|
|
43
|
+
};
|
|
44
|
+
sprite?: MapLibreSprite;
|
|
45
|
+
sources: Record<string, Record<string, unknown>>;
|
|
46
|
+
layers: Array<Record<string, unknown>>;
|
|
47
|
+
terrain?: Record<string, unknown>;
|
|
48
|
+
metadata?: Record<string, unknown>;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** Resource budgets apply to validation work, not downloaded resources or native GPU memory. */
|
|
52
|
+
declare const tileflowNativeProfileLimits: Readonly<{
|
|
53
|
+
maximumStyleBytes: number;
|
|
54
|
+
maximumDepth: 64;
|
|
55
|
+
maximumNodes: 160000;
|
|
56
|
+
maximumSources: 128;
|
|
57
|
+
maximumLayers: 4096;
|
|
58
|
+
maximumIssues: 32;
|
|
59
|
+
maximumFontFaces: 16;
|
|
60
|
+
maximumFontBytes: number;
|
|
61
|
+
}>;
|
|
62
|
+
/** Fixed output budget for a prepared native-v1 style, never a raw input allowance. */
|
|
63
|
+
declare const tileflowNativePreparedStyleLimits: Readonly<{
|
|
64
|
+
maximumNodes: 540000;
|
|
65
|
+
maximumStyleBytes: number;
|
|
66
|
+
maximumDepth: 64;
|
|
67
|
+
maximumSources: 128;
|
|
68
|
+
maximumLayers: 4096;
|
|
69
|
+
maximumIssues: 32;
|
|
70
|
+
maximumFontFaces: 16;
|
|
71
|
+
maximumFontBytes: number;
|
|
72
|
+
}>;
|
|
73
|
+
|
|
74
|
+
declare const tileflowNativeBuildRecordFileName = "native-build.json";
|
|
75
|
+
declare const tileflowNativeStyleTransformationSchema: z.ZodLazy<z.core.$ZodObject<{
|
|
76
|
+
map: z.ZodString;
|
|
77
|
+
theme: z.ZodString;
|
|
78
|
+
inputStyleSha256: z.ZodString;
|
|
79
|
+
loweredStyleSha256: z.ZodString;
|
|
80
|
+
inputLayers: z.ZodNumber;
|
|
81
|
+
outputLayers: z.ZodNumber;
|
|
82
|
+
projection: z.ZodEnum<{
|
|
83
|
+
none: "none";
|
|
84
|
+
"mercator-to-implicit": "mercator-to-implicit";
|
|
85
|
+
"globe-to-mercator": "globe-to-mercator";
|
|
86
|
+
}>;
|
|
87
|
+
layers: z.ZodArray<z.ZodLazy<z.core.$ZodObject<{
|
|
88
|
+
inputLayer: z.ZodNumber;
|
|
89
|
+
outputStart: z.ZodNumber;
|
|
90
|
+
outputCount: z.ZodNumber;
|
|
91
|
+
properties: z.ZodArray<z.ZodEnum<{
|
|
92
|
+
"line-dasharray": "line-dasharray";
|
|
93
|
+
"line-cap": "line-cap";
|
|
94
|
+
}>>;
|
|
95
|
+
}, z.core.$strict>>>;
|
|
96
|
+
}, z.core.$strict>>;
|
|
97
|
+
type TileflowNativeStyleTransformation = z.infer<typeof tileflowNativeStyleTransformationSchema>;
|
|
98
|
+
/** Version 2 adds explicit preparation evidence. The runtime manifest remains version 1. */
|
|
99
|
+
declare const tileflowNativeBuildRecordSchema: z.ZodLazy<z.core.$ZodObject<{
|
|
100
|
+
schemaVersion: z.ZodLiteral<2>;
|
|
101
|
+
renderer: z.ZodLiteral<"native">;
|
|
102
|
+
profile: z.ZodLiteral<"native-v1">;
|
|
103
|
+
validation: z.ZodLiteral<"static-artifacts">;
|
|
104
|
+
preparationVersion: z.ZodLiteral<"native-lowering-v1">;
|
|
105
|
+
engines: z.ZodLazy<z.core.$ZodObject<{
|
|
106
|
+
android: z.ZodLiteral<"13.2.0">;
|
|
107
|
+
ios: z.ZodLiteral<"6.26.0">;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
buildManifestSha256: z.ZodString;
|
|
110
|
+
transformations: z.ZodArray<z.ZodLazy<z.core.$ZodObject<{
|
|
111
|
+
map: z.ZodString;
|
|
112
|
+
theme: z.ZodString;
|
|
113
|
+
inputStyleSha256: z.ZodString;
|
|
114
|
+
loweredStyleSha256: z.ZodString;
|
|
115
|
+
inputLayers: z.ZodNumber;
|
|
116
|
+
outputLayers: z.ZodNumber;
|
|
117
|
+
projection: z.ZodEnum<{
|
|
118
|
+
none: "none";
|
|
119
|
+
"mercator-to-implicit": "mercator-to-implicit";
|
|
120
|
+
"globe-to-mercator": "globe-to-mercator";
|
|
121
|
+
}>;
|
|
122
|
+
layers: z.ZodArray<z.ZodLazy<z.core.$ZodObject<{
|
|
123
|
+
inputLayer: z.ZodNumber;
|
|
124
|
+
outputStart: z.ZodNumber;
|
|
125
|
+
outputCount: z.ZodNumber;
|
|
126
|
+
properties: z.ZodArray<z.ZodEnum<{
|
|
127
|
+
"line-dasharray": "line-dasharray";
|
|
128
|
+
"line-cap": "line-cap";
|
|
129
|
+
}>>;
|
|
130
|
+
}, z.core.$strict>>>;
|
|
131
|
+
}, z.core.$strict>>>;
|
|
132
|
+
}, z.core.$strict>>;
|
|
133
|
+
type TileflowNativeBuildRecord = z.infer<typeof tileflowNativeBuildRecordSchema>;
|
|
134
|
+
declare function createTileflowNativeBuildRecord(buildManifestSha256: string, transformations?: readonly TileflowNativeStyleTransformation[]): TileflowNativeBuildRecord;
|
|
135
|
+
|
|
136
|
+
declare const tileflowNativeDiagnosticCodeSchema: z.ZodEnum<{
|
|
137
|
+
NATIVE_UNSUPPORTED_STYLE: "NATIVE_UNSUPPORTED_STYLE";
|
|
138
|
+
NATIVE_UNSUPPORTED_SOURCE: "NATIVE_UNSUPPORTED_SOURCE";
|
|
139
|
+
NATIVE_FONT_UNAVAILABLE: "NATIVE_FONT_UNAVAILABLE";
|
|
140
|
+
NATIVE_MANIFEST_REQUIRED: "NATIVE_MANIFEST_REQUIRED";
|
|
141
|
+
NATIVE_RENDERER_UNSUPPORTED: "NATIVE_RENDERER_UNSUPPORTED";
|
|
142
|
+
}>;
|
|
143
|
+
type TileflowNativeDiagnosticCode = z.infer<typeof tileflowNativeDiagnosticCodeSchema>;
|
|
144
|
+
/** Uses the command diagnostic fields; renderer/profile are bounded additional context. */
|
|
145
|
+
declare const tileflowNativeDiagnosticSchema: z.ZodLazy<z.core.$ZodObject<{
|
|
146
|
+
code: z.ZodEnum<{
|
|
147
|
+
NATIVE_UNSUPPORTED_STYLE: "NATIVE_UNSUPPORTED_STYLE";
|
|
148
|
+
NATIVE_UNSUPPORTED_SOURCE: "NATIVE_UNSUPPORTED_SOURCE";
|
|
149
|
+
NATIVE_FONT_UNAVAILABLE: "NATIVE_FONT_UNAVAILABLE";
|
|
150
|
+
NATIVE_MANIFEST_REQUIRED: "NATIVE_MANIFEST_REQUIRED";
|
|
151
|
+
NATIVE_RENDERER_UNSUPPORTED: "NATIVE_RENDERER_UNSUPPORTED";
|
|
152
|
+
}>;
|
|
153
|
+
phase: z.ZodLiteral<"native-compatibility">;
|
|
154
|
+
severity: z.ZodLiteral<"error">;
|
|
155
|
+
path: z.ZodString;
|
|
156
|
+
renderer: z.ZodLiteral<"native">;
|
|
157
|
+
profile: z.ZodLiteral<"native-v1">;
|
|
158
|
+
message: z.ZodString;
|
|
159
|
+
suggestion: z.ZodString;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
type TileflowNativeDiagnostic = z.infer<typeof tileflowNativeDiagnosticSchema>;
|
|
162
|
+
declare function createTileflowNativeDiagnostic(code: TileflowNativeDiagnosticCode, path?: string): TileflowNativeDiagnostic;
|
|
163
|
+
declare class TileflowNativeCompatibilityError extends Error {
|
|
164
|
+
readonly phase: "native-compatibility";
|
|
165
|
+
readonly issues: readonly TileflowNativeDiagnostic[];
|
|
166
|
+
readonly code: TileflowNativeDiagnosticCode;
|
|
167
|
+
constructor(issues: readonly TileflowNativeDiagnostic[]);
|
|
168
|
+
}
|
|
169
|
+
declare function resolveTileflowRenderer(value?: unknown): TileflowRenderer;
|
|
170
|
+
type TileflowNativeStyleValidationOptions = {
|
|
171
|
+
profile?: 'native-v1';
|
|
172
|
+
/** Used only for URL syntax resolution; no request or authority is implied. */
|
|
173
|
+
documentUrl?: string;
|
|
174
|
+
developmentOrigin?: string;
|
|
175
|
+
/** Build preflight may defer font closure until the existing font pipeline has run. */
|
|
176
|
+
deferFontClosure?: boolean;
|
|
177
|
+
};
|
|
178
|
+
/** Validate bounded JSON and the common native engine surface without executing a renderer. */
|
|
179
|
+
declare function validateTileflowNativeStyle(input: unknown, options?: TileflowNativeStyleValidationOptions): TileflowNativeDiagnostic[];
|
|
180
|
+
/**
|
|
181
|
+
* Check an already prepared artifact with the fixed native-v1 output allowance.
|
|
182
|
+
* This does not lower a style or prove its origin. Authoring input must use the raw validator.
|
|
183
|
+
*/
|
|
184
|
+
declare function validateTileflowNativePreparedStyle(input: unknown, options?: TileflowNativeStyleValidationOptions): TileflowNativeDiagnostic[];
|
|
185
|
+
declare function assertTileflowNativeStyle(style: unknown, options?: TileflowNativeStyleValidationOptions): asserts style is MapLibreStyle;
|
|
186
|
+
|
|
187
|
+
export { type TileflowNativeBuildRecord, TileflowNativeCompatibilityError, type TileflowNativeDiagnostic, type TileflowNativeDiagnosticCode, type TileflowNativeProfile, type TileflowNativeStyleValidationOptions, type TileflowRenderer, assertTileflowNativeStyle, createTileflowNativeBuildRecord, createTileflowNativeDiagnostic, resolveTileflowRenderer, tileflowNativeBuildRecordFileName, tileflowNativeBuildRecordSchema, tileflowNativeDiagnosticCodeSchema, tileflowNativeDiagnosticSchema, tileflowNativePreparedStyleLimits, tileflowNativeProfile, tileflowNativeProfileIdSchema, tileflowNativeProfileLimits, tileflowNativeProfileSchema, tileflowRendererSchema, validateTileflowNativePreparedStyle, validateTileflowNativeStyle };
|