@plurid/plurid-engine 0.0.0-18 → 0.0.0-19
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/distribution/index.d.mts +744 -0
- package/distribution/index.d.ts +744 -2
- package/distribution/index.js +3319 -2730
- package/distribution/index.js.map +1 -1
- package/distribution/index.mjs +3432 -0
- package/distribution/index.mjs.map +1 -0
- package/package.json +71 -78
- package/distribution/functions/index.d.ts +0 -2
- package/distribution/functions/navigate/index.d.ts +0 -1
- package/distribution/functions/template/index.d.ts +0 -1
- package/distribution/index.es.js +0 -2829
- package/distribution/index.es.js.map +0 -1
- package/distribution/modules/general/configuration/index.d.ts +0 -2
- package/distribution/modules/general/index.d.ts +0 -3
- package/distribution/modules/general/tree/index.d.ts +0 -5
- package/distribution/modules/index.d.ts +0 -9
- package/distribution/modules/interaction/direction/index.d.ts +0 -2
- package/distribution/modules/interaction/index.d.ts +0 -5
- package/distribution/modules/interaction/mathematics/matrix/index.d.ts +0 -31
- package/distribution/modules/interaction/mathematics/quaternion/index.d.ts +0 -78
- package/distribution/modules/interaction/mathematics/transform/general/index.d.ts +0 -37
- package/distribution/modules/interaction/mathematics/transform/index.d.ts +0 -3
- package/distribution/modules/interaction/mathematics/transform/matrix3d/index.d.ts +0 -68
- package/distribution/modules/internationalization/index.d.ts +0 -3
- package/distribution/modules/planes/index.d.ts +0 -2
- package/distribution/modules/planes/logic/index.d.ts +0 -4
- package/distribution/modules/planes/registrar/index.d.ts +0 -3
- package/distribution/modules/planes/registrar/object.d.ts +0 -14
- package/distribution/modules/planes/registrar/utilities.d.ts +0 -6
- package/distribution/modules/routing/IsoMatcher/index.d.ts +0 -44
- package/distribution/modules/routing/Parser/index.d.ts +0 -21
- package/distribution/modules/routing/Parser/interfaces.d.ts +0 -31
- package/distribution/modules/routing/Parser/logic.d.ts +0 -68
- package/distribution/modules/routing/index.d.ts +0 -6
- package/distribution/modules/routing/logic/general/index.d.ts +0 -8
- package/distribution/modules/routing/logic/index.d.ts +0 -3
- package/distribution/modules/routing/logic/utilities/index.d.ts +0 -29
- package/distribution/modules/routing/logic/validity/index.d.ts +0 -3
- package/distribution/modules/space/index.d.ts +0 -6
- package/distribution/modules/space/layout/column.d.ts +0 -3
- package/distribution/modules/space/layout/faceToFace.d.ts +0 -3
- package/distribution/modules/space/layout/index.d.ts +0 -6
- package/distribution/modules/space/layout/row.d.ts +0 -3
- package/distribution/modules/space/layout/sheaves.d.ts +0 -3
- package/distribution/modules/space/layout/zigZag.d.ts +0 -3
- package/distribution/modules/space/location/index.d.ts +0 -2
- package/distribution/modules/space/location/logic.d.ts +0 -22
- package/distribution/modules/space/tree/index.d.ts +0 -3
- package/distribution/modules/space/tree/logic.d.ts +0 -44
- package/distribution/modules/space/tree/object.d.ts +0 -16
- package/distribution/modules/space/utilities/index.d.ts +0 -16
- package/distribution/modules/space/view/index.d.ts +0 -2
- package/distribution/modules/space/view/logic.d.ts +0 -13
- package/distribution/modules/state/compute/index.d.ts +0 -3
- package/distribution/modules/state/compute/space/index.d.ts +0 -3
- package/distribution/modules/state/compute/themes/index.d.ts +0 -3
- package/distribution/modules/state/index.d.ts +0 -3
- package/distribution/modules/state/local/index.d.ts +0 -3
- package/distribution/modules/utilities/index.d.ts +0 -1
package/distribution/index.d.ts
CHANGED
|
@@ -1,2 +1,744 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as _plurid_plurid_data from '@plurid/plurid-data';
|
|
2
|
+
import { FlatPluridConfiguration, PluridConfiguration, PluridPartialConfiguration, TreePlane, LinkCoordinates, WheelDeltas, InternationalizationLanguageType, InternationalizationFieldType, PluridPlane, PluridPlaneObject, PluridRoutePlane, PluridRoutePlaneObject, PluridPlanesRegistrar as PluridPlanesRegistrar$1, RegisteredPluridPlane, IsoMatcherData, IsoMatcherRouteResult, IsoMatcherPlaneResult, IsoMatcherIndexedPlane, PluridRoute, Indexed, PluridRouteFragments, CompareType, PluridRouteParameter, RouteDivisions, LocationCoordinates, PluridApplicationView, PluridView, PathParameters, SpaceLocation, RecursivePartial, PluridState, PluridMetastateState, PluridStorageAdapter } from '@plurid/plurid-data';
|
|
3
|
+
|
|
4
|
+
declare const merge: (configuration?: PluridPartialConfiguration, target?: PluridConfiguration) => PluridConfiguration;
|
|
5
|
+
/**
|
|
6
|
+
* Build a full `PluridConfiguration` from a FLAT shorthand, so consumers can configure the common
|
|
7
|
+
* options without authoring the 5-level nested object. Flat fields are expanded to their nested
|
|
8
|
+
* locations, then `extend` (a normal nested partial) is layered on top, then the whole thing is
|
|
9
|
+
* merged over the defaults via `merge` (which also resolves `theme`). Anything omitted keeps its
|
|
10
|
+
* default. Returns a complete, ready-to-use configuration.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* definePluridConfiguration({ theme: 'plurid', center: true, planeWidth: 0.32, bridgeLength: 160 })
|
|
14
|
+
*/
|
|
15
|
+
declare const definePluridConfiguration: (flat?: FlatPluridConfiguration) => PluridConfiguration;
|
|
16
|
+
|
|
17
|
+
declare const index$k_definePluridConfiguration: typeof definePluridConfiguration;
|
|
18
|
+
declare const index$k_merge: typeof merge;
|
|
19
|
+
declare namespace index$k {
|
|
20
|
+
export { index$k_definePluridConfiguration as definePluridConfiguration, index$k_merge as merge };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const updateTreePlane$1: (tree: TreePlane[], page: TreePlane) => TreePlane[];
|
|
24
|
+
declare const updateTreeByPlaneIDWithLinkCoordinates: (tree: TreePlane[], planeID: string, linkCoordinates: LinkCoordinates) => TreePlane[];
|
|
25
|
+
|
|
26
|
+
declare const index$j_updateTreeByPlaneIDWithLinkCoordinates: typeof updateTreeByPlaneIDWithLinkCoordinates;
|
|
27
|
+
declare namespace index$j {
|
|
28
|
+
export { index$j_updateTreeByPlaneIDWithLinkCoordinates as updateTreeByPlaneIDWithLinkCoordinates, updateTreePlane$1 as updateTreePlane };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare namespace index$i {
|
|
32
|
+
export { index$k as configuration, index$j as tree };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare const getWheelDirection: (deltas: WheelDeltas, ABSTHRESHOLD?: number, THRESHOLD?: number) => string;
|
|
36
|
+
|
|
37
|
+
declare const index$h_getWheelDirection: typeof getWheelDirection;
|
|
38
|
+
declare namespace index$h {
|
|
39
|
+
export { index$h_getWheelDirection as getWheelDirection };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @param xAngle
|
|
45
|
+
* @param yAngle
|
|
46
|
+
* @param zAngle
|
|
47
|
+
*/
|
|
48
|
+
declare function rotateMatrix(xAngle: number, yAngle: number, zAngle?: number): number[];
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param x
|
|
52
|
+
* @param y
|
|
53
|
+
* @param z
|
|
54
|
+
*/
|
|
55
|
+
declare function translateMatrix$1(x: number, y: number, z: number): number[];
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @param s
|
|
59
|
+
*/
|
|
60
|
+
declare function scaleMatrix$1(s: number): number[];
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @param matrixA
|
|
64
|
+
* @param matrixB
|
|
65
|
+
*/
|
|
66
|
+
declare function multiplyMatrices$1(matrixA: number[], matrixB: number[]): number[];
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @param matrices
|
|
70
|
+
*/
|
|
71
|
+
declare function multiplyArrayOfMatrices(matrices: number[][]): number[];
|
|
72
|
+
declare function matrixArrayToCSSMatrix(array: number[]): string;
|
|
73
|
+
|
|
74
|
+
declare const index$g_matrixArrayToCSSMatrix: typeof matrixArrayToCSSMatrix;
|
|
75
|
+
declare const index$g_multiplyArrayOfMatrices: typeof multiplyArrayOfMatrices;
|
|
76
|
+
declare const index$g_rotateMatrix: typeof rotateMatrix;
|
|
77
|
+
declare namespace index$g {
|
|
78
|
+
export { index$g_matrixArrayToCSSMatrix as matrixArrayToCSSMatrix, index$g_multiplyArrayOfMatrices as multiplyArrayOfMatrices, multiplyMatrices$1 as multiplyMatrices, index$g_rotateMatrix as rotateMatrix, scaleMatrix$1 as scaleMatrix, translateMatrix$1 as translateMatrix };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Converts degrees to radians.
|
|
83
|
+
*
|
|
84
|
+
* @param deg
|
|
85
|
+
* @returns radians
|
|
86
|
+
*/
|
|
87
|
+
declare const degToRad: (deg: number) => number;
|
|
88
|
+
/**
|
|
89
|
+
* Converts radians to degrees.
|
|
90
|
+
*
|
|
91
|
+
* @param deg
|
|
92
|
+
* @returns degrees
|
|
93
|
+
*/
|
|
94
|
+
declare const radToDeg: (rad: number) => number;
|
|
95
|
+
interface Quaternion {
|
|
96
|
+
x: number;
|
|
97
|
+
y: number;
|
|
98
|
+
z: number;
|
|
99
|
+
w: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @param x
|
|
104
|
+
* @param y
|
|
105
|
+
* @param z
|
|
106
|
+
* @param w
|
|
107
|
+
* @returns {Quaternion}
|
|
108
|
+
*/
|
|
109
|
+
declare const makeQuaternion: (x: number, y: number, z: number, w: number) => Quaternion;
|
|
110
|
+
/**
|
|
111
|
+
* Returns all-fields 0-ed quaternion.
|
|
112
|
+
*
|
|
113
|
+
* @returns {Quaternion}
|
|
114
|
+
*/
|
|
115
|
+
declare const zeroQuaternion: () => Quaternion;
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
* @param quaternion
|
|
119
|
+
*/
|
|
120
|
+
declare function inverseQuaternion(quaternion: Quaternion): Quaternion;
|
|
121
|
+
/**
|
|
122
|
+
*
|
|
123
|
+
* @param quaternion
|
|
124
|
+
*/
|
|
125
|
+
declare function conjugateQuaternion(quaternion: Quaternion): Quaternion;
|
|
126
|
+
/**
|
|
127
|
+
* Generates quaternion based on Euler angles (in radians).
|
|
128
|
+
*
|
|
129
|
+
* @param alpha around Z axis
|
|
130
|
+
* @param beta around X axis
|
|
131
|
+
* @param gamma around Y axis
|
|
132
|
+
* @returns {Quaternion}
|
|
133
|
+
*/
|
|
134
|
+
declare function computeQuaternionFromEulers(alpha: number, beta: number, gamma: number, radians?: boolean): Quaternion;
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
* @param x
|
|
138
|
+
* @param y
|
|
139
|
+
* @param z
|
|
140
|
+
* @param angle
|
|
141
|
+
*/
|
|
142
|
+
declare function quaternionFromAxisAngle(x: number, y: number, z: number, angle: number): Quaternion;
|
|
143
|
+
/**
|
|
144
|
+
*
|
|
145
|
+
* @param quaternionArray
|
|
146
|
+
*/
|
|
147
|
+
declare function quaternionMultiply(quaternionArray: Quaternion[]): Quaternion;
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
* @param pointRotate
|
|
151
|
+
* @param quaternion
|
|
152
|
+
*/
|
|
153
|
+
declare function rotatePointViaQuaternion(pointRotate: [number, number, number], quaternion: Quaternion): Quaternion;
|
|
154
|
+
/**
|
|
155
|
+
*
|
|
156
|
+
* @param quaternion
|
|
157
|
+
*/
|
|
158
|
+
declare function makeRotationMatrixFromQuaternion(quaternion: Quaternion): number[];
|
|
159
|
+
|
|
160
|
+
type index$f_Quaternion = Quaternion;
|
|
161
|
+
declare const index$f_computeQuaternionFromEulers: typeof computeQuaternionFromEulers;
|
|
162
|
+
declare const index$f_conjugateQuaternion: typeof conjugateQuaternion;
|
|
163
|
+
declare const index$f_degToRad: typeof degToRad;
|
|
164
|
+
declare const index$f_inverseQuaternion: typeof inverseQuaternion;
|
|
165
|
+
declare const index$f_makeQuaternion: typeof makeQuaternion;
|
|
166
|
+
declare const index$f_makeRotationMatrixFromQuaternion: typeof makeRotationMatrixFromQuaternion;
|
|
167
|
+
declare const index$f_quaternionFromAxisAngle: typeof quaternionFromAxisAngle;
|
|
168
|
+
declare const index$f_quaternionMultiply: typeof quaternionMultiply;
|
|
169
|
+
declare const index$f_radToDeg: typeof radToDeg;
|
|
170
|
+
declare const index$f_rotatePointViaQuaternion: typeof rotatePointViaQuaternion;
|
|
171
|
+
declare const index$f_zeroQuaternion: typeof zeroQuaternion;
|
|
172
|
+
declare namespace index$f {
|
|
173
|
+
export { type index$f_Quaternion as Quaternion, index$f_computeQuaternionFromEulers as computeQuaternionFromEulers, index$f_conjugateQuaternion as conjugateQuaternion, index$f_degToRad as degToRad, index$f_inverseQuaternion as inverseQuaternion, index$f_makeQuaternion as makeQuaternion, index$f_makeRotationMatrixFromQuaternion as makeRotationMatrixFromQuaternion, index$f_quaternionFromAxisAngle as quaternionFromAxisAngle, index$f_quaternionMultiply as quaternionMultiply, index$f_radToDeg as radToDeg, index$f_rotatePointViaQuaternion as rotatePointViaQuaternion, index$f_zeroQuaternion as zeroQuaternion };
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
type Matrix = number[][];
|
|
177
|
+
declare const getInitialMatrix: () => Matrix;
|
|
178
|
+
declare const multiplyMatrices: (m1: Matrix, m2: Matrix) => Matrix;
|
|
179
|
+
/**
|
|
180
|
+
* Multiplies multiple `matrices`, must contain at least 2.
|
|
181
|
+
*
|
|
182
|
+
* @param matrices
|
|
183
|
+
* @returns
|
|
184
|
+
*/
|
|
185
|
+
declare const multiplyMatricesArray: (matrices: Matrix[]) => Matrix;
|
|
186
|
+
declare const arrayToMatrix: (array: number[]) => Matrix;
|
|
187
|
+
declare const matrixToArray: (matrix: Matrix) => number[];
|
|
188
|
+
/**
|
|
189
|
+
* Parse a `matrix3d` string into a `Matrix`.
|
|
190
|
+
*
|
|
191
|
+
* @param value
|
|
192
|
+
* @returns
|
|
193
|
+
*/
|
|
194
|
+
declare const matrix3DToMatrix: (value: string) => Matrix;
|
|
195
|
+
declare const rotateXMatrix: (angle: number) => Matrix;
|
|
196
|
+
declare const rotateYMatrix: (angle: number) => Matrix;
|
|
197
|
+
declare const rotateZMatrix: (angle: number) => Matrix;
|
|
198
|
+
declare const translateMatrix: (x?: number, y?: number, z?: number) => Matrix;
|
|
199
|
+
declare const scaleMatrix: (s: number) => Matrix;
|
|
200
|
+
declare function rotationMatrixFromQuaternion(quaternion: Quaternion): Matrix;
|
|
201
|
+
declare const matrixToCSSMatrix: (matrix: Matrix) => string;
|
|
202
|
+
declare const identityMatrix: () => Matrix;
|
|
203
|
+
/**
|
|
204
|
+
* Inverse a matrix based on
|
|
205
|
+
* https://github.com/josdejong/mathjs/blob/develop/src/function/matrix/inv.js
|
|
206
|
+
*
|
|
207
|
+
* @param matrix
|
|
208
|
+
* @returns
|
|
209
|
+
*/
|
|
210
|
+
declare const inverseMatrix: (matrix: Matrix) => Matrix;
|
|
211
|
+
|
|
212
|
+
type index$e_Matrix = Matrix;
|
|
213
|
+
declare const index$e_arrayToMatrix: typeof arrayToMatrix;
|
|
214
|
+
declare const index$e_getInitialMatrix: typeof getInitialMatrix;
|
|
215
|
+
declare const index$e_identityMatrix: typeof identityMatrix;
|
|
216
|
+
declare const index$e_inverseMatrix: typeof inverseMatrix;
|
|
217
|
+
declare const index$e_matrix3DToMatrix: typeof matrix3DToMatrix;
|
|
218
|
+
declare const index$e_matrixToArray: typeof matrixToArray;
|
|
219
|
+
declare const index$e_matrixToCSSMatrix: typeof matrixToCSSMatrix;
|
|
220
|
+
declare const index$e_multiplyMatrices: typeof multiplyMatrices;
|
|
221
|
+
declare const index$e_multiplyMatricesArray: typeof multiplyMatricesArray;
|
|
222
|
+
declare const index$e_rotateXMatrix: typeof rotateXMatrix;
|
|
223
|
+
declare const index$e_rotateYMatrix: typeof rotateYMatrix;
|
|
224
|
+
declare const index$e_rotateZMatrix: typeof rotateZMatrix;
|
|
225
|
+
declare const index$e_rotationMatrixFromQuaternion: typeof rotationMatrixFromQuaternion;
|
|
226
|
+
declare const index$e_scaleMatrix: typeof scaleMatrix;
|
|
227
|
+
declare const index$e_translateMatrix: typeof translateMatrix;
|
|
228
|
+
declare namespace index$e {
|
|
229
|
+
export { type index$e_Matrix as Matrix, index$e_arrayToMatrix as arrayToMatrix, index$e_getInitialMatrix as getInitialMatrix, index$e_identityMatrix as identityMatrix, index$e_inverseMatrix as inverseMatrix, index$e_matrix3DToMatrix as matrix3DToMatrix, index$e_matrixToArray as matrixToArray, index$e_matrixToCSSMatrix as matrixToCSSMatrix, index$e_multiplyMatrices as multiplyMatrices, index$e_multiplyMatricesArray as multiplyMatricesArray, index$e_rotateXMatrix as rotateXMatrix, index$e_rotateYMatrix as rotateYMatrix, index$e_rotateZMatrix as rotateZMatrix, index$e_rotationMatrixFromQuaternion as rotationMatrixFromQuaternion, index$e_scaleMatrix as scaleMatrix, index$e_translateMatrix as translateMatrix };
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Converts the CSS string matrix3d into an array of numbers.
|
|
234
|
+
*
|
|
235
|
+
* @param matrix3d CSS string obtained from
|
|
236
|
+
* window
|
|
237
|
+
* .getComputedStyle(element)
|
|
238
|
+
* .getPropertyValue('transform').
|
|
239
|
+
* @returns Numbers array.
|
|
240
|
+
*/
|
|
241
|
+
declare function getMatrixValues(matrix3d: string): number[];
|
|
242
|
+
/**
|
|
243
|
+
* Extracts the rotation matrix from the matrix3d CSS string.
|
|
244
|
+
*
|
|
245
|
+
* @param matrix3d CSS string obtained from
|
|
246
|
+
* window
|
|
247
|
+
* .getComputedStyle(element)
|
|
248
|
+
* .getPropertyValue("transform").
|
|
249
|
+
* @returns Rotation matrix.
|
|
250
|
+
*/
|
|
251
|
+
declare function getRotationMatrix(matrix3d: string): number[];
|
|
252
|
+
/**
|
|
253
|
+
* Extracts the translation matrix from the matrix3d CSS string.
|
|
254
|
+
*
|
|
255
|
+
* @param matrix3d CSS string obtained from
|
|
256
|
+
* window
|
|
257
|
+
* .getComputedStyle(element)
|
|
258
|
+
* .getPropertyValue("transform").
|
|
259
|
+
* @returns Translation matrix.
|
|
260
|
+
*/
|
|
261
|
+
declare function getTranslationMatrix(matrix3d: string): number[];
|
|
262
|
+
/**
|
|
263
|
+
* Extracts the scalation value from the matrix3d CSS string.
|
|
264
|
+
*
|
|
265
|
+
* @param matrix3d CSS string obtained from
|
|
266
|
+
* window
|
|
267
|
+
* .getComputedStyle(element)
|
|
268
|
+
* .getPropertyValue("transform").
|
|
269
|
+
* @returns Scalation value.
|
|
270
|
+
*/
|
|
271
|
+
declare function getScalationValue(matrix3d: string): number;
|
|
272
|
+
/**
|
|
273
|
+
* Returns a a matrix3d CSS string.
|
|
274
|
+
*
|
|
275
|
+
* @param rotationMatrix
|
|
276
|
+
* @param translationMatrix
|
|
277
|
+
* @param scalationMatrix
|
|
278
|
+
* @returns matrix3d CSS string.
|
|
279
|
+
*/
|
|
280
|
+
declare function setTransform(rotationMatrix: number[], translationMatrix: number[], scalationMatrix: number[]): string;
|
|
281
|
+
interface RotationValues {
|
|
282
|
+
rotateX: number;
|
|
283
|
+
rotateY: number;
|
|
284
|
+
rotateZ: number;
|
|
285
|
+
}
|
|
286
|
+
declare function getTransformRotate(matrix3d: string): RotationValues;
|
|
287
|
+
interface TranslationValues {
|
|
288
|
+
translateX: number;
|
|
289
|
+
translateY: number;
|
|
290
|
+
translateZ: number;
|
|
291
|
+
}
|
|
292
|
+
declare function getTransformTranslate(matrix3d: string): TranslationValues;
|
|
293
|
+
interface ScalationValue {
|
|
294
|
+
scale: number;
|
|
295
|
+
}
|
|
296
|
+
declare function getTransformScale(matrix3d: string): ScalationValue;
|
|
297
|
+
|
|
298
|
+
type index$d_RotationValues = RotationValues;
|
|
299
|
+
type index$d_ScalationValue = ScalationValue;
|
|
300
|
+
type index$d_TranslationValues = TranslationValues;
|
|
301
|
+
declare const index$d_getMatrixValues: typeof getMatrixValues;
|
|
302
|
+
declare const index$d_getRotationMatrix: typeof getRotationMatrix;
|
|
303
|
+
declare const index$d_getScalationValue: typeof getScalationValue;
|
|
304
|
+
declare const index$d_getTransformRotate: typeof getTransformRotate;
|
|
305
|
+
declare const index$d_getTransformScale: typeof getTransformScale;
|
|
306
|
+
declare const index$d_getTransformTranslate: typeof getTransformTranslate;
|
|
307
|
+
declare const index$d_getTranslationMatrix: typeof getTranslationMatrix;
|
|
308
|
+
declare const index$d_setTransform: typeof setTransform;
|
|
309
|
+
declare namespace index$d {
|
|
310
|
+
export { type index$d_RotationValues as RotationValues, type index$d_ScalationValue as ScalationValue, type index$d_TranslationValues as TranslationValues, index$d_getMatrixValues as getMatrixValues, index$d_getRotationMatrix as getRotationMatrix, index$d_getScalationValue as getScalationValue, index$d_getTransformRotate as getTransformRotate, index$d_getTransformScale as getTransformScale, index$d_getTransformTranslate as getTransformTranslate, index$d_getTranslationMatrix as getTranslationMatrix, index$d_setTransform as setTransform };
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
declare namespace index$c {
|
|
314
|
+
export { index$e as general, index$d as matrix3d };
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
declare namespace index$b {
|
|
318
|
+
export { index$h as direction, index$g as matrix, index$f as quaternion, index$c as transform };
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
declare const internatiolate: (lamguage: InternationalizationLanguageType, field: InternationalizationFieldType) => string;
|
|
322
|
+
|
|
323
|
+
declare const resolvePluridPlaneData: <C>(plane: PluridPlane<C>) => PluridPlaneObject<C>;
|
|
324
|
+
declare const resolvePluridRoutePlaneData: <C>(plane: PluridRoutePlane<C>) => PluridRoutePlaneObject<C>;
|
|
325
|
+
declare const getPluridPlaneIDByData: (element: HTMLElement | null) => string;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* The planes registrar can be stored in-memory (server-side)
|
|
329
|
+
* or on the `window.__pluridPlanesRegistrar__` object (browser-side).
|
|
330
|
+
*/
|
|
331
|
+
declare class PluridPlanesRegistrar<C> implements PluridPlanesRegistrar$1<C> {
|
|
332
|
+
private isoMatcher;
|
|
333
|
+
constructor(planes?: PluridPlane<C>[], origin?: string);
|
|
334
|
+
register(planes: PluridPlane<C>[]): void;
|
|
335
|
+
identify(): string[];
|
|
336
|
+
get(route: string): RegisteredPluridPlane<C> | undefined;
|
|
337
|
+
getAll(): Map<any, any>;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
declare const registerPlanes: <C>(planes?: PluridPlane<C>[], planesRegistrar?: PluridPlanesRegistrar$1<C>, origin?: string) => void;
|
|
341
|
+
declare const getPlanesRegistrar: <C>(planesRegistrar: PluridPlanesRegistrar$1<C> | undefined) => PluridPlanesRegistrar$1<C> | undefined;
|
|
342
|
+
declare const getRegisteredPlanes: <C>(planesRegistrar: PluridPlanesRegistrar$1<C> | undefined) => Map<any, any>;
|
|
343
|
+
declare const getRegisteredPlane: <C>(route: string, planesRegistrar: PluridPlanesRegistrar$1<C> | undefined) => _plurid_plurid_data.RegisteredPluridPlane<C> | undefined;
|
|
344
|
+
|
|
345
|
+
declare const index$a_getPlanesRegistrar: typeof getPlanesRegistrar;
|
|
346
|
+
declare const index$a_getPluridPlaneIDByData: typeof getPluridPlaneIDByData;
|
|
347
|
+
declare const index$a_getRegisteredPlane: typeof getRegisteredPlane;
|
|
348
|
+
declare const index$a_getRegisteredPlanes: typeof getRegisteredPlanes;
|
|
349
|
+
declare const index$a_registerPlanes: typeof registerPlanes;
|
|
350
|
+
declare const index$a_resolvePluridPlaneData: typeof resolvePluridPlaneData;
|
|
351
|
+
declare const index$a_resolvePluridRoutePlaneData: typeof resolvePluridRoutePlaneData;
|
|
352
|
+
declare namespace index$a {
|
|
353
|
+
export { PluridPlanesRegistrar as Registrar, index$a_getPlanesRegistrar as getPlanesRegistrar, index$a_getPluridPlaneIDByData as getPluridPlaneIDByData, index$a_getRegisteredPlane as getRegisteredPlane, index$a_getRegisteredPlanes as getRegisteredPlanes, index$a_registerPlanes as registerPlanes, index$a_resolvePluridPlaneData as resolvePluridPlaneData, index$a_resolvePluridRoutePlaneData as resolvePluridRoutePlaneData };
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The `IsoMatcher` gathers all the known information about `routes` and `planes`
|
|
358
|
+
* and matches client-side or server-side, in-browser or in-plurid.
|
|
359
|
+
*/
|
|
360
|
+
declare class IsoMatcher<C> {
|
|
361
|
+
private origin;
|
|
362
|
+
private routesIndex;
|
|
363
|
+
private planesIndex;
|
|
364
|
+
private routesKeys;
|
|
365
|
+
private planesKeys;
|
|
366
|
+
constructor(data: IsoMatcherData<C>, origin?: string);
|
|
367
|
+
/**
|
|
368
|
+
* Matches a `path` with a known `route` or `plane`,
|
|
369
|
+
* based on the strategy imposed by the `context`.
|
|
370
|
+
*
|
|
371
|
+
* @param path
|
|
372
|
+
* @param context
|
|
373
|
+
*/
|
|
374
|
+
match(path: string, context: 'route'): IsoMatcherRouteResult<C> | undefined;
|
|
375
|
+
match(path: string): IsoMatcherPlaneResult<C> | undefined;
|
|
376
|
+
match(path: string, context: 'plane'): IsoMatcherPlaneResult<C> | undefined;
|
|
377
|
+
/**
|
|
378
|
+
* Dynammically update the planes and routes indexes.
|
|
379
|
+
*
|
|
380
|
+
* @param data
|
|
381
|
+
*/
|
|
382
|
+
index(data: IsoMatcherData<C>): void;
|
|
383
|
+
/**
|
|
384
|
+
* Clear all data.
|
|
385
|
+
*
|
|
386
|
+
*/
|
|
387
|
+
clear(): void;
|
|
388
|
+
getPlanesIndex(): Map<string, IsoMatcherIndexedPlane<C>>;
|
|
389
|
+
/**
|
|
390
|
+
* Creates a common data structure able to match and route accordingly.
|
|
391
|
+
*
|
|
392
|
+
*/
|
|
393
|
+
private updateIndexes;
|
|
394
|
+
private indexPlanes;
|
|
395
|
+
private matchPlane;
|
|
396
|
+
private matchRoute;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
type ParserPartialOptions = Partial<ParserOptions>;
|
|
400
|
+
interface ParserOptions {
|
|
401
|
+
/**
|
|
402
|
+
* Allow the parsing of fragments. Default `true`.
|
|
403
|
+
*/
|
|
404
|
+
fragment: boolean;
|
|
405
|
+
}
|
|
406
|
+
interface ParserResponse<C> {
|
|
407
|
+
path: PluridRoute<C>;
|
|
408
|
+
pathname: string;
|
|
409
|
+
elements: string[];
|
|
410
|
+
match: boolean;
|
|
411
|
+
parameters: Indexed<string>;
|
|
412
|
+
query: Indexed<string>;
|
|
413
|
+
fragments: PluridRouteFragments;
|
|
414
|
+
route: string;
|
|
415
|
+
}
|
|
416
|
+
interface MatcherResponse<C> {
|
|
417
|
+
path: PluridRoute<C>;
|
|
418
|
+
pathname: string;
|
|
419
|
+
parameters: Record<string, string>;
|
|
420
|
+
query: Record<string, string>;
|
|
421
|
+
fragments: PluridRouteFragments;
|
|
422
|
+
route: string;
|
|
423
|
+
}
|
|
424
|
+
interface ParserParametersAndMatch {
|
|
425
|
+
match: boolean;
|
|
426
|
+
parameters: Indexed<string>;
|
|
427
|
+
elements: string[];
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
declare class Parser<C> {
|
|
431
|
+
/** properties */
|
|
432
|
+
private location;
|
|
433
|
+
private path;
|
|
434
|
+
private options;
|
|
435
|
+
/** constructor */
|
|
436
|
+
constructor(location: string, path: PluridRoute<C>, options?: ParserPartialOptions);
|
|
437
|
+
/** private */
|
|
438
|
+
private handleOptions;
|
|
439
|
+
private extractPathname;
|
|
440
|
+
private extractParametersAndMatch;
|
|
441
|
+
private extractQuery;
|
|
442
|
+
private extractFragments;
|
|
443
|
+
/** public */
|
|
444
|
+
/**
|
|
445
|
+
* Extract pathname, parameters, query, and fragment, if available.
|
|
446
|
+
*/
|
|
447
|
+
extract(): ParserResponse<C>;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Extract the query values.
|
|
452
|
+
*
|
|
453
|
+
* e.g.
|
|
454
|
+
*
|
|
455
|
+
* `path = '/foo?id=1&asd=asd'`
|
|
456
|
+
*
|
|
457
|
+
* `query = { id: 1, asd: 'asd' }`
|
|
458
|
+
*
|
|
459
|
+
* @param path
|
|
460
|
+
*/
|
|
461
|
+
declare const extractQuery: (path: string) => Indexed<string>;
|
|
462
|
+
|
|
463
|
+
declare const stringInsertInitial: (value: string, insert: string) => string;
|
|
464
|
+
declare const stringRemoveTrailing: (value: string, trail: string) => string;
|
|
465
|
+
declare const cleanupPath: (value: string) => string;
|
|
466
|
+
declare const computePlaneAddress: (plane: string, route?: string, origin?: string) => string;
|
|
467
|
+
declare const isAbsolutePlane: (value: string) => boolean;
|
|
468
|
+
declare const checkPlaneAddressType: (value: string) => "http" | "https" | "pttp" | "relative";
|
|
469
|
+
declare const removeTrailingSlash: (value: string) => string;
|
|
470
|
+
declare const cleanPathValue: (value: string) => string;
|
|
471
|
+
|
|
472
|
+
declare const checkParameterLength: (parameter: string, length: number, compareType?: CompareType) => boolean;
|
|
473
|
+
declare const checkValidPath: <C>(validationParameters: Record<string, PluridRouteParameter> | undefined, parameters: Indexed<string>) => boolean;
|
|
474
|
+
|
|
475
|
+
declare const pluridLinkPathDivider: (route: string) => RouteDivisions;
|
|
476
|
+
/**
|
|
477
|
+
* Given a partial `route`, e.g. `/route`, or `://cluster://route`,
|
|
478
|
+
* it resolves it to the absolute form
|
|
479
|
+
* `protocol://origin://route://space://universe://cluster://plane`.
|
|
480
|
+
*
|
|
481
|
+
* @param path
|
|
482
|
+
*/
|
|
483
|
+
declare const resolveRoute: (route: string, protocol?: string, host?: string) => {
|
|
484
|
+
protocol: string;
|
|
485
|
+
host: _plurid_plurid_data.RouteHostDivision;
|
|
486
|
+
path: _plurid_plurid_data.RoutePathDivision;
|
|
487
|
+
space: _plurid_plurid_data.RouteSpaceDivision;
|
|
488
|
+
universe: _plurid_plurid_data.RouteUniverseDivision;
|
|
489
|
+
cluster: _plurid_plurid_data.RouteClusterDivision;
|
|
490
|
+
plane: _plurid_plurid_data.RoutePlaneDivision;
|
|
491
|
+
route: string;
|
|
492
|
+
} | {
|
|
493
|
+
protocol: string;
|
|
494
|
+
host: string;
|
|
495
|
+
path: _plurid_plurid_data.RoutePathDivision;
|
|
496
|
+
space: string;
|
|
497
|
+
universe: string;
|
|
498
|
+
cluster: string;
|
|
499
|
+
plane: string;
|
|
500
|
+
route: string;
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
type index$9_IsoMatcher<C> = IsoMatcher<C>;
|
|
504
|
+
declare const index$9_IsoMatcher: typeof IsoMatcher;
|
|
505
|
+
type index$9_MatcherResponse<C> = MatcherResponse<C>;
|
|
506
|
+
type index$9_ParserOptions = ParserOptions;
|
|
507
|
+
type index$9_ParserParametersAndMatch = ParserParametersAndMatch;
|
|
508
|
+
type index$9_ParserPartialOptions = ParserPartialOptions;
|
|
509
|
+
type index$9_ParserResponse<C> = ParserResponse<C>;
|
|
510
|
+
declare const index$9_checkParameterLength: typeof checkParameterLength;
|
|
511
|
+
declare const index$9_checkPlaneAddressType: typeof checkPlaneAddressType;
|
|
512
|
+
declare const index$9_checkValidPath: typeof checkValidPath;
|
|
513
|
+
declare const index$9_cleanPathValue: typeof cleanPathValue;
|
|
514
|
+
declare const index$9_cleanupPath: typeof cleanupPath;
|
|
515
|
+
declare const index$9_computePlaneAddress: typeof computePlaneAddress;
|
|
516
|
+
declare const index$9_extractQuery: typeof extractQuery;
|
|
517
|
+
declare const index$9_isAbsolutePlane: typeof isAbsolutePlane;
|
|
518
|
+
declare const index$9_pluridLinkPathDivider: typeof pluridLinkPathDivider;
|
|
519
|
+
declare const index$9_removeTrailingSlash: typeof removeTrailingSlash;
|
|
520
|
+
declare const index$9_resolveRoute: typeof resolveRoute;
|
|
521
|
+
declare const index$9_stringInsertInitial: typeof stringInsertInitial;
|
|
522
|
+
declare const index$9_stringRemoveTrailing: typeof stringRemoveTrailing;
|
|
523
|
+
declare namespace index$9 {
|
|
524
|
+
export { index$9_IsoMatcher as IsoMatcher, type index$9_MatcherResponse as MatcherResponse, type index$9_ParserOptions as ParserOptions, type index$9_ParserParametersAndMatch as ParserParametersAndMatch, type index$9_ParserPartialOptions as ParserPartialOptions, type index$9_ParserResponse as ParserResponse, Parser as RouteParser, index$9_checkParameterLength as checkParameterLength, index$9_checkPlaneAddressType as checkPlaneAddressType, index$9_checkValidPath as checkValidPath, index$9_cleanPathValue as cleanPathValue, index$9_cleanupPath as cleanupPath, index$9_computePlaneAddress as computePlaneAddress, index$9_extractQuery as extractQuery, index$9_isAbsolutePlane as isAbsolutePlane, index$9_pluridLinkPathDivider as pluridLinkPathDivider, index$9_removeTrailingSlash as removeTrailingSlash, index$9_resolveRoute as resolveRoute, index$9_stringInsertInitial as stringInsertInitial, index$9_stringRemoveTrailing as stringRemoveTrailing };
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
declare const computeColumnLayout: (roots: TreePlane[], columns?: number, columnLength?: number, gap?: number, configuration?: PluridConfiguration) => TreePlane[];
|
|
528
|
+
|
|
529
|
+
declare const computeRowLayout: (roots: TreePlane[], rows?: number, rowLength?: number, gap?: number, configuration?: PluridConfiguration) => TreePlane[];
|
|
530
|
+
|
|
531
|
+
declare const computeFaceToFaceLayout: (roots: TreePlane[], angle?: number, gap?: number, middle?: number, configuration?: PluridConfiguration) => TreePlane[];
|
|
532
|
+
|
|
533
|
+
declare const computeSheavesLayout: (roots: TreePlane[], depth?: number, offsetX?: number, offsetY?: number, configuration?: PluridConfiguration) => TreePlane[];
|
|
534
|
+
|
|
535
|
+
declare const computeZigZagLayout: (pages: TreePlane[], angle?: number, configuration?: PluridConfiguration) => TreePlane[];
|
|
536
|
+
|
|
537
|
+
declare const index$8_computeColumnLayout: typeof computeColumnLayout;
|
|
538
|
+
declare const index$8_computeFaceToFaceLayout: typeof computeFaceToFaceLayout;
|
|
539
|
+
declare const index$8_computeRowLayout: typeof computeRowLayout;
|
|
540
|
+
declare const index$8_computeSheavesLayout: typeof computeSheavesLayout;
|
|
541
|
+
declare const index$8_computeZigZagLayout: typeof computeZigZagLayout;
|
|
542
|
+
declare namespace index$8 {
|
|
543
|
+
export { index$8_computeColumnLayout as computeColumnLayout, index$8_computeFaceToFaceLayout as computeFaceToFaceLayout, index$8_computeRowLayout as computeRowLayout, index$8_computeSheavesLayout as computeSheavesLayout, index$8_computeZigZagLayout as computeZigZagLayout };
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
declare const computePath: (tree: TreePlane[], planeID: string) => TreePlane[];
|
|
547
|
+
declare const computePluridPlaneLocation: (linkCoordinates: LinkCoordinates, treePageParent: TreePlane, bridgeLength?: number, linkPlaneAngle?: number) => LocationCoordinates;
|
|
548
|
+
declare const recomputeChildrenLocation: (page: TreePlane) => TreePlane[];
|
|
549
|
+
|
|
550
|
+
declare const index$7_computePath: typeof computePath;
|
|
551
|
+
declare const index$7_computePluridPlaneLocation: typeof computePluridPlaneLocation;
|
|
552
|
+
declare const index$7_recomputeChildrenLocation: typeof recomputeChildrenLocation;
|
|
553
|
+
declare namespace index$7 {
|
|
554
|
+
export { index$7_computePath as computePath, index$7_computePluridPlaneLocation as computePluridPlaneLocation, index$7_recomputeChildrenLocation as recomputeChildrenLocation };
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
interface TreeData<C> {
|
|
558
|
+
planes: Map<string, RegisteredPluridPlane<C>>;
|
|
559
|
+
view: PluridApplicationView;
|
|
560
|
+
configuration: PluridConfiguration;
|
|
561
|
+
layout?: boolean;
|
|
562
|
+
previousTree?: TreePlane[];
|
|
563
|
+
}
|
|
564
|
+
declare class Tree<C> {
|
|
565
|
+
private data;
|
|
566
|
+
private origin;
|
|
567
|
+
private count;
|
|
568
|
+
constructor(data: TreeData<C>, origin?: string);
|
|
569
|
+
compute(): TreePlane[];
|
|
570
|
+
private getCount;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Given a view resolve it to an absolute view
|
|
575
|
+
* and compute a TreePlane if there is a RegisteredPluridPlane
|
|
576
|
+
* for that absolute view.
|
|
577
|
+
*
|
|
578
|
+
* @param view
|
|
579
|
+
*/
|
|
580
|
+
declare const resolveViewItem: <C>(planes: Map<string, RegisteredPluridPlane<C>>, view: string | PluridView, configuration: PluridConfiguration, origin?: string, getCount?: () => number) => TreePlane | undefined;
|
|
581
|
+
/**
|
|
582
|
+
* Compute the space based on the layout.
|
|
583
|
+
* If there is no configuration.space.layout, it uses the default '2 COLUMNS' layout.
|
|
584
|
+
*
|
|
585
|
+
* @param planes
|
|
586
|
+
* @param configuration
|
|
587
|
+
*/
|
|
588
|
+
declare const computeSpaceTree: <C>(planes: Map<string, RegisteredPluridPlane<C>>, view: PluridApplicationView, configuration: PluridConfiguration, layout: boolean | undefined, origin: string | undefined, getCount: () => number) => TreePlane[];
|
|
589
|
+
declare const updateTreePlane: (tree: TreePlane[], updatedPlane: TreePlane) => TreePlane[];
|
|
590
|
+
interface UpdatedTreeWithNewPlane {
|
|
591
|
+
pluridPlaneID: string;
|
|
592
|
+
updatedTree: TreePlane[];
|
|
593
|
+
updatedTreePlane?: TreePlane;
|
|
594
|
+
}
|
|
595
|
+
declare const updateTreeWithNewPlane: <C>(planeRoute: string, parentPlaneID: string, linkCoordinates: LinkCoordinates, tree: TreePlane[], planesRegistry: Map<string, RegisteredPluridPlane<C>>, configuration: PluridConfiguration, hostname?: string) => UpdatedTreeWithNewPlane;
|
|
596
|
+
declare const updatePlaneLocation: (tree: TreePlane[], parentPlaneID: string, planeID: string, linkCoordinates: LinkCoordinates) => TreePlane[];
|
|
597
|
+
declare const updateTreeWithNewPage: (tree: TreePlane[], treePageParentPlaneID: string, pagePath: string, pageID: string, linkCoordinates: LinkCoordinates, parameters?: PathParameters) => UpdatedTreeWithNewPlane;
|
|
598
|
+
declare const toggleChildren: (children: TreePlane[]) => TreePlane[];
|
|
599
|
+
declare const toggleAllChildren: (tree: TreePlane[], show: boolean) => TreePlane[];
|
|
600
|
+
interface TogglePlaneFromTree {
|
|
601
|
+
updatedTree: TreePlane[];
|
|
602
|
+
updatedPlane: TreePlane | undefined;
|
|
603
|
+
}
|
|
604
|
+
declare const togglePlaneFromTree: (tree: TreePlane[], pluridPlaneID: string, forceShow?: boolean) => TogglePlaneFromTree;
|
|
605
|
+
declare const getTreePlaneByID: (stateTree: TreePlane[], id: string | undefined) => TreePlane | undefined;
|
|
606
|
+
declare const removeRootFromTree: (tree: TreePlane[], pluridPlaneID: string) => {
|
|
607
|
+
updatedTree: TreePlane[];
|
|
608
|
+
};
|
|
609
|
+
declare const removePlaneFromTree: (tree: TreePlane[], pluridPlaneID: string) => TreePlane[];
|
|
610
|
+
/**
|
|
611
|
+
* Structural-sharing reconciliation: returns `nextTree`, but every node (and array) that is
|
|
612
|
+
* deep-equal to its counterpart in `previousTree` is replaced by the PREVIOUS reference. Producers
|
|
613
|
+
* of a new tree routinely rebuild it from scratch (a layout recompute emits brand-new node objects
|
|
614
|
+
* for every plane even when only one moved); without this, every connected `<PluridRoot>`/`<Plane>`
|
|
615
|
+
* receives fresh-identity props and re-renders. Running this in the `setTree` reducer means EVERY
|
|
616
|
+
* tree-replacing path (link spawn, relayout, resize, persistence restore) gets reference stability
|
|
617
|
+
* for free, so per-plane memoization actually pays off and only the genuinely-changed planes render.
|
|
618
|
+
*/
|
|
619
|
+
declare const reconcileTree: (previousTree: TreePlane[] | undefined, nextTree: TreePlane[]) => TreePlane[];
|
|
620
|
+
|
|
621
|
+
type logic_TogglePlaneFromTree = TogglePlaneFromTree;
|
|
622
|
+
type logic_UpdatedTreeWithNewPlane = UpdatedTreeWithNewPlane;
|
|
623
|
+
declare const logic_computeSpaceTree: typeof computeSpaceTree;
|
|
624
|
+
declare const logic_getTreePlaneByID: typeof getTreePlaneByID;
|
|
625
|
+
declare const logic_reconcileTree: typeof reconcileTree;
|
|
626
|
+
declare const logic_removePlaneFromTree: typeof removePlaneFromTree;
|
|
627
|
+
declare const logic_removeRootFromTree: typeof removeRootFromTree;
|
|
628
|
+
declare const logic_resolveViewItem: typeof resolveViewItem;
|
|
629
|
+
declare const logic_toggleAllChildren: typeof toggleAllChildren;
|
|
630
|
+
declare const logic_toggleChildren: typeof toggleChildren;
|
|
631
|
+
declare const logic_togglePlaneFromTree: typeof togglePlaneFromTree;
|
|
632
|
+
declare const logic_updatePlaneLocation: typeof updatePlaneLocation;
|
|
633
|
+
declare const logic_updateTreePlane: typeof updateTreePlane;
|
|
634
|
+
declare const logic_updateTreeWithNewPage: typeof updateTreeWithNewPage;
|
|
635
|
+
declare const logic_updateTreeWithNewPlane: typeof updateTreeWithNewPlane;
|
|
636
|
+
declare namespace logic {
|
|
637
|
+
export { type logic_TogglePlaneFromTree as TogglePlaneFromTree, type logic_UpdatedTreeWithNewPlane as UpdatedTreeWithNewPlane, logic_computeSpaceTree as computeSpaceTree, logic_getTreePlaneByID as getTreePlaneByID, logic_reconcileTree as reconcileTree, logic_removePlaneFromTree as removePlaneFromTree, logic_removeRootFromTree as removeRootFromTree, logic_resolveViewItem as resolveViewItem, logic_toggleAllChildren as toggleAllChildren, logic_toggleChildren as toggleChildren, logic_togglePlaneFromTree as togglePlaneFromTree, logic_updatePlaneLocation as updatePlaneLocation, logic_updateTreePlane as updateTreePlane, logic_updateTreeWithNewPage as updateTreeWithNewPage, logic_updateTreeWithNewPlane as updateTreeWithNewPlane };
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
type index$6_Tree<C> = Tree<C>;
|
|
641
|
+
declare const index$6_Tree: typeof Tree;
|
|
642
|
+
declare const index$6_logic: typeof logic;
|
|
643
|
+
declare namespace index$6 {
|
|
644
|
+
export { index$6_Tree as Tree, index$6_logic as logic };
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
declare const computeSpaceSize: (tree: TreePlane[]) => {
|
|
648
|
+
width: number;
|
|
649
|
+
height: number;
|
|
650
|
+
depth: number;
|
|
651
|
+
topCorner: {
|
|
652
|
+
x: number;
|
|
653
|
+
y: number;
|
|
654
|
+
z: number;
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
declare const findPage: (view: string, pages: TreePlane[]) => TreePlane | undefined;
|
|
658
|
+
declare const splitIntoGroups: <T>(data: T[], length: number) => T[][];
|
|
659
|
+
declare const getTreePlaneByPlaneID: (tree: TreePlane[], planeID: string) => TreePlane | null;
|
|
660
|
+
|
|
661
|
+
declare const index$5_computeSpaceSize: typeof computeSpaceSize;
|
|
662
|
+
declare const index$5_findPage: typeof findPage;
|
|
663
|
+
declare const index$5_getTreePlaneByPlaneID: typeof getTreePlaneByPlaneID;
|
|
664
|
+
declare const index$5_splitIntoGroups: typeof splitIntoGroups;
|
|
665
|
+
declare namespace index$5 {
|
|
666
|
+
export { index$5_computeSpaceSize as computeSpaceSize, index$5_findPage as findPage, index$5_getTreePlaneByPlaneID as getTreePlaneByPlaneID, index$5_splitIntoGroups as splitIntoGroups };
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
declare const computeViewTree: (pages: TreePlane[], view: string[] | PluridView[]) => TreePlane[];
|
|
670
|
+
/**
|
|
671
|
+
* Compute only the view within a given radius around the user.
|
|
672
|
+
*
|
|
673
|
+
* @param pages
|
|
674
|
+
* @param view
|
|
675
|
+
* @param location
|
|
676
|
+
*/
|
|
677
|
+
declare const computeCulledView: (pages: TreePlane[], view: string[] | PluridView[], location: SpaceLocation, radius?: number) => string[] | undefined;
|
|
678
|
+
declare const checkPageInView: (page: TreePlane, location: SpaceLocation, radius: number) => boolean;
|
|
679
|
+
|
|
680
|
+
declare const index$4_checkPageInView: typeof checkPageInView;
|
|
681
|
+
declare const index$4_computeCulledView: typeof computeCulledView;
|
|
682
|
+
declare const index$4_computeViewTree: typeof computeViewTree;
|
|
683
|
+
declare namespace index$4 {
|
|
684
|
+
export { index$4_checkPageInView as checkPageInView, index$4_computeCulledView as computeCulledView, index$4_computeViewTree as computeViewTree };
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
declare namespace index$3 {
|
|
688
|
+
export { index$8 as layout, index$7 as location, index$6 as tree, index$5 as utilities, index$4 as view };
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
declare const compute: <C>(view: PluridApplicationView, configuration: RecursivePartial<PluridConfiguration> | undefined, planesRegistrar: PluridPlanesRegistrar$1<C> | undefined, currentState: PluridState | undefined, localState: PluridState | undefined, precomputedState: Partial<PluridState> | undefined, contextState: PluridMetastateState | undefined, hostname?: string) => PluridState;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Build a focused, versioned snapshot of the persistable space state.
|
|
695
|
+
*/
|
|
696
|
+
declare const serialize: (state: PluridState) => string;
|
|
697
|
+
/**
|
|
698
|
+
* Persist the focused space snapshot via the storage adapter (default `localStorage`). No-op when
|
|
699
|
+
* there is no state or no available backend.
|
|
700
|
+
*/
|
|
701
|
+
declare const save: (id: string | undefined, state: PluridState | undefined, adapter?: PluridStorageAdapter) => void;
|
|
702
|
+
/**
|
|
703
|
+
* Load a previously persisted snapshot. Returns a partial `PluridState` (just `{ space }`)
|
|
704
|
+
* that `compute`/`resolveSpace` merge over a freshly-computed space. Version mismatch,
|
|
705
|
+
* missing data, or parse errors all fall back to a fresh space (return `undefined`).
|
|
706
|
+
*/
|
|
707
|
+
declare const load: (id: string | undefined, useLocalStorage: boolean | undefined, adapter?: PluridStorageAdapter) => PluridState | undefined;
|
|
708
|
+
/**
|
|
709
|
+
* Persist an OPAQUE product content blob (the `onPersistContent` seam). Stored under a sibling key
|
|
710
|
+
* to the space snapshot, with NO engine version stamp — the content shape (and any migration) is
|
|
711
|
+
* the product's concern; the engine never inspects it. No-op outside the browser / for `undefined`.
|
|
712
|
+
*/
|
|
713
|
+
declare const saveContent: (id: string | undefined, content: unknown, adapter?: PluridStorageAdapter) => void;
|
|
714
|
+
/**
|
|
715
|
+
* Load the opaque product content blob, or `undefined` if absent / unparseable.
|
|
716
|
+
*/
|
|
717
|
+
declare const loadContent: (id: string | undefined, adapter?: PluridStorageAdapter) => unknown;
|
|
718
|
+
|
|
719
|
+
declare const index$2_load: typeof load;
|
|
720
|
+
declare const index$2_loadContent: typeof loadContent;
|
|
721
|
+
declare const index$2_save: typeof save;
|
|
722
|
+
declare const index$2_saveContent: typeof saveContent;
|
|
723
|
+
declare const index$2_serialize: typeof serialize;
|
|
724
|
+
declare namespace index$2 {
|
|
725
|
+
export { index$2_load as load, index$2_loadContent as loadContent, index$2_save as save, index$2_saveContent as saveContent, index$2_serialize as serialize };
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
declare const index$1_compute: typeof compute;
|
|
729
|
+
declare namespace index$1 {
|
|
730
|
+
export { index$1_compute as compute, index$2 as local };
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
declare const cleanPathElement: (path: string) => string;
|
|
734
|
+
|
|
735
|
+
declare const index_cleanPathElement: typeof cleanPathElement;
|
|
736
|
+
declare namespace index {
|
|
737
|
+
export { index_cleanPathElement as cleanPathElement };
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
declare const cleanTemplate: (template: string) => string;
|
|
741
|
+
|
|
742
|
+
declare const pluridRouterNavigate: (path: string) => void;
|
|
743
|
+
|
|
744
|
+
export { IsoMatcher, Parser as RouteParser, cleanTemplate, definePluridConfiguration, index$i as general, index$b as interaction, internatiolate, index$a as planes, pluridRouterNavigate, index$9 as routing, index$3 as space, index$1 as state, index as utilities };
|