@mappedin/mappedin-js 6.30.0 → 6.32.0
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/THIRD_PARTY_LICENSES.txt +68 -161
- package/lib/esm/chunk-7B7J4IXM.js +2 -0
- package/lib/esm/chunk-EXOCWBOF.js +1 -0
- package/lib/esm/chunk-J5TYCDYA.js +1 -0
- package/lib/esm/chunk-PQ2OLSSS.js +1381 -0
- package/lib/esm/chunk-SAPR7Z5M.js +1771 -0
- package/lib/esm/chunk-TWRTSPVQ.js +2 -0
- package/lib/esm/chunk-ZJEQSG7Y.js +5 -0
- package/lib/esm/index.d.ts +1397 -280
- package/lib/esm/index.js +660 -1
- package/lib/esm/inspector-2DU7TV3T.css +1 -0
- package/lib/esm/{inspector-6TN57EHG.js → inspector-BXOUWL5H.js} +2 -2
- package/lib/esm/internal-WXG4ZPV3.js +1 -0
- package/lib/esm/src-Q2KNMHOD.js +1 -0
- package/lib/esm/text3d-PIWYZMWH.js +1 -0
- package/lib/esm/workers/collision-worker.csp.js +1 -1
- package/package.json +3 -2
- package/lib/esm/GLTFExporter-6CFIB35E.js +0 -1
- package/lib/esm/GLTFLoader-4HJWTRLM.js +0 -1
- package/lib/esm/chunk-7WSSZSL2.js +0 -661
- package/lib/esm/chunk-NO3DWTOG.js +0 -1515
- package/lib/esm/chunk-NRL4CNJO.js +0 -1222
- package/lib/esm/chunk-Q7BEUNXA.js +0 -1
- package/lib/esm/chunk-UHBPXUGN.js +0 -3819
- package/lib/esm/inspector-XFCJVSNO.css +0 -1
- package/lib/esm/internal-GAAKLDRM.js +0 -1
- package/lib/esm/internal-MHQVREWX.css +0 -1
- package/lib/esm/src-PT63JZBF.js +0 -1
- package/lib/esm/text3d-CZ52NRGO.js +0 -252
package/lib/esm/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { MVFv2_STANDARD_MVFv3 as MVFv2_STANDARD_MVFv3$1, ParsedMVF as ParsedMVF$
|
|
|
4
4
|
import * as _mappedin_renderer_three0 from "@mappedin/renderer-three";
|
|
5
5
|
import { AddLabelOptionsInternal, AddText3DOptions, AddText3DOptions as AddText3DOptions$1, AddText3DPointOptions, AddText3DPointOptions as AddText3DPointOptions$1, CameraSystemState, ColorString, DebugState, DebugState as DebugState$1, EntityId, EnvMapOptions, EnvMapOptions as EnvMapOptions$1, GLTFExportOptions as GLTFExportOptions$1, GroupContainerState, ISystemPlugin, ISystemPlugin as ISystemPlugin$1, ImagePlacementOptions, InitializeModelState, InitializeModelState as InitializeModelState$1, InitializeText3DState, InsetPadding, InsetPadding as InsetPadding$1, InsetPaddingOption, InsetPaddingOption as InsetPaddingOption$1, InterpolateOn, Interpolation, LabelRenderedState, LineStyle, LineStyle as LineStyle$1, MapViewState, MarkerState, OutlinesOptions, PaintStyle, PaintStyle as PaintStyle$1, PathState, PathWidth, PathWidth as PathWidth$1, PixelWidth, Position as Position$1, RendererCore, RendererCoreOptions, RendererCoreOptions as RendererCoreOptions$1, Shading, ShadowsOptions, Text3DState, WatermarkUpdateOptions } from "@mappedin/renderer-three";
|
|
6
6
|
import * as three0 from "three";
|
|
7
|
-
import { AmbientLight, BatchedMesh, BatchedMeshGeometryRange, Box3, BufferAttribute, BufferGeometry, Camera as Camera$1, Color, DirectionalLight, Group, Intersection, LineSegments, Matrix4, Mesh, MeshLambertMaterial, MeshLambertMaterialParameters, Object3D, Object3DEventMap, PerspectiveCamera, Plane, PlaneGeometry, Raycaster, Scene, ShaderMaterial, Texture, TubeGeometry, Vector2, Vector3, WebGLRenderer } from "three";
|
|
7
|
+
import { AmbientLight, BatchedMesh, BatchedMeshGeometryRange, Box3, BufferAttribute, BufferGeometry, Camera as Camera$1, Color, DataTexture, DirectionalLight, Group, IUniform, Intersection, LineSegments, Matrix4, Mesh, MeshLambertMaterial, MeshLambertMaterialParameters, Object3D, Object3DEventMap, PerspectiveCamera, Plane, PlaneGeometry, Raycaster, Scene, ShaderMaterial, Texture, TubeGeometry, Vector2, Vector3, WebGLRenderer } from "three";
|
|
8
8
|
import * as _tweenjs_tween_js0 from "@tweenjs/tween.js";
|
|
9
9
|
import { Group as Group$1, Tween } from "@tweenjs/tween.js";
|
|
10
10
|
import { CustomLayerInterface, IControl, Map as Map$1, MapEventType } from "@mappedin/outdoor-context";
|
|
@@ -226,8 +226,68 @@ type TMVFVersion = '2.0.0' | '2.0.0-c' | '3.0.0' | '3.0.0-native';
|
|
|
226
226
|
type TSearchOptions = {
|
|
227
227
|
/**
|
|
228
228
|
* Indicates whether search functionality is enabled.
|
|
229
|
+
* @default false
|
|
229
230
|
*/
|
|
230
231
|
enabled: boolean;
|
|
232
|
+
/**
|
|
233
|
+
* Index runs of neighbouring words in separate joined fields, so a query
|
|
234
|
+
* typed without spaces ("katespade") matches a value stored with spaces
|
|
235
|
+
* ("Kate Spade"). Opt-in: disabled unless `enabled: true`.
|
|
236
|
+
*
|
|
237
|
+
* The base `name`/`tags` fields, their ranking, and `suggest()` are
|
|
238
|
+
* untouched. Joined runs live in their own fields, so they can only add
|
|
239
|
+
* matches; they never leak into suggestions. Search `limit` is applied after
|
|
240
|
+
* the merge, so a joined-only match can push a base match out of a truncated
|
|
241
|
+
* list.
|
|
242
|
+
*
|
|
243
|
+
* Modelled on Elasticsearch's `shingle` token filter, applied to a separate
|
|
244
|
+
* multi-field: runs are only of size 2 and up (`output_unigrams: true` keeps
|
|
245
|
+
* single words in the base fields), and the separator is `""`
|
|
246
|
+
* (`token_separator` defaults to a space, which would make each run several
|
|
247
|
+
* tokens again).
|
|
248
|
+
*
|
|
249
|
+
* @experimental
|
|
250
|
+
*/
|
|
251
|
+
joinedWords?: TSearchJoinedWordsOptions;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Options for the separate joined-word index fields. Equivalent to
|
|
255
|
+
* Elasticsearch's `shingle` token filter with `min_shingle_size: 2`,
|
|
256
|
+
* `token_separator: ""`, and `output_unigrams: true`, written to a sub-field
|
|
257
|
+
* that `search()` reads and `suggest()` never does.
|
|
258
|
+
*
|
|
259
|
+
* There is no minimum option: runs of two or more words are always included.
|
|
260
|
+
* There is no separator option: the joined text is tokenized again, so only
|
|
261
|
+
* `""` keeps a run as one term. `maxWords` is clamped to 2–4, matching
|
|
262
|
+
* `search_as_you_type.max_shingle_size` ("integer values 2 - 4 inclusive");
|
|
263
|
+
* unlike that field type we default to 2, because pairs cover the common
|
|
264
|
+
* joined brand names and every extra size adds terms.
|
|
265
|
+
*
|
|
266
|
+
* @experimental
|
|
267
|
+
*/
|
|
268
|
+
type TSearchJoinedWordsOptions = {
|
|
269
|
+
/**
|
|
270
|
+
* Whether to index joined word runs.
|
|
271
|
+
* @default false
|
|
272
|
+
*/
|
|
273
|
+
enabled?: boolean;
|
|
274
|
+
/**
|
|
275
|
+
* Largest run of neighbouring words indexed as one joined term. All sizes
|
|
276
|
+
* from 2 up to this value are indexed in one field (Elasticsearch's
|
|
277
|
+
* `search_as_you_type` instead creates one sub-field per size).
|
|
278
|
+
*
|
|
279
|
+
* Fractional values are floored, and values outside 2–4 are clamped; both log
|
|
280
|
+
* one warning. `NaN` resolves to 2 and `Infinity` to 4.
|
|
281
|
+
* @default 2
|
|
282
|
+
*/
|
|
283
|
+
maxWords?: number;
|
|
284
|
+
/**
|
|
285
|
+
* Fields to index joined runs for. `name` covers places, enterprise locations
|
|
286
|
+
* and enterprise categories; `tags` covers enterprise-location tags.
|
|
287
|
+
* An empty array turns joined words off.
|
|
288
|
+
* @default ['name', 'tags']
|
|
289
|
+
*/
|
|
290
|
+
fields?: ('name' | 'tags')[];
|
|
231
291
|
};
|
|
232
292
|
/**
|
|
233
293
|
* A pre-resolved (typically signed) MVF bundle URL, or a function that returns one.
|
|
@@ -660,11 +720,8 @@ declare class QuadTree<T$1 = unknown> {
|
|
|
660
720
|
//#endregion
|
|
661
721
|
//#region ../2d-labels-markers/lib/esm/systems/collision/types.d.ts
|
|
662
722
|
type WatermarkPosition$1 = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center' | 'top' | 'bottom' | 'left' | 'right';
|
|
663
|
-
type TSerializedColliderResponse = [number, 1 | 0, Rectangle?];
|
|
664
723
|
type PackedBBox = [x: number, y: number, w: number, h: number, index: number];
|
|
665
724
|
type PackedBBoxes = PackedBBox[];
|
|
666
|
-
type PackedCollider = [bboxes: PackedBBoxes, enabled: 0 | 1, alwaysVisible: 0 | 1, x: number, y: number, shouldCollideWithScreenEdges?: 0 | 1, onlyExposeStrategyIndex?: number];
|
|
667
|
-
type PackedMessage = [colliders: PackedCollider[], devicePixelRatio: number, totalHeight: number, totalWidth: number, watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition$1];
|
|
668
725
|
type PackedJsonMessage = {
|
|
669
726
|
x: number;
|
|
670
727
|
y: number;
|
|
@@ -693,8 +750,9 @@ declare enum TEXTALIGN {
|
|
|
693
750
|
RIGHT = "right",
|
|
694
751
|
}
|
|
695
752
|
//#endregion
|
|
696
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
753
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/json-schema.d.cts
|
|
697
754
|
type _JSONSchema = boolean | JSONSchema;
|
|
755
|
+
type SchemaType = "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
|
|
698
756
|
type JSONSchema = {
|
|
699
757
|
[k: string]: unknown;
|
|
700
758
|
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
@@ -706,7 +764,7 @@ type JSONSchema = {
|
|
|
706
764
|
$vocabulary?: Record<string, boolean>;
|
|
707
765
|
$comment?: string;
|
|
708
766
|
$defs?: Record<string, JSONSchema>;
|
|
709
|
-
type?:
|
|
767
|
+
type?: SchemaType | SchemaType[];
|
|
710
768
|
additionalItems?: _JSONSchema;
|
|
711
769
|
unevaluatedItems?: _JSONSchema;
|
|
712
770
|
prefixItems?: _JSONSchema[];
|
|
@@ -761,7 +819,7 @@ type JSONSchema = {
|
|
|
761
819
|
};
|
|
762
820
|
type BaseSchema = JSONSchema;
|
|
763
821
|
//#endregion
|
|
764
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
822
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/standard-schema.d.cts
|
|
765
823
|
/** The Standard interface. */
|
|
766
824
|
interface StandardTypedV1<Input = unknown, Output = Input> {
|
|
767
825
|
/** The Standard properties. */
|
|
@@ -880,12 +938,12 @@ declare namespace StandardJSONSchemaV1 {
|
|
|
880
938
|
}
|
|
881
939
|
interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
|
|
882
940
|
//#endregion
|
|
883
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
941
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/registries.d.cts
|
|
884
942
|
declare const $output: unique symbol;
|
|
885
943
|
type $output = typeof $output;
|
|
886
944
|
declare const $input: unique symbol;
|
|
887
945
|
type $input = typeof $input;
|
|
888
|
-
type $replace<Meta, S extends $ZodType> = Meta extends $output ? output<S> : Meta extends $input ? input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends ((...args: infer P) => infer R) ? (...args: { [K in keyof P]: $replace<P[K], S> }) => $replace<R, S> : Meta extends object ? { [K in keyof Meta]: $replace<Meta[K], S> } : Meta;
|
|
946
|
+
type $replace<Meta, S extends $ZodType> = Meta extends $output ? output<S> : Meta extends $input ? input$1<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends ((...args: infer P) => infer R) ? (...args: { [K in keyof P]: $replace<P[K], S> }) => $replace<R, S> : Meta extends object ? { [K in keyof Meta]: $replace<Meta[K], S> } : Meta;
|
|
889
947
|
type MetadataType = object | undefined;
|
|
890
948
|
declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
|
|
891
949
|
_meta: Meta;
|
|
@@ -907,8 +965,20 @@ interface JSONSchemaMeta {
|
|
|
907
965
|
}
|
|
908
966
|
interface GlobalMeta extends JSONSchemaMeta {}
|
|
909
967
|
//#endregion
|
|
910
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
968
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.d.cts
|
|
911
969
|
type Processor<T$1 extends $ZodType = $ZodType> = (schema: T$1, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
|
|
970
|
+
/**
|
|
971
|
+
* Called for each schema that has no JSON Schema equivalent. Return a JSON Schema to use in its
|
|
972
|
+
* place, `"any"` to fall back to the `unrepresentable: "any"` behavior, or `"throw"`/`undefined` to
|
|
973
|
+
* throw the default error. Throwing from the handler propagates, so custom errors work too.
|
|
974
|
+
*/
|
|
975
|
+
type UnrepresentableHandler<T$1 extends $ZodType = $ZodType> = (ctx: {
|
|
976
|
+
zodSchema: T$1;
|
|
977
|
+
path: (string | number)[];
|
|
978
|
+
/** The error Zod would throw. Distinguishes sites that share a `zodSchema`, e.g. an `undefined`
|
|
979
|
+
* vs a `bigint` member of the same literal. */
|
|
980
|
+
message: string;
|
|
981
|
+
}) => BaseSchema | "throw" | "any" | undefined;
|
|
912
982
|
interface JSONSchemaGeneratorParams {
|
|
913
983
|
processors: Record<string, Processor>;
|
|
914
984
|
/** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
|
|
@@ -922,8 +992,9 @@ interface JSONSchemaGeneratorParams {
|
|
|
922
992
|
target?: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string) | undefined;
|
|
923
993
|
/** How to handle unrepresentable types.
|
|
924
994
|
* - `"throw"` — Default. Unrepresentable types throw an error
|
|
925
|
-
* - `"any"` — Unrepresentable types become `{}`
|
|
926
|
-
|
|
995
|
+
* - `"any"` — Unrepresentable types become `{}`
|
|
996
|
+
* - A function — called once per unrepresentable schema; see {@link UnrepresentableHandler}. */
|
|
997
|
+
unrepresentable?: "throw" | "any" | UnrepresentableHandler<$ZodTypes>;
|
|
927
998
|
/** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
|
|
928
999
|
override?: (ctx: {
|
|
929
1000
|
zodSchema: $ZodTypes;
|
|
@@ -972,7 +1043,7 @@ interface ToJSONSchemaContext {
|
|
|
972
1043
|
processors: Record<string, Processor>;
|
|
973
1044
|
metadataRegistry: $ZodRegistry<Record<string, any>>;
|
|
974
1045
|
target: "draft-04" | "draft-07" | "draft-2020-12" | "openapi-3.0" | ({} & string);
|
|
975
|
-
unrepresentable: "throw" | "any";
|
|
1046
|
+
unrepresentable: "throw" | "any" | UnrepresentableHandler;
|
|
976
1047
|
override: (ctx: {
|
|
977
1048
|
zodSchema: $ZodType;
|
|
978
1049
|
jsonSchema: BaseSchema;
|
|
@@ -981,8 +1052,28 @@ interface ToJSONSchemaContext {
|
|
|
981
1052
|
io: "input" | "output";
|
|
982
1053
|
counter: number;
|
|
983
1054
|
seen: Map<$ZodType, Seen>;
|
|
1055
|
+
/** Registry conversions share one `seen` map across every emitted schema. These hold the
|
|
1056
|
+
* `external` the whole-map passes below last ran for, so the passes are not repeated once per
|
|
1057
|
+
* schema — and still re-run if the map grows or `external` is swapped. `sharedEmitDoneFor`
|
|
1058
|
+
* covers both passes in `finalize`: the ref flattening and the `$defs` build.
|
|
1059
|
+
*
|
|
1060
|
+
* The passes are valid only while nothing they read has changed, so both are cleared in
|
|
1061
|
+
* `processSchema()` when the map grows, and in `JSONSchemaGenerator.emit()`, which can also change
|
|
1062
|
+
* the `cycles` and `reused` they branch on.
|
|
1063
|
+
*
|
|
1064
|
+
* One case is deliberately not covered: an `override` callback that writes to
|
|
1065
|
+
* `metadataRegistry` mid-conversion. It runs inside `finalize`, so a registry conversion has
|
|
1066
|
+
* nowhere left to clear the guards, and later schemas keep the ids the first pass saw. That
|
|
1067
|
+
* output was never coherent — before this, whether a shared subschema was inlined or extracted
|
|
1068
|
+
* depended on which registry entry happened to be emitted when the callback fired. */
|
|
1069
|
+
sharedDefsExtractedFor?: ToJSONSchemaContext["external"];
|
|
1070
|
+
sharedEmitDoneFor?: ToJSONSchemaContext["external"];
|
|
984
1071
|
cycles: "ref" | "throw";
|
|
985
1072
|
reused: "ref" | "inline";
|
|
1073
|
+
/** The `allOf` array of each intersection encountered during traversal, innermost first. `finalize` folds every emitted object holding one; see `foldIntersection`. */
|
|
1074
|
+
intersections: BaseSchema[][];
|
|
1075
|
+
/** Rewrites a processor deferred to `finalize`, where the flatten has resolved every ref and the union branches are in place. */
|
|
1076
|
+
deferred: (() => void)[];
|
|
986
1077
|
external?: {
|
|
987
1078
|
registry: $ZodRegistry<{
|
|
988
1079
|
id?: string | undefined;
|
|
@@ -991,12 +1082,12 @@ interface ToJSONSchemaContext {
|
|
|
991
1082
|
defs: Record<string, BaseSchema>;
|
|
992
1083
|
} | undefined;
|
|
993
1084
|
}
|
|
994
|
-
type ZodStandardSchemaWithJSON$1<T$1> = StandardSchemaWithJSONProps<input<T$1>, output<T$1>>;
|
|
1085
|
+
type ZodStandardSchemaWithJSON$1<T$1> = StandardSchemaWithJSONProps<input$1<T$1>, output<T$1>>;
|
|
995
1086
|
interface ZodStandardJSONSchemaPayload<T$1> extends BaseSchema {
|
|
996
1087
|
"~standard": ZodStandardSchemaWithJSON$1<T$1>;
|
|
997
1088
|
}
|
|
998
1089
|
//#endregion
|
|
999
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
1090
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/util.d.cts
|
|
1000
1091
|
type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
|
|
1001
1092
|
type MimeTypes = "application/json" | "application/xml" | "application/x-www-form-urlencoded" | "application/javascript" | "application/pdf" | "application/zip" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/octet-stream" | "application/graphql" | "text/html" | "text/plain" | "text/css" | "text/javascript" | "text/csv" | "image/png" | "image/jpeg" | "image/gif" | "image/svg+xml" | "image/webp" | "audio/mpeg" | "audio/ogg" | "audio/wav" | "audio/webm" | "video/mp4" | "video/webm" | "video/ogg" | "font/woff" | "font/woff2" | "font/ttf" | "font/otf" | "multipart/form-data" | (string & {});
|
|
1002
1093
|
type IsAny$1<T$1> = 0 extends 1 & T$1 ? true : false;
|
|
@@ -1007,6 +1098,7 @@ type LoosePartial<T$1 extends object> = InexactPartial<T$1> & {
|
|
|
1007
1098
|
[k: string]: unknown;
|
|
1008
1099
|
};
|
|
1009
1100
|
type Mask$1<Keys extends PropertyKey> = { [K in Keys]?: true };
|
|
1101
|
+
type Writeable<T$1> = { -readonly [P in keyof T$1]: T$1[P] } & {};
|
|
1010
1102
|
type InexactPartial<T$1> = { [P in keyof T$1]?: T$1[P] | undefined };
|
|
1011
1103
|
type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
|
|
1012
1104
|
readonly [Symbol.toStringTag]: string;
|
|
@@ -1016,7 +1108,7 @@ type SomeObject = Record<PropertyKey, any>;
|
|
|
1016
1108
|
type Identity<T$1> = T$1;
|
|
1017
1109
|
type Flatten<T$1> = Identity<{ [k in keyof T$1]: T$1[k] }>;
|
|
1018
1110
|
type Prettify<T$1> = { [K in keyof T$1]: T$1[K] } & {};
|
|
1019
|
-
type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : { [K in keyof A as K extends keyof B ? never : K]: A[K] } & { [K in keyof B]: B[K] }>;
|
|
1111
|
+
type Extend<A$1 extends SomeObject, B extends SomeObject> = Flatten<keyof A$1 & keyof B extends never ? A$1 & B : { [K in keyof A$1 as K extends keyof B ? never : K]: A$1[K] } & { [K in keyof B]: B[K] }>;
|
|
1020
1112
|
type TupleItems = ReadonlyArray<SomeType>;
|
|
1021
1113
|
type AnyFunc = (...args: any[]) => any;
|
|
1022
1114
|
type MaybeAsync<T$1> = T$1 | Promise<T$1>;
|
|
@@ -1035,15 +1127,17 @@ type EmptyToNever<T$1> = keyof T$1 extends never ? never : T$1;
|
|
|
1035
1127
|
declare abstract class Class {
|
|
1036
1128
|
constructor(..._args: any[]);
|
|
1037
1129
|
}
|
|
1130
|
+
/** A trait's prototype members: a partial view of its own interface, with `this` typed as the instance. */
|
|
1131
|
+
type ProtoOf<T$1> = { [K in keyof T$1]?: (T$1[K] extends ((...args: infer A) => infer R) ? (...args: A) => R : T$1[K]) | undefined } & ThisType<T$1>;
|
|
1038
1132
|
//#endregion
|
|
1039
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
1133
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/versions.d.cts
|
|
1040
1134
|
declare const version: {
|
|
1041
1135
|
readonly major: 4;
|
|
1042
|
-
readonly minor:
|
|
1136
|
+
readonly minor: 6;
|
|
1043
1137
|
readonly patch: number;
|
|
1044
1138
|
};
|
|
1045
1139
|
//#endregion
|
|
1046
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
1140
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/schemas.d.cts
|
|
1047
1141
|
interface ParseContext<T$1 extends $ZodIssueBase = never> {
|
|
1048
1142
|
/** Customize error messages. */
|
|
1049
1143
|
readonly error?: $ZodErrorMap<T$1>;
|
|
@@ -1057,12 +1151,17 @@ interface ParseContextInternal<T$1 extends $ZodIssueBase = never> extends ParseC
|
|
|
1057
1151
|
readonly async?: boolean | undefined;
|
|
1058
1152
|
readonly direction?: "forward" | "backward";
|
|
1059
1153
|
readonly skipChecks?: boolean;
|
|
1154
|
+
/** Set only by `validate`/`validateAsync`. A container may stop before its next child, never inside one, so a map entry and a tuple's fixed items parse whole. */
|
|
1155
|
+
readonly abortEarly?: boolean;
|
|
1060
1156
|
}
|
|
1061
1157
|
interface ParsePayload<T$1 = unknown> {
|
|
1062
1158
|
value: T$1;
|
|
1063
1159
|
issues: $ZodRawIssue[];
|
|
1064
|
-
/** A
|
|
1160
|
+
/** A way to mark a whole payload as aborted. Used in codecs/pipes. */
|
|
1065
1161
|
aborted?: boolean;
|
|
1162
|
+
/** @internal Set when the value came from a repeat visit to a node still being
|
|
1163
|
+
* parsed. Its checks run on the node itself, against the finished value. */
|
|
1164
|
+
memo?: boolean | undefined;
|
|
1066
1165
|
}
|
|
1067
1166
|
type CheckFn<T$1> = (input: ParsePayload<T$1>) => MaybeAsync<void>;
|
|
1068
1167
|
interface $ZodTypeDef {
|
|
@@ -1087,8 +1186,13 @@ interface _$ZodTypeInternals {
|
|
|
1087
1186
|
/** @internal Indicates that a schema output type should be considered optional inside objects.
|
|
1088
1187
|
* @default Required
|
|
1089
1188
|
*/
|
|
1090
|
-
/** @internal
|
|
1091
|
-
|
|
1189
|
+
/** @internal Three rungs, each strictly stronger than the last:
|
|
1190
|
+
* undefined — required; the container may not omit this slot
|
|
1191
|
+
* "optional" — the container may omit it; nothing is supplied in its place
|
|
1192
|
+
* "defaulted" — the container may omit it AND this schema substitutes a value
|
|
1193
|
+
* Consumers asking "may the slot be absent?" test `!== undefined`.
|
|
1194
|
+
* $ZodOptional asks the stronger question and tests `=== "defaulted"`. */
|
|
1195
|
+
optin?: "optional" | "defaulted" | undefined;
|
|
1092
1196
|
/** @internal */
|
|
1093
1197
|
optout?: "optional" | undefined;
|
|
1094
1198
|
/** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
|
|
@@ -1117,17 +1221,17 @@ interface _$ZodTypeInternals {
|
|
|
1117
1221
|
parent?: $ZodType | undefined;
|
|
1118
1222
|
}
|
|
1119
1223
|
/** @internal */
|
|
1120
|
-
interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
|
|
1224
|
+
interface $ZodTypeInternals<out O = unknown, out I$1 = unknown> extends _$ZodTypeInternals {
|
|
1121
1225
|
/** @internal The inferred output type */
|
|
1122
1226
|
output: O;
|
|
1123
1227
|
/** @internal The inferred input type */
|
|
1124
|
-
input: I;
|
|
1228
|
+
input: I$1;
|
|
1125
1229
|
}
|
|
1126
|
-
type $ZodStandardSchema<T$1> = StandardSchemaV1.Props<input<T$1>, output<T$1>>;
|
|
1230
|
+
type $ZodStandardSchema<T$1> = StandardSchemaV1.Props<input$1<T$1>, output<T$1>>;
|
|
1127
1231
|
type SomeType = {
|
|
1128
1232
|
_zod: _$ZodTypeInternals;
|
|
1129
1233
|
};
|
|
1130
|
-
interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
|
|
1234
|
+
interface $ZodType<O = unknown, I$1 = unknown, Internals extends $ZodTypeInternals<O, I$1> = $ZodTypeInternals<O, I$1>> {
|
|
1131
1235
|
_zod: Internals;
|
|
1132
1236
|
"~standard": $ZodStandardSchema<this>;
|
|
1133
1237
|
}
|
|
@@ -1150,6 +1254,8 @@ interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
|
|
|
1150
1254
|
patterns: Set<RegExp>;
|
|
1151
1255
|
format: string;
|
|
1152
1256
|
contentEncoding: string;
|
|
1257
|
+
/** the pattern admits strings its `format` keyword forbids, so `toJSONSchema` must not emit it */
|
|
1258
|
+
laxFormat: boolean;
|
|
1153
1259
|
}>;
|
|
1154
1260
|
}
|
|
1155
1261
|
interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {}
|
|
@@ -1199,15 +1305,35 @@ interface $ZodEmoji extends $ZodType {
|
|
|
1199
1305
|
_zod: $ZodEmojiInternals;
|
|
1200
1306
|
}
|
|
1201
1307
|
declare const $ZodEmoji: $constructor<$ZodEmoji>;
|
|
1202
|
-
interface $
|
|
1308
|
+
interface $ZodNanoIDDef extends $ZodStringFormatDef<"nanoid"> {
|
|
1309
|
+
length?: number | undefined;
|
|
1310
|
+
}
|
|
1311
|
+
interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {
|
|
1312
|
+
def: $ZodNanoIDDef;
|
|
1313
|
+
}
|
|
1203
1314
|
interface $ZodNanoID extends $ZodType {
|
|
1204
1315
|
_zod: $ZodNanoIDInternals;
|
|
1205
1316
|
}
|
|
1206
1317
|
declare const $ZodNanoID: $constructor<$ZodNanoID>;
|
|
1318
|
+
/**
|
|
1319
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
1320
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1321
|
+
* See https://github.com/paralleldrive/cuid.
|
|
1322
|
+
*/
|
|
1207
1323
|
interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {}
|
|
1324
|
+
/**
|
|
1325
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
1326
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1327
|
+
* See https://github.com/paralleldrive/cuid.
|
|
1328
|
+
*/
|
|
1208
1329
|
interface $ZodCUID extends $ZodType {
|
|
1209
1330
|
_zod: $ZodCUIDInternals;
|
|
1210
1331
|
}
|
|
1332
|
+
/**
|
|
1333
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
1334
|
+
* (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
|
|
1335
|
+
* See https://github.com/paralleldrive/cuid.
|
|
1336
|
+
*/
|
|
1211
1337
|
declare const $ZodCUID: $constructor<$ZodCUID>;
|
|
1212
1338
|
interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {}
|
|
1213
1339
|
interface $ZodCUID2 extends $ZodType {
|
|
@@ -1488,7 +1614,7 @@ interface $ZodArrayInternals<T$1 extends SomeType = $ZodType> extends _$ZodTypeI
|
|
|
1488
1614
|
def: $ZodArrayDef<T$1>;
|
|
1489
1615
|
isst: $ZodIssueInvalidType;
|
|
1490
1616
|
output: output<T$1>[];
|
|
1491
|
-
input: input<T$1>[];
|
|
1617
|
+
input: input$1<T$1>[];
|
|
1492
1618
|
}
|
|
1493
1619
|
interface $ZodArray<T$1 extends SomeType = $ZodType> extends $ZodType<any, any, $ZodArrayInternals<T$1>> {}
|
|
1494
1620
|
declare const $ZodArray: $constructor<$ZodArray>;
|
|
@@ -1499,11 +1625,11 @@ type OptionalOutSchema = {
|
|
|
1499
1625
|
};
|
|
1500
1626
|
type OptionalInSchema = {
|
|
1501
1627
|
_zod: {
|
|
1502
|
-
optin: "optional";
|
|
1628
|
+
optin: "optional" | "defaulted";
|
|
1503
1629
|
};
|
|
1504
1630
|
};
|
|
1505
|
-
type $InferObjectOutput<T$1 extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T$1 ? IsAny$1<T$1[keyof T$1]> extends true ? Record<string, unknown> :
|
|
1506
|
-
type $InferObjectInput<T$1 extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T$1 ? IsAny$1<T$1[keyof T$1]> extends true ? Record<string, unknown> :
|
|
1631
|
+
type $InferObjectOutput<T$1 extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T$1 ? IsAny$1<T$1[keyof T$1]> extends true ? Record<string, unknown> : { [k in string]: output<T$1[keyof T$1]> } : keyof (T$1 & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T$1 as T$1[k] extends OptionalOutSchema ? never : k]: T$1[k]["_zod"]["output"] } & { -readonly [k in keyof T$1 as T$1[k] extends OptionalOutSchema ? k : never]?: T$1[k]["_zod"]["output"] } & Extra>;
|
|
1632
|
+
type $InferObjectInput<T$1 extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T$1 ? IsAny$1<T$1[keyof T$1]> extends true ? Record<string, unknown> : { [k in string]: input$1<T$1[keyof T$1]> } : keyof (T$1 & Extra) extends never ? Record<string, never> : Prettify<{ -readonly [k in keyof T$1 as T$1[k] extends OptionalInSchema ? never : k]: T$1[k]["_zod"]["input"] } & { -readonly [k in keyof T$1 as T$1[k] extends OptionalInSchema ? k : never]?: T$1[k]["_zod"]["input"] } & Extra>;
|
|
1507
1633
|
type $ZodObjectConfig = {
|
|
1508
1634
|
out: Record<string, unknown>;
|
|
1509
1635
|
in: Record<string, unknown>;
|
|
@@ -1525,34 +1651,34 @@ type $catchall<T$1 extends SomeType> = {
|
|
|
1525
1651
|
[k: string]: output<T$1>;
|
|
1526
1652
|
};
|
|
1527
1653
|
in: {
|
|
1528
|
-
[k: string]: input<T$1>;
|
|
1654
|
+
[k: string]: input$1<T$1>;
|
|
1529
1655
|
};
|
|
1530
1656
|
};
|
|
1531
1657
|
type $ZodShape = Readonly<{
|
|
1532
1658
|
[k: string]: $ZodType;
|
|
1533
1659
|
}>;
|
|
1534
|
-
interface $ZodObjectDef<Shape$
|
|
1660
|
+
interface $ZodObjectDef<Shape$2 extends $ZodShape = $ZodShape> extends $ZodTypeDef {
|
|
1535
1661
|
type: "object";
|
|
1536
|
-
shape: Shape$
|
|
1662
|
+
shape: Shape$2;
|
|
1537
1663
|
catchall?: $ZodType | undefined;
|
|
1538
1664
|
}
|
|
1539
1665
|
interface $ZodObjectInternals< /** @ts-ignore Cast variance */
|
|
1540
|
-
out Shape$
|
|
1541
|
-
def: $ZodObjectDef<Shape$
|
|
1542
|
-
config: Config;
|
|
1666
|
+
out Shape$2 extends $ZodShape = $ZodShape, out Config$1 extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
|
|
1667
|
+
def: $ZodObjectDef<Shape$2>;
|
|
1668
|
+
config: Config$1;
|
|
1543
1669
|
isst: $ZodIssueInvalidType | $ZodIssueUnrecognizedKeys;
|
|
1544
1670
|
propValues: PropValues;
|
|
1545
|
-
output: $InferObjectOutput<Shape$
|
|
1546
|
-
input: $InferObjectInput<Shape$
|
|
1671
|
+
output: $InferObjectOutput<Shape$2, Config$1["out"]>;
|
|
1672
|
+
input: $InferObjectInput<Shape$2, Config$1["in"]>;
|
|
1547
1673
|
optin?: "optional" | undefined;
|
|
1548
1674
|
optout?: "optional" | undefined;
|
|
1549
1675
|
}
|
|
1550
1676
|
type $ZodLooseShape = Record<string, any>;
|
|
1551
1677
|
interface $ZodObject< /** @ts-ignore Cast variance */
|
|
1552
|
-
out Shape$
|
|
1678
|
+
out Shape$2 extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params$1 extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape$2, Params$1>> {}
|
|
1553
1679
|
declare const $ZodObject: $constructor<$ZodObject>;
|
|
1554
1680
|
type $InferUnionOutput<T$1 extends SomeType> = T$1 extends any ? output<T$1> : never;
|
|
1555
|
-
type $InferUnionInput<T$1 extends SomeType> = T$1 extends any ? input<T$1> : never;
|
|
1681
|
+
type $InferUnionInput<T$1 extends SomeType> = T$1 extends any ? input$1<T$1> : never;
|
|
1556
1682
|
interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
|
|
1557
1683
|
type: "union";
|
|
1558
1684
|
options: Options;
|
|
@@ -1567,7 +1693,7 @@ interface $ZodUnionInternals<T$1 extends readonly SomeType[] = readonly $ZodType
|
|
|
1567
1693
|
values: T$1[number]["_zod"]["values"];
|
|
1568
1694
|
output: $InferUnionOutput<T$1[number]>;
|
|
1569
1695
|
input: $InferUnionInput<T$1[number]>;
|
|
1570
|
-
optin: IsOptionalIn<T$1[number]> extends false ? "optional" | undefined : "optional";
|
|
1696
|
+
optin: IsOptionalIn<T$1[number]> extends false ? "optional" | "defaulted" | undefined : "optional" | "defaulted";
|
|
1571
1697
|
optout: IsOptionalOut<T$1[number]> extends false ? "optional" | undefined : "optional";
|
|
1572
1698
|
}
|
|
1573
1699
|
interface $ZodUnion<T$1 extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType<any, any, $ZodUnionInternals<T$1>> {
|
|
@@ -1581,6 +1707,9 @@ interface $ZodDiscriminatedUnionDef<Options extends readonly SomeType[] = readon
|
|
|
1581
1707
|
interface $ZodDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodUnionInternals<Options> {
|
|
1582
1708
|
def: $ZodDiscriminatedUnionDef<Options, Disc>;
|
|
1583
1709
|
propValues: PropValues;
|
|
1710
|
+
bag: LoosePartial<{
|
|
1711
|
+
optionsMap: Map<Primitive$1, $ZodType | null>;
|
|
1712
|
+
}>;
|
|
1584
1713
|
}
|
|
1585
1714
|
interface $ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $ZodType[], Disc extends string = string> extends $ZodType {
|
|
1586
1715
|
_zod: $ZodDiscriminatedUnionInternals<Options, Disc>;
|
|
@@ -1591,16 +1720,16 @@ interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends So
|
|
|
1591
1720
|
left: Left;
|
|
1592
1721
|
right: Right;
|
|
1593
1722
|
}
|
|
1594
|
-
interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
|
|
1595
|
-
def: $ZodIntersectionDef<A, B>;
|
|
1723
|
+
interface $ZodIntersectionInternals<A$1 extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _$ZodTypeInternals {
|
|
1724
|
+
def: $ZodIntersectionDef<A$1, B>;
|
|
1596
1725
|
isst: never;
|
|
1597
|
-
optin: A["_zod"]["optin"] | B["_zod"]["optin"];
|
|
1598
|
-
optout: A["_zod"]["optout"] | B["_zod"]["optout"];
|
|
1599
|
-
output: output<A> & output<B>;
|
|
1600
|
-
input: input<A> & input<B>;
|
|
1726
|
+
optin: A$1["_zod"]["optin"] | B["_zod"]["optin"];
|
|
1727
|
+
optout: A$1["_zod"]["optout"] | B["_zod"]["optout"];
|
|
1728
|
+
output: output<A$1> & output<B>;
|
|
1729
|
+
input: input$1<A$1> & input$1<B>;
|
|
1601
1730
|
}
|
|
1602
|
-
interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
1603
|
-
_zod: $ZodIntersectionInternals<A, B>;
|
|
1731
|
+
interface $ZodIntersection<A$1 extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
1732
|
+
_zod: $ZodIntersectionInternals<A$1, B>;
|
|
1604
1733
|
}
|
|
1605
1734
|
declare const $ZodIntersection: $constructor<$ZodIntersection>;
|
|
1606
1735
|
interface $ZodTupleDef<T$1 extends TupleItems = readonly $ZodType[], Rest$1 extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
|
|
@@ -1608,9 +1737,9 @@ interface $ZodTupleDef<T$1 extends TupleItems = readonly $ZodType[], Rest$1 exte
|
|
|
1608
1737
|
items: T$1;
|
|
1609
1738
|
rest: Rest$1;
|
|
1610
1739
|
}
|
|
1611
|
-
type $InferTupleInputType<T$1 extends TupleItems, Rest$1 extends SomeType | null> = [...TupleInputTypeWithOptionals<T$1>, ...(Rest$1 extends SomeType ? input<Rest$1>[] : [])];
|
|
1612
|
-
type TupleInputTypeNoOptionals<T$1 extends TupleItems> = { [k in keyof T$1]: input<T$1[k]> };
|
|
1613
|
-
type TupleInputTypeWithOptionals<T$1 extends TupleItems> = T$1 extends readonly [...infer Prefix extends SomeType[], infer Tail extends SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...TupleInputTypeWithOptionals<Prefix>, input<Tail>?] : TupleInputTypeNoOptionals<T$1> : [];
|
|
1740
|
+
type $InferTupleInputType<T$1 extends TupleItems, Rest$1 extends SomeType | null> = [...TupleInputTypeWithOptionals<T$1>, ...(Rest$1 extends SomeType ? input$1<Rest$1>[] : [])];
|
|
1741
|
+
type TupleInputTypeNoOptionals<T$1 extends TupleItems> = { [k in keyof T$1]: input$1<T$1[k]> };
|
|
1742
|
+
type TupleInputTypeWithOptionals<T$1 extends TupleItems> = T$1 extends readonly [...infer Prefix extends SomeType[], infer Tail extends SomeType] ? Tail["_zod"]["optin"] extends "optional" | "defaulted" ? [...TupleInputTypeWithOptionals<Prefix>, input$1<Tail>?] : TupleInputTypeNoOptionals<T$1> : [];
|
|
1614
1743
|
type $InferTupleOutputType<T$1 extends TupleItems, Rest$1 extends SomeType | null> = [...TupleOutputTypeWithOptionals<T$1>, ...(Rest$1 extends SomeType ? output<Rest$1>[] : [])];
|
|
1615
1744
|
type TupleOutputTypeNoOptionals<T$1 extends TupleItems> = { [k in keyof T$1]: output<T$1[k]> };
|
|
1616
1745
|
type TupleOutputTypeWithOptionals<T$1 extends TupleItems> = T$1 extends readonly [...infer Prefix extends SomeType[], infer Tail extends SomeType] ? Tail["_zod"]["optout"] extends "optional" ? [...TupleOutputTypeWithOptionals<Prefix>, output<Tail>?] : TupleOutputTypeNoOptionals<T$1> : [];
|
|
@@ -1631,11 +1760,14 @@ interface $ZodRecordDef<Key$1 extends $ZodRecordKey = $ZodRecordKey, Value exten
|
|
|
1631
1760
|
valueType: Value;
|
|
1632
1761
|
/** @default "strict" - errors on keys not matching keyType. "loose" passes through non-matching keys unchanged. */
|
|
1633
1762
|
mode?: "strict" | "loose";
|
|
1763
|
+
partial?: boolean;
|
|
1634
1764
|
}
|
|
1635
1765
|
type $InferZodRecordOutput<Key$1 extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key$1 extends $partial ? Partial<Record<output<Key$1>, output<Value>>> : Record<output<Key$1>, output<Value>>;
|
|
1636
|
-
type $InferZodRecordInput<Key$1 extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key$1 extends $partial ? Partial<Record<input<Key$1> & PropertyKey, input<Value>>> : Record<input<Key$1> & PropertyKey, input<Value>>;
|
|
1637
|
-
interface $ZodRecordInternals<Key$1 extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals
|
|
1766
|
+
type $InferZodRecordInput<Key$1 extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = Key$1 extends $partial ? Partial<Record<input$1<Key$1> & PropertyKey, input$1<Value>>> : [Value] extends [OptionalInSchema] ? Partial<Record<input$1<Key$1> & PropertyKey, input$1<Value>>> : Record<input$1<Key$1> & PropertyKey, input$1<Value>>;
|
|
1767
|
+
interface $ZodRecordInternals<Key$1 extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals {
|
|
1638
1768
|
def: $ZodRecordDef<Key$1, Value>;
|
|
1769
|
+
output: $InferZodRecordOutput<Key$1, Value>;
|
|
1770
|
+
input: $InferZodRecordInput<Key$1, Value>;
|
|
1639
1771
|
isst: $ZodIssueInvalidType | $ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
|
|
1640
1772
|
optin?: "optional" | undefined;
|
|
1641
1773
|
optout?: "optional" | undefined;
|
|
@@ -1652,7 +1784,7 @@ interface $ZodMapDef<Key$1 extends SomeType = $ZodType, Value extends SomeType =
|
|
|
1652
1784
|
keyType: Key$1;
|
|
1653
1785
|
valueType: Value;
|
|
1654
1786
|
}
|
|
1655
|
-
interface $ZodMapInternals<Key$1 extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key$1>, output<Value>>, Map<input<Key$1>, input<Value>>> {
|
|
1787
|
+
interface $ZodMapInternals<Key$1 extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<output<Key$1>, output<Value>>, Map<input$1<Key$1>, input$1<Value>>> {
|
|
1656
1788
|
def: $ZodMapDef<Key$1, Value>;
|
|
1657
1789
|
isst: $ZodIssueInvalidType | $ZodIssueInvalidKey | $ZodIssueInvalidElement<unknown>;
|
|
1658
1790
|
optin?: "optional" | undefined;
|
|
@@ -1666,7 +1798,7 @@ interface $ZodSetDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
|
1666
1798
|
type: "set";
|
|
1667
1799
|
valueType: T$1;
|
|
1668
1800
|
}
|
|
1669
|
-
interface $ZodSetInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T$1>>, Set<input<T$1>>> {
|
|
1801
|
+
interface $ZodSetInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<Set<output<T$1>>, Set<input$1<T$1>>> {
|
|
1670
1802
|
def: $ZodSetDef<T$1>;
|
|
1671
1803
|
isst: $ZodIssueInvalidType;
|
|
1672
1804
|
optin?: "optional" | undefined;
|
|
@@ -1737,21 +1869,21 @@ interface $ZodTransformDef extends $ZodTypeDef {
|
|
|
1737
1869
|
type: "transform";
|
|
1738
1870
|
transform: (input: unknown, payload: ParsePayload<unknown>) => MaybeAsync<unknown>;
|
|
1739
1871
|
}
|
|
1740
|
-
interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
|
|
1872
|
+
interface $ZodTransformInternals<O = unknown, I$1 = unknown> extends $ZodTypeInternals<O, I$1> {
|
|
1741
1873
|
def: $ZodTransformDef;
|
|
1742
1874
|
isst: never;
|
|
1743
1875
|
}
|
|
1744
|
-
interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
|
|
1745
|
-
_zod: $ZodTransformInternals<O, I>;
|
|
1876
|
+
interface $ZodTransform<O = unknown, I$1 = unknown> extends $ZodType {
|
|
1877
|
+
_zod: $ZodTransformInternals<O, I$1>;
|
|
1746
1878
|
}
|
|
1747
1879
|
declare const $ZodTransform: $constructor<$ZodTransform>;
|
|
1748
1880
|
interface $ZodOptionalDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1749
1881
|
type: "optional";
|
|
1750
1882
|
innerType: T$1;
|
|
1751
1883
|
}
|
|
1752
|
-
interface $ZodOptionalInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1> | undefined, input<T$1> | undefined> {
|
|
1884
|
+
interface $ZodOptionalInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1> | undefined, input$1<T$1> | undefined> {
|
|
1753
1885
|
def: $ZodOptionalDef<T$1>;
|
|
1754
|
-
optin: "optional";
|
|
1886
|
+
optin: "optional" | "defaulted";
|
|
1755
1887
|
optout: "optional";
|
|
1756
1888
|
isst: never;
|
|
1757
1889
|
values: T$1["_zod"]["values"];
|
|
@@ -1765,7 +1897,7 @@ interface $ZodExactOptionalDef<T$1 extends SomeType = $ZodType> extends $ZodOpti
|
|
|
1765
1897
|
interface $ZodExactOptionalInternals<T$1 extends SomeType = $ZodType> extends $ZodOptionalInternals<T$1> {
|
|
1766
1898
|
def: $ZodExactOptionalDef<T$1>;
|
|
1767
1899
|
output: output<T$1>;
|
|
1768
|
-
input: input<T$1>;
|
|
1900
|
+
input: input$1<T$1>;
|
|
1769
1901
|
}
|
|
1770
1902
|
interface $ZodExactOptional<T$1 extends SomeType = $ZodType> extends $ZodType {
|
|
1771
1903
|
_zod: $ZodExactOptionalInternals<T$1>;
|
|
@@ -1775,7 +1907,7 @@ interface $ZodNullableDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
|
1775
1907
|
type: "nullable";
|
|
1776
1908
|
innerType: T$1;
|
|
1777
1909
|
}
|
|
1778
|
-
interface $ZodNullableInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1> | null, input<T$1> | null> {
|
|
1910
|
+
interface $ZodNullableInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1> | null, input$1<T$1> | null> {
|
|
1779
1911
|
def: $ZodNullableDef<T$1>;
|
|
1780
1912
|
optin: T$1["_zod"]["optin"];
|
|
1781
1913
|
optout: T$1["_zod"]["optout"];
|
|
@@ -1793,9 +1925,9 @@ interface $ZodDefaultDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
|
1793
1925
|
/** The default value. May be a getter. */
|
|
1794
1926
|
defaultValue: NoUndefined<output<T$1>>;
|
|
1795
1927
|
}
|
|
1796
|
-
interface $ZodDefaultInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T$1>>, input<T$1> | undefined> {
|
|
1928
|
+
interface $ZodDefaultInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T$1>>, input$1<T$1> | undefined> {
|
|
1797
1929
|
def: $ZodDefaultDef<T$1>;
|
|
1798
|
-
optin: "
|
|
1930
|
+
optin: "defaulted";
|
|
1799
1931
|
optout?: "optional" | undefined;
|
|
1800
1932
|
isst: never;
|
|
1801
1933
|
values: T$1["_zod"]["values"];
|
|
@@ -1808,11 +1940,11 @@ interface $ZodPrefaultDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
|
1808
1940
|
type: "prefault";
|
|
1809
1941
|
innerType: T$1;
|
|
1810
1942
|
/** The default value. May be a getter. */
|
|
1811
|
-
defaultValue: input<T$1>;
|
|
1943
|
+
defaultValue: input$1<T$1>;
|
|
1812
1944
|
}
|
|
1813
|
-
interface $ZodPrefaultInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<
|
|
1945
|
+
interface $ZodPrefaultInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1>, input$1<T$1> | undefined> {
|
|
1814
1946
|
def: $ZodPrefaultDef<T$1>;
|
|
1815
|
-
optin: "
|
|
1947
|
+
optin: "defaulted";
|
|
1816
1948
|
optout?: "optional" | undefined;
|
|
1817
1949
|
isst: never;
|
|
1818
1950
|
values: T$1["_zod"]["values"];
|
|
@@ -1825,7 +1957,7 @@ interface $ZodNonOptionalDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDe
|
|
|
1825
1957
|
type: "nonoptional";
|
|
1826
1958
|
innerType: T$1;
|
|
1827
1959
|
}
|
|
1828
|
-
interface $ZodNonOptionalInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T$1>>, NoUndefined<input<T$1>>> {
|
|
1960
|
+
interface $ZodNonOptionalInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<NoUndefined<output<T$1>>, NoUndefined<input$1<T$1>>> {
|
|
1829
1961
|
def: $ZodNonOptionalDef<T$1>;
|
|
1830
1962
|
isst: $ZodIssueInvalidType;
|
|
1831
1963
|
values: T$1["_zod"]["values"];
|
|
@@ -1840,7 +1972,7 @@ interface $ZodSuccessDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
|
1840
1972
|
type: "success";
|
|
1841
1973
|
innerType: T$1;
|
|
1842
1974
|
}
|
|
1843
|
-
interface $ZodSuccessInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input<T$1>> {
|
|
1975
|
+
interface $ZodSuccessInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, input$1<T$1>> {
|
|
1844
1976
|
def: $ZodSuccessDef<T$1>;
|
|
1845
1977
|
isst: never;
|
|
1846
1978
|
optin: T$1["_zod"]["optin"];
|
|
@@ -1863,7 +1995,7 @@ interface $ZodCatchDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
|
1863
1995
|
innerType: T$1;
|
|
1864
1996
|
catchValue: (ctx: $ZodCatchCtx) => unknown;
|
|
1865
1997
|
}
|
|
1866
|
-
interface $ZodCatchInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1>, input<T$1>> {
|
|
1998
|
+
interface $ZodCatchInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1>, input$1<T$1>> {
|
|
1867
1999
|
def: $ZodCatchDef<T$1>;
|
|
1868
2000
|
optin: T$1["_zod"]["optin"];
|
|
1869
2001
|
optout: T$1["_zod"]["optout"];
|
|
@@ -1885,32 +2017,32 @@ interface $ZodNaN extends $ZodType {
|
|
|
1885
2017
|
_zod: $ZodNaNInternals;
|
|
1886
2018
|
}
|
|
1887
2019
|
declare const $ZodNaN: $constructor<$ZodNaN>;
|
|
1888
|
-
interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
2020
|
+
interface $ZodPipeDef<A$1 extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1889
2021
|
type: "pipe";
|
|
1890
|
-
in: A;
|
|
2022
|
+
in: A$1;
|
|
1891
2023
|
out: B;
|
|
1892
2024
|
/** Only defined inside $ZodCodec instances. */
|
|
1893
|
-
transform?: (value: output<A>, payload: ParsePayload<output<A>>) => MaybeAsync<input<B>>;
|
|
2025
|
+
transform?: (value: output<A$1>, payload: ParsePayload<output<A$1>>) => MaybeAsync<input$1<B>>;
|
|
1894
2026
|
/** Only defined inside $ZodCodec instances. */
|
|
1895
|
-
reverseTransform?: (value: input<B>, payload: ParsePayload<input<B>>) => MaybeAsync<output<A>>;
|
|
2027
|
+
reverseTransform?: (value: input$1<B>, payload: ParsePayload<input$1<B>>) => MaybeAsync<output<A$1>>;
|
|
1896
2028
|
}
|
|
1897
|
-
interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input<A>> {
|
|
1898
|
-
def: $ZodPipeDef<A, B>;
|
|
2029
|
+
interface $ZodPipeInternals<A$1 extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<output<B>, input$1<A$1>> {
|
|
2030
|
+
def: $ZodPipeDef<A$1, B>;
|
|
1899
2031
|
isst: never;
|
|
1900
|
-
values: A["_zod"]["values"];
|
|
1901
|
-
optin: A["_zod"]["optin"];
|
|
2032
|
+
values: A$1["_zod"]["values"];
|
|
2033
|
+
optin: A$1["_zod"]["optin"];
|
|
1902
2034
|
optout: B["_zod"]["optout"];
|
|
1903
|
-
propValues: A["_zod"]["propValues"];
|
|
2035
|
+
propValues: A$1["_zod"]["propValues"];
|
|
1904
2036
|
}
|
|
1905
|
-
interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
1906
|
-
_zod: $ZodPipeInternals<A, B>;
|
|
2037
|
+
interface $ZodPipe<A$1 extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
|
|
2038
|
+
_zod: $ZodPipeInternals<A$1, B>;
|
|
1907
2039
|
}
|
|
1908
2040
|
declare const $ZodPipe: $constructor<$ZodPipe>;
|
|
1909
2041
|
interface $ZodReadonlyDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
1910
2042
|
type: "readonly";
|
|
1911
2043
|
innerType: T$1;
|
|
1912
2044
|
}
|
|
1913
|
-
interface $ZodReadonlyInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<MakeReadonly<output<T$1>>, MakeReadonly<input<T$1>>> {
|
|
2045
|
+
interface $ZodReadonlyInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<MakeReadonly<output<T$1>>, MakeReadonly<input$1<T$1>>> {
|
|
1914
2046
|
def: $ZodReadonlyDef<T$1>;
|
|
1915
2047
|
optin: T$1["_zod"]["optin"];
|
|
1916
2048
|
optout: T$1["_zod"]["optout"];
|
|
@@ -1947,14 +2079,14 @@ declare const $ZodTemplateLiteral: $constructor<$ZodTemplateLiteral>;
|
|
|
1947
2079
|
type $ZodFunctionArgs = $ZodType<unknown[], unknown[]>;
|
|
1948
2080
|
type $ZodFunctionIn = $ZodFunctionArgs;
|
|
1949
2081
|
type $ZodFunctionOut = $ZodType;
|
|
1950
|
-
type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input<Returns>;
|
|
1951
|
-
type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => MaybeAsync<input<Returns>>;
|
|
1952
|
-
type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => output<Returns>;
|
|
1953
|
-
type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input<Args>) => Promise<output<Returns>>;
|
|
1954
|
-
interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
|
|
2082
|
+
type $InferInnerFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => input$1<Returns>;
|
|
2083
|
+
type $InferInnerFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : output<Args>) => MaybeAsync<input$1<Returns>>;
|
|
2084
|
+
type $InferOuterFunctionType<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input$1<Args>) => output<Returns>;
|
|
2085
|
+
type $InferOuterFunctionTypeAsync<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> = (...args: $ZodFunctionIn extends Args ? never[] : input$1<Args>) => Promise<output<Returns>>;
|
|
2086
|
+
interface $ZodFunctionDef<In extends $ZodFunctionIn = $ZodFunctionIn, Out$1 extends $ZodFunctionOut = $ZodFunctionOut> extends $ZodTypeDef {
|
|
1955
2087
|
type: "function";
|
|
1956
2088
|
input: In;
|
|
1957
|
-
output: Out;
|
|
2089
|
+
output: Out$1;
|
|
1958
2090
|
}
|
|
1959
2091
|
interface $ZodFunctionInternals<Args extends $ZodFunctionIn, Returns extends $ZodFunctionOut> extends $ZodTypeInternals<$InferOuterFunctionType<Args, Returns>, $InferInnerFunctionType<Args, Returns>> {
|
|
1960
2092
|
def: $ZodFunctionDef<Args, Returns>;
|
|
@@ -1977,7 +2109,7 @@ interface $ZodPromiseDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
|
1977
2109
|
type: "promise";
|
|
1978
2110
|
innerType: T$1;
|
|
1979
2111
|
}
|
|
1980
|
-
interface $ZodPromiseInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T$1>>, MaybeAsync<input<T$1>>> {
|
|
2112
|
+
interface $ZodPromiseInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<Promise<output<T$1>>, MaybeAsync<input$1<T$1>>> {
|
|
1981
2113
|
def: $ZodPromiseDef<T$1>;
|
|
1982
2114
|
isst: never;
|
|
1983
2115
|
}
|
|
@@ -1989,7 +2121,7 @@ interface $ZodLazyDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
|
|
|
1989
2121
|
type: "lazy";
|
|
1990
2122
|
getter: () => T$1;
|
|
1991
2123
|
}
|
|
1992
|
-
interface $ZodLazyInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1>, input<T$1>> {
|
|
2124
|
+
interface $ZodLazyInternals<T$1 extends SomeType = $ZodType> extends $ZodTypeInternals<output<T$1>, input$1<T$1>> {
|
|
1993
2125
|
def: $ZodLazyDef<T$1>;
|
|
1994
2126
|
isst: never;
|
|
1995
2127
|
/** Auto-cached way to retrieve the inner schema */
|
|
@@ -2011,7 +2143,7 @@ interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, $ZodCheckDef {
|
|
|
2011
2143
|
params?: Record<string, any> | undefined;
|
|
2012
2144
|
fn: (arg: O) => unknown;
|
|
2013
2145
|
}
|
|
2014
|
-
interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, $ZodCheckInternals<O> {
|
|
2146
|
+
interface $ZodCustomInternals<O = unknown, I$1 = unknown> extends $ZodTypeInternals<O, I$1>, $ZodCheckInternals<O> {
|
|
2015
2147
|
def: $ZodCustomDef;
|
|
2016
2148
|
issc: $ZodIssue;
|
|
2017
2149
|
isst: never;
|
|
@@ -2019,19 +2151,19 @@ interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternal
|
|
|
2019
2151
|
Class: typeof Class;
|
|
2020
2152
|
}>;
|
|
2021
2153
|
}
|
|
2022
|
-
interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
|
|
2023
|
-
_zod: $ZodCustomInternals<O, I>;
|
|
2154
|
+
interface $ZodCustom<O = unknown, I$1 = unknown> extends $ZodType {
|
|
2155
|
+
_zod: $ZodCustomInternals<O, I$1>;
|
|
2024
2156
|
}
|
|
2025
2157
|
declare const $ZodCustom: $constructor<$ZodCustom>;
|
|
2026
2158
|
type $ZodTypes = $ZodString | $ZodNumber | $ZodBigInt | $ZodBoolean | $ZodDate | $ZodSymbol | $ZodUndefined | $ZodNullable | $ZodNull | $ZodAny | $ZodUnknown | $ZodNever | $ZodVoid | $ZodArray | $ZodObject | $ZodUnion | $ZodIntersection | $ZodTuple | $ZodRecord | $ZodMap | $ZodSet | $ZodLiteral | $ZodEnum | $ZodFunction | $ZodPromise | $ZodLazy | $ZodOptional | $ZodDefault | $ZodPrefault | $ZodTemplateLiteral | $ZodCustom | $ZodTransform | $ZodNonOptional | $ZodReadonly | $ZodNaN | $ZodPipe | $ZodSuccess | $ZodCatch | $ZodFile;
|
|
2027
2159
|
//#endregion
|
|
2028
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
2160
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/checks.d.cts
|
|
2029
2161
|
interface $ZodCheckDef {
|
|
2030
2162
|
check: string;
|
|
2031
2163
|
error?: $ZodErrorMap<never> | undefined;
|
|
2032
2164
|
/** If true, no later checks will be executed if this check fails. Default `false`. */
|
|
2033
2165
|
abort?: boolean | undefined;
|
|
2034
|
-
/** If provided,
|
|
2166
|
+
/** If provided, the check runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
|
|
2035
2167
|
when?: ((payload: ParsePayload) => boolean) | undefined;
|
|
2036
2168
|
}
|
|
2037
2169
|
interface $ZodCheckInternals<T$1> {
|
|
@@ -2084,16 +2216,16 @@ interface $ZodCheckMultipleOf<T$1 extends number | bigint = number | bigint> ext
|
|
|
2084
2216
|
}
|
|
2085
2217
|
declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
|
|
2086
2218
|
type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
|
|
2087
|
-
interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
|
|
2219
|
+
interface $ZodCheckNumberFormatDef<Format extends $ZodNumberFormats = $ZodNumberFormats> extends $ZodCheckDef {
|
|
2088
2220
|
check: "number_format";
|
|
2089
|
-
format:
|
|
2221
|
+
format: Format;
|
|
2090
2222
|
}
|
|
2091
|
-
interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
|
|
2092
|
-
def: $ZodCheckNumberFormatDef
|
|
2223
|
+
interface $ZodCheckNumberFormatInternals<Format extends $ZodNumberFormats = $ZodNumberFormats> extends $ZodCheckInternals<number> {
|
|
2224
|
+
def: $ZodCheckNumberFormatDef<Format>;
|
|
2093
2225
|
issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
|
|
2094
2226
|
}
|
|
2095
|
-
interface $ZodCheckNumberFormat extends $ZodCheck<number> {
|
|
2096
|
-
_zod: $ZodCheckNumberFormatInternals
|
|
2227
|
+
interface $ZodCheckNumberFormat<Format extends $ZodNumberFormats = $ZodNumberFormats> extends $ZodCheck<number> {
|
|
2228
|
+
_zod: $ZodCheckNumberFormatInternals<Format>;
|
|
2097
2229
|
}
|
|
2098
2230
|
declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
|
|
2099
2231
|
interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
|
|
@@ -2132,7 +2264,7 @@ interface $ZodCheckLengthEquals<T$1 extends HasLength = HasLength> extends $ZodC
|
|
|
2132
2264
|
_zod: $ZodCheckLengthEqualsInternals<T$1>;
|
|
2133
2265
|
}
|
|
2134
2266
|
declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
|
|
2135
|
-
type $ZodStringFormats = "email" | "url" | "emoji" | "uuid" | "guid" | "nanoid" | "cuid" | "cuid2" | "ulid" | "xid" | "ksuid" | "datetime" | "date" | "time" | "duration" | "ipv4" | "ipv6" | "cidrv4" | "cidrv6" | "base64" | "base64url" | "json_string" | "e164" | "lowercase" | "uppercase" | "regex" | "jwt" | "starts_with" | "ends_with" | "includes";
|
|
2267
|
+
type $ZodStringFormats = "email" | "url" | "emoji" | "uuid" | "guid" | "nanoid" | "cuid" | "cuid2" | "ulid" | "xid" | "ksuid" | "datetime" | "date" | "time" | "duration" | "ipv4" | "ipv6" | "cidrv4" | "cidrv6" | "base64" | "base64url" | "json_string" | "e164" | "credit_card" | "iban" | "lowercase" | "uppercase" | "regex" | "jwt" | "starts_with" | "ends_with" | "includes";
|
|
2136
2268
|
interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
|
|
2137
2269
|
check: "string_format";
|
|
2138
2270
|
format: Format;
|
|
@@ -2207,7 +2339,7 @@ interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
|
|
|
2207
2339
|
}
|
|
2208
2340
|
declare const $ZodCheckEndsWith: $constructor<$ZodCheckEndsWith>;
|
|
2209
2341
|
//#endregion
|
|
2210
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
2342
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/errors.d.cts
|
|
2211
2343
|
interface $ZodIssueBase {
|
|
2212
2344
|
readonly code?: string;
|
|
2213
2345
|
readonly input?: unknown;
|
|
@@ -2259,6 +2391,7 @@ interface $ZodIssueInvalidUnionNoMatch extends $ZodIssueBase {
|
|
|
2259
2391
|
readonly errors: $ZodIssue[][];
|
|
2260
2392
|
readonly input?: unknown;
|
|
2261
2393
|
readonly discriminator?: string | undefined;
|
|
2394
|
+
readonly options?: Primitive$1[];
|
|
2262
2395
|
readonly inclusive?: true;
|
|
2263
2396
|
}
|
|
2264
2397
|
interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
|
|
@@ -2267,6 +2400,8 @@ interface $ZodIssueInvalidUnionMultipleMatch extends $ZodIssueBase {
|
|
|
2267
2400
|
readonly input?: unknown;
|
|
2268
2401
|
readonly discriminator?: string | undefined;
|
|
2269
2402
|
readonly inclusive: false;
|
|
2403
|
+
/** Indices of the options that matched */
|
|
2404
|
+
readonly matches: number[];
|
|
2270
2405
|
}
|
|
2271
2406
|
type $ZodIssueInvalidUnion = $ZodIssueInvalidUnionNoMatch | $ZodIssueInvalidUnionMultipleMatch;
|
|
2272
2407
|
interface $ZodIssueInvalidKey<Input = unknown> extends $ZodIssueBase {
|
|
@@ -2299,6 +2434,8 @@ type RawIssue$1<T$1 extends $ZodIssueBase> = T$1 extends any ? Flatten<MakeParti
|
|
|
2299
2434
|
readonly input: unknown;
|
|
2300
2435
|
/** The schema or check that originated this issue. */
|
|
2301
2436
|
readonly inst?: $ZodType | $ZodCheck;
|
|
2437
|
+
/** The schema that owns the issue. Equal to `inst` when a schema originated the issue, and the schema the check was attached to when a check did. */
|
|
2438
|
+
readonly schema?: $ZodType | undefined;
|
|
2302
2439
|
/** If `true`, Zod will continue executing checks/refinements after this issue. */
|
|
2303
2440
|
readonly continue?: boolean | undefined;
|
|
2304
2441
|
} & Record<string, unknown>> : never;
|
|
@@ -2331,7 +2468,7 @@ type $ZodFormattedError<T$1, U$1 = string> = {
|
|
|
2331
2468
|
_errors: U$1[];
|
|
2332
2469
|
} & Flatten<_ZodFormattedError<T$1, U$1>>;
|
|
2333
2470
|
//#endregion
|
|
2334
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
2471
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/core.d.cts
|
|
2335
2472
|
type ZodTrait = {
|
|
2336
2473
|
_zod: {
|
|
2337
2474
|
def: any;
|
|
@@ -2342,28 +2479,30 @@ interface $constructor<T$1 extends ZodTrait, D = T$1["_zod"]["def"]> {
|
|
|
2342
2479
|
new (def: D): T$1;
|
|
2343
2480
|
init(inst: T$1, def: D): asserts inst is T$1;
|
|
2344
2481
|
}
|
|
2345
|
-
|
|
2482
|
+
interface $constructorParams {
|
|
2346
2483
|
Parent?: typeof Class;
|
|
2347
|
-
}
|
|
2484
|
+
}
|
|
2485
|
+
declare function $constructor<T$1 extends ZodTrait, D = T$1["_zod"]["def"]>(name: string, initializer: (inst: T$1, def: D) => void, /** This trait's members, installed once on every prototype that composes it. They cannot be declared in the initializer above: that runs per instance, and the prototype is shared. */
|
|
2486
|
+
proto?: ProtoOf<T$1>, params?: $constructorParams): $constructor<T$1, D>;
|
|
2348
2487
|
declare const $brand: unique symbol;
|
|
2349
2488
|
type $brand<T$1 extends string | number | symbol = string | number | symbol> = {
|
|
2350
2489
|
[$brand]: { [k in T$1]: true };
|
|
2351
2490
|
};
|
|
2352
2491
|
type $ZodBranded<T$1 extends SomeType, Brand extends string | number | symbol, Dir extends "in" | "out" | "inout" = "out"> = T$1 & (Dir extends "inout" ? {
|
|
2353
2492
|
_zod: {
|
|
2354
|
-
input: input<T$1> & $brand<Brand>;
|
|
2493
|
+
input: input$1<T$1> & $brand<Brand>;
|
|
2355
2494
|
output: output<T$1> & $brand<Brand>;
|
|
2356
2495
|
};
|
|
2357
2496
|
} : Dir extends "in" ? {
|
|
2358
2497
|
_zod: {
|
|
2359
|
-
input: input<T$1> & $brand<Brand>;
|
|
2498
|
+
input: input$1<T$1> & $brand<Brand>;
|
|
2360
2499
|
};
|
|
2361
2500
|
} : {
|
|
2362
2501
|
_zod: {
|
|
2363
2502
|
output: output<T$1> & $brand<Brand>;
|
|
2364
2503
|
};
|
|
2365
2504
|
});
|
|
2366
|
-
type input<T$1> = T$1 extends {
|
|
2505
|
+
type input$1<T$1> = T$1 extends {
|
|
2367
2506
|
_zod: {
|
|
2368
2507
|
input: any;
|
|
2369
2508
|
};
|
|
@@ -2374,7 +2513,7 @@ type output<T$1> = T$1 extends {
|
|
|
2374
2513
|
};
|
|
2375
2514
|
} ? T$1["_zod"]["output"] : unknown;
|
|
2376
2515
|
//#endregion
|
|
2377
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
2516
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/api.d.cts
|
|
2378
2517
|
type Params<T$1 extends $ZodType | $ZodCheck, IssueTypes extends $ZodIssueBase, OmitKeys extends keyof T$1["_zod"]["def"] = never> = Flatten<Partial<EmptyToNever<Omit<T$1["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
|
|
2379
2518
|
error?: string | $ZodErrorMap<IssueTypes> | undefined;
|
|
2380
2519
|
/** @deprecated This parameter is deprecated. Use `error` instead. */
|
|
@@ -2393,7 +2532,12 @@ type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">
|
|
|
2393
2532
|
type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
|
|
2394
2533
|
type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
|
|
2395
2534
|
type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
|
|
2396
|
-
type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
|
|
2535
|
+
type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when" | "pattern">;
|
|
2536
|
+
/**
|
|
2537
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
2538
|
+
* (timestamps embedded in the id). Use {@link _cuid2} instead.
|
|
2539
|
+
* See https://github.com/paralleldrive/cuid.
|
|
2540
|
+
*/
|
|
2397
2541
|
type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
|
|
2398
2542
|
type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
|
|
2399
2543
|
type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
|
|
@@ -2437,8 +2581,12 @@ type RawIssue<T$1 extends $ZodIssueBase> = T$1 extends any ? Flatten<MakePartial
|
|
|
2437
2581
|
interface $RefinementCtx<T$1 = unknown> extends ParsePayload<T$1> {
|
|
2438
2582
|
addIssue(arg: string | $ZodSuperRefineIssue): void;
|
|
2439
2583
|
}
|
|
2584
|
+
interface $ZodSuperRefineParams {
|
|
2585
|
+
/** If provided, the refinement runs only when this returns `true`. By default, it is skipped if prior parsing produced aborting issues. */
|
|
2586
|
+
when?: ((payload: ParsePayload) => boolean) | undefined;
|
|
2587
|
+
}
|
|
2440
2588
|
//#endregion
|
|
2441
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
2589
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/errors.d.cts
|
|
2442
2590
|
/** An Error-like class used to store Zod validation issues. */
|
|
2443
2591
|
interface ZodError<T$1 = unknown> extends $ZodError<T$1> {
|
|
2444
2592
|
/** @deprecated Use the `z.treeifyError(err)` function instead. */
|
|
@@ -2456,7 +2604,7 @@ interface ZodError<T$1 = unknown> extends $ZodError<T$1> {
|
|
|
2456
2604
|
}
|
|
2457
2605
|
declare const ZodError: $constructor<ZodError>;
|
|
2458
2606
|
//#endregion
|
|
2459
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
2607
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/parse.d.cts
|
|
2460
2608
|
type ZodSafeParseResult<T$1> = ZodSafeParseSuccess<T$1> | ZodSafeParseError<T$1>;
|
|
2461
2609
|
type ZodSafeParseSuccess<T$1> = {
|
|
2462
2610
|
success: true;
|
|
@@ -2469,8 +2617,8 @@ type ZodSafeParseError<T$1> = {
|
|
|
2469
2617
|
error: ZodError<T$1>;
|
|
2470
2618
|
};
|
|
2471
2619
|
//#endregion
|
|
2472
|
-
//#region ../../node_modules/.pnpm/zod@4.
|
|
2473
|
-
type ZodStandardSchemaWithJSON<T$1> = StandardSchemaWithJSONProps<input<T$1>, output<T$1>>;
|
|
2620
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/schemas.d.cts
|
|
2621
|
+
type ZodStandardSchemaWithJSON<T$1> = StandardSchemaWithJSONProps<input$1<T$1>, output<T$1>>;
|
|
2474
2622
|
interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
|
|
2475
2623
|
def: Internals["def"];
|
|
2476
2624
|
type: Internals["def"]["type"];
|
|
@@ -2495,16 +2643,18 @@ interface ZodType<out Output = unknown, out Input = unknown, out Internals exten
|
|
|
2495
2643
|
parseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
|
|
2496
2644
|
safeParseAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
|
|
2497
2645
|
spa: (data: unknown, params?: ParseContext<$ZodIssue>) => Promise<ZodSafeParseResult<output<this>>>;
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2646
|
+
validate(data: unknown, params?: ParseContext<$ZodIssue>): data is input$1<this>;
|
|
2647
|
+
validateAsync(data: unknown, params?: ParseContext<$ZodIssue>): Promise<boolean>;
|
|
2648
|
+
encode(data: output<this>, params?: ParseContext<$ZodIssue>): input$1<this>;
|
|
2649
|
+
decode(data: input$1<this>, params?: ParseContext<$ZodIssue>): output<this>;
|
|
2650
|
+
encodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<input$1<this>>;
|
|
2651
|
+
decodeAsync(data: input$1<this>, params?: ParseContext<$ZodIssue>): Promise<output<this>>;
|
|
2652
|
+
safeEncode(data: output<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<input$1<this>>;
|
|
2653
|
+
safeDecode(data: input$1<this>, params?: ParseContext<$ZodIssue>): ZodSafeParseResult<output<this>>;
|
|
2654
|
+
safeEncodeAsync(data: output<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<input$1<this>>>;
|
|
2655
|
+
safeDecodeAsync(data: input$1<this>, params?: ParseContext<$ZodIssue>): Promise<ZodSafeParseResult<output<this>>>;
|
|
2656
|
+
refine<Ch extends (arg: output<this>) => unknown | Promise<unknown>>(check: Ch, params?: string | $ZodCustomParams): Ch extends ((arg: any) => arg is infer R) ? this & ZodType<R$1, input$1<this>> : this;
|
|
2657
|
+
superRefine(refinement: (arg: output<this>, ctx: $RefinementCtx<output<this>>) => void | Promise<void>, params?: $ZodSuperRefineParams): this;
|
|
2508
2658
|
overwrite(fn: (x: output<this>) => output<this>): this;
|
|
2509
2659
|
optional(): ZodOptional<this>;
|
|
2510
2660
|
exactOptional(): ZodExactOptional<this>;
|
|
@@ -2513,8 +2663,8 @@ interface ZodType<out Output = unknown, out Input = unknown, out Internals exten
|
|
|
2513
2663
|
nullish(): ZodOptional<ZodNullable<this>>;
|
|
2514
2664
|
default(def: NoUndefined<output<this>>): ZodDefault<this>;
|
|
2515
2665
|
default(def: () => NoUndefined<output<this>>): ZodDefault<this>;
|
|
2516
|
-
prefault(def: () => input<this>): ZodPrefault<this>;
|
|
2517
|
-
prefault(def: input<this>): ZodPrefault<this>;
|
|
2666
|
+
prefault(def: () => input$1<this>): ZodPrefault<this>;
|
|
2667
|
+
prefault(def: input$1<this>): ZodPrefault<this>;
|
|
2518
2668
|
array(): ZodArray<this>;
|
|
2519
2669
|
or<T$1 extends SomeType>(option: T$1): ZodUnion<[this, T$1]>;
|
|
2520
2670
|
and<T$1 extends SomeType>(incoming: T$1): ZodIntersection<this, T$1>;
|
|
@@ -2547,7 +2697,7 @@ interface ZodType<out Output = unknown, out Input = unknown, out Internals exten
|
|
|
2547
2697
|
* ```
|
|
2548
2698
|
*/
|
|
2549
2699
|
isNullable(): boolean;
|
|
2550
|
-
apply<T$1>(fn: (schema: this) => T$1): T$1;
|
|
2700
|
+
apply<T$1, TArgs extends unknown[] = []>(fn: (schema: this, ...args: TArgs) => T$1, ...args: TArgs): T$1;
|
|
2551
2701
|
}
|
|
2552
2702
|
interface _ZodType<out Internals extends $ZodTypeInternals = $ZodTypeInternals> extends ZodType<any, any, Internals> {}
|
|
2553
2703
|
declare const ZodType: $constructor<ZodType>;
|
|
@@ -2596,7 +2746,11 @@ interface ZodString extends _ZodString<$ZodStringInternals<string>> {
|
|
|
2596
2746
|
nanoid(params?: string | $ZodCheckNanoIDParams): this;
|
|
2597
2747
|
/** @deprecated Use `z.guid()` instead. */
|
|
2598
2748
|
guid(params?: string | $ZodCheckGUIDParams): this;
|
|
2599
|
-
/**
|
|
2749
|
+
/**
|
|
2750
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
2751
|
+
* (timestamps embedded in the id). Use `z.cuid2()` instead.
|
|
2752
|
+
* See https://github.com/paralleldrive/cuid.
|
|
2753
|
+
*/
|
|
2600
2754
|
cuid(params?: string | $ZodCheckCUIDParams): this;
|
|
2601
2755
|
/** @deprecated Use `z.cuid2()` instead. */
|
|
2602
2756
|
cuid2(params?: string | $ZodCheckCUID2Params): this;
|
|
@@ -2677,34 +2831,36 @@ interface ZodArray<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodArrayIn
|
|
|
2677
2831
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2678
2832
|
}
|
|
2679
2833
|
declare const ZodArray: $constructor<ZodArray>;
|
|
2680
|
-
type SafeExtendShape<Base extends $ZodShape, Ext extends $ZodLooseShape> = { [K in keyof Ext]: K extends keyof Base ? output<Ext[K]> extends output<Base[K]> ? input<Ext[K]> extends input<Base[K]> ? Ext[K] : never : never : Ext[K] };
|
|
2834
|
+
type SafeExtendShape<Base extends $ZodShape, Ext extends $ZodLooseShape> = { [K in keyof Ext]: K extends keyof Base ? output<Ext[K]> extends output<Base[K]> ? input$1<Ext[K]> extends input$1<Base[K]> ? Ext[K] : never : never : Ext[K] };
|
|
2681
2835
|
interface ZodObject< /** @ts-ignore Cast variance */
|
|
2682
|
-
out Shape$
|
|
2836
|
+
out Shape$2 extends $ZodShape = $ZodLooseShape, out Config$1 extends $ZodObjectConfig = $strip> extends _ZodType<$ZodObjectInternals<Shape$2, Config$1>>, $ZodObject<Shape$2, Config$1> {
|
|
2683
2837
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2684
|
-
shape: Shape$
|
|
2685
|
-
keyof(): ZodEnum<ToEnum<keyof Shape$
|
|
2838
|
+
shape: Shape$2;
|
|
2839
|
+
keyof(): ZodEnum<ToEnum<keyof Shape$2 & string>>;
|
|
2686
2840
|
/** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
|
|
2687
|
-
catchall<T$1 extends SomeType>(schema: T$1): ZodObject<Shape$
|
|
2841
|
+
catchall<T$1 extends SomeType>(schema: T$1): ZodObject<Shape$2, $catchall<T$1>>;
|
|
2688
2842
|
/** @deprecated Use `z.looseObject()` or `.loose()` instead. */
|
|
2689
|
-
passthrough(): ZodObject<Shape$
|
|
2843
|
+
passthrough(): ZodObject<Shape$2, $loose>;
|
|
2690
2844
|
/** Consider `z.looseObject(A.shape)` instead */
|
|
2691
|
-
loose(): ZodObject<Shape$
|
|
2845
|
+
loose(): ZodObject<Shape$2, $loose>;
|
|
2692
2846
|
/** Consider `z.strictObject(A.shape)` instead */
|
|
2693
|
-
strict(): ZodObject<Shape$
|
|
2847
|
+
strict(): ZodObject<Shape$2, $strict>;
|
|
2694
2848
|
/** This is the default behavior. This method call is likely unnecessary. */
|
|
2695
|
-
strip(): ZodObject<Shape$
|
|
2696
|
-
extend<U$1 extends $ZodLooseShape>(shape: U$1): ZodObject<Extend<Shape$
|
|
2697
|
-
safeExtend<U$1 extends $ZodLooseShape>(shape: SafeExtendShape<Shape$
|
|
2849
|
+
strip(): ZodObject<Shape$2, $strip>;
|
|
2850
|
+
extend<U$1 extends $ZodLooseShape>(shape: U$1): ZodObject<Extend<Shape$2, Writeable<U$1>>, Config$1>;
|
|
2851
|
+
safeExtend<U$1 extends $ZodLooseShape>(shape: SafeExtendShape<Shape$2, U$1> & Partial<Record<keyof Shape$2, SomeType>>): ZodObject<Extend<Shape$2, Writeable<U$1>>, Config$1>;
|
|
2698
2852
|
/**
|
|
2699
2853
|
* @deprecated Use [`A.extend(B.shape)`](https://zod.dev/api?id=extend) instead.
|
|
2700
2854
|
*/
|
|
2701
|
-
merge<U$1 extends ZodObject>(other: U$1): ZodObject<Extend<Shape$
|
|
2702
|
-
pick<M$1 extends Mask$1<keyof Shape$
|
|
2703
|
-
omit<M$1 extends Mask$1<keyof Shape$
|
|
2704
|
-
partial(): ZodObject<{ [k in keyof Shape$
|
|
2705
|
-
partial<M$1 extends Mask$1<keyof Shape$
|
|
2706
|
-
|
|
2707
|
-
|
|
2855
|
+
merge<U$1 extends ZodObject>(other: U$1): ZodObject<Extend<Shape$2, U$1["shape"]>, U$1["_zod"]["config"]>;
|
|
2856
|
+
pick<M$1 extends Mask$1<keyof Shape$2>>(mask: M$1 & Record<Exclude<keyof M$1, keyof Shape$2>, never>): ZodObject<Flatten<Pick<Shape$2, Extract<keyof Shape$2, keyof M$1>>>, Config$1>;
|
|
2857
|
+
omit<M$1 extends Mask$1<keyof Shape$2>>(mask: M$1 & Record<Exclude<keyof M$1, keyof Shape$2>, never>): ZodObject<Flatten<Omit<Shape$2, Extract<keyof Shape$2, keyof M$1>>>, Config$1>;
|
|
2858
|
+
partial(): ZodObject<{ -readonly [k in keyof Shape$2]: ZodOptional<Shape$2[k]> }, Config$1>;
|
|
2859
|
+
partial<M$1 extends Mask$1<keyof Shape$2>>(mask: M$1 & Record<Exclude<keyof M$1, keyof Shape$2>, never>): ZodObject<{ -readonly [k in keyof Shape$2]: k extends keyof M$1 ? ZodOptional<Shape$2[k]> : Shape$2[k] }, Config$1>;
|
|
2860
|
+
exactPartial(): ZodObject<{ -readonly [k in keyof Shape$2]: ZodExactOptional<Shape$2[k]> }, Config$1>;
|
|
2861
|
+
exactPartial<M$1 extends Mask$1<keyof Shape$2>>(mask: M$1 & Record<Exclude<keyof M$1, keyof Shape$2>, never>): ZodObject<{ -readonly [k in keyof Shape$2]: k extends keyof M$1 ? ZodExactOptional<Shape$2[k]> : Shape$2[k] }, Config$1>;
|
|
2862
|
+
required(): ZodObject<{ -readonly [k in keyof Shape$2]: ZodNonOptional<Shape$2[k]> }, Config$1>;
|
|
2863
|
+
required<M$1 extends Mask$1<keyof Shape$2>>(mask: M$1 & Record<Exclude<keyof M$1, keyof Shape$2>, never>): ZodObject<{ -readonly [k in keyof Shape$2]: k extends keyof M$1 ? ZodNonOptional<Shape$2[k]> : Shape$2[k] }, Config$1>;
|
|
2708
2864
|
}
|
|
2709
2865
|
declare const ZodObject: $constructor<ZodObject>;
|
|
2710
2866
|
interface ZodUnion<T$1 extends readonly SomeType[] = readonly $ZodType[]> extends _ZodType<$ZodUnionInternals<T$1>>, $ZodUnion<T$1> {
|
|
@@ -2718,13 +2874,14 @@ interface ZodDiscriminatedUnion<Options extends readonly SomeType[] = readonly $
|
|
|
2718
2874
|
def: $ZodDiscriminatedUnionDef<Options, Disc>;
|
|
2719
2875
|
}
|
|
2720
2876
|
declare const ZodDiscriminatedUnion: $constructor<ZodDiscriminatedUnion>;
|
|
2721
|
-
interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A, B>>, $ZodIntersection<A, B> {
|
|
2877
|
+
interface ZodIntersection<A$1 extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodIntersectionInternals<A$1, B>>, $ZodIntersection<A$1, B> {
|
|
2722
2878
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2723
2879
|
}
|
|
2724
2880
|
declare const ZodIntersection: $constructor<ZodIntersection>;
|
|
2725
2881
|
interface ZodTuple<T$1 extends TupleItems = readonly $ZodType[], Rest$1 extends SomeType | null = $ZodType | null> extends _ZodType<$ZodTupleInternals<T$1, Rest$1>>, $ZodTuple<T$1, Rest$1> {
|
|
2726
2882
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2727
2883
|
rest<Rest$1 extends SomeType = $ZodType>(rest: Rest$1): ZodTuple<T$1, Rest$1>;
|
|
2884
|
+
partial(): ZodTuple<{ -readonly [k in keyof T$1]: ZodOptional<T$1[k]> }, Rest$1>;
|
|
2728
2885
|
}
|
|
2729
2886
|
declare const ZodTuple: $constructor<ZodTuple>;
|
|
2730
2887
|
interface ZodRecord<Key$1 extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends _ZodType<$ZodRecordInternals<Key$1, Value>>, $ZodRecord<Key$1, Value> {
|
|
@@ -2749,7 +2906,7 @@ interface ZodLiteral<T$1 extends Literal = Literal> extends _ZodType<$ZodLiteral
|
|
|
2749
2906
|
value: T$1;
|
|
2750
2907
|
}
|
|
2751
2908
|
declare const ZodLiteral: $constructor<ZodLiteral>;
|
|
2752
|
-
interface ZodTransform<O = unknown, I = unknown> extends _ZodType<$ZodTransformInternals<O, I>>, $ZodTransform<O, I> {
|
|
2909
|
+
interface ZodTransform<O = unknown, I$1 = unknown> extends _ZodType<$ZodTransformInternals<O, I$1>>, $ZodTransform<O, I$1> {
|
|
2753
2910
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2754
2911
|
}
|
|
2755
2912
|
declare const ZodTransform: $constructor<ZodTransform>;
|
|
@@ -2792,9 +2949,9 @@ interface ZodCatch<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodCatchIn
|
|
|
2792
2949
|
removeCatch(): T$1;
|
|
2793
2950
|
}
|
|
2794
2951
|
declare const ZodCatch: $constructor<ZodCatch>;
|
|
2795
|
-
interface ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A, B>>, $ZodPipe<A, B> {
|
|
2952
|
+
interface ZodPipe<A$1 extends SomeType = $ZodType, B extends SomeType = $ZodType> extends _ZodType<$ZodPipeInternals<A$1, B>>, $ZodPipe<A$1, B> {
|
|
2796
2953
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2797
|
-
in: A;
|
|
2954
|
+
in: A$1;
|
|
2798
2955
|
out: B;
|
|
2799
2956
|
}
|
|
2800
2957
|
declare const ZodPipe: $constructor<ZodPipe>;
|
|
@@ -2803,11 +2960,16 @@ interface ZodReadonly<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodRead
|
|
|
2803
2960
|
unwrap(): T$1;
|
|
2804
2961
|
}
|
|
2805
2962
|
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
2806
|
-
interface ZodCustom<O = unknown, I = unknown> extends _ZodType<$ZodCustomInternals<O, I>>, $ZodCustom<O, I> {
|
|
2963
|
+
interface ZodCustom<O = unknown, I$1 = unknown> extends _ZodType<$ZodCustomInternals<O, I$1>>, $ZodCustom<O, I$1> {
|
|
2807
2964
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2808
2965
|
}
|
|
2809
2966
|
declare const ZodCustom: $constructor<ZodCustom>;
|
|
2810
2967
|
//#endregion
|
|
2968
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/in-out.d.cts
|
|
2969
|
+
type input<T$1> = input$1<T$1>;
|
|
2970
|
+
/** Returns a copy of the schema with every pipe replaced by its input side. A codec's checks are dropped: they constrain the decoded value the input side never produces. */
|
|
2971
|
+
declare function input<T$1 extends $ZodType>(schema: T$1): ZodType<input$1<T$1>, input$1<T$1>>;
|
|
2972
|
+
//#endregion
|
|
2811
2973
|
//#region ../2d-labels-markers/lib/esm/collision-ranking.d.ts
|
|
2812
2974
|
declare const collisionRankingTierSchema: ZodUnion<readonly [ZodEnum<{
|
|
2813
2975
|
low: "low";
|
|
@@ -3159,6 +3321,47 @@ declare class LabelComponent {
|
|
|
3159
3321
|
style: TStyle;
|
|
3160
3322
|
projection: Vec2;
|
|
3161
3323
|
labelCacheId?: string;
|
|
3324
|
+
/**
|
|
3325
|
+
* Inputs {@link labelCacheId} was last built from; lets the draw system reuse the id string
|
|
3326
|
+
* instead of rebuilding it every frame.
|
|
3327
|
+
* @internal
|
|
3328
|
+
*/
|
|
3329
|
+
labelCacheKeyInputs: {
|
|
3330
|
+
pinColor?: string;
|
|
3331
|
+
pinColorInactive?: string;
|
|
3332
|
+
pinOutlineColor?: string;
|
|
3333
|
+
pinOutlineColorInactive?: string;
|
|
3334
|
+
pinSize?: number;
|
|
3335
|
+
iconVisible?: boolean;
|
|
3336
|
+
iconBorderRadiusFactor?: number;
|
|
3337
|
+
};
|
|
3338
|
+
/**
|
|
3339
|
+
* Last zoom-interpolated icon scale and its inputs, so an unchanged zoom does not re-interpolate.
|
|
3340
|
+
* @internal
|
|
3341
|
+
*/
|
|
3342
|
+
iconScaleCache: {
|
|
3343
|
+
zoom: number;
|
|
3344
|
+
input: unknown;
|
|
3345
|
+
output: unknown;
|
|
3346
|
+
easing: unknown;
|
|
3347
|
+
value: number;
|
|
3348
|
+
};
|
|
3349
|
+
/**
|
|
3350
|
+
* Inputs of the composited pin + icon sprite last resolved by the draw system, and that sprite
|
|
3351
|
+
* (`TwoDDrawSystem.getPinIconSprite`).
|
|
3352
|
+
* @internal
|
|
3353
|
+
*/
|
|
3354
|
+
pinIconKeyInputs: {
|
|
3355
|
+
pin?: unknown;
|
|
3356
|
+
img?: unknown;
|
|
3357
|
+
iconFit?: string;
|
|
3358
|
+
iconOverflow?: string;
|
|
3359
|
+
iconPadding?: number;
|
|
3360
|
+
iconBorderRadiusFactor?: number;
|
|
3361
|
+
totalPinSize?: number;
|
|
3362
|
+
generation?: number;
|
|
3363
|
+
sprite: OffscreenCanvas | HTMLCanvasElement | null;
|
|
3364
|
+
};
|
|
3162
3365
|
_cache: {};
|
|
3163
3366
|
appearance: LabelAppearanceWithDefaults;
|
|
3164
3367
|
options: AddLabelOptionsInternal$1;
|
|
@@ -3204,6 +3407,12 @@ declare class LabelComponent {
|
|
|
3204
3407
|
pinSize: number;
|
|
3205
3408
|
iconVisible: boolean;
|
|
3206
3409
|
static testId: number;
|
|
3410
|
+
/** Renderer pixel ratio that {@link pinSize} is measured in. Kept current by {@link setPixelRatio}. */
|
|
3411
|
+
private pixelRatio;
|
|
3412
|
+
/**
|
|
3413
|
+
* Converts CSS px to device px at the label's current pixel ratio.
|
|
3414
|
+
* @param v - CSS px (default 1, which returns the ratio itself)
|
|
3415
|
+
*/
|
|
3207
3416
|
dp: (v?: number) => number;
|
|
3208
3417
|
/**
|
|
3209
3418
|
* @param text - Label text
|
|
@@ -3211,6 +3420,13 @@ declare class LabelComponent {
|
|
|
3211
3420
|
* @param pixelRatio - Device pixel ratio from the host renderer
|
|
3212
3421
|
*/
|
|
3213
3422
|
constructor(text: string, options: AddLabelOptionsInternal$1, pixelRatio: number);
|
|
3423
|
+
/**
|
|
3424
|
+
* Updates the pixel ratio the label measures its pin in, and marks the pin, text and collision box for
|
|
3425
|
+
* recalculation. The renderer's ratio can change after the label is created without
|
|
3426
|
+
* `devicePixelRatio` changing (MapLibre clamps the drawing buffer by window width).
|
|
3427
|
+
* @param pixelRatio - The renderer's new pixel ratio
|
|
3428
|
+
*/
|
|
3429
|
+
setPixelRatio(pixelRatio: number): void;
|
|
3214
3430
|
calculatePinSize(): void;
|
|
3215
3431
|
/**
|
|
3216
3432
|
* Get the bounding box when the label has no text.
|
|
@@ -3230,7 +3446,18 @@ declare class LabelComponent {
|
|
|
3230
3446
|
animate: boolean;
|
|
3231
3447
|
recomputeCurrentStrategy(scale?: number): void;
|
|
3232
3448
|
onStrategySelected: (strategyIndex: number) => void;
|
|
3449
|
+
/**
|
|
3450
|
+
* Largest bbox extent (CSS px) from the anchor over every strategy, as of the last
|
|
3451
|
+
* {@link toPackedMessage} repack; `-1` until packed. Lets the collision system skip
|
|
3452
|
+
* components that are far outside the viewport .
|
|
3453
|
+
* @internal
|
|
3454
|
+
*/
|
|
3455
|
+
collisionExtent: number;
|
|
3233
3456
|
private packedMessage;
|
|
3457
|
+
private _validMemoIndex;
|
|
3458
|
+
private _validMemoText;
|
|
3459
|
+
private _validMemoStrategies;
|
|
3460
|
+
private _validMemoValue;
|
|
3234
3461
|
toPackedMessage(isPanning?: boolean): PackedJsonMessage;
|
|
3235
3462
|
destroy(): void;
|
|
3236
3463
|
}
|
|
@@ -3405,6 +3632,13 @@ declare class MarkerComponent {
|
|
|
3405
3632
|
invalidateStrategies(): void;
|
|
3406
3633
|
private getBoundingBoxForPlacement;
|
|
3407
3634
|
get strategies(): MarkerStrategy[];
|
|
3635
|
+
/**
|
|
3636
|
+
* Largest bbox extent (CSS px) from the anchor over every strategy, as of the last
|
|
3637
|
+
* {@link toPackedMessage} repack; `-1` until packed. Lets the collision system skip
|
|
3638
|
+
* components that are far outside the viewport .
|
|
3639
|
+
* @internal
|
|
3640
|
+
*/
|
|
3641
|
+
collisionExtent: number;
|
|
3408
3642
|
private packedMessage;
|
|
3409
3643
|
toPackedMessage(isPanning?: boolean): PackedJsonMessage;
|
|
3410
3644
|
private _cachedLowPriorityPinIndex;
|
|
@@ -3477,14 +3711,17 @@ interface TwoDPipelineState {
|
|
|
3477
3711
|
pixelRatio: number;
|
|
3478
3712
|
}
|
|
3479
3713
|
/**
|
|
3480
|
-
*
|
|
3481
|
-
*
|
|
3482
|
-
*
|
|
3483
|
-
* @param
|
|
3484
|
-
* @param
|
|
3485
|
-
* @
|
|
3714
|
+
* Projects world positions to screen pixels. The host renderer provides this to the pipeline,
|
|
3715
|
+
* which calls it once per frame for every entity.
|
|
3716
|
+
*
|
|
3717
|
+
* @param positions - World coordinates, `[x0, y0, z0, x1, y1, z1, …]`
|
|
3718
|
+
* @param out - Optional reusable destination; the host may return a larger replacement
|
|
3719
|
+
* @param count - Number of points
|
|
3720
|
+
* @returns `PROJECT_BATCH_STRIDE` slots per point: `[screenX, screenY, flags]` (see
|
|
3721
|
+
* {@link ProjectBatchFlags}). An exact `(0, 0)` means "no projection": the entity keeps its
|
|
3722
|
+
* previous position.
|
|
3486
3723
|
*/
|
|
3487
|
-
type
|
|
3724
|
+
type ProjectBatchFn = (positions: Float64Array, out: Float64Array | undefined, count: number) => Float64Array;
|
|
3488
3725
|
/**
|
|
3489
3726
|
* Aggregate counts and byte size for a single 2D draw cache.
|
|
3490
3727
|
* @internal - For diagnostic tooling only.
|
|
@@ -3506,6 +3743,8 @@ interface TwoDDrawSystemCacheStats {
|
|
|
3506
3743
|
pinCache: TwoDCacheStats;
|
|
3507
3744
|
wrapperCache: TwoDCacheStats;
|
|
3508
3745
|
imageCache: TwoDCacheStats;
|
|
3746
|
+
/** Pre-composited active pin + clipped icon sprites (one canvas per entry). */
|
|
3747
|
+
pinIconCache: TwoDCacheStats;
|
|
3509
3748
|
/** Bytes of the full-screen label canvas (held as the draw system's collider canvas). */
|
|
3510
3749
|
labelCanvasBytes: number;
|
|
3511
3750
|
/** Sum of all per-cache bytes plus the label canvas bytes. */
|
|
@@ -3632,25 +3871,68 @@ declare class PubSub<EVENT_PAYLOAD, EVENT extends keyof EVENT_PAYLOAD = keyof EV
|
|
|
3632
3871
|
destroy(): void;
|
|
3633
3872
|
}
|
|
3634
3873
|
//#endregion
|
|
3874
|
+
//#region ../2d-labels-markers/lib/esm/systems/collision/packing.d.ts
|
|
3875
|
+
/** Message posted back from the collision worker. */
|
|
3876
|
+
type FlatCollisionResponse = {
|
|
3877
|
+
id: number;
|
|
3878
|
+
/** The request buffer, returned for reuse. */
|
|
3879
|
+
input: Float64Array;
|
|
3880
|
+
/** Result buffer (see layout above). */
|
|
3881
|
+
output: Float64Array;
|
|
3882
|
+
colliderCount: number;
|
|
3883
|
+
};
|
|
3884
|
+
//#endregion
|
|
3635
3885
|
//#region ../2d-labels-markers/lib/esm/systems/collision/system.d.ts
|
|
3636
3886
|
type TCollisionSystemEvent = {
|
|
3637
3887
|
'visibility-changed': undefined;
|
|
3638
3888
|
};
|
|
3889
|
+
type Component = MarkerComponent | LabelComponent;
|
|
3639
3890
|
/**
|
|
3640
3891
|
* Collision system for 2D labels and markers.
|
|
3641
3892
|
* Manages collision detection using a quad-tree and web worker (or sync fallback).
|
|
3893
|
+
*
|
|
3894
|
+
* Each run is written into one `Float64Array` (see `packing.ts`) that is **transferred** to the
|
|
3895
|
+
* worker (zero-copy) and comes back for reuse, and results come back as a second `Float64Array`;
|
|
3896
|
+
* no nested arrays or `Rectangle` objects are structured-cloned across threads.
|
|
3642
3897
|
*/
|
|
3643
3898
|
declare class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TCollisionSystemEvent> {
|
|
3644
|
-
#private;
|
|
3645
3899
|
private worker;
|
|
3646
3900
|
collidersDirty: boolean;
|
|
3647
|
-
|
|
3901
|
+
/** Reused request writer; its buffer is transferred to the worker and handed back with the result. */
|
|
3902
|
+
private _writer;
|
|
3903
|
+
/** Spare result buffer offered to the worker so it can write results without allocating. */
|
|
3904
|
+
private _spareOutput;
|
|
3905
|
+
/** True while the request buffer is owned by the worker (transferred). */
|
|
3906
|
+
private _bufferInFlight;
|
|
3907
|
+
private _requestId;
|
|
3908
|
+
/** Components the in-flight request was packed from, in packing order. */
|
|
3909
|
+
private _inFlight;
|
|
3910
|
+
/** Two reusable arrays for {@link _inFlight}, so the order is kept even if `componentArray` re-sorts. */
|
|
3911
|
+
private _snapshotA;
|
|
3912
|
+
private _snapshotB;
|
|
3913
|
+
/** Copy of the in-flight request . */
|
|
3914
|
+
private _sentInput;
|
|
3915
|
+
private _sentLength;
|
|
3916
|
+
/** Copy of the last request whose results were applied, its results and component order. */
|
|
3917
|
+
private _appliedInput;
|
|
3918
|
+
private _appliedLength;
|
|
3919
|
+
private _appliedResults;
|
|
3920
|
+
private _appliedCount;
|
|
3921
|
+
private _appliedComponents;
|
|
3922
|
+
/** Reused list of the components packed into the current request . */
|
|
3923
|
+
private _sendList;
|
|
3648
3924
|
visibleCollidersQTree: QuadTree<{
|
|
3649
3925
|
entityId: string | number;
|
|
3650
3926
|
}>;
|
|
3651
3927
|
interactiveCollidersQTree: QuadTree<{
|
|
3652
3928
|
entityId: string | number;
|
|
3653
3929
|
}>;
|
|
3930
|
+
private _state;
|
|
3931
|
+
private _canvasWidth;
|
|
3932
|
+
private _canvasHeight;
|
|
3933
|
+
private _debug;
|
|
3934
|
+
private _debugCanvas;
|
|
3935
|
+
private _debugCtx;
|
|
3654
3936
|
/**
|
|
3655
3937
|
* @param state - Pipeline state
|
|
3656
3938
|
* @param canvasWidth - Width of the collision canvas
|
|
@@ -3661,7 +3943,7 @@ declare class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TColli
|
|
|
3661
3943
|
*/
|
|
3662
3944
|
constructor(state: TwoDPipelineState, canvasWidth: number, canvasHeight: number, workerUrl?: string, useWorker?: boolean, container?: HTMLElement);
|
|
3663
3945
|
working: boolean;
|
|
3664
|
-
componentArray:
|
|
3946
|
+
componentArray: Component[];
|
|
3665
3947
|
/**
|
|
3666
3948
|
* Resizes the collision area dimensions.
|
|
3667
3949
|
* @param width - New width
|
|
@@ -3669,22 +3951,40 @@ declare class CollisionSystem extends PubSub<TCollisionSystemEvent, keyof TColli
|
|
|
3669
3951
|
*/
|
|
3670
3952
|
resizeCanvas(width: number, height: number): void;
|
|
3671
3953
|
/**
|
|
3672
|
-
*
|
|
3954
|
+
* Packs all active entities into a flat request and posts it to the worker. While a request is in
|
|
3955
|
+
* flight the call only refreshes the sorted component list; the next call after the result
|
|
3956
|
+
* arrives picks up the latest state.
|
|
3957
|
+
*
|
|
3958
|
+
* @param watermarkWidth - Watermark width to avoid
|
|
3959
|
+
* @param watermarkHeight - Watermark height to avoid
|
|
3960
|
+
* @param watermarkPosition - Watermark anchor
|
|
3961
|
+
* @param lockStrategies - Keep current strategies (camera moving)
|
|
3962
|
+
* @param staticColliders - Extra screen rectangles to avoid (e.g. images)
|
|
3673
3963
|
*/
|
|
3674
3964
|
update: (watermarkWidth: number, watermarkHeight: number, watermarkPosition?: WatermarkPosition$1, lockStrategies?: boolean, staticColliders?: Rectangle[]) => void;
|
|
3675
|
-
resize(watermarkWidth: number, watermarkHeight: number, watermarkPosition: WatermarkPosition$1): void;
|
|
3676
3965
|
/**
|
|
3677
|
-
*
|
|
3966
|
+
* Applies collision results from the worker to components and publishes `visibility-changed`.
|
|
3967
|
+
*/
|
|
3968
|
+
resolve: (e: {
|
|
3969
|
+
data: FlatCollisionResponse;
|
|
3970
|
+
}) => void;
|
|
3971
|
+
/**
|
|
3972
|
+
* When `input` is identical to the last applied request (same components, same order), the
|
|
3973
|
+
* collision result would be identical too: re-apply the cached result locally.
|
|
3974
|
+
* Publishes `visibility-changed` only when applying left a component with pending work.
|
|
3975
|
+
* @returns `true` when the request was satisfied from cache.
|
|
3976
|
+
*/
|
|
3977
|
+
private _tryReuseLastResult;
|
|
3978
|
+
/**
|
|
3979
|
+
* Applies a flat result buffer to components and rebuilds the collider quad trees.
|
|
3980
|
+
* @returns Whether any component changed or has a pending visibility update afterwards.
|
|
3678
3981
|
*/
|
|
3679
|
-
|
|
3680
|
-
msgId: string;
|
|
3681
|
-
colliders: TSerializedColliderResponse[];
|
|
3682
|
-
staticColliders: Rectangle[];
|
|
3683
|
-
}>) => void;
|
|
3982
|
+
private _applyResults;
|
|
3684
3983
|
/** Enables the debug overlay that draws visible collision boxes. */
|
|
3685
3984
|
showCollisionBoxes(): void;
|
|
3686
3985
|
/** Disables the debug overlay and clears the canvas. */
|
|
3687
3986
|
hideCollisionBoxes(): void;
|
|
3987
|
+
private _drawDebug;
|
|
3688
3988
|
destroy: () => void;
|
|
3689
3989
|
}
|
|
3690
3990
|
//#endregion
|
|
@@ -3712,6 +4012,12 @@ interface LabelTextCache {
|
|
|
3712
4012
|
/** Block height device px. */
|
|
3713
4013
|
height: number;
|
|
3714
4014
|
}
|
|
4015
|
+
/**
|
|
4016
|
+
* Max pre-composited pin + icon sprites kept by {@link TwoDDrawSystem.pinIconCache}. A sprite is the pin
|
|
4017
|
+
* canvas size (roughly 100-140 px square at DPR 2, ~40-80 KB), so this bounds the cache to a few MB while
|
|
4018
|
+
* still covering every distinct icon on screen at once.
|
|
4019
|
+
*/
|
|
4020
|
+
|
|
3715
4021
|
/**
|
|
3716
4022
|
* 2D canvas draw system for labels.
|
|
3717
4023
|
* Renders label pins, icons, and text to a canvas overlay.
|
|
@@ -3763,10 +4069,34 @@ declare class TwoDDrawSystem extends PubSub<{
|
|
|
3763
4069
|
/** Lazily-mounted DOM overlay that renders per-frame stats. */
|
|
3764
4070
|
private statsElement?;
|
|
3765
4071
|
/**
|
|
3766
|
-
*
|
|
4072
|
+
* Pre-composited active pin + clipped icon sprites, keyed by pin cache id + icon inputs.
|
|
4073
|
+
* Least-recently-used, capped at {@link PIN_ICON_CACHE_MAX_ENTRIES} (Map iteration order = recency);
|
|
4074
|
+
* cleared on a full redraw (`dirty`). Only used for icons with `iconOverflow` other than `'visible'`,
|
|
4075
|
+
* where one sprite exists per distinct icon + pin style, so a large directory of logos would otherwise
|
|
4076
|
+
* keep one canvas per logo for the whole session.
|
|
4077
|
+
*/
|
|
4078
|
+
pinIconCache: Map<string, HTMLCanvasElement | OffscreenCanvas>;
|
|
4079
|
+
/**
|
|
4080
|
+
* Bumped when {@link pinIconCache} is cleared or evicts a sprite, so per-label sprite references
|
|
4081
|
+
* (`LabelComponent.pinIconKeyInputs.sprite`) are re-resolved.
|
|
4082
|
+
*/
|
|
4083
|
+
private pinIconGeneration;
|
|
4084
|
+
/** Labels collected for drawing this frame (only the first `drawCount` entries of a frame are valid). */
|
|
4085
|
+
private _drawList;
|
|
4086
|
+
/** Cache ids parallel to {@link _drawList}. */
|
|
4087
|
+
private _drawListIds;
|
|
4088
|
+
/**
|
|
4089
|
+
* Runs the draw pass for all label entities, in two passes: pass 1 runs every per-label prep step
|
|
4090
|
+
* (caches, strategies) and collects the labels to draw, skipping invisible and offscreen ones; pass 2
|
|
4091
|
+
* clears the canvas and draws them.
|
|
3767
4092
|
* @param zoomLevel - Current zoom level (for icon scale interpolation)
|
|
3768
4093
|
*/
|
|
3769
4094
|
update: (zoomLevel: number) => void;
|
|
4095
|
+
/**
|
|
4096
|
+
* Per-label prep shared by both update paths: icon visibility, pin size, caches, strategy.
|
|
4097
|
+
* @returns The pin cache id when the label should be drawn this frame, otherwise `null`.
|
|
4098
|
+
*/
|
|
4099
|
+
private _prepareLabel;
|
|
3770
4100
|
processText: (text: string, size: number, maxWidth: number, maxLines: number, lineHeight: number, balance?: boolean) => {
|
|
3771
4101
|
lineStrings: string[];
|
|
3772
4102
|
lineWidths: number[];
|
|
@@ -3868,6 +4198,16 @@ declare class TwoDDrawSystem extends PubSub<{
|
|
|
3868
4198
|
* All coordinates are in canvas pixels (already multiplied by pixelRatio).
|
|
3869
4199
|
*/
|
|
3870
4200
|
private drawWrapperBackground;
|
|
4201
|
+
/**
|
|
4202
|
+
* Returns a cached sprite with the active pin and the clipped icon composited, laid out like the
|
|
4203
|
+
* active pin canvas (same size and center) so it is blitted with the pin's destination rect.
|
|
4204
|
+
* Everything in the icon draw scales linearly with `iconScale`, so the sprite is rendered at
|
|
4205
|
+
* the pin canvas' max icon scale and the blit applies the current scale.
|
|
4206
|
+
*
|
|
4207
|
+
* @returns The sprite, or `null` when the label must use the separate pin + icon path (no icon
|
|
4208
|
+
* loaded yet, `iconOverflow: 'visible'`, or a fixed `imageDimensionsCache` size).
|
|
4209
|
+
*/
|
|
4210
|
+
getPinIconSprite(label: LabelComponent, labelCacheId: string): OffscreenCanvas | HTMLCanvasElement | null;
|
|
3871
4211
|
/**
|
|
3872
4212
|
* Draws a single label to the canvas.
|
|
3873
4213
|
*/
|
|
@@ -3921,13 +4261,42 @@ interface TwoDPipelineOptions {
|
|
|
3921
4261
|
* Owns the canvas and DOM overlay elements and all sub-systems.
|
|
3922
4262
|
*
|
|
3923
4263
|
* Usage:
|
|
3924
|
-
* 1. `new TwoDPipeline(container, state,
|
|
4264
|
+
* 1. `new TwoDPipeline(container, state, projectBatch, options)`
|
|
3925
4265
|
* 2. Call `update(zoomLevel, isUserInteracting)` each frame
|
|
3926
4266
|
* 3. Call `cancelPendingFrames()` before sync renders
|
|
3927
4267
|
* 4. Call `destroy()` on cleanup
|
|
3928
4268
|
*/
|
|
3929
4269
|
declare class TwoDPipeline {
|
|
3930
|
-
|
|
4270
|
+
private _state;
|
|
4271
|
+
private _viewportSize;
|
|
4272
|
+
private _projectBatch;
|
|
4273
|
+
/** Reused `[x, y, z, …]` input for {@link _projectBatch}. */
|
|
4274
|
+
private _batchPositions;
|
|
4275
|
+
/** Reused output for {@link _projectBatch}; replaced by the host if it needs more room. */
|
|
4276
|
+
private _batchOut;
|
|
4277
|
+
private _engineContainer;
|
|
4278
|
+
private _labelCanvas;
|
|
4279
|
+
private _markerContainer;
|
|
4280
|
+
private _collisionSystem;
|
|
4281
|
+
private _drawSystem;
|
|
4282
|
+
private _visibilitySystem;
|
|
4283
|
+
private _domDrawSystem;
|
|
4284
|
+
private _domVisibilitySystem;
|
|
4285
|
+
private _domResizeSystem;
|
|
4286
|
+
private _framesSinceLastCollision;
|
|
4287
|
+
/** Frame time of the last collision run started by {@link update}. */
|
|
4288
|
+
private _lastCollisionTime;
|
|
4289
|
+
private _resizeCollisionFrame;
|
|
4290
|
+
private _twoDFrameId;
|
|
4291
|
+
private _animationFrameId;
|
|
4292
|
+
private _updateEntitiesFrameId;
|
|
4293
|
+
private _headless;
|
|
4294
|
+
/** Frame time of the last {@link update} call (`-Infinity` before the first one). */
|
|
4295
|
+
private _lastUpdateTime;
|
|
4296
|
+
/** Whether the pending rAF redraw was already deferred once for a continuously-rendering host. */
|
|
4297
|
+
private _rafDrawDeferred;
|
|
4298
|
+
/** Last observed interval between {@link update} calls (ms). */
|
|
4299
|
+
private _updateInterval;
|
|
3931
4300
|
/**
|
|
3932
4301
|
* When true, the next collision update will perform a full strategy recompute.
|
|
3933
4302
|
* Set to false by the host renderer on camera-start events so that collision
|
|
@@ -3936,13 +4305,24 @@ declare class TwoDPipeline {
|
|
|
3936
4305
|
* Resets to false automatically at the end of each {@link update} call.
|
|
3937
4306
|
*/
|
|
3938
4307
|
collidersNeedRecomputing: boolean;
|
|
4308
|
+
private _watermark;
|
|
4309
|
+
private _lastZoomLevel;
|
|
4310
|
+
private _lastImageScreenBBoxes;
|
|
4311
|
+
/** Pixel ratio the label caches were baked at; see {@link _handlePixelRatioChange}. */
|
|
4312
|
+
private _lastPixelRatio;
|
|
3939
4313
|
get collisionSystem(): CollisionSystem;
|
|
3940
4314
|
get drawSystem(): TwoDDrawSystem;
|
|
3941
4315
|
/** Exposed for testing; DOM draw is internal to the pipeline */
|
|
3942
4316
|
get domDrawSystem(): DOMDrawSystem;
|
|
3943
4317
|
/** @internal Canvas used for rendering 2D labels. */
|
|
3944
4318
|
get labelCanvas(): HTMLCanvasElement;
|
|
3945
|
-
|
|
4319
|
+
/**
|
|
4320
|
+
* @param container - Element the label canvas and marker layer are appended to
|
|
4321
|
+
* @param state - Shared pipeline state
|
|
4322
|
+
* @param projectBatch - Host projection: world `[x, y, z, …]` → screen `[x, y, flags, …]`
|
|
4323
|
+
* @param options - Worker, image, watermark, viewport and headless options
|
|
4324
|
+
*/
|
|
4325
|
+
constructor(container: HTMLElement, state: TwoDPipelineState, projectBatch: ProjectBatchFn, options?: TwoDPipelineOptions);
|
|
3946
4326
|
/**
|
|
3947
4327
|
* Registers an entity in the lookup map without activating it.
|
|
3948
4328
|
* Use {@link activateEntity} to also add it to the active set.
|
|
@@ -3990,6 +4370,28 @@ declare class TwoDPipeline {
|
|
|
3990
4370
|
* Called by the host renderer on init and container resize.
|
|
3991
4371
|
*/
|
|
3992
4372
|
resize(): void;
|
|
4373
|
+
/**
|
|
4374
|
+
* Rebakes everything sized in device px after the host renderer's pixel ratio changes. The label text,
|
|
4375
|
+
* pin and wrapper canvases are drawn at the ratio in effect when they were cached and blitted 1:1, so a
|
|
4376
|
+
* stale bake shows up as text too large or too small next to its pin. The ratio can change without
|
|
4377
|
+
* `devicePixelRatio` changing: MapLibre clamps the drawing buffer to 4096 px, so moving a window between
|
|
4378
|
+
* a laptop screen and a wide external monitor changes it on a 2x display. Cold path: runs only on change.
|
|
4379
|
+
* @param pixelRatio - The new pixel ratio
|
|
4380
|
+
*/
|
|
4381
|
+
private _handlePixelRatioChange;
|
|
4382
|
+
/**
|
|
4383
|
+
* Projects all entities from world coordinates to screen pixels with one host
|
|
4384
|
+
* {@link ProjectBatchFn} call. An exact `(0, 0)` result keeps the entity's previous
|
|
4385
|
+
* projection (the long-standing "no projection" convention). Reports the number of
|
|
4386
|
+
* projected entities to the draw system for diagnostics.
|
|
4387
|
+
*
|
|
4388
|
+
* Note: intentionally does NOT mutate `component.offscreen`. The
|
|
4389
|
+
* authoritative off-screen determination is the collision worker's
|
|
4390
|
+
* viewport/collider test (see collision/system.ts). Previously this
|
|
4391
|
+
* loop reset `offscreen = false` every frame, clobbering the worker's
|
|
4392
|
+
* result and effectively disabling viewport culling in the draw loop.
|
|
4393
|
+
*/
|
|
4394
|
+
private _projectEntities;
|
|
3993
4395
|
/**
|
|
3994
4396
|
* Main update entry point. Called by the host renderer each frame.
|
|
3995
4397
|
*
|
|
@@ -3999,6 +4401,13 @@ declare class TwoDPipeline {
|
|
|
3999
4401
|
* @param imageScreenBBoxes - Bounding boxes of images on screen for collision avoidance
|
|
4000
4402
|
*/
|
|
4001
4403
|
update(zoomLevel: number, isUserInteracting: boolean, isCameraMoving?: boolean, imageScreenBBoxes?: Rectangle[]): void;
|
|
4404
|
+
/**
|
|
4405
|
+
* Schedules a collision update on the next animation frame.
|
|
4406
|
+
* Used when the render loop is idle but collision needs re-evaluation
|
|
4407
|
+
* (e.g. after a marker's DOM content resizes).
|
|
4408
|
+
* Uses a dedicated frame ID so it never cancels a full update from {@link update}.
|
|
4409
|
+
*/
|
|
4410
|
+
private _scheduleCollisionUpdate;
|
|
4002
4411
|
/**
|
|
4003
4412
|
* Updates the watermark configuration at runtime.
|
|
4004
4413
|
* @param watermark - New watermark dimensions and position
|
|
@@ -4008,6 +4417,15 @@ declare class TwoDPipeline {
|
|
|
4008
4417
|
height: number;
|
|
4009
4418
|
position: WatermarkPosition$1;
|
|
4010
4419
|
}): void;
|
|
4420
|
+
/** Called when collision results arrive: queue visibility + draw */
|
|
4421
|
+
private _onVisibilityChanged;
|
|
4422
|
+
/** Immediate draw pass for labels + markers */
|
|
4423
|
+
private _draw2DEntities;
|
|
4424
|
+
private _rafDraw;
|
|
4425
|
+
/** Called by visibility system when draw is needed */
|
|
4426
|
+
private _onDraw2D;
|
|
4427
|
+
/** Called by visibility system to advance animations */
|
|
4428
|
+
private _onAnimate2D;
|
|
4011
4429
|
/**
|
|
4012
4430
|
* Marks the 2D state as dirty, triggering re-population of the entity set
|
|
4013
4431
|
* and collision recalculation.
|
|
@@ -4499,8 +4917,7 @@ type DecorationStyle = {
|
|
|
4499
4917
|
};
|
|
4500
4918
|
/**
|
|
4501
4919
|
* A space or obstruction bevel, as the renderer reads it off the feature (renderer-three batched-mesh merges it under
|
|
4502
|
-
* any style bevel).
|
|
4503
|
-
* parsed MVFv2 feature through `onMVFParsed` (`WithBevel`: every field optional, e.g. cms-v6-compat's v5 bevels).
|
|
4920
|
+
* any style bevel). Built from the bundle's `geometry-effects.json` ({@link bevelFromGeometryEffects}).
|
|
4504
4921
|
*/
|
|
4505
4922
|
type DecorationBevel = {
|
|
4506
4923
|
enabled?: boolean;
|
|
@@ -4523,8 +4940,7 @@ interface DecorationRecord {
|
|
|
4523
4940
|
/** Every texture anchored to the geometry, in source order (e.g. one per face). */
|
|
4524
4941
|
textures?: EnterpriseTexture[];
|
|
4525
4942
|
/**
|
|
4526
|
-
* The geometry's bevel
|
|
4527
|
-
* `onMVFParsed`), then the `geometry-effects.json` effects (spaces; SDK #1817, {@link bevelFromGeometryEffects}).
|
|
4943
|
+
* The geometry's bevel, from the bundle's `geometry-effects.json` effects ({@link bevelFromGeometryEffects}).
|
|
4528
4944
|
* The renderer reads it off the space or object feature (`render/spaces.ts`, `render/objects.ts`).
|
|
4529
4945
|
*/
|
|
4530
4946
|
bevel?: DecorationBevel;
|
|
@@ -4620,6 +5036,16 @@ declare abstract class BaseMapData {
|
|
|
4620
5036
|
#private;
|
|
4621
5037
|
/**
|
|
4622
5038
|
* The identity of the map data.
|
|
5039
|
+
*
|
|
5040
|
+
* This `id` is **transient**: it may be regenerated whenever the map is modified, so it can change
|
|
5041
|
+
* between builds of the same map. It is safe to use during runtime, but it should not be stored as a
|
|
5042
|
+
* reference that persists between executions — for example, saved to a database or hardcoded in
|
|
5043
|
+
* application code.
|
|
5044
|
+
*
|
|
5045
|
+
* Use `externalId` instead, where available, for a value that remains constant. `externalId` is a text
|
|
5046
|
+
* field that can be entered and set in the map editor, so it stays the same even if the object is
|
|
5047
|
+
* deleted and re-created. Note that `externalId` is optional and is only populated if it has been set
|
|
5048
|
+
* in the map editor.
|
|
4623
5049
|
*/
|
|
4624
5050
|
readonly id: string;
|
|
4625
5051
|
constructor(id: string, _data: MapDataInternal);
|
|
@@ -4685,6 +5111,9 @@ declare class Floor extends BaseMapData implements IFocusable, IGeoJSONData {
|
|
|
4685
5111
|
/**
|
|
4686
5112
|
* Gets the external ID of the floor.
|
|
4687
5113
|
*
|
|
5114
|
+
* Unlike {@link id}, this value is stable across map edits: it is a text field that can be entered and
|
|
5115
|
+
* set in the map editor, so it stays the same even if the floor is deleted and re-created.
|
|
5116
|
+
*
|
|
4688
5117
|
* @returns {string} The external ID of the floor.
|
|
4689
5118
|
*/
|
|
4690
5119
|
get externalId(): string;
|
|
@@ -4788,6 +5217,16 @@ declare class Floor extends BaseMapData implements IFocusable, IGeoJSONData {
|
|
|
4788
5217
|
declare abstract class BaseMetaData {
|
|
4789
5218
|
/**
|
|
4790
5219
|
* The identity of the map metadata.
|
|
5220
|
+
*
|
|
5221
|
+
* This `id` is **transient**: it may be regenerated whenever the map is modified, so it can change
|
|
5222
|
+
* between builds of the same map. It is safe to use during runtime, but it should not be stored as a
|
|
5223
|
+
* reference that persists between executions — for example, saved to a database or hardcoded in
|
|
5224
|
+
* application code.
|
|
5225
|
+
*
|
|
5226
|
+
* Where available, use `externalId` instead for a value that remains constant. `externalId` is a text
|
|
5227
|
+
* field that can be entered and set in the map editor, so it stays the same even if the object is
|
|
5228
|
+
* deleted and re-created. Note that `externalId` is optional and is only populated if it has been set
|
|
5229
|
+
* in the map editor. Not all types expose an `externalId`.
|
|
4791
5230
|
*/
|
|
4792
5231
|
readonly id: string;
|
|
4793
5232
|
constructor(id: string);
|
|
@@ -4863,6 +5302,9 @@ declare class Node extends BaseMetaData implements IGeoJSONData, IFocusable, IAn
|
|
|
4863
5302
|
/**
|
|
4864
5303
|
* Gets the external ID of the node.
|
|
4865
5304
|
*
|
|
5305
|
+
* Unlike {@link id}, this value is stable across map edits: it is a text field that can be entered and
|
|
5306
|
+
* set in the map editor, so it stays the same even if the node is deleted and re-created.
|
|
5307
|
+
*
|
|
4866
5308
|
* @returns {string} The external ID of the node.
|
|
4867
5309
|
*/
|
|
4868
5310
|
get externalId(): string;
|
|
@@ -5257,6 +5699,10 @@ declare abstract class DetailedMapData<MVFData extends Feature$1<Geometry$1, {
|
|
|
5257
5699
|
/**
|
|
5258
5700
|
* Gets the external identifier of the map feature.
|
|
5259
5701
|
*
|
|
5702
|
+
* Unlike {@link id}, which is transient and may be regenerated whenever the map is modified, this
|
|
5703
|
+
* value is stable: it is a text field that can be entered and set in the map editor, so it stays the
|
|
5704
|
+
* same even if the map feature is deleted and re-created.
|
|
5705
|
+
*
|
|
5260
5706
|
* @returns {string} The external ID of the map feature, or an empty string if no external ID exists.
|
|
5261
5707
|
*/
|
|
5262
5708
|
get externalId(): string;
|
|
@@ -6143,6 +6589,9 @@ declare class FloorStack extends BaseMapData implements IGeoJSONData, IFocusable
|
|
|
6143
6589
|
get shortName(): string;
|
|
6144
6590
|
/**
|
|
6145
6591
|
* Gets the externalId of FloorStack
|
|
6592
|
+
*
|
|
6593
|
+
* Unlike {@link id}, this value is stable across map edits: it is a text field that can be entered and
|
|
6594
|
+
* set in the map editor, so it stays the same even if the floor stack is deleted and re-created.
|
|
6146
6595
|
*/
|
|
6147
6596
|
get externalId(): string;
|
|
6148
6597
|
/**
|
|
@@ -8639,6 +9088,7 @@ declare class Marker implements IFocusable, INavigatable {
|
|
|
8639
9088
|
* 3D Models can be added to a {@link Coordinate}, {@link Door} or {@link Space}.
|
|
8640
9089
|
* When adding the same model to multiple locations at the same time always use an array instead of calling the add method multiple times.
|
|
8641
9090
|
* This allows the SDK to re-use the same instance of the model to reduce RAM usage and rendering time, resulting in better performance.
|
|
9091
|
+
* A model added with `EXPERIMENTAL_batchedDraw` is never instanced: each placement draws its own copy.
|
|
8642
9092
|
*
|
|
8643
9093
|
* Models are added using {@link Models.add}.
|
|
8644
9094
|
*
|
|
@@ -8647,7 +9097,11 @@ declare class Marker implements IFocusable, INavigatable {
|
|
|
8647
9097
|
declare class Model implements INavigatable {
|
|
8648
9098
|
#private;
|
|
8649
9099
|
/**
|
|
8650
|
-
* The model's id
|
|
9100
|
+
* The model's id.
|
|
9101
|
+
*
|
|
9102
|
+
* When it was created with the `id` option — as {@link Models.all} does with the venue's
|
|
9103
|
+
* model id — this is that id, so the model can be matched back to its map data entry.
|
|
9104
|
+
* Otherwise it is the renderer's id for the model.
|
|
8651
9105
|
*/
|
|
8652
9106
|
id: string;
|
|
8653
9107
|
/**
|
|
@@ -9695,7 +10149,7 @@ declare class GeojsonApiMapObject extends PubSub<{
|
|
|
9695
10149
|
add: <T$1 extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T$1, style: T$1 extends FeatureCollection<LineString, any> ? LineStyle$1 : PaintStyle$1, opts: {
|
|
9696
10150
|
floorId?: string;
|
|
9697
10151
|
}) => string;
|
|
9698
|
-
remove: (customGeometry: Shape) => string;
|
|
10152
|
+
remove: (customGeometry: Shape$1) => string;
|
|
9699
10153
|
};
|
|
9700
10154
|
Text3D: {
|
|
9701
10155
|
label: (target: Space, content?: string, options?: TAddText3DOptions) => Text3DInfo | undefined;
|
|
@@ -9828,7 +10282,7 @@ declare class Shapes {
|
|
|
9828
10282
|
/**
|
|
9829
10283
|
* @internal
|
|
9830
10284
|
*/
|
|
9831
|
-
getById(id: string): Shape | undefined;
|
|
10285
|
+
getById(id: string): Shape$1 | undefined;
|
|
9832
10286
|
/**
|
|
9833
10287
|
* Adds a custom GeoJSON geometry ({@link Shape}) to the map.
|
|
9834
10288
|
*
|
|
@@ -9882,14 +10336,14 @@ declare class Shapes {
|
|
|
9882
10336
|
*
|
|
9883
10337
|
* @see [Shapes Guide](https://developer.mappedin.com/web-sdk/shapes)
|
|
9884
10338
|
*/
|
|
9885
|
-
add<T$1 extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T$1, style: T$1 extends FeatureCollection<LineString, any> ? LineStyle$1 : PaintStyle$1, floor?: Floor): Shape;
|
|
10339
|
+
add<T$1 extends FeatureCollection<Polygon | MultiPolygon | LineString, any>>(geometry: T$1, style: T$1 extends FeatureCollection<LineString, any> ? LineStyle$1 : PaintStyle$1, floor?: Floor): Shape$1;
|
|
9886
10340
|
/**
|
|
9887
10341
|
* Removes a specific shape ({@link Shape}) from the map.
|
|
9888
10342
|
* @param shape The shape to be removed.
|
|
9889
10343
|
* @example
|
|
9890
10344
|
* mapView.Shapes.remove(shape);
|
|
9891
10345
|
*/
|
|
9892
|
-
remove(shape: Shape): void;
|
|
10346
|
+
remove(shape: Shape$1): void;
|
|
9893
10347
|
/**
|
|
9894
10348
|
* Removes all Shapes ({@link Shape}) from the map.
|
|
9895
10349
|
*
|
|
@@ -12803,6 +13257,12 @@ type CurrentMapGetter = () => GeojsonApiMapObject | undefined;
|
|
|
12803
13257
|
//#endregion
|
|
12804
13258
|
//#region src/api-geojson/models.d.ts
|
|
12805
13259
|
type MapDataInternalGetter = () => MapDataInternal | undefined;
|
|
13260
|
+
/** A model added through {@link Models}, keyed by its public id and by the renderer's entity id. */
|
|
13261
|
+
type ModelRecord = {
|
|
13262
|
+
model: Model;
|
|
13263
|
+
entityId: string;
|
|
13264
|
+
groupId: string;
|
|
13265
|
+
};
|
|
12806
13266
|
/**
|
|
12807
13267
|
* ## 3D Models in Mappedin JS
|
|
12808
13268
|
*
|
|
@@ -12840,8 +13300,57 @@ type MapDataInternalGetter = () => MapDataInternal | undefined;
|
|
|
12840
13300
|
*
|
|
12841
13301
|
* > **Best Practice:** Use self-hosted GLB files for smaller download size and better caching. Use direct imports for convenience and rapid prototyping.
|
|
12842
13302
|
*
|
|
13303
|
+
* ### Model Clipping (cut-aways)
|
|
13304
|
+
*
|
|
13305
|
+
* A model that represents a **building** is a closed shell: it sits over the venue and its
|
|
13306
|
+
* walls and roof hide the floors inside it. Pass `clippingEnabled: true` to
|
|
13307
|
+
* {@link TAddModelOptions} to cut the model away with a horizontal plane, so everything below
|
|
13308
|
+
* the plane is drawn and everything above it is removed — the familiar cut-away view of a
|
|
13309
|
+
* building, looking down into the floor the user is on:
|
|
13310
|
+
*
|
|
13311
|
+
* ```ts
|
|
13312
|
+
* const building = mapView.Models.add(mapData.mapCenter, buildingUrl, {
|
|
13313
|
+
* clippingEnabled: true,
|
|
13314
|
+
* });
|
|
13315
|
+
* ```
|
|
13316
|
+
*
|
|
13317
|
+
* - `clippingEnabled` is the switch. It is decided when the model is added — setting it
|
|
13318
|
+
* later has no effect — and it de-optimizes the model by disabling instancing, so keep
|
|
13319
|
+
* it to the models that actually need it.
|
|
13320
|
+
* - `clippingPlaneZOffset` is the height of the cut, in meters on the map's vertical axis —
|
|
13321
|
+
* the same scale the floors use, so `getState(floor).altitude` can be used directly. It
|
|
13322
|
+
* defaults to `Infinity`, which puts the plane above everything and so cuts nothing: set a
|
|
13323
|
+
* finite height, and move it at runtime with
|
|
13324
|
+
* `mapView.updateState(model, { clippingPlaneZOffset })`.
|
|
13325
|
+
* - `clippingPlaneTopColor` and `clippingPlaneTopVisible` style the exposed cut face.
|
|
13326
|
+
*
|
|
13327
|
+
* Follow the floor the user is on by reading `getState(floor).altitude` — the floor's visual
|
|
13328
|
+
* height in the scene, which already includes the floor spacing of a multi-floor view — and
|
|
13329
|
+
* using it as the cut height:
|
|
13330
|
+
*
|
|
13331
|
+
* ```ts
|
|
13332
|
+
* function clipToCurrentFloor() {
|
|
13333
|
+
* const altitude = mapView.getState(mapView.currentFloor)?.altitude ?? 0;
|
|
13334
|
+
*
|
|
13335
|
+
* mapView.updateState(building, {
|
|
13336
|
+
* clippingPlaneZOffset: altitude + 0.05, // a hair above the floor, not through it
|
|
13337
|
+
* clippingPlaneTopColor: '#8899aa',
|
|
13338
|
+
* });
|
|
13339
|
+
* }
|
|
13340
|
+
*
|
|
13341
|
+
* clipToCurrentFloor();
|
|
13342
|
+
* mapView.on('floor-change', clipToCurrentFloor);
|
|
13343
|
+
* ```
|
|
13344
|
+
*
|
|
13345
|
+
* Venue models added with {@link Models.all} enable clipping automatically when the venue
|
|
13346
|
+
* marks them as manifolded.
|
|
13347
|
+
*
|
|
13348
|
+
* > **Deprecated:** `EXPERIMENTAL_clippingEnabled` still works and logs a warning. It is
|
|
13349
|
+
* > the pre-release name of `clippingEnabled` — rename it.
|
|
13350
|
+
*
|
|
12843
13351
|
* ### Performance Tips
|
|
12844
13352
|
* - Avoid using models with nested meshes.
|
|
13353
|
+
* - Clipping disables instancing for the model, so enable it only on the models that need it.
|
|
12845
13354
|
*
|
|
12846
13355
|
* ### More Information
|
|
12847
13356
|
* - [3D Models Guide](https://developer.mappedin.com/web-sdk/3d-models)
|
|
@@ -12868,11 +13377,11 @@ declare class Models {
|
|
|
12868
13377
|
/**
|
|
12869
13378
|
* @internal
|
|
12870
13379
|
*/
|
|
12871
|
-
getById(id: string):
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
13380
|
+
getById(id: string): ModelRecord | undefined;
|
|
13381
|
+
/**
|
|
13382
|
+
* @internal
|
|
13383
|
+
*/
|
|
13384
|
+
getByEntityId(entityId: string): ModelRecord | undefined;
|
|
12876
13385
|
/**
|
|
12877
13386
|
* Adds a 3D model to the map at the specified coordinate.
|
|
12878
13387
|
*
|
|
@@ -12902,6 +13411,22 @@ declare class Models {
|
|
|
12902
13411
|
* });
|
|
12903
13412
|
* ```
|
|
12904
13413
|
*
|
|
13414
|
+
* @example Add a building model and cut it open at the floor the user is on
|
|
13415
|
+
* ```ts
|
|
13416
|
+
* const building = mapView.Models.add(mapData.mapCenter, buildingUrl, {
|
|
13417
|
+
* clippingEnabled: true,
|
|
13418
|
+
* });
|
|
13419
|
+
*
|
|
13420
|
+
* function clipToCurrentFloor() {
|
|
13421
|
+
* const altitude = mapView.getState(mapView.currentFloor)?.altitude ?? 0;
|
|
13422
|
+
*
|
|
13423
|
+
* mapView.updateState(building, { clippingPlaneZOffset: altitude + 0.05 });
|
|
13424
|
+
* }
|
|
13425
|
+
*
|
|
13426
|
+
* clipToCurrentFloor();
|
|
13427
|
+
* mapView.on('floor-change', clipToCurrentFloor);
|
|
13428
|
+
* ```
|
|
13429
|
+
*
|
|
12905
13430
|
* @see [3D Models Guide](https://developer.mappedin.com/web-sdk/3d-models)
|
|
12906
13431
|
* @see [Mappedin 3D Assets Library](https://www.npmjs.com/package/@mappedin/3d-assets)
|
|
12907
13432
|
*/
|
|
@@ -12913,6 +13438,28 @@ declare class Models {
|
|
|
12913
13438
|
* each model to the map at its configured coordinate with the specified
|
|
12914
13439
|
* rotation, scale, color, and clipping settings.
|
|
12915
13440
|
*
|
|
13441
|
+
* Venue models either carry a `url` of their own, or just the `modelId` of a model from
|
|
13442
|
+
* the [Mappedin 3D Assets Library](https://www.npmjs.com/package/@mappedin/3d-assets).
|
|
13443
|
+
* The library is not bundled with the SDK — pass `resolveModel` to resolve those ids
|
|
13444
|
+
* (see {@link TModelsAllOptions}). Entries that resolve to neither are skipped.
|
|
13445
|
+
*
|
|
13446
|
+
* Each {@link Model} takes the venue entry's id, so it can be matched back to its entry in
|
|
13447
|
+
* the venue's `extra.models` data.
|
|
13448
|
+
*
|
|
13449
|
+
* Each model is drawn the cheapest way the venue data allows. A model with its own `url` that appears **once** in
|
|
13450
|
+
* the venue (a building, clipped or not) is batched: its pieces draw in a few calls instead of one call per piece.
|
|
13451
|
+
* An asset-library model, or a `url` that appears more than once, is instanced, so its placements share one copy of
|
|
13452
|
+
* the geometry. (Experimental: batching uses `EXPERIMENTAL_batchedDraw` under the hood.)
|
|
13453
|
+
*
|
|
13454
|
+
* The entry's `visibility` (`'always'`, `'outdoors-only'`, `'indoors-only'`) is not applied:
|
|
13455
|
+
* every model is added visible. A model placed on a real floor still hides and shows with that
|
|
13456
|
+
* floor, because it is added to the floor's models layer. An outdoor entry has no floor to
|
|
13457
|
+
* follow — it is parented at the scene root — so it stays visible on every floor and does not
|
|
13458
|
+
* follow the outdoor container's visibility either, which means an `outdoors-only` asset is
|
|
13459
|
+
* also visible indoors. Apply the field yourself with `updateState(model, { visible })` when a
|
|
13460
|
+
* venue relies on it.
|
|
13461
|
+
*
|
|
13462
|
+
* @param options - Options for {@link TModelsAllOptions}.
|
|
12916
13463
|
* @returns An array of {@link Model} instances that were added to the map.
|
|
12917
13464
|
* Returns an empty array when the venue has no model data
|
|
12918
13465
|
* or none of the model entries are valid.
|
|
@@ -12922,8 +13469,17 @@ declare class Models {
|
|
|
12922
13469
|
* const models = mapView.Models.all();
|
|
12923
13470
|
* console.log(`Added ${models.length} models to the map`);
|
|
12924
13471
|
* ```
|
|
13472
|
+
*
|
|
13473
|
+
* @example Resolve venue models that use the 3D Assets Library
|
|
13474
|
+
* ```ts
|
|
13475
|
+
* import * as assets from '@mappedin/3d-assets';
|
|
13476
|
+
*
|
|
13477
|
+
* const models = mapView.Models.all({
|
|
13478
|
+
* resolveModel: modelId => (assets as Record<string, string>)[modelId],
|
|
13479
|
+
* });
|
|
13480
|
+
* ```
|
|
12925
13481
|
*/
|
|
12926
|
-
all(): Model[];
|
|
13482
|
+
all(options?: TModelsAllOptions): Model[];
|
|
12927
13483
|
/**
|
|
12928
13484
|
* Removes a model from the map.
|
|
12929
13485
|
*
|
|
@@ -13266,6 +13822,10 @@ declare class Text3D {
|
|
|
13266
13822
|
}: {
|
|
13267
13823
|
currentMapGetter: CurrentMapGetter;
|
|
13268
13824
|
});
|
|
13825
|
+
/**
|
|
13826
|
+
* @internal
|
|
13827
|
+
*/
|
|
13828
|
+
getById(id: string): Text3DView | undefined;
|
|
13269
13829
|
/**
|
|
13270
13830
|
* Creates polygon labels for all spaces.
|
|
13271
13831
|
*
|
|
@@ -13694,7 +14254,7 @@ type TGeometryUpdateState = output<typeof geometryStateSchemaPartial>;
|
|
|
13694
14254
|
declare const labelStateSchema: ZodObject<{
|
|
13695
14255
|
type: ZodDefault<ZodLiteral<"label">>;
|
|
13696
14256
|
text: ZodString;
|
|
13697
|
-
rank: ZodCustom<"initial" |
|
|
14257
|
+
rank: ZodCustom<TCollisionRankingTier | "initial", TCollisionRankingTier | "initial">;
|
|
13698
14258
|
appearance: ZodCustom<LabelAppearance, LabelAppearance>;
|
|
13699
14259
|
interactive: ZodDefault<ZodBoolean>;
|
|
13700
14260
|
enabled: ZodDefault<ZodBoolean>;
|
|
@@ -13717,7 +14277,7 @@ declare const labelStateSchema: ZodObject<{
|
|
|
13717
14277
|
declare const labelStateSchemaPartial: ZodObject<{
|
|
13718
14278
|
type: ZodOptional<ZodDefault<ZodLiteral<"label">>>;
|
|
13719
14279
|
text: ZodOptional<ZodString>;
|
|
13720
|
-
rank: ZodOptional<ZodCustom<"initial" |
|
|
14280
|
+
rank: ZodOptional<ZodCustom<TCollisionRankingTier | "initial", TCollisionRankingTier | "initial">>;
|
|
13721
14281
|
appearance: ZodOptional<ZodCustom<LabelAppearance, LabelAppearance>>;
|
|
13722
14282
|
interactive: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
13723
14283
|
enabled: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
@@ -13750,7 +14310,7 @@ type TLabelUpdateState = output<typeof labelStateSchemaPartial>;
|
|
|
13750
14310
|
/** @internal */
|
|
13751
14311
|
declare const markerStateSchema: ZodObject<{
|
|
13752
14312
|
type: ZodDefault<ZodLiteral<"marker">>;
|
|
13753
|
-
rank: ZodCustom<"initial" |
|
|
14313
|
+
rank: ZodCustom<TCollisionRankingTier | "initial", TCollisionRankingTier | "initial">;
|
|
13754
14314
|
placement: ZodOptional<ZodUnion<readonly [ZodEnum<{
|
|
13755
14315
|
hidden: "hidden";
|
|
13756
14316
|
top: "top";
|
|
@@ -13793,7 +14353,7 @@ declare const markerStateSchemaPartial: ZodObject<{
|
|
|
13793
14353
|
type: ZodOptional<ZodDefault<ZodLiteral<"marker">>>;
|
|
13794
14354
|
enabled: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
13795
14355
|
interactive: ZodOptional<ZodDefault<ZodUnion<readonly [ZodBoolean, ZodLiteral<"pointer-events-auto">]>>>;
|
|
13796
|
-
rank: ZodOptional<ZodCustom<"initial" |
|
|
14356
|
+
rank: ZodOptional<ZodCustom<TCollisionRankingTier | "initial", TCollisionRankingTier | "initial">>;
|
|
13797
14357
|
occlude: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
13798
14358
|
placement: ZodOptional<ZodOptional<ZodUnion<readonly [ZodEnum<{
|
|
13799
14359
|
hidden: "hidden";
|
|
@@ -14055,6 +14615,7 @@ declare const shapeStateSchemaPartial: ZodObject<{
|
|
|
14055
14615
|
offset: ZodOptional<ZodNumber>;
|
|
14056
14616
|
segments: ZodOptional<ZodNumber>;
|
|
14057
14617
|
}, $strip>>>;
|
|
14618
|
+
visibleThroughGeometry: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
14058
14619
|
position: ZodOptional<ZodCustom<Coordinate, Coordinate>>;
|
|
14059
14620
|
}, $strip>;
|
|
14060
14621
|
/** @internal */
|
|
@@ -14074,6 +14635,7 @@ declare const shapeStateSchemaStrict: ZodObject<{
|
|
|
14074
14635
|
offset: ZodOptional<ZodNumber>;
|
|
14075
14636
|
segments: ZodOptional<ZodNumber>;
|
|
14076
14637
|
}, $strip>>;
|
|
14638
|
+
visibleThroughGeometry: ZodDefault<ZodBoolean>;
|
|
14077
14639
|
position: ZodCustom<Coordinate, Coordinate>;
|
|
14078
14640
|
}, $strict>;
|
|
14079
14641
|
/**
|
|
@@ -14124,23 +14686,23 @@ type TImage3DUpdateState = output<typeof imageStateSchemaPartial>;
|
|
|
14124
14686
|
//#region src/states/model-state.d.ts
|
|
14125
14687
|
/** @internal */
|
|
14126
14688
|
declare const modelStateUpdateSchema: ZodObject<{
|
|
14127
|
-
altitude: ZodOptional<ZodOptional<ZodNumber>>;
|
|
14128
14689
|
id: ZodOptional<ZodOptional<ZodUnion<readonly [ZodNumber, ZodString]>>>;
|
|
14129
14690
|
type: ZodOptional<ZodDefault<ZodLiteral<"model">>>;
|
|
14130
14691
|
color: ZodOptional<ZodOptional<ZodString>>;
|
|
14131
|
-
|
|
14692
|
+
rotation: ZodOptional<ZodUnion<readonly [ZodNumber, ZodTuple<[ZodNumber, ZodNumber, ZodNumber], null>]>>;
|
|
14693
|
+
scale: ZodOptional<ZodUnion<readonly [ZodNumber, ZodTuple<[ZodNumber, ZodNumber, ZodNumber], null>]>>;
|
|
14132
14694
|
visible: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
14133
|
-
verticalOffset: ZodOptional<ZodDefault<ZodNumber>>;
|
|
14134
14695
|
opacity: ZodOptional<ZodDefault<ZodNumber>>;
|
|
14135
14696
|
material: ZodOptional<ZodOptional<ZodRecord<ZodString, ZodObject<{
|
|
14136
14697
|
color: ZodString;
|
|
14137
14698
|
}, $strip>>>>;
|
|
14138
|
-
|
|
14699
|
+
verticalOffset: ZodOptional<ZodDefault<ZodNumber>>;
|
|
14139
14700
|
clippingPlaneZOffset: ZodOptional<ZodDefault<ZodCustom<number, number>>>;
|
|
14140
14701
|
clippingPlaneTopColor: ZodOptional<ZodDefault<ZodString>>;
|
|
14141
14702
|
clippingPlaneTopVisible: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
14142
|
-
|
|
14143
|
-
|
|
14703
|
+
altitude: ZodOptional<ZodOptional<ZodNumber>>;
|
|
14704
|
+
position: ZodOptional<ZodCustom<Coordinate, Coordinate>>;
|
|
14705
|
+
interactive: ZodOptional<ZodDefault<ZodBoolean>>;
|
|
14144
14706
|
}, $strip>;
|
|
14145
14707
|
/** @internal */
|
|
14146
14708
|
declare const modelStateSchemaStrict: ZodObject<{
|
|
@@ -14161,6 +14723,9 @@ declare const modelStateSchemaStrict: ZodObject<{
|
|
|
14161
14723
|
clippingPlaneZOffset: ZodDefault<ZodCustom<number, number>>;
|
|
14162
14724
|
clippingPlaneTopColor: ZodDefault<ZodString>;
|
|
14163
14725
|
clippingPlaneTopVisible: ZodDefault<ZodBoolean>;
|
|
14726
|
+
castShadow: ZodDefault<ZodBoolean>;
|
|
14727
|
+
receiveShadow: ZodDefault<ZodBoolean>;
|
|
14728
|
+
clippingEnabled: ZodDefault<ZodBoolean>;
|
|
14164
14729
|
}, $strict>;
|
|
14165
14730
|
/**
|
|
14166
14731
|
* The serialized state of a 3D model, including its coordinate, rotation, and scale.
|
|
@@ -14176,7 +14741,14 @@ type TModelUpdateState = output<typeof modelStateUpdateSchema>;
|
|
|
14176
14741
|
declare const text3DUpdateStateSchema: ZodObject<{
|
|
14177
14742
|
visible: ZodOptional<ZodOptional<ZodBoolean>>;
|
|
14178
14743
|
color: ZodOptional<ZodOptional<ZodString>>;
|
|
14744
|
+
rotation: ZodOptional<ZodOptional<ZodNumber>>;
|
|
14179
14745
|
flipToFaceCamera: ZodOptional<ZodOptional<ZodBoolean>>;
|
|
14746
|
+
content: ZodOptional<ZodOptional<ZodString>>;
|
|
14747
|
+
align: ZodOptional<ZodOptional<ZodOptional<ZodEnum<{
|
|
14748
|
+
center: "center";
|
|
14749
|
+
left: "left";
|
|
14750
|
+
right: "right";
|
|
14751
|
+
}>>>>;
|
|
14180
14752
|
font: ZodOptional<ZodOptional<ZodOptional<ZodString>>>;
|
|
14181
14753
|
fontSize: ZodOptional<ZodOptional<ZodNumber>>;
|
|
14182
14754
|
outlineColor: ZodOptional<ZodOptional<ZodString>>;
|
|
@@ -14217,6 +14789,11 @@ declare const text3DStateSchemaStrict: ZodObject<{
|
|
|
14217
14789
|
id: ZodUnion<readonly [ZodString, ZodNumber]>;
|
|
14218
14790
|
content: ZodString;
|
|
14219
14791
|
rotation: ZodNumber;
|
|
14792
|
+
align: ZodOptional<ZodEnum<{
|
|
14793
|
+
center: "center";
|
|
14794
|
+
left: "left";
|
|
14795
|
+
right: "right";
|
|
14796
|
+
}>>;
|
|
14220
14797
|
type: ZodDefault<ZodLiteral<"text3d">>;
|
|
14221
14798
|
position: ZodCustom<Coordinate, Coordinate>;
|
|
14222
14799
|
}, $strict>;
|
|
@@ -14276,7 +14853,7 @@ type TWallsUpdateState = output<typeof wallsStateSchemaPartial>;
|
|
|
14276
14853
|
type MapElementToGetState = {
|
|
14277
14854
|
[Marker.__type]: ReadonlyDeep<TMarkerState>;
|
|
14278
14855
|
[Label.__type]: ReadonlyDeep<TLabelState>;
|
|
14279
|
-
[Shape.__type]: ReadonlyDeep<TShapeState>;
|
|
14856
|
+
[Shape$1.__type]: ReadonlyDeep<TShapeState>;
|
|
14280
14857
|
[Model.__type]: ReadonlyDeep<TModelState>;
|
|
14281
14858
|
[Path.__type]: ReadonlyDeep<TPathState>;
|
|
14282
14859
|
[PathSegment$1.__type]: ReadonlyDeep<TPathState>;
|
|
@@ -14299,7 +14876,7 @@ type MapElementToGetState = {
|
|
|
14299
14876
|
type MapElementToUpdateState = {
|
|
14300
14877
|
[Marker.__type]: TMarkerUpdateState;
|
|
14301
14878
|
[Label.__type]: TLabelUpdateState;
|
|
14302
|
-
[Shape.__type]: TShapeUpdateState;
|
|
14879
|
+
[Shape$1.__type]: TShapeUpdateState;
|
|
14303
14880
|
[Model.__type]: TModelUpdateState;
|
|
14304
14881
|
[Path.__type]: TPathUpdateState;
|
|
14305
14882
|
[PathSegment$1.__type]: TPathUpdateState;
|
|
@@ -14539,7 +15116,7 @@ declare class CameraTransform {
|
|
|
14539
15116
|
*
|
|
14540
15117
|
* Refer to the [Shapes Guide](https://developer.mappedin.com/web-sdk/shapes) for more information and interactive examples.
|
|
14541
15118
|
*/
|
|
14542
|
-
declare class Shape implements IFocusable {
|
|
15119
|
+
declare class Shape$1 implements IFocusable {
|
|
14543
15120
|
/**
|
|
14544
15121
|
* id of Shape
|
|
14545
15122
|
*/
|
|
@@ -14558,7 +15135,7 @@ declare class Shape implements IFocusable {
|
|
|
14558
15135
|
* @param instance The instance to check.
|
|
14559
15136
|
* @returns {boolean} True if the instance is a Shape, false otherwise.
|
|
14560
15137
|
*/
|
|
14561
|
-
static is(instance: object): instance is Shape;
|
|
15138
|
+
static is(instance: object): instance is Shape$1;
|
|
14562
15139
|
/** @internal */
|
|
14563
15140
|
get focusTarget(): this;
|
|
14564
15141
|
/**
|
|
@@ -14646,6 +15223,10 @@ type TClickPayload = {
|
|
|
14646
15223
|
* Interactive {@link Image3DView | 3D Image}s under the pointer.
|
|
14647
15224
|
*/
|
|
14648
15225
|
images?: Image3DView[];
|
|
15226
|
+
/**
|
|
15227
|
+
* Interactive {@link Text3DView | 3D Text}s under the pointer.
|
|
15228
|
+
*/
|
|
15229
|
+
text3ds?: Text3DView[];
|
|
14649
15230
|
/**
|
|
14650
15231
|
* Interactive {@link Label}s under the pointer.
|
|
14651
15232
|
*/
|
|
@@ -14665,7 +15246,7 @@ type TClickPayload = {
|
|
|
14665
15246
|
/**
|
|
14666
15247
|
* Interactive {@link Shape}s under the pointer.
|
|
14667
15248
|
*/
|
|
14668
|
-
shapes?: Shape[];
|
|
15249
|
+
shapes?: Shape$1[];
|
|
14669
15250
|
};
|
|
14670
15251
|
/**
|
|
14671
15252
|
* Represents the payload for a hover event on the map.
|
|
@@ -15031,7 +15612,7 @@ type MapDataElements = Space | MapObject | Door | Facade | Floor | FloorStack |
|
|
|
15031
15612
|
/**
|
|
15032
15613
|
* Elements created by the MapView.
|
|
15033
15614
|
*/
|
|
15034
|
-
type MapViewElements = Label | Marker | Model | Shape | Text3DView | Path | PathSegment$1 | Image3DView;
|
|
15615
|
+
type MapViewElements = Label | Marker | Model | Shape$1 | Text3DView | Path | PathSegment$1 | Image3DView;
|
|
15035
15616
|
/**
|
|
15036
15617
|
* Options for {@link Camera} animations on the map.
|
|
15037
15618
|
*/
|
|
@@ -15883,9 +16464,90 @@ type TAddModel = {
|
|
|
15883
16464
|
};
|
|
15884
16465
|
/**
|
|
15885
16466
|
* Options for controlling the behavior of a {@link Model}.
|
|
16467
|
+
*
|
|
16468
|
+
* ## Model clipping
|
|
16469
|
+
*
|
|
16470
|
+
* A model that represents a **building** is a closed shell: it sits over the venue and its
|
|
16471
|
+
* walls and roof hide the floors inside it. Set `clippingEnabled: true` to cut the model away
|
|
16472
|
+
* with a horizontal plane, so everything below the plane is drawn and everything above it is
|
|
16473
|
+
* removed — the familiar cut-away view of a building, looking down into the floor the user has
|
|
16474
|
+
* selected.
|
|
16475
|
+
*
|
|
16476
|
+
* Clipping is decided when the model is added — setting it later has no effect — and it
|
|
16477
|
+
* de-optimizes the model by disabling instancing, so enable it only on the models that need it.
|
|
16478
|
+
* Models added by {@link Models.all} enable it automatically when the venue marks them as
|
|
16479
|
+
* manifolded.
|
|
16480
|
+
*
|
|
16481
|
+
* The plane itself moves at runtime. `clippingPlaneZOffset` is the height of the cut, in meters
|
|
16482
|
+
* on the map's vertical axis — the same scale the floors use — and it defaults to `Infinity`,
|
|
16483
|
+
* which puts the plane above everything and so cuts nothing: set a finite height to see a cut.
|
|
16484
|
+
* `clippingPlaneTopColor` and `clippingPlaneTopVisible` style the exposed cut face.
|
|
16485
|
+
*
|
|
16486
|
+
* To follow the floor the user is on, read `getState(floor).altitude` — the floor's visual
|
|
16487
|
+
* height in the scene, which already includes the floor spacing of a multi-floor view — and use
|
|
16488
|
+
* it as the cut height.
|
|
16489
|
+
* @example Cut a building model open at the floor the user is on
|
|
16490
|
+
* ```ts
|
|
16491
|
+
* const building = mapView.Models.add(mapData.mapCenter, buildingUrl, {
|
|
16492
|
+
* clippingEnabled: true,
|
|
16493
|
+
* });
|
|
16494
|
+
*
|
|
16495
|
+
* function clipToCurrentFloor() {
|
|
16496
|
+
* const altitude = mapView.getState(mapView.currentFloor)?.altitude ?? 0;
|
|
16497
|
+
*
|
|
16498
|
+
* mapView.updateState(building, {
|
|
16499
|
+
* clippingPlaneZOffset: altitude + 0.05, // a hair above the floor, not through it
|
|
16500
|
+
* clippingPlaneTopColor: '#8899aa',
|
|
16501
|
+
* });
|
|
16502
|
+
* }
|
|
16503
|
+
*
|
|
16504
|
+
* clipToCurrentFloor();
|
|
16505
|
+
* mapView.on('floor-change', clipToCurrentFloor);
|
|
16506
|
+
* ```
|
|
15886
16507
|
*/
|
|
15887
16508
|
type TAddModelOptions = Omit<InitializeModelState$1, 'scale' | 'url'> & {
|
|
15888
16509
|
scale?: number | [number, number, number];
|
|
16510
|
+
/**
|
|
16511
|
+
* An id for the model, used as {@link Model.id} so it can be cross-referenced with the
|
|
16512
|
+
* data it came from — {@link Models.all} passes the venue's model id.
|
|
16513
|
+
*
|
|
16514
|
+
* It must be unique on the map. If it is already taken, or the call creates more than one
|
|
16515
|
+
* instance, the renderer's own id is used instead and a warning is logged.
|
|
16516
|
+
*/
|
|
16517
|
+
id?: string;
|
|
16518
|
+
/**
|
|
16519
|
+
* Whether the model should be cut away at its clipping plane, exposing the interior.
|
|
16520
|
+
*
|
|
16521
|
+
* This is the pre-release name of the promoted `clippingEnabled` option: it still works,
|
|
16522
|
+
* but logs a warning and is never forwarded to the renderer. Clipping is no longer
|
|
16523
|
+
* experimental — rename the key.
|
|
16524
|
+
* @deprecated Use `clippingEnabled` instead. This alias will be removed in a future version.
|
|
16525
|
+
*/
|
|
16526
|
+
EXPERIMENTAL_clippingEnabled?: boolean;
|
|
16527
|
+
};
|
|
16528
|
+
/**
|
|
16529
|
+
* Options for {@link Models.all}.
|
|
16530
|
+
* @interface
|
|
16531
|
+
*/
|
|
16532
|
+
type TModelsAllOptions = {
|
|
16533
|
+
/**
|
|
16534
|
+
* Resolves a venue model's `modelId` to a model URL or an inline base64 asset, for
|
|
16535
|
+
* entries that carry no `url` of their own.
|
|
16536
|
+
*
|
|
16537
|
+
* Models placed from the Mappedin 3D Assets Library store only the asset's `modelId`
|
|
16538
|
+
* (e.g. `'truck'`). The SDK does not bundle the library — pass the lookup and the
|
|
16539
|
+
* models resolve the way `Models.add` resolves an inline asset.
|
|
16540
|
+
*
|
|
16541
|
+
* @example Add venue models that reference the 3D Assets Library
|
|
16542
|
+
* ```ts
|
|
16543
|
+
* import * as assets from '@mappedin/3d-assets';
|
|
16544
|
+
*
|
|
16545
|
+
* const models = mapView.Models.all({
|
|
16546
|
+
* resolveModel: modelId => (assets as Record<string, string>)[modelId],
|
|
16547
|
+
* });
|
|
16548
|
+
* ```
|
|
16549
|
+
*/
|
|
16550
|
+
resolveModel?: (modelId: string) => string | undefined;
|
|
15889
16551
|
};
|
|
15890
16552
|
/**
|
|
15891
16553
|
* Options for adding a 3D text element to the map.
|
|
@@ -15895,7 +16557,9 @@ type TAddText3DOptions = AddText3DOptions$1;
|
|
|
15895
16557
|
/**
|
|
15896
16558
|
* Options for adding 3D text at an anchorable target (e.g., Coordinate).
|
|
15897
16559
|
*/
|
|
15898
|
-
type TAddText3DAnchorableOptions = AddText3DPointOptions$1
|
|
16560
|
+
type TAddText3DAnchorableOptions = AddText3DPointOptions$1 & {
|
|
16561
|
+
align?: 'left' | 'center' | 'right';
|
|
16562
|
+
};
|
|
15899
16563
|
/**
|
|
15900
16564
|
* Options for controlling the behavior of an {@link Image3DView}.
|
|
15901
16565
|
*/
|
|
@@ -16231,7 +16895,7 @@ interface UpdateGlobalState {
|
|
|
16231
16895
|
/**
|
|
16232
16896
|
* A map element that can be focused on by the camera.
|
|
16233
16897
|
*/
|
|
16234
|
-
type TFocusTarget = Coordinate | Space | Area | MapObject | Floor | FloorStack | Shape;
|
|
16898
|
+
type TFocusTarget = Coordinate | Space | Area | MapObject | Floor | FloorStack | Shape$1;
|
|
16235
16899
|
/**
|
|
16236
16900
|
* Associates MapData type strings with their corresponding classes.
|
|
16237
16901
|
*/
|
|
@@ -16260,7 +16924,7 @@ type TMapViewObjectTypes = {
|
|
|
16260
16924
|
[Label.__type]: Label;
|
|
16261
16925
|
[Marker.__type]: Marker;
|
|
16262
16926
|
[Model.__type]: Model;
|
|
16263
|
-
[Shape.__type]: Shape;
|
|
16927
|
+
[Shape$1.__type]: Shape$1;
|
|
16264
16928
|
[Path.__type]: Path;
|
|
16265
16929
|
[PathSegment$1.__type]: PathSegment$1;
|
|
16266
16930
|
[Image3DView.__type]: Image3DView;
|
|
@@ -16937,13 +17601,21 @@ type THydrateMapDataBundle = {
|
|
|
16937
17601
|
*/
|
|
16938
17602
|
declare const hydrateMapData: (backup: THydrateMapDataBundle | ParsedMVF, userOptions?: TGetMapDataOptions) => Promise<MapData>;
|
|
16939
17603
|
//#endregion
|
|
17604
|
+
//#region src/search/joined-words.d.ts
|
|
17605
|
+
type JoinedWordsSettings = {
|
|
17606
|
+
maxWords: number;
|
|
17607
|
+
name: boolean;
|
|
17608
|
+
tags: boolean;
|
|
17609
|
+
};
|
|
17610
|
+
//#endregion
|
|
16940
17611
|
//#region src/search/internal.d.ts
|
|
16941
17612
|
declare class InternalSearch {
|
|
16942
17613
|
#private;
|
|
16943
17614
|
private mapData;
|
|
16944
17615
|
private indexes;
|
|
16945
17616
|
private ready;
|
|
16946
|
-
|
|
17617
|
+
private joinedWords;
|
|
17618
|
+
constructor(mapData: MapData, joinedWords?: JoinedWordsSettings | null);
|
|
16947
17619
|
/**
|
|
16948
17620
|
* Populates the search indexes with the map data.
|
|
16949
17621
|
* @returns A promise that resolves when the indexes are populated.
|
|
@@ -17006,12 +17678,18 @@ type SearchResult = {
|
|
|
17006
17678
|
* that `undefined` is *not* a valid MiniSearch value — it would silently
|
|
17007
17679
|
* disable fuzzy if forwarded verbatim — so `applyMatchOptions()` drops it and
|
|
17008
17680
|
* the index default applies.
|
|
17681
|
+
*
|
|
17682
|
+
* The budget applies to folded terms: queries are accent-stripped, apostrophe-
|
|
17683
|
+
* stripped and lowercased before MiniSearch sees them.
|
|
17009
17684
|
*/
|
|
17010
17685
|
type Fuzzy = number;
|
|
17011
17686
|
/**
|
|
17012
17687
|
* Whether prefix (as-you-type) matching is enabled per search source. Mirrors
|
|
17013
17688
|
* MiniSearch's `prefix` option: a boolean, or a `(term, index, terms) => boolean`
|
|
17014
17689
|
* function.
|
|
17690
|
+
*
|
|
17691
|
+
* A callback receives the folded query terms (accent-stripped, apostrophe-
|
|
17692
|
+
* stripped, lowercased), not the raw input string.
|
|
17015
17693
|
*/
|
|
17016
17694
|
type Prefix$1 = SearchOptions$1['prefix'];
|
|
17017
17695
|
declare const searchOptionsSchema: ZodObject<{
|
|
@@ -17088,10 +17766,9 @@ declare class Search {
|
|
|
17088
17766
|
* @internal
|
|
17089
17767
|
*/
|
|
17090
17768
|
constructor(mapData: MapData, mapDataInternal: MapDataInternal, {
|
|
17091
|
-
enabled
|
|
17092
|
-
|
|
17093
|
-
|
|
17094
|
-
});
|
|
17769
|
+
enabled,
|
|
17770
|
+
joinedWords
|
|
17771
|
+
}?: Partial<Pick<TSearchOptions, 'enabled' | 'joinedWords'>>);
|
|
17095
17772
|
/**
|
|
17096
17773
|
* Use query to search for locations based on a string input:
|
|
17097
17774
|
*
|
|
@@ -18117,6 +18794,7 @@ type Style$1 = {
|
|
|
18117
18794
|
washOutAmount?: number;
|
|
18118
18795
|
washOutUseDepth?: boolean;
|
|
18119
18796
|
maxImageSize?: number;
|
|
18797
|
+
visibleThroughGeometry?: boolean;
|
|
18120
18798
|
};
|
|
18121
18799
|
declare class StyleComponent implements Style$1 {
|
|
18122
18800
|
#private;
|
|
@@ -18172,6 +18850,12 @@ declare class StyleComponent implements Style$1 {
|
|
|
18172
18850
|
washOutAmount: number;
|
|
18173
18851
|
washOutUseDepth: boolean;
|
|
18174
18852
|
maxImageSize?: number;
|
|
18853
|
+
/**
|
|
18854
|
+
* Whether this geometry renders on top of other geometry (depth test/write off).
|
|
18855
|
+
* Applied per geometry by the `RenderOrderSystem`, which also assigns the
|
|
18856
|
+
* render order that keeps it above the rest of the scene.
|
|
18857
|
+
*/
|
|
18858
|
+
visibleThroughGeometry: boolean;
|
|
18175
18859
|
constructor(style?: Partial<Style$1>);
|
|
18176
18860
|
}
|
|
18177
18861
|
//#endregion
|
|
@@ -18416,15 +19100,42 @@ type ModelStyle = {
|
|
|
18416
19100
|
*/
|
|
18417
19101
|
visibleThroughGeometry: boolean;
|
|
18418
19102
|
/**
|
|
18419
|
-
*
|
|
18420
|
-
*
|
|
19103
|
+
* Whether the model is cut away at its clipping plane, exposing the interior.
|
|
19104
|
+
*
|
|
19105
|
+
* Use this for models that represent a **building**: their walls and roof are a closed
|
|
19106
|
+
* shell over the venue, and clipping removes everything above `clippingPlaneZOffset` so
|
|
19107
|
+
* the floors inside the model stay visible — the familiar cut-away view of a building.
|
|
19108
|
+
* `clippingPlaneTopColor` and `clippingPlaneTopVisible` style the exposed cut face.
|
|
19109
|
+
*
|
|
19110
|
+
* Clipping is decided when the model is added: setting it later has no effect.
|
|
18421
19111
|
*
|
|
18422
19112
|
* Note: This will de-optimize the model by disabling instancing.
|
|
18423
19113
|
* @default false
|
|
18424
19114
|
*/
|
|
18425
|
-
|
|
19115
|
+
clippingEnabled: boolean;
|
|
18426
19116
|
/**
|
|
18427
|
-
*
|
|
19117
|
+
* Draw the model's GLB pieces as batches — one draw per material and attribute layout — instead of one draw per
|
|
19118
|
+
* piece. A model with hundreds of pieces and a handful of materials then costs a handful of draws.
|
|
19119
|
+
*
|
|
19120
|
+
* A batched model is **never instanced**: it draws its own batches on its own container, clipped or not, so placing
|
|
19121
|
+
* the same model again uploads another copy of its geometry and adds its draws again. Use it for models placed once
|
|
19122
|
+
* (a venue's buildings), not for models placed many times (trees, kiosks), which instancing draws more cheaply. A
|
|
19123
|
+
* `visibleThroughGeometry` model ignores it (its depth settings are per material, one-to-one with its meshes) with a
|
|
19124
|
+
* warning. Decided when the model is added. See ADR 0016.
|
|
19125
|
+
* @experimental
|
|
19126
|
+
* @default false
|
|
19127
|
+
*/
|
|
19128
|
+
EXPERIMENTAL_batchedDraw: boolean;
|
|
19129
|
+
/**
|
|
19130
|
+
* Height of the clipping plane on the map's vertical axis, in meters.
|
|
19131
|
+
*
|
|
19132
|
+
* The plane is horizontal and the world is cut at this height: everything below it is
|
|
19133
|
+
* drawn, everything above it is removed. It is the same vertical scale the floors use,
|
|
19134
|
+
* so a floor's `altitude` can be used directly as the cut height.
|
|
19135
|
+
*
|
|
19136
|
+
* `Infinity` — the default — puts the plane above everything, so nothing is cut. Set a
|
|
19137
|
+
* finite height to clip; it can be moved afterwards with
|
|
19138
|
+
* `mapView.updateState(model, { clippingPlaneZOffset })`.
|
|
18428
19139
|
* @default Infinity
|
|
18429
19140
|
*/
|
|
18430
19141
|
clippingPlaneZOffset: number;
|
|
@@ -18438,6 +19149,32 @@ type ModelStyle = {
|
|
|
18438
19149
|
* @default true
|
|
18439
19150
|
*/
|
|
18440
19151
|
clippingPlaneTopVisible: boolean;
|
|
19152
|
+
/**
|
|
19153
|
+
* Whether the model casts a shadow onto the map. Fixed when the model is created, because casting
|
|
19154
|
+
* is a layer on the batch's meshes: it cannot be changed on an existing model. A no-op while
|
|
19155
|
+
* shadows are disabled for the map.
|
|
19156
|
+
*
|
|
19157
|
+
* For instanced models the layer is per batch and this setting is part of the batch identity, so a
|
|
19158
|
+
* model that opts out is placed in its own batch (same URL and container, one extra draw call)
|
|
19159
|
+
* rather than changing what the instances sharing its batch do. A non-instanced model (created
|
|
19160
|
+
* with `visibleThroughGeometry` or `clippingEnabled`) owns its mesh, so the layer
|
|
19161
|
+
* applies to that mesh alone — no batch to move into and no extra draw call.
|
|
19162
|
+
* @default true
|
|
19163
|
+
*/
|
|
19164
|
+
castShadow: boolean;
|
|
19165
|
+
/**
|
|
19166
|
+
* Whether the model receives shadows cast onto it. Fixed when the model is created, because
|
|
19167
|
+
* receiving is a material state that decides how the model's clones are compiled — the patch
|
|
19168
|
+
* cannot be removed from an already-compiled material. A no-op while shadows are disabled for the
|
|
19169
|
+
* map: the batches' material clones are then never patched, so nothing receives.
|
|
19170
|
+
*
|
|
19171
|
+
* For instanced models it is part of the batch identity too: models that do not receive are placed
|
|
19172
|
+
* in their own unpatched batch instead of sharing the patched one — one extra draw call per
|
|
19173
|
+
* distinct opt-out shape. A non-instanced model owns its materials, so it is simply created with
|
|
19174
|
+
* unpatched clones.
|
|
19175
|
+
* @default true
|
|
19176
|
+
*/
|
|
19177
|
+
receiveShadow: boolean;
|
|
18441
19178
|
};
|
|
18442
19179
|
declare class ModelStyleComponnet implements Partial<ModelStyle> {
|
|
18443
19180
|
#private;
|
|
@@ -18453,10 +19190,13 @@ declare class ModelStyleComponnet implements Partial<ModelStyle> {
|
|
|
18453
19190
|
material?: ModelStyle['material'];
|
|
18454
19191
|
rotation?: [number, number, number];
|
|
18455
19192
|
scale?: [number, number, number];
|
|
18456
|
-
|
|
19193
|
+
clippingEnabled: boolean;
|
|
19194
|
+
EXPERIMENTAL_batchedDraw: boolean;
|
|
18457
19195
|
clippingPlaneZOffset: number;
|
|
18458
19196
|
clippingPlaneTopColor?: string;
|
|
18459
19197
|
clippingPlaneTopVisible: boolean;
|
|
19198
|
+
castShadow: boolean;
|
|
19199
|
+
receiveShadow: boolean;
|
|
18460
19200
|
get visibleThroughGeometry(): boolean;
|
|
18461
19201
|
set visibleThroughGeometry(value: boolean);
|
|
18462
19202
|
constructor(init?: Partial<ModelStyle>);
|
|
@@ -18600,6 +19340,14 @@ type FeatureCollectionState = {
|
|
|
18600
19340
|
desaturateUseDepth?: boolean;
|
|
18601
19341
|
washOutAmount?: number;
|
|
18602
19342
|
washOutUseDepth?: boolean;
|
|
19343
|
+
/**
|
|
19344
|
+
* When true, renders every feature in the collection on top of other geometry
|
|
19345
|
+
* by disabling depth testing. Cascades to all children, which are detached
|
|
19346
|
+
* from the shared batched mesh so the depth state does not leak to siblings.
|
|
19347
|
+
*
|
|
19348
|
+
* @default false
|
|
19349
|
+
*/
|
|
19350
|
+
visibleThroughGeometry?: boolean;
|
|
18603
19351
|
/**
|
|
18604
19352
|
* The position of the feature collection as a GeoJSON Position `[lon, lat]`,
|
|
18605
19353
|
* computed from the centroid of its child features. Vertical offset is a
|
|
@@ -18874,7 +19622,29 @@ declare class EntityBatchedMesh extends BatchedMesh {
|
|
|
18874
19622
|
[key: number]: string | number;
|
|
18875
19623
|
};
|
|
18876
19624
|
detached?: boolean;
|
|
19625
|
+
/**
|
|
19626
|
+
* Authored colour of the source GLB material, used when no per-instance override applies. Model batches
|
|
19627
|
+
* only; mirrors the `InstancedMesh` contract.
|
|
19628
|
+
*/
|
|
19629
|
+
originalColor?: Color;
|
|
19630
|
+
/**
|
|
19631
|
+
* Entity this batch draws, for a model that owns its container (any batched model). Picking and the
|
|
19632
|
+
* interaction system's clipped-region filter read it. Model batches only.
|
|
19633
|
+
*/
|
|
19634
|
+
entityId?: string;
|
|
18877
19635
|
};
|
|
19636
|
+
/**
|
|
19637
|
+
* Assigned by three's BatchedMesh constructor / setColorAt but not present in @types/three.
|
|
19638
|
+
* `declare` emits nothing, so it cannot overwrite the value three set in super().
|
|
19639
|
+
*/
|
|
19640
|
+
protected _colorsTexture: DataTexture | null;
|
|
19641
|
+
/**
|
|
19642
|
+
* Perf: three 0.178 WebGLRenderer.setProgram checks `object.colorTexture` for batched
|
|
19643
|
+
* meshes, but BatchedMesh only defines `_colorsTexture` — so `undefined !== null` is always true and
|
|
19644
|
+
* every batched mesh without per-instance colors forces needsProgramChange -> getProgram on every
|
|
19645
|
+
* draw. Expose the getter so the check compares the real texture.
|
|
19646
|
+
*/
|
|
19647
|
+
get colorTexture(): DataTexture | null;
|
|
18878
19648
|
}
|
|
18879
19649
|
declare class EntityMergedMesh extends Mesh {
|
|
18880
19650
|
type: "entityMergedMesh";
|
|
@@ -19022,6 +19792,16 @@ type GeometryState = {
|
|
|
19022
19792
|
* The width of the border
|
|
19023
19793
|
*/
|
|
19024
19794
|
borderWidth?: number;
|
|
19795
|
+
/**
|
|
19796
|
+
* When true, the geometry renders on top of other geometry: depth testing and
|
|
19797
|
+
* depth writing are disabled and it is given an always-on-top render order.
|
|
19798
|
+
*
|
|
19799
|
+
* Setting this detaches the geometry from its shared batched mesh, because the
|
|
19800
|
+
* depth state belongs to the material.
|
|
19801
|
+
*
|
|
19802
|
+
* @default false
|
|
19803
|
+
*/
|
|
19804
|
+
visibleThroughGeometry?: boolean;
|
|
19025
19805
|
};
|
|
19026
19806
|
declare class MeshComponent {
|
|
19027
19807
|
#private;
|
|
@@ -19108,16 +19888,16 @@ type ModelState = {
|
|
|
19108
19888
|
interactive: boolean;
|
|
19109
19889
|
} & Partial<Omit<ModelStyle, 'rotation' | 'scale'>> & Pick<ModelStyle, 'rotation' | 'scale'>;
|
|
19110
19890
|
/**
|
|
19111
|
-
*
|
|
19891
|
+
* Initial state for a model, including its transform, appearance and clipping.
|
|
19112
19892
|
* @interface
|
|
19113
|
-
* Note:
|
|
19893
|
+
* Note: `clippingEnabled` and `visibleThroughGeometry` are passed via the style, not as GeoJSON feature properties.
|
|
19114
19894
|
*/
|
|
19115
19895
|
type InitializeModelState$2 = Omit<Partial<ModelState>, 'id' | 'type' | 'parent' | 'position'>;
|
|
19116
19896
|
/**
|
|
19117
19897
|
* updatable model state
|
|
19118
19898
|
* @interface
|
|
19119
19899
|
*/
|
|
19120
|
-
type UpdateModelState = Omit<InitializeModelState$2, 'url'> & {
|
|
19900
|
+
type UpdateModelState = Omit<InitializeModelState$2, 'url' | 'clippingEnabled'> & {
|
|
19121
19901
|
position?: Position$2;
|
|
19122
19902
|
};
|
|
19123
19903
|
declare class ModelComponent {
|
|
@@ -19144,8 +19924,9 @@ declare class ModelComponent {
|
|
|
19144
19924
|
feature: Feature<Point, ModelProperties>;
|
|
19145
19925
|
instanceIndex?: number;
|
|
19146
19926
|
/**
|
|
19147
|
-
* If true, this model
|
|
19148
|
-
*
|
|
19927
|
+
* If true, this model draws on its own container instead of the shared instanced one: cloned meshes for
|
|
19928
|
+
* `visibleThroughGeometry` or `clippingEnabled`, or batches for `EXPERIMENTAL_batchedDraw` (ADR 0016).
|
|
19929
|
+
* Set at creation time.
|
|
19149
19930
|
* Cannot be changed at runtime.
|
|
19150
19931
|
*/
|
|
19151
19932
|
instancingDisabled: boolean;
|
|
@@ -19571,6 +20352,12 @@ declare class PathComponent {
|
|
|
19571
20352
|
readonly type = "path";
|
|
19572
20353
|
mesh: PatMeshContainer;
|
|
19573
20354
|
material?: PathMaterial;
|
|
20355
|
+
/**
|
|
20356
|
+
* The main path mesh (`name === 'path'`), set by `buildPath`. It is the only child that can be placed on
|
|
20357
|
+
* `RENDER_LAYERS.ALWAYS_ON_TOP_PATHS` (when `visibleThroughGeometry`), so the per-frame on-top count
|
|
20358
|
+
* reads it directly instead of scanning children.
|
|
20359
|
+
*/
|
|
20360
|
+
pathObject?: PathMesh;
|
|
19574
20361
|
geometry?: BufferGeometry;
|
|
19575
20362
|
outline?: LineSegments;
|
|
19576
20363
|
feature: FeatureCollection<Point, PathProperties>;
|
|
@@ -19779,6 +20566,10 @@ type Text3DState$1 = {
|
|
|
19779
20566
|
* Content of the text3d
|
|
19780
20567
|
*/
|
|
19781
20568
|
content: string;
|
|
20569
|
+
/**
|
|
20570
|
+
* Horizontal alignment of multi-line text: 'left' | 'center' | 'right'.
|
|
20571
|
+
*/
|
|
20572
|
+
align?: 'left' | 'center' | 'right';
|
|
19782
20573
|
/**
|
|
19783
20574
|
* Rotation of the text in degrees clockwise from North.
|
|
19784
20575
|
*/
|
|
@@ -19792,10 +20583,10 @@ type Text3DState$1 = {
|
|
|
19792
20583
|
*/
|
|
19793
20584
|
type InitializeText3DState$1 = Partial<Omit<Text3DState$1, 'id' | 'type'>>;
|
|
19794
20585
|
/**
|
|
19795
|
-
* At this moment updating text margin,
|
|
20586
|
+
* At this moment updating text margin, maxWidth, and maxHeight (text-area-only fields) are not supported.
|
|
19796
20587
|
* @interface
|
|
19797
20588
|
*/
|
|
19798
|
-
type UpdatableText3DState = Omit<InitializeText3DState$1, 'margin' | '
|
|
20589
|
+
type UpdatableText3DState = Omit<InitializeText3DState$1, 'margin' | 'maxWidth' | 'maxHeight'>;
|
|
19799
20590
|
type Text3DProperties = {
|
|
19800
20591
|
id: string;
|
|
19801
20592
|
content: string;
|
|
@@ -19806,6 +20597,7 @@ type Text3DProperties = {
|
|
|
19806
20597
|
*/
|
|
19807
20598
|
type AddText3DOptions$2 = {
|
|
19808
20599
|
appearance?: Partial<InitializeText3DState$1>;
|
|
20600
|
+
interactive?: boolean;
|
|
19809
20601
|
};
|
|
19810
20602
|
declare class Text3DComponent {
|
|
19811
20603
|
mesh: Geometry3DObject3D;
|
|
@@ -20093,9 +20885,9 @@ type ComponentTypeMap$1 = {
|
|
|
20093
20885
|
clippingPlane: ClippingPlaneComponent;
|
|
20094
20886
|
slope: SlopeComponent;
|
|
20095
20887
|
};
|
|
20096
|
-
declare class Geometry3D<M$1 extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I extends InteractionComponent = InteractionComponent, T$1 extends MappedComponentType<M$1> = MappedComponentType<M$1>, O extends OutlineComponent | undefined = OutlineComponent | undefined, F$1 extends FocusableComponent | undefined = FocusableComponent | undefined, TX extends TextureComponent | undefined = TextureComponent | undefined, B extends BorderComponent | undefined = BorderComponent | undefined, C extends ClippingPlaneComponent | undefined = ClippingPlaneComponent | undefined, Sl extends SlopeComponent | undefined = SlopeComponent | undefined> {
|
|
20888
|
+
declare class Geometry3D<M$1 extends MeshComponentTypes = MeshComponent, S extends StyleComponent | Text3DStyleComponent | ModelStyleComponnet = StyleComponent, I$1 extends InteractionComponent = InteractionComponent, T$1 extends MappedComponentType<M$1> = MappedComponentType<M$1>, O extends OutlineComponent | undefined = OutlineComponent | undefined, F$1 extends FocusableComponent | undefined = FocusableComponent | undefined, TX extends TextureComponent | undefined = TextureComponent | undefined, B extends BorderComponent | undefined = BorderComponent | undefined, C extends ClippingPlaneComponent | undefined = ClippingPlaneComponent | undefined, Sl extends SlopeComponent | undefined = SlopeComponent | undefined> {
|
|
20097
20889
|
id: string | number;
|
|
20098
|
-
components: [M$1, S, I?, O?, F$1?, B?, TX?, C?, Sl?];
|
|
20890
|
+
components: [M$1, S, I$1?, O?, F$1?, B?, TX?, C?, Sl?];
|
|
20099
20891
|
getComponent<K$1 extends keyof ComponentTypeMap$1>(type: K$1): ComponentTypeMap$1[K$1] | undefined;
|
|
20100
20892
|
/**
|
|
20101
20893
|
* Parent geometry group ID
|
|
@@ -20393,8 +21185,11 @@ declare class Renderer {
|
|
|
20393
21185
|
* @param renderTarget {null or WebGLRenderTarget}
|
|
20394
21186
|
* @param scene {Scene}
|
|
20395
21187
|
* @param sceneCamera {Camera}
|
|
21188
|
+
* @param renderAlwaysOnTop Whether to run the second, always-on-top pass
|
|
21189
|
+
* (`RENDER_LAYERS.ALWAYS_ON_TOP_PATHS`). Callers pass `false` when nothing in the scene
|
|
21190
|
+
* is on that layer: three still walks the whole scene graph for an empty layer pass.
|
|
20396
21191
|
*/
|
|
20397
|
-
renderFullScene(scene: Scene, sceneCamera: Camera$1): void;
|
|
21192
|
+
renderFullScene(scene: Scene, sceneCamera: Camera$1, renderAlwaysOnTop?: boolean): void;
|
|
20398
21193
|
clear(): void;
|
|
20399
21194
|
/**
|
|
20400
21195
|
* Set the size of the renderer, composer, and all its internal buffers.
|
|
@@ -20506,6 +21301,12 @@ declare class InteractionSystem extends PubSub<InteractionEvents> {
|
|
|
20506
21301
|
private onPointerMove;
|
|
20507
21302
|
tapsControl: TapsController;
|
|
20508
21303
|
getThreeDIntersectsFromXY(point: Vector2): Intersection<Object3D<Object3DEventMap>>[];
|
|
21304
|
+
/**
|
|
21305
|
+
* A hit on a model that nothing can interact with. `_hitBoxes` already leaves such models out, so
|
|
21306
|
+
* this only matches an instance of a shared batch that stays raycastable because another model on it
|
|
21307
|
+
* is interactive — the pointer goes through that instance to whatever is behind it.
|
|
21308
|
+
*/
|
|
21309
|
+
private isNonInteractiveModel;
|
|
20509
21310
|
getGroupContainerIntersectsFromXY(point: Vector2): any;
|
|
20510
21311
|
private onPointerDown;
|
|
20511
21312
|
private clickTimeout;
|
|
@@ -21040,6 +21841,16 @@ declare class CameraSystem extends PubSub<CameraEvents> {
|
|
|
21040
21841
|
*/
|
|
21041
21842
|
setPosition: (x: number, y: number) => void;
|
|
21042
21843
|
private updateCameraPosition;
|
|
21844
|
+
/**
|
|
21845
|
+
* Clamps a centre to the pan bounds, exactly as {@link setCenter} would, without moving the camera.
|
|
21846
|
+
* Lets another camera driver (MapLibre in interleaved mode) stay inside the same bounds.
|
|
21847
|
+
*
|
|
21848
|
+
* @param longitude Proposed centre longitude, degrees.
|
|
21849
|
+
* @param latitude Proposed centre latitude, degrees.
|
|
21850
|
+
* @returns The clamped `[longitude, latitude]`, or `undefined` if the centre is already inside.
|
|
21851
|
+
* @hidden
|
|
21852
|
+
*/
|
|
21853
|
+
clampCenterToPanBounds(longitude: number, latitude: number): [number, number] | undefined;
|
|
21043
21854
|
/**
|
|
21044
21855
|
* Tilts the camera up or down by some number of radians. Bounded by minTilt and maxTilt.
|
|
21045
21856
|
*
|
|
@@ -21335,6 +22146,12 @@ declare class Camera$2 extends PubSub<{
|
|
|
21335
22146
|
* @param center The center in [longitude, latitude] degrees.
|
|
21336
22147
|
*/
|
|
21337
22148
|
setCenter(center: Position$2): void;
|
|
22149
|
+
/**
|
|
22150
|
+
* @internal
|
|
22151
|
+
* Run several camera setters as one update: at most one `camera-change` is published (synchronously,
|
|
22152
|
+
* before this returns) and one render is requested.
|
|
22153
|
+
*/
|
|
22154
|
+
batch(fn: () => void): void;
|
|
21338
22155
|
/**
|
|
21339
22156
|
* Current camera zoom in mercator zoom level units.
|
|
21340
22157
|
*/
|
|
@@ -21901,6 +22718,17 @@ declare class GeometryInFocusSystem extends PubSub<{
|
|
|
21901
22718
|
private screenBoundsMap;
|
|
21902
22719
|
private screenDiagonal;
|
|
21903
22720
|
private lastPublishedEntities?;
|
|
22721
|
+
/** View-projection matrix used by the last compute(). */
|
|
22722
|
+
private lastComputedVP;
|
|
22723
|
+
private hasComputed;
|
|
22724
|
+
/** Set when the focusable set changed since the last compute(). */
|
|
22725
|
+
private focusablesChangedSinceCompute;
|
|
22726
|
+
private lastComputeTime;
|
|
22727
|
+
private trailingTimer?;
|
|
22728
|
+
private clipPool;
|
|
22729
|
+
private clipScratch;
|
|
22730
|
+
private screenPool;
|
|
22731
|
+
private screenScratch;
|
|
21904
22732
|
constructor(state: RendererState, camera: Camera$1);
|
|
21905
22733
|
resize(): void;
|
|
21906
22734
|
/**
|
|
@@ -22243,45 +23071,91 @@ declare class Debug$1 {
|
|
|
22243
23071
|
}
|
|
22244
23072
|
//#endregion
|
|
22245
23073
|
//#region ../renderer-three/src/systems/2d-occlusion/system.d.ts
|
|
23074
|
+
/**
|
|
23075
|
+
* Hides 2D entities (labels, markers) that sit behind 3D occluder geometry by writing `UI.isOccluded`.
|
|
23076
|
+
*
|
|
23077
|
+
* Each pass renders the occluders into a half-resolution id texture (the picking pass), then hands the pending
|
|
23078
|
+
* entities' projected pixels to a {@link SampleReadback}, which samples that texture on the GPU and reads only those
|
|
23079
|
+
* pixels back without stalling. Results are applied on a later frame. See `ARCHITECTURE.md` in this directory.
|
|
23080
|
+
*/
|
|
22246
23081
|
declare class Occlusion2DSystem {
|
|
22247
23082
|
private state;
|
|
22248
23083
|
private renderer;
|
|
22249
23084
|
private renderService;
|
|
22250
|
-
private pickingTexture?;
|
|
22251
|
-
private pickingMaterial;
|
|
22252
|
-
private pixelBuffer?;
|
|
22253
|
-
private width;
|
|
22254
|
-
private height;
|
|
22255
|
-
private scale;
|
|
22256
|
-
private color;
|
|
22257
23085
|
private convertTo3DMapPosition;
|
|
22258
23086
|
private destroyed;
|
|
22259
23087
|
private enabled;
|
|
22260
23088
|
backgroundId: number;
|
|
23089
|
+
/** Last occluder id handed out by {@link reserveOccluderId}. */
|
|
23090
|
+
private color;
|
|
23091
|
+
private pickingTexture?;
|
|
23092
|
+
private pickingMaterial;
|
|
23093
|
+
/** Reused clear colour for the picking pass, set to {@link backgroundId}. */
|
|
23094
|
+
private readonly clearColor;
|
|
23095
|
+
/** GPU sample-pack + PBO readback of the pending entities' picking-texture pixels. */
|
|
23096
|
+
private readback;
|
|
22261
23097
|
/**
|
|
22262
|
-
*
|
|
23098
|
+
* Snapshot of the entities driving the in-flight read: sample `i` belongs to entity `i`. Applying results walks
|
|
23099
|
+
* this list (not `geometry2DsInScene`), so entities added or removed mid-read can't misalign samples.
|
|
22263
23100
|
*/
|
|
22264
|
-
private
|
|
22265
|
-
|
|
23101
|
+
private pendingEntities;
|
|
23102
|
+
activeOccluders: Set<unknown>;
|
|
23103
|
+
private framesSinceLastUpdate;
|
|
22266
23104
|
constructor(state: RendererState, convertTo3DMapPosition: (position: Position) => Vector3, renderer?: Renderer);
|
|
22267
23105
|
reserveOccluderId(): number;
|
|
22268
23106
|
enable(): void;
|
|
22269
23107
|
disable(): void;
|
|
22270
23108
|
resize: () => void;
|
|
22271
|
-
private shouldShowByXY;
|
|
22272
|
-
activeOccluders: Set<unknown>;
|
|
22273
|
-
private framesSinceLastUpdate;
|
|
22274
23109
|
/**
|
|
22275
|
-
*
|
|
22276
|
-
* {@link
|
|
22277
|
-
*
|
|
22278
|
-
*
|
|
22279
|
-
* regression harness (`?e2e=true`) the throttle is bypassed so every
|
|
22280
|
-
* render produces a deterministic occlusion state.
|
|
23110
|
+
* Per-frame entry point called by the render loop. Applies the in-flight read once the GPU has finished it, then
|
|
23111
|
+
* (every {@link OCCLUSION_SKIP_FRAMES} calls, or every call under the visual test harness) starts the next one.
|
|
23112
|
+
* Polling from the render loop keeps the CPU work frame-aligned, unlike `readRenderTargetPixelsAsync`, which polls
|
|
23113
|
+
* its fence with `setTimeout` and resumes in a microtask detached from the frame.
|
|
22281
23114
|
*/
|
|
22282
23115
|
update: () => void;
|
|
23116
|
+
/**
|
|
23117
|
+
* Kick off an occlusion pass immediately, bypassing the frame throttle. Still asynchronous: the results are
|
|
23118
|
+
* applied on a later {@link update} once the GPU finishes. A no-op while a read is in flight.
|
|
23119
|
+
*/
|
|
22283
23120
|
updateImmediately: () => void;
|
|
23121
|
+
/**
|
|
23122
|
+
* Called after the WebGL context was lost and restored. The readback's PBO and fence are raw GL objects of the
|
|
23123
|
+
* dead context, so drop them (and the in-flight snapshot); the next pass reallocates. three.js rebuilds the picking
|
|
23124
|
+
* texture and materials itself.
|
|
23125
|
+
*/
|
|
23126
|
+
contextRestored(): void;
|
|
22284
23127
|
destroy(): void;
|
|
23128
|
+
/** Rebuilds dirty occluders, snapshots the pending entities, renders the picking pass and dispatches the read. */
|
|
23129
|
+
private beginPass;
|
|
23130
|
+
/**
|
|
23131
|
+
* Records which occluders are in the scene ({@link activeOccluders}) and (re)builds the mesh of any occluder whose
|
|
23132
|
+
* feature changed.
|
|
23133
|
+
*/
|
|
23134
|
+
private refreshOccluders;
|
|
23135
|
+
private buildOccluderMesh;
|
|
23136
|
+
private createOccluderMesh;
|
|
23137
|
+
/**
|
|
23138
|
+
* Applies the id to the geometry which is encoded as a color
|
|
23139
|
+
*/
|
|
23140
|
+
private applyId;
|
|
23141
|
+
/**
|
|
23142
|
+
* Snapshots the eligible 2D entities (occlusion enabled, occluder in the scene) into {@link pendingEntities}, and
|
|
23143
|
+
* un-occludes entities whose occlusion component is disabled since they won't get a sample.
|
|
23144
|
+
*
|
|
23145
|
+
* @returns Number of entities queued for sampling.
|
|
23146
|
+
*/
|
|
23147
|
+
private collectPendingEntities;
|
|
23148
|
+
/** Writes each pending entity's projected picking-texture pixel into the readback's positions buffer. */
|
|
23149
|
+
private writePositions;
|
|
23150
|
+
/** Renders the occluder layer into the picking texture, so each texel holds the nearest occluder's id. */
|
|
23151
|
+
private renderPickingPass;
|
|
23152
|
+
/** Applies the in-flight read once it completes; a stale or failed read is consumed without being applied. */
|
|
23153
|
+
private pollReadback;
|
|
23154
|
+
/**
|
|
23155
|
+
* Sets `isOccluded` on each snapshotted entity from its sample. Re-checks `enabled`: a component disabled while
|
|
23156
|
+
* the read was in flight means the consumer asked for the entity to show, so the stale sample is ignored.
|
|
23157
|
+
*/
|
|
23158
|
+
private applyResults;
|
|
22285
23159
|
}
|
|
22286
23160
|
//#endregion
|
|
22287
23161
|
//#region ../renderer-three/src/systems/geometry-disposal/system.d.ts
|
|
@@ -22356,6 +23230,15 @@ declare class RenderOrderSystem {
|
|
|
22356
23230
|
*/
|
|
22357
23231
|
getOrder(object: object): number | undefined;
|
|
22358
23232
|
update(): void;
|
|
23233
|
+
/**
|
|
23234
|
+
* Applies always-on-top depth settings and render order for a single geometry
|
|
23235
|
+
* (a shape feature) whose style opted into `visibleThroughGeometry`.
|
|
23236
|
+
*
|
|
23237
|
+
* Runs off `StyleComponent.dirty` (the draw system clears it later in the frame,
|
|
23238
|
+
* after this system). A mesh that is not loaded yet is picked up on the next frame
|
|
23239
|
+
* because the style stays dirty until the draw system consumes it.
|
|
23240
|
+
*/
|
|
23241
|
+
private updateVisibleThroughGeometry;
|
|
22359
23242
|
/**
|
|
22360
23243
|
* Applies render order to a model component's mesh
|
|
22361
23244
|
* @param modelComponent - The model component to apply render order to
|
|
@@ -22395,6 +23278,15 @@ declare class ClippingPlaneSystem {
|
|
|
22395
23278
|
dirty: boolean;
|
|
22396
23279
|
constructor(rendererState: RendererState);
|
|
22397
23280
|
update(): void;
|
|
23281
|
+
/**
|
|
23282
|
+
* Builds the clipped rendering of a model: the clipped children, the hole-fill cap and the
|
|
23283
|
+
* stencil counting passes.
|
|
23284
|
+
* @param meshComponent - The model's mesh component
|
|
23285
|
+
* @param clippingPlaneComponent - The model's clipping plane component
|
|
23286
|
+
* @param receiveShadow - Whether the model receives shadows (`ModelStyle.receiveShadow`). The cap is
|
|
23287
|
+
* the model's visible cut surface, so it is patched as a receiver only when the model is one; a cap
|
|
23288
|
+
* built patched for a model that opted out would show a shadowed cut surface.
|
|
23289
|
+
*/
|
|
22398
23290
|
private process;
|
|
22399
23291
|
/**
|
|
22400
23292
|
* Creates the stencil counting passes that mark cross-section pixels.
|
|
@@ -22581,7 +23473,15 @@ declare class ShadowsSystem {
|
|
|
22581
23473
|
* tall casters. 1 when the default range already fits. Not applied to the adaptive `'auto'` bias.
|
|
22582
23474
|
*/
|
|
22583
23475
|
private depthScale;
|
|
23476
|
+
/** Depth range of the cached caster bounds written by `updateBoundsDepthRange`: reused, never re-created. */
|
|
23477
|
+
private rangeNear;
|
|
23478
|
+
private rangeFar;
|
|
22584
23479
|
private readonly scratchBox;
|
|
23480
|
+
/** Uniforms shared by every patched model material (see `receiver-patch.ts`). */
|
|
23481
|
+
private readonly receiverContext;
|
|
23482
|
+
/** Reused by `groundShadowFitHalfSize` for the light camera's two view-plane axes. */
|
|
23483
|
+
private readonly scratchRight;
|
|
23484
|
+
private readonly scratchUp;
|
|
22585
23485
|
private shadowPlane;
|
|
22586
23486
|
private shadowPlaneMaterial;
|
|
22587
23487
|
private shadowPlaneEnabled;
|
|
@@ -22606,8 +23506,6 @@ declare class ShadowsSystem {
|
|
|
22606
23506
|
private readonly shadowResolutionSizes;
|
|
22607
23507
|
private readonly shadowResolutionZoomThresholds;
|
|
22608
23508
|
constructor(state: RendererState, rendererService: Renderer, cameraOrbit: Object3D, options?: ShadowsOptions$1, ladder?: ShadowLadder);
|
|
22609
|
-
/** Depth-only material for the shadow pass: receivers sample the depth attachment, never colour. */
|
|
22610
|
-
private static createDepthMaterial;
|
|
22611
23509
|
/**
|
|
22612
23510
|
* Creates a WebGLRenderTarget for shadow mapping with the specified size
|
|
22613
23511
|
* @param size - The width and height of the render target in pixels
|
|
@@ -22700,11 +23598,23 @@ declare class ShadowsSystem {
|
|
|
22700
23598
|
private matrix;
|
|
22701
23599
|
private updateLightMatrix;
|
|
22702
23600
|
/**
|
|
22703
|
-
*
|
|
22704
|
-
*
|
|
22705
|
-
*
|
|
23601
|
+
* Writes the depth range the cached caster bounds and the ground shadows they cast span along the light's
|
|
23602
|
+
* view direction into `rangeNear` / `rangeFar`.
|
|
23603
|
+
*
|
|
23604
|
+
* Both ends are per corner, and per corner they are the union of the corner *and* its landing point, not the
|
|
23605
|
+
* casters widened by one constant. The light's view direction is the sun direction, so a corner's landing point
|
|
23606
|
+
* sits `(corner.z − plane z) / sin(sun elevation)` further along the view direction than the corner
|
|
23607
|
+
* (`dir · (p + t·dir) = dir · p + t`), and that distance differs per corner — as does its sign, since a corner
|
|
23608
|
+
* below the plane lands nearer the light. Uniting per corner is what keeps the range tight and complete;
|
|
23609
|
+
* widening the whole box by a single maximum leaves the deepest corner's landing point outside the far plane
|
|
23610
|
+
* whenever that corner is not also the one furthest from the light.
|
|
23611
|
+
*
|
|
23612
|
+
* A ray is clamped to half the shadow plane's size both ways: the plane is the only surface a shadow lands on,
|
|
23613
|
+
* and a sun at or below the horizon would otherwise ask for an unbounded far plane. Eight corner projections,
|
|
23614
|
+
* no scene walk, no allocation — the result lands in the two fields rather than a tuple so the per-frame path
|
|
23615
|
+
* creates nothing.
|
|
22706
23616
|
*/
|
|
22707
|
-
private
|
|
23617
|
+
private updateBoundsDepthRange;
|
|
22708
23618
|
/**
|
|
22709
23619
|
* Marks the cached shadow-caster bounds stale (and the shadow map with it). Call when casters are added,
|
|
22710
23620
|
* removed, moved or resized: the scene's 3D entities change, a model loads, an altitude or height
|
|
@@ -22728,6 +23638,41 @@ declare class ShadowsSystem {
|
|
|
22728
23638
|
*/
|
|
22729
23639
|
private updateAutoShadowResolution;
|
|
22730
23640
|
private updateAutoLightSize;
|
|
23641
|
+
/**
|
|
23642
|
+
* Frustum half-size that contains every shadow the scene can draw. The casters are enough: the light sits on
|
|
23643
|
+
* `shadowCenter − sunDirection × sunDistance` and looks at the centre, so its view direction *is* the sun
|
|
23644
|
+
* direction, and a shadow's landing point is the caster's own point moved along the sun. Moving along the view
|
|
23645
|
+
* direction leaves both view-plane coordinates unchanged (`sunDirection · right = sunDirection · up = 0`),
|
|
23646
|
+
* so a landing point projects to the same place as the caster it fell from — at any height, on any receiver.
|
|
23647
|
+
* Containing the casters therefore contains every receiver the shadow map can shade; reserving more would
|
|
23648
|
+
* spend texels on ground no shadow reaches.
|
|
23649
|
+
*
|
|
23650
|
+
* This is what makes the fit independent of where the camera target is. The light is centred on the
|
|
23651
|
+
* camera's snapped cell (`updateSnap`), so its axis is routinely tens of metres off the venue; a fit
|
|
23652
|
+
* measured about the casters' *own* centre (ADR 0013's `1.15 × bounding-sphere radius`) therefore contains
|
|
23653
|
+
* the venue only while the camera happens to be near it, and every shadow on screen goes out at once past the
|
|
23654
|
+
* offset the 1.15 margin absorbs (SDK-516). Measuring from the centre the light actually sits on removes that
|
|
23655
|
+
* coupling.
|
|
23656
|
+
*
|
|
23657
|
+
* The light camera's view-plane axes are the two directions the orthographic box measures in. Read from its
|
|
23658
|
+
* world matrix so the fit uses the same basis `updateLightMatrix` renders with. `lookAt` builds that basis
|
|
23659
|
+
* from the view direction and the camera's `up`, which is three.js's default (0, 1, 0) — the position is
|
|
23660
|
+
* always `shadowCenter − sunDirection × sunDistance` and the target `shadowCenter`, so the view direction is
|
|
23661
|
+
* the sun direction at every pose and the basis depends on neither the shadow centre nor the ortho size. A
|
|
23662
|
+
* matrix left over from the previous frame therefore carries the same basis — see the ordering note in
|
|
23663
|
+
* `update`.
|
|
23664
|
+
*
|
|
23665
|
+
* @returns The half-size in metres, before the zoom-derived cap and the `LIGHT_SIZE_BASE` floor.
|
|
23666
|
+
*/
|
|
23667
|
+
private groundShadowFitHalfSize;
|
|
23668
|
+
/**
|
|
23669
|
+
* Largest distance from `centre` to the cached caster bounds along `axis`, in metres — the support of the
|
|
23670
|
+
* box, which the axis-aligned extreme corner gives without enumerating all eight. No scene walk, no
|
|
23671
|
+
* allocation.
|
|
23672
|
+
* @param axis - A unit view-plane axis of the light camera.
|
|
23673
|
+
* @param centre - The point the light sits on (`shadowCenter`).
|
|
23674
|
+
*/
|
|
23675
|
+
private casterSupport;
|
|
22731
23676
|
/**
|
|
22732
23677
|
* Updates shadow visibility and opacity based on zoom level threshold.
|
|
22733
23678
|
* Shadows smoothly fade in/out over a zoom range for a smoother transition.
|
|
@@ -22752,6 +23697,8 @@ declare class ShadowsSystem {
|
|
|
22752
23697
|
*/
|
|
22753
23698
|
private recreateDebugGrid;
|
|
22754
23699
|
private transparentGeometryVisibilityStateMap;
|
|
23700
|
+
/** Reused by `renderShadowMap`: each swapped caster's own material, restored after the pass. */
|
|
23701
|
+
private readonly swappedMaterials;
|
|
22755
23702
|
private renderShadowMap;
|
|
22756
23703
|
/**
|
|
22757
23704
|
* Depth-comparison tolerance for the receivers, in the shader's normalised light-depth units.
|
|
@@ -22866,6 +23813,8 @@ declare class ModelSystem extends PubSub<{
|
|
|
22866
23813
|
* @param containerId - The container this batch belongs to
|
|
22867
23814
|
* @param opacity - The opacity for this batch (1 = default)
|
|
22868
23815
|
* @param maxCount - Maximum instance capacity
|
|
23816
|
+
* @param receiveShadow - Whether the batch's materials receive shadows
|
|
23817
|
+
* @param castShadow - Whether the batch's meshes are on the shadow-caster layer
|
|
22869
23818
|
* @returns The created batch entry
|
|
22870
23819
|
*/
|
|
22871
23820
|
private createBatch;
|
|
@@ -22885,6 +23834,23 @@ declare class ModelSystem extends PubSub<{
|
|
|
22885
23834
|
* @returns The batch entry or undefined
|
|
22886
23835
|
*/
|
|
22887
23836
|
private getBatchForMesh;
|
|
23837
|
+
/**
|
|
23838
|
+
* The shadow receiver context a model with this receive setting should be built with.
|
|
23839
|
+
* @param receiveShadow - Whether the model (or batch) opted into receiving
|
|
23840
|
+
* @returns The context to patch with, or undefined when shadows are off or the model opts out
|
|
23841
|
+
*/
|
|
23842
|
+
private shadowReceiverFor;
|
|
23843
|
+
/**
|
|
23844
|
+
* The batching key for one of the two per-model shadow settings (`receiveShadow`, `castShadow`).
|
|
23845
|
+
*
|
|
23846
|
+
* While shadows are off for the map there is nothing to receive and nothing to cast into, so both
|
|
23847
|
+
* settings are no-ops: every model keys `true` and the system batches exactly as it did before these
|
|
23848
|
+
* options existed — one shared, unpatched batch per URL and container. That is what keeps a shadows-off
|
|
23849
|
+
* scene from splitting into per-model batches it never had before, and it makes the "shadows off" case
|
|
23850
|
+
* of the divergence checks fall out of the key comparison instead of needing its own guard.
|
|
23851
|
+
* @param enabled - The model's own setting
|
|
23852
|
+
*/
|
|
23853
|
+
private shadowBatchKey;
|
|
22888
23854
|
/**
|
|
22889
23855
|
* Updates the debug UI with current batch information
|
|
22890
23856
|
*/
|
|
@@ -22932,6 +23898,25 @@ declare class ModelSystem extends PubSub<{
|
|
|
22932
23898
|
* @returns The loaded GLTF data
|
|
22933
23899
|
*/
|
|
22934
23900
|
private getOrLoadGLTF;
|
|
23901
|
+
/**
|
|
23902
|
+
* Fills an own container with one cloned mesh per GLB piece — the default for a model that draws on its own.
|
|
23903
|
+
* @param meshContainer - The model's own container.
|
|
23904
|
+
* @param gltf - The loaded GLTF data.
|
|
23905
|
+
* @param entityId - The model entity, recorded on each mesh for picking.
|
|
23906
|
+
* @param shadowReceiver - Live receiver context when the model receives shadows.
|
|
23907
|
+
*/
|
|
23908
|
+
private addClonedPieces;
|
|
23909
|
+
/**
|
|
23910
|
+
* Fills an own container with the model's pieces as batches — one per material and attribute layout — for a
|
|
23911
|
+
* model on `EXPERIMENTAL_batchedDraw`, clipped or not. The GLTF scene is never cloned on this path: the batches read
|
|
23912
|
+
* the pieces straight from it.
|
|
23913
|
+
* @param meshContainer - The model's own container.
|
|
23914
|
+
* @param gltf - The loaded GLTF data.
|
|
23915
|
+
* @param entityId - The model entity, recorded on each batch for picking and the clipped-region filter.
|
|
23916
|
+
* @param shadowReceiver - Live receiver context when the model receives shadows.
|
|
23917
|
+
* @param keepPlacementSource - The model is clipped, so its hull will read the batches' pieces.
|
|
23918
|
+
*/
|
|
23919
|
+
private addBatchedPieces;
|
|
22935
23920
|
/**
|
|
22936
23921
|
* Creates a non-instanced model (regular mesh) for entities with visibleThroughGeometry or clippingEnabled
|
|
22937
23922
|
* @param entity - The model entity
|
|
@@ -22959,7 +23944,7 @@ declare class ModelSystem extends PubSub<{
|
|
|
22959
23944
|
* Creates a model entity from a GeoJSON feature
|
|
22960
23945
|
* @param id - The unique identifier for the model
|
|
22961
23946
|
* @param feature - The GeoJSON Point feature with model properties
|
|
22962
|
-
* @param style - Optional model style overrides (includes
|
|
23947
|
+
* @param style - Optional model style overrides (includes clippingEnabled)
|
|
22963
23948
|
* @returns The created model geometry entity
|
|
22964
23949
|
*/
|
|
22965
23950
|
createModelFromFeature(id: string | number, feature: Feature<Point, ModelProperties>, style?: Partial<InitializeModelState$2>): ModelGeometry3D;
|
|
@@ -22982,7 +23967,8 @@ declare class ModelSystem extends PubSub<{
|
|
|
22982
23967
|
*/
|
|
22983
23968
|
private rebatchDetachedInstances;
|
|
22984
23969
|
/**
|
|
22985
|
-
* Creates a shared InstancedMesh batch for multiple detached entities with the same opacity
|
|
23970
|
+
* Creates a shared InstancedMesh batch for multiple detached entities with the same opacity,
|
|
23971
|
+
* receive and cast setting
|
|
22986
23972
|
*/
|
|
22987
23973
|
private createSharedBatchForDetached;
|
|
22988
23974
|
/**
|
|
@@ -23049,10 +24035,10 @@ declare class TwoDEntitySystem {
|
|
|
23049
24035
|
* @param container - DOM element to host the 2D overlay
|
|
23050
24036
|
* @param state - Renderer state
|
|
23051
24037
|
* @param pipelineState - 2D pipeline state
|
|
23052
|
-
* @param
|
|
24038
|
+
* @param projectBatch - Batched world → screen projection (`RendererCore.projectBatch`)
|
|
23053
24039
|
* @param options - Pipeline options (worker URL, collision settings, etc.)
|
|
23054
24040
|
*/
|
|
23055
|
-
constructor(container: HTMLElement, state: RendererState, pipelineState: TwoDPipelineState,
|
|
24041
|
+
constructor(container: HTMLElement, state: RendererState, pipelineState: TwoDPipelineState, projectBatch: ProjectBatchFn, options?: TwoDPipelineOptions);
|
|
23056
24042
|
/** Returns the internal pipeline for direct access (test use only). */
|
|
23057
24043
|
get pipeline(): TwoDPipeline;
|
|
23058
24044
|
/** @internal Canvas used for rendering 2D labels. */
|
|
@@ -23240,6 +24226,24 @@ declare class Core extends PubSub<MapEvent> {
|
|
|
23240
24226
|
* @internal
|
|
23241
24227
|
*/
|
|
23242
24228
|
constructor(container: HTMLElement, options?: RendererCoreOptions$2);
|
|
24229
|
+
/**
|
|
24230
|
+
* Projects many world positions to screen pixels in one pass; the batched form of {@link project}.
|
|
24231
|
+
*
|
|
24232
|
+
* Each result equals `project()` on that point (same camera matrices, same behind-camera rule,
|
|
24233
|
+
* same 0.1 px truncation) whenever the cached canvas size matches the live layout box, i.e. once
|
|
24234
|
+
* {@link CanvasSizeTracker} has refreshed after a size change. Unlike `project()` it makes no
|
|
24235
|
+
* per-point function call, allocates nothing per point, and reads the canvas size once per call
|
|
24236
|
+
* from the tracker instead of `clientWidth`/`clientHeight` per point.
|
|
24237
|
+
*
|
|
24238
|
+
* @param positions - World coordinates, `[x0, y0, z0, x1, y1, z1, …]` (as `project()` takes them)
|
|
24239
|
+
* @param out - Optional destination, reused across calls; replaced with a larger array if too small
|
|
24240
|
+
* @param count - Number of points; defaults to `positions.length / 3`
|
|
24241
|
+
* @returns `out` (or its replacement), `PROJECT_BATCH_STRIDE` slots per point:
|
|
24242
|
+
* `[screenX, screenY, flags]`, where `flags` holds `ProjectBatchFlags` (e.g. `BehindCamera`).
|
|
24243
|
+
* Further flag bits are reserved for per-point metadata such as occlusion.
|
|
24244
|
+
* @internal
|
|
24245
|
+
*/
|
|
24246
|
+
projectBatch: (positions: ArrayLike<number>, out?: Float64Array, count?: number) => Float64Array;
|
|
23243
24247
|
/**
|
|
23244
24248
|
* Projects a position into screen space. If a Vector3 is provided, the z-coordinate will include the depth from the camera.
|
|
23245
24249
|
* @param projectVector - The vector to project the position into
|
|
@@ -23451,6 +24455,12 @@ declare class Core extends PubSub<MapEvent> {
|
|
|
23451
24455
|
* @internal
|
|
23452
24456
|
*/
|
|
23453
24457
|
convert3DMapPositionToCoordinate: (v: Vector3) => Position$2;
|
|
24458
|
+
/**
|
|
24459
|
+
* @internal
|
|
24460
|
+
* Cheap visibility read for an entity — avoids building a full {@link getState} object.
|
|
24461
|
+
* Returns `undefined` when the entity does not exist.
|
|
24462
|
+
*/
|
|
24463
|
+
getVisible(geometryOrGeometryId: Record<string | number, any> | string | number): boolean | undefined;
|
|
23454
24464
|
/**
|
|
23455
24465
|
* Sets the background color of the renderer. Only applies to "standalone mode"
|
|
23456
24466
|
*/
|
|
@@ -23579,6 +24589,12 @@ declare class Core extends PubSub<MapEvent> {
|
|
|
23579
24589
|
* Destroys instance and frees resources
|
|
23580
24590
|
*/
|
|
23581
24591
|
destroy: () => void;
|
|
24592
|
+
/**
|
|
24593
|
+
* @internal
|
|
24594
|
+
* Runs `fn` with camera `change` handling deferred, then handles at most one change (one
|
|
24595
|
+
* `camera-change` publish, one render request) synchronously before returning. Re-entrant.
|
|
24596
|
+
*/
|
|
24597
|
+
batchCameraChanges(fn: () => void): void;
|
|
23582
24598
|
}
|
|
23583
24599
|
//#endregion
|
|
23584
24600
|
//#region ../renderer-three/src/entities/group-container.d.ts
|
|
@@ -23679,7 +24695,22 @@ declare class Occlusion2DComponent implements Occlusion2D {
|
|
|
23679
24695
|
}
|
|
23680
24696
|
//#endregion
|
|
23681
24697
|
//#region ../renderer-three/src/entities/geometry2d.d.ts
|
|
23682
|
-
|
|
24698
|
+
/**
|
|
24699
|
+
* Scene-graph anchor for a 2D label/marker. It has no geometry; it exists so the anchor inherits its
|
|
24700
|
+
* parent container's transform and scene membership.
|
|
24701
|
+
*
|
|
24702
|
+
* Anchors are excluded from three.js' per-frame scene traversal:
|
|
24703
|
+
* - `visible` is `false` so `WebGLRenderer.projectObject` returns immediately for each anchor.
|
|
24704
|
+
* Scene membership is decided by {@link populateGeometry2DIdsInScene}, which checks the parent
|
|
24705
|
+
* containers' visibility, not this flag.
|
|
24706
|
+
* - `updateMatrixWorld` is a no-op; the world position is computed on demand by
|
|
24707
|
+
* {@link Geometry2D.position} via `getWorldPosition` (which uses `updateWorldMatrix`, not this).
|
|
24708
|
+
*
|
|
24709
|
+
* With thousands of labels this traversal was ~20% of frame time while producing nothing.
|
|
24710
|
+
*/
|
|
24711
|
+
declare class Geometry2DObject3D extends Object3D {
|
|
24712
|
+
constructor();
|
|
24713
|
+
}
|
|
23683
24714
|
type ComponentTypeMap = {
|
|
23684
24715
|
interaction: InteractionComponent;
|
|
23685
24716
|
marker: MarkerComponent;
|
|
@@ -23730,6 +24761,48 @@ declare class Geometry2D {
|
|
|
23730
24761
|
//#region ../renderer-three/src/types/geometry.d.ts
|
|
23731
24762
|
type Position$2 = [lon: number, lat: number] | [lon: number, lat: number, alt: number];
|
|
23732
24763
|
//#endregion
|
|
24764
|
+
//#region ../renderer-three/src/systems/shadows/receiver-patch.d.ts
|
|
24765
|
+
/**
|
|
24766
|
+
* The shadow-receiver uniforms shared by every patched (non-SDK) material, e.g. glTF model materials.
|
|
24767
|
+
*
|
|
24768
|
+
* One object, owned by `ShadowsSystem`: every patched material's compiled program binds these exact `IUniform`
|
|
24769
|
+
* instances, so a shadow-map update writes each value once (`setShadowUniformValues`) and every model sees it —
|
|
24770
|
+
* no per-material or per-model work, however many models are loaded.
|
|
24771
|
+
*/
|
|
24772
|
+
type ShadowReceiverUniforms = {
|
|
24773
|
+
shadowMap: IUniform;
|
|
24774
|
+
lightMatrix: IUniform<Matrix4>;
|
|
24775
|
+
cameraNear: IUniform<number>;
|
|
24776
|
+
cameraFar: IUniform<number>;
|
|
24777
|
+
shadowBias: IUniform<number>;
|
|
24778
|
+
selfShadowThreshold: IUniform<number>;
|
|
24779
|
+
shadowOpacity: IUniform<number>;
|
|
24780
|
+
baseColor: IUniform;
|
|
24781
|
+
shadowMapSize: IUniform<number>;
|
|
24782
|
+
pcfSpread: IUniform<number>;
|
|
24783
|
+
sunDir: IUniform<Vector3>;
|
|
24784
|
+
normalBias: IUniform<number>;
|
|
24785
|
+
shadowEnabled: IUniform<boolean>;
|
|
24786
|
+
depthRangeMax: IUniform<number>;
|
|
24787
|
+
};
|
|
24788
|
+
/**
|
|
24789
|
+
* The live shadow system's hooks for non-SDK geometry (models). Published on `RendererState.shadowReceiver` while
|
|
24790
|
+
* shadows are enabled; `undefined` otherwise.
|
|
24791
|
+
*/
|
|
24792
|
+
type ShadowReceiverContext = {
|
|
24793
|
+
uniforms: ShadowReceiverUniforms;
|
|
24794
|
+
/** Compile-time PCF sample count (`#define PCF_SAMPLES`). Fixed per session; part of the program key. */
|
|
24795
|
+
pcfSamples: number;
|
|
24796
|
+
/**
|
|
24797
|
+
* Casters that must render the depth pass with their own `customDepthMaterial` (clipped models), because the
|
|
24798
|
+
* shared override material cannot know their clipping planes. Registered by the clipping system; entries that
|
|
24799
|
+
* have left the scene are pruned by the shadow pass.
|
|
24800
|
+
*/
|
|
24801
|
+
customDepthCasters: Set<Mesh>;
|
|
24802
|
+
/** Invalidates the shadow map (and caster bounds), e.g. when a clipping plane moves. */
|
|
24803
|
+
castersChanged: () => void;
|
|
24804
|
+
};
|
|
24805
|
+
//#endregion
|
|
23733
24806
|
//#region ../renderer-three/src/types/options.d.ts
|
|
23734
24807
|
/**
|
|
23735
24808
|
* Selects which environment map is used for image-based lighting.
|
|
@@ -23960,9 +25033,18 @@ type ShadowsOptions$1 = {
|
|
|
23960
25033
|
* Mercator zoom level at which shadows become visible.
|
|
23961
25034
|
* Shadows are hidden when zoomed out beyond this level for performance.
|
|
23962
25035
|
* Higher values mean you need to zoom in more to see shadows.
|
|
23963
|
-
* @default
|
|
25036
|
+
* @default 15
|
|
23964
25037
|
*/
|
|
23965
25038
|
visibleAtZoomLevel?: number;
|
|
25039
|
+
/**
|
|
25040
|
+
* Where the shadow light frustum's half-size comes from.
|
|
25041
|
+
* - `'venue'` caps the zoom-derived size at the shadow casters' bounding sphere, so a small venue
|
|
25042
|
+
* keeps a dense shadow map when zoomed out instead of paying for a texel sized for a much larger
|
|
25043
|
+
* area. The cap only ever shrinks the frustum, so zoomed-in framing is unaffected.
|
|
25044
|
+
* - `'zoom'` derives it from zoom alone, which pins it at its maximum for every zoom at or below 15.
|
|
25045
|
+
* @default 'venue'
|
|
25046
|
+
*/
|
|
25047
|
+
frustumMode?: 'zoom' | 'venue';
|
|
23966
25048
|
};
|
|
23967
25049
|
//#endregion
|
|
23968
25050
|
//#region ../renderer-three/src/types/index.d.ts
|
|
@@ -24076,6 +25158,17 @@ type PaintStyle$2 = {
|
|
|
24076
25158
|
* @experimental
|
|
24077
25159
|
*/
|
|
24078
25160
|
__EXPERIMENTAL_maskEnabled?: boolean;
|
|
25161
|
+
/**
|
|
25162
|
+
* When true, renders the geometry on top of other geometry by disabling depth
|
|
25163
|
+
* testing. Useful for shapes that should always be visible regardless of
|
|
25164
|
+
* occlusion.
|
|
25165
|
+
*
|
|
25166
|
+
* Depth state belongs to the material, so a feature opting in is detached from
|
|
25167
|
+
* its shared batched mesh and given its own material.
|
|
25168
|
+
*
|
|
25169
|
+
* @default false
|
|
25170
|
+
*/
|
|
25171
|
+
visibleThroughGeometry?: boolean;
|
|
24079
25172
|
};
|
|
24080
25173
|
/**
|
|
24081
25174
|
* Configures the vertical shading gradient applied to extruded geometry to give
|
|
@@ -24117,13 +25210,18 @@ type ModelProperties = {
|
|
|
24117
25210
|
id?: string | number;
|
|
24118
25211
|
verticalOffset?: number;
|
|
24119
25212
|
/**
|
|
24120
|
-
*
|
|
24121
|
-
*
|
|
25213
|
+
* Whether the model is cut away at its clipping plane, exposing the interior.
|
|
25214
|
+
*
|
|
25215
|
+
* Use this for models that represent a **building**: their walls and roof are a closed
|
|
25216
|
+
* shell over the venue, and clipping removes everything above `clippingPlaneZOffset` so
|
|
25217
|
+
* the floors inside the model stay visible — the familiar cut-away view of a building.
|
|
25218
|
+
*
|
|
25219
|
+
* Clipping is decided when the model is added: setting it later has no effect.
|
|
24122
25220
|
*
|
|
24123
25221
|
* Note: This will de-optimize the model by disabling instancing.
|
|
24124
25222
|
* @default false
|
|
24125
25223
|
*/
|
|
24126
|
-
|
|
25224
|
+
clippingEnabled?: boolean;
|
|
24127
25225
|
/**
|
|
24128
25226
|
* When true at creation time, the model will be visible through other geometry.
|
|
24129
25227
|
* This value at creation time determines instancing behavior and cannot be changed.
|
|
@@ -24183,6 +25281,11 @@ type ClickPayload = {
|
|
|
24183
25281
|
* Only images added with `interactive: true` are included.
|
|
24184
25282
|
*/
|
|
24185
25283
|
images: [string | number] | [];
|
|
25284
|
+
/**
|
|
25285
|
+
* An array of 3D text IDs the user interaction passed through. Empty if no text was interacted with.
|
|
25286
|
+
* Only text added with `interactive: true` is included.
|
|
25287
|
+
*/
|
|
25288
|
+
text3ds: [string | number] | [];
|
|
24186
25289
|
/**
|
|
24187
25290
|
* An array of label IDs which the user interaction passed through. Will be empty if no labels were interacted with.
|
|
24188
25291
|
*/
|
|
@@ -24424,6 +25527,11 @@ type RendererState = {
|
|
|
24424
25527
|
* @defaultValue [0, 1]
|
|
24425
25528
|
*/
|
|
24426
25529
|
depthRangeFor3D: [number, number];
|
|
25530
|
+
/**
|
|
25531
|
+
* Shared shadow-receiver uniforms for patched non-SDK materials (glTF models). Set by `ShadowsSystem` when shadows
|
|
25532
|
+
* are enabled; `undefined` otherwise, which makes model material patching a no-op.
|
|
25533
|
+
*/
|
|
25534
|
+
shadowReceiver?: ShadowReceiverContext;
|
|
24427
25535
|
/**
|
|
24428
25536
|
* Options for configuring outline rendering
|
|
24429
25537
|
*/
|
|
@@ -24436,6 +25544,12 @@ type RendererState = {
|
|
|
24436
25544
|
* system from the renderer service.
|
|
24437
25545
|
*/
|
|
24438
25546
|
renderStats: RenderFrameStats;
|
|
25547
|
+
/**
|
|
25548
|
+
* Number of visible paths in the scene that draw on `RENDER_LAYERS.ALWAYS_ON_TOP_PATHS`
|
|
25549
|
+
* (`visibleThroughGeometry`). Recounted every frame by the path system over
|
|
25550
|
+
* `geometry3DsInScene`; the always-on-top render pass is skipped while it is 0.
|
|
25551
|
+
*/
|
|
25552
|
+
alwaysOnTopPaths: number;
|
|
24439
25553
|
};
|
|
24440
25554
|
/**
|
|
24441
25555
|
* All of the entities in the scene
|
|
@@ -24583,6 +25697,7 @@ declare class MapLibreOverlay<T$1> extends PubSub<T$1> implements IControl {
|
|
|
24583
25697
|
private handleStyleChange;
|
|
24584
25698
|
private handleMoveStart;
|
|
24585
25699
|
private handleMove;
|
|
25700
|
+
private applyMapCameraToSystem;
|
|
24586
25701
|
private handleMoveEnd;
|
|
24587
25702
|
private handleError;
|
|
24588
25703
|
/**
|
|
@@ -24608,6 +25723,23 @@ declare const MAPPEDIN_COLORS: {
|
|
|
24608
25723
|
lightTeal: string;
|
|
24609
25724
|
};
|
|
24610
25725
|
//#endregion
|
|
25726
|
+
//#region src/enterprise-mode.d.ts
|
|
25727
|
+
/**
|
|
25728
|
+
* @internal
|
|
25729
|
+
* @hidden
|
|
25730
|
+
*
|
|
25731
|
+
* If true, the SDK will create enterprise locations in addition to location profiles. Use this to allow
|
|
25732
|
+
* legacy applications to load platform maps.
|
|
25733
|
+
*/
|
|
25734
|
+
declare function forceEnterpriseLocations(value: boolean): void;
|
|
25735
|
+
/**
|
|
25736
|
+
* @hidden
|
|
25737
|
+
* @internal
|
|
25738
|
+
*
|
|
25739
|
+
* See {@link forceEnterpriseLocations}
|
|
25740
|
+
*/
|
|
25741
|
+
declare function shouldForceEnterpriseLocations(): boolean;
|
|
25742
|
+
//#endregion
|
|
24611
25743
|
//#region src/utils/convert-renderer-core-options.d.ts
|
|
24612
25744
|
/**
|
|
24613
25745
|
* Converts TShow3DMapOptions to RendererCoreOptions format.
|
|
@@ -25026,21 +26158,6 @@ declare const hydrateMapDataFromMVF: (mvf: TMVF, options?: TGetMapDataWithCreden
|
|
|
25026
26158
|
* @deprecated Use {@link getMapData} and enterprise will be inferred from key/secret.
|
|
25027
26159
|
*/
|
|
25028
26160
|
declare function setUseEnterpriseAPI(value: boolean): void;
|
|
25029
|
-
/**
|
|
25030
|
-
* @internal
|
|
25031
|
-
* @hidden
|
|
25032
|
-
*
|
|
25033
|
-
* If true, the SDK will create enterprise locations in addition to location profiles. Use this to allow
|
|
25034
|
-
* legacy applications to load platform maps.
|
|
25035
|
-
*/
|
|
25036
|
-
declare function forceEnterpriseLocations(value: boolean): void;
|
|
25037
|
-
/**
|
|
25038
|
-
* @hidden
|
|
25039
|
-
* @internal
|
|
25040
|
-
*
|
|
25041
|
-
* See {@link forceEnterpriseLocations}
|
|
25042
|
-
*/
|
|
25043
|
-
declare function shouldForceEnterpriseLocations(): boolean;
|
|
25044
26161
|
/**
|
|
25045
26162
|
* Asynchronously retrieves map data ({@link MapData}) based on user-provided options.
|
|
25046
26163
|
*
|
|
@@ -25135,4 +26252,4 @@ declare const getVersion: () => string | undefined;
|
|
|
25135
26252
|
*/
|
|
25136
26253
|
declare const show3dMapGeojson: (el: HTMLElement, mapData: MapData, options?: TShow3DMapOptions) => Promise<MapView>;
|
|
25137
26254
|
//#endregion
|
|
25138
|
-
export { ACTION_TYPE, ANIMATION_TWEENS, type AddText3DOptions, type AddText3DPointOptions, type Analytics, Annotation, Area, type AutoElements, BBox, BEARING_TYPE, CONNECTION_TYPE, type Camera, type CameraBounds, type CameraTransform, type CaptureEventsPayloadMap, type ColorString, Connection, Coordinate, DOORS, type Debug, type DebugState, DetailedMapData, Directions, Door, E_SDK_LOG_LEVEL, type EasingCurve, EnterpriseCategory, EnterpriseLocation, EnterpriseVenue, type EnvMapOptions, type Environment, type Exporter, Facade, Feature, FeatureCollection, Floor, FloorStack, type FootprintConfig, type Fuzzy, GeoJSON$1 as GeoJSON, GeoJsonGeometryTypes, GeoJsonObject, GeoJsonProperties, GeoJsonTypes, Geometry, GeometryCollection, GeometryObject, type GlobalState, Hyperlink, type IAnchorable, type IFocusable, type IGeoJSONData, type INavigatable, type ISystemPlugin, type Image3D, type Image3DView, ImageMetaData, type InitializeModelState, type InitializeText3DState, type InsetPadding, type InsetPaddingOption, type InterpolateOn, type Interpolation, type Label, type LabelAppearance, type LabelTextPlacement, type LabelTextWrap, type Labels, LineString, type LineStyle, LocationCategory, LocationProfile, type LocationSocial, type LocationState, MAPPEDIN_COLORS, type MapData, type MapDataElements, type MapElementToGetRenderedState, type MapElementToGetState, type MapElementToUpdateState, type MapElementsWithState, type MapFeatureOfType, MapObject, MapView, type MapViewElements, type MapViewState, type MappedinError, type MappedinRenderError, type Marker, type Markers, type MatchInfo, type Model, type Models, type MultiFloorViewEffectState, MultiLineString, MultiPoint, MultiPolygon, type Navigation, type NavigationState, Node, type OpeningHours, type OperationHours, type Outdoor, type OutlinesOptions, type PaintStyle, type Path, type PathSegment$1 as PathSegment, type PathWidth, type Paths, type PixelWidth, type Places, Point, PointOfInterest, Polygon, type Position, type Prefix$1 as Prefix, type PubSub, type Query, type RendererCoreOptions, type Search, type SearchOptions, type SearchResult, type SearchResultEnterpriseCategory, type SearchResultEnterpriseLocations, type SearchResultItem, type SearchResultPlaces, type SetFloorHandler, type Shading, type ShadowsOptions, type Shape, type Shapes, type SiblingGroup, Space, type Style, type SuggestOptions, type Suggestion, type TActionType, type TAddImageOptions, type TAddLabelOptions, type TAddMarkerOptions, type TAddModel, type TAddModelOptions, type TAddPathOptions, type TAddText3DAnchorableOptions, type TAddText3DOptions, type TAnalyticsUpdateState, type TAnimateStateResult, type TAnimationOptions, type TAntialiasingOptions, type TBearingType, type TCameraAnimationOptions, type TCameraInteractionsSetOptions, type TCameraTarget, type TCancellablePromise, type TClickPayload, type TCollisionRankingTier, type TConnectionPathOptions, type TConnectionType, type TCoordinateParams, type TCreateMarker, type TDashOptions, type TDirectionInstruction, type TDirectionInstructionAction, type TDirectionZone, type TDoorsState, type TDoorsUpdateState, type TEasingFunction, type TEventPayload, type TEvents, type TExperimentalDashOptions, type TFacadeState, type TFacadeUpdateState, type TFindNearestOptions, type TFindNearestResult, type TFindNearestTravelOptions, type TFindPreferredLanguageInVenueOptions, type TFloorAltitudeData, type TFloorChangePayload, type TFloorChangeReason, type TFloorState, type TFloorUpdateState, type TFocusOnOptions, type TFocusTarget, type TGeometryState, type TGeometryUpdateState, type TGetDirectionsOptions, type TGetMapDataOptions, type TGetMapDataSharedOptions, type TGetMapDataWithAccessTokenOptions, type TGetMapDataWithCredentialsOptions, type TGetState, type THoverPayload, type THydrateMapDataBundle, type TImage3DState as TImageState, type TImage3DUpdateState as TImageUpdateState, type TLabelState, type TLabelUpdateState, type TLogLevelName, type TLongPressPayload, type TMVF, type TMVFLineStringStyle, type TMVFPointStyle, type TMVFPolygonStyle, type TMVFStyle, type TMVFStyleCollection, type TMapDataEvents, type TMapDataObjectTypes, type TMapFeatureTypes, type TMapViewObjectTypes, type TMarkerPlacement, type TMarkerState, type TMarkerUpdateState, type TModelState, type TModelUpdateState, type TMultiFloorViewOptions, type TNavigationMarker, type TNavigationMarkerType, type TNavigationOptions, type TNavigationPathOptions, type TNavigationTarget, type TOutsideThresholdPathStyle, type TPathSectionHighlightOptions, type TPathState, type TPathUpdateState, type TQueriables, type TQueryAtResult, type RendererState as TRendererState, type TSearchOptions, type TSetFloorOptions, type TShapeState, type TShapeUpdateState, type TShow3DMapOptions, type TSpaceType, type TStateChangedInternalPayload, type TTakeScreenshotOptions, type TTetheredOptions as TTetherOptions, type TText3DState, type TText3DUpdateState, type TTrackCoordinateOptions, type TTravelledOptions, type TUpdateState, type TWallsState, type TWallsUpdateState, TWatermarkOptions, type Text3D, type Text3DView, type UpdateGlobalState, type VisibilityState, WALLS, type WithState, MAPPEDIN_LAYER_ID as __INTERNAL__MAPPEDIN_LAYER_ID, MapLibreOverlay as __INTERNAL__MapLibreOverlay, Core as __INTERNAL__RendererCore, convertToRendererCoreOptions as __INTERNAL__convertToRendererCoreOptions, __setWatermarkOnClickFn, checkWorkerUrls, disableText3DWorker, enableTestMode, findPreferredLanguageInVenue, forceEnterpriseLocations, getMapData, getMapDataEnterprise, getMultiFloorState, getVersion, hydrateMapData, hydrateMapDataFromMVF, parseLogLevel, parseMVFv2 as parseMVF, preloadFont, setHeadlessViewport, setLoggerLevel, setUseEnterpriseAPI, setWorkersUrl, shouldForceEnterpriseLocations, show3dMap, show3dMapGeojson, unzipAndParseMVFv2, unzipMVFv2 as unzipMVF };
|
|
26255
|
+
export { ACTION_TYPE, ANIMATION_TWEENS, type AddText3DOptions, type AddText3DPointOptions, type Analytics, Annotation, Area, type AutoElements, BBox, BEARING_TYPE, CONNECTION_TYPE, type Camera, type CameraBounds, type CameraTransform, type CaptureEventsPayloadMap, type ColorString, Connection, Coordinate, DOORS, type Debug, type DebugState, DetailedMapData, Directions, Door, E_SDK_LOG_LEVEL, type EasingCurve, EnterpriseCategory, EnterpriseLocation, EnterpriseVenue, type EnvMapOptions, type Environment, type Exporter, Facade, Feature, FeatureCollection, Floor, FloorStack, type FootprintConfig, type Fuzzy, GeoJSON$1 as GeoJSON, GeoJsonGeometryTypes, GeoJsonObject, GeoJsonProperties, GeoJsonTypes, Geometry, GeometryCollection, GeometryObject, type GlobalState, Hyperlink, type IAnchorable, type IFocusable, type IGeoJSONData, type INavigatable, type ISystemPlugin, type Image3D, type Image3DView, ImageMetaData, type InitializeModelState, type InitializeText3DState, type InsetPadding, type InsetPaddingOption, type InterpolateOn, type Interpolation, type Label, type LabelAppearance, type LabelTextPlacement, type LabelTextWrap, type Labels, LineString, type LineStyle, LocationCategory, LocationProfile, type LocationSocial, type LocationState, MAPPEDIN_COLORS, type MapData, type MapDataElements, type MapElementToGetRenderedState, type MapElementToGetState, type MapElementToUpdateState, type MapElementsWithState, type MapFeatureOfType, MapObject, MapView, type MapViewElements, type MapViewState, type MappedinError, type MappedinRenderError, type Marker, type Markers, type MatchInfo, type Model, type Models, type MultiFloorViewEffectState, MultiLineString, MultiPoint, MultiPolygon, type Navigation, type NavigationState, Node, type OpeningHours, type OperationHours, type Outdoor, type OutlinesOptions, type PaintStyle, type Path, type PathSegment$1 as PathSegment, type PathWidth, type Paths, type PixelWidth, type Places, Point, PointOfInterest, Polygon, type Position, type Prefix$1 as Prefix, type PubSub, type Query, type RendererCoreOptions, type Search, type SearchOptions, type SearchResult, type SearchResultEnterpriseCategory, type SearchResultEnterpriseLocations, type SearchResultItem, type SearchResultPlaces, type SetFloorHandler, type Shading, type ShadowsOptions, type Shape$1 as Shape, type Shapes, type SiblingGroup, Space, type Style, type SuggestOptions, type Suggestion, type TActionType, type TAddImageOptions, type TAddLabelOptions, type TAddMarkerOptions, type TAddModel, type TAddModelOptions, type TAddPathOptions, type TAddText3DAnchorableOptions, type TAddText3DOptions, type TAnalyticsUpdateState, type TAnimateStateResult, type TAnimationOptions, type TAntialiasingOptions, type TBearingType, type TCameraAnimationOptions, type TCameraInteractionsSetOptions, type TCameraTarget, type TCancellablePromise, type TClickPayload, type TCollisionRankingTier, type TConnectionPathOptions, type TConnectionType, type TCoordinateParams, type TCreateMarker, type TDashOptions, type TDirectionInstruction, type TDirectionInstructionAction, type TDirectionZone, type TDoorsState, type TDoorsUpdateState, type TEasingFunction, type TEventPayload, type TEvents, type TExperimentalDashOptions, type TFacadeState, type TFacadeUpdateState, type TFindNearestOptions, type TFindNearestResult, type TFindNearestTravelOptions, type TFindPreferredLanguageInVenueOptions, type TFloorAltitudeData, type TFloorChangePayload, type TFloorChangeReason, type TFloorState, type TFloorUpdateState, type TFocusOnOptions, type TFocusTarget, type TGeometryState, type TGeometryUpdateState, type TGetDirectionsOptions, type TGetMapDataOptions, type TGetMapDataSharedOptions, type TGetMapDataWithAccessTokenOptions, type TGetMapDataWithCredentialsOptions, type TGetState, type THoverPayload, type THydrateMapDataBundle, type TImage3DState as TImageState, type TImage3DUpdateState as TImageUpdateState, type TLabelState, type TLabelUpdateState, type TLogLevelName, type TLongPressPayload, type TMVF, type TMVFLineStringStyle, type TMVFPointStyle, type TMVFPolygonStyle, type TMVFStyle, type TMVFStyleCollection, type TMapDataEvents, type TMapDataObjectTypes, type TMapFeatureTypes, type TMapViewObjectTypes, type TMarkerPlacement, type TMarkerState, type TMarkerUpdateState, type TModelState, type TModelUpdateState, type TModelsAllOptions, type TMultiFloorViewOptions, type TNavigationMarker, type TNavigationMarkerType, type TNavigationOptions, type TNavigationPathOptions, type TNavigationTarget, type TOutsideThresholdPathStyle, type TPathSectionHighlightOptions, type TPathState, type TPathUpdateState, type TQueriables, type TQueryAtResult, type RendererState as TRendererState, type TSearchJoinedWordsOptions, type TSearchOptions, type TSetFloorOptions, type TShapeState, type TShapeUpdateState, type TShow3DMapOptions, type TSpaceType, type TStateChangedInternalPayload, type TTakeScreenshotOptions, type TTetheredOptions as TTetherOptions, type TText3DState, type TText3DUpdateState, type TTrackCoordinateOptions, type TTravelledOptions, type TUpdateState, type TWallsState, type TWallsUpdateState, TWatermarkOptions, type Text3D, type Text3DView, type UpdateGlobalState, type VisibilityState, WALLS, type WithState, MAPPEDIN_LAYER_ID as __INTERNAL__MAPPEDIN_LAYER_ID, MapLibreOverlay as __INTERNAL__MapLibreOverlay, Core as __INTERNAL__RendererCore, convertToRendererCoreOptions as __INTERNAL__convertToRendererCoreOptions, __setWatermarkOnClickFn, checkWorkerUrls, disableText3DWorker, enableTestMode, findPreferredLanguageInVenue, forceEnterpriseLocations, getMapData, getMapDataEnterprise, getMultiFloorState, getVersion, hydrateMapData, hydrateMapDataFromMVF, parseLogLevel, parseMVFv2 as parseMVF, preloadFont, setHeadlessViewport, setLoggerLevel, setUseEnterpriseAPI, setWorkersUrl, shouldForceEnterpriseLocations, show3dMap, show3dMapGeojson, unzipAndParseMVFv2, unzipMVFv2 as unzipMVF };
|