@crystaldesign/planner-core 26.14.0-beta.4 → 26.14.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/cjs/index.js +405 -41
- package/build/esm/index.js +405 -41
- package/build/types/planner-core/src/stretch/profile.d.ts +45 -0
- package/build/types/planner-core/src/stretch/profile.d.ts.map +1 -0
- package/build/types/planner-core/src/stretch/stretchArticleSvg.d.ts.map +1 -1
- package/build/types/planner-core/src/tests/stretchProfile.test.d.ts +2 -0
- package/build/types/planner-core/src/tests/stretchProfile.test.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { StretchState } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Profile drawings: an article drawn as a stack of plates around one spine curve (e.g. the arches of a pool
|
|
4
|
+
* enclosure). Stretching moves only the spine; every plate edge is rebuilt as a parallel offset of it, so plates
|
|
5
|
+
* keep their thickness and gaps at any size, where the SAH/SAV areas would squeeze them.
|
|
6
|
+
*
|
|
7
|
+
* Opt-in through a `<g id="PROFILE…">` (usually inside TE, so viewers without this engine never show it), holding
|
|
8
|
+
* the spine as one `<path>` of absolute M/L commands from foot to foot (feet on the OLT's bottom edge):
|
|
9
|
+
* - `data-plates`: `in,out;in,out;…` — each plate's inner and outer edge as its distance outward from the spine.
|
|
10
|
+
* - `data-k` (optional, default 1): heights are multiplied by k for the offsets, so a plate steps `d` sideways but
|
|
11
|
+
* `d / k` upwards (box profiles whose top plates are thicker than their legs).
|
|
12
|
+
* - `data-parts` (optional): `in,out,from,to;…` — plates over part of the spine only (e.g. a sliding door), from/to
|
|
13
|
+
* as fractional spine vertex indices; their ends stay square to the spine.
|
|
14
|
+
* The drawing in VIT stays as the fallback for other viewers; this engine replaces it with the rebuilt plates.
|
|
15
|
+
*
|
|
16
|
+
* Not IDM compatible: a DIVA-only extension of the article SVG, implemented for the Polyfaser pool enclosure roofs
|
|
17
|
+
* (ART_SIDE_DACH_*). IDM and every other SVG consumer ignore the group and show the VIT drawing.
|
|
18
|
+
*/
|
|
19
|
+
export interface ProfileSpec {
|
|
20
|
+
spine: Point[];
|
|
21
|
+
plates: [number, number][];
|
|
22
|
+
parts: [number, number, number, number][];
|
|
23
|
+
k: number;
|
|
24
|
+
/** Inline style of the drawn plate outlines (taken from the first VIT path). */
|
|
25
|
+
style: string | null;
|
|
26
|
+
/** That path's class and presentation attributes, copied as attributes so a stylesheet keeps its priority over them. */
|
|
27
|
+
attributes: [string, string][];
|
|
28
|
+
}
|
|
29
|
+
interface Point {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Takes the profile groups out of the document (before any stretch pass touches them) and returns their specs.
|
|
35
|
+
* A group without a usable spine or plates is dropped with a warning: the article then shows its VIT drawing.
|
|
36
|
+
*/
|
|
37
|
+
export declare function takeProfiles(document: Document, warn: (message: string) => void): ProfileSpec[];
|
|
38
|
+
/**
|
|
39
|
+
* Rebuilds the profiles for the stretched size and replaces the VIT drawing with them. The spine's left foot stays,
|
|
40
|
+
* its right foot moves with the OLT's right edge, everything between is spread evenly; heights follow the OLT height.
|
|
41
|
+
* The outermost plate's feet then stand on the OLT's bottom corners.
|
|
42
|
+
*/
|
|
43
|
+
export declare function renderProfiles(state: StretchState, specs: ProfileSpec[]): void;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../../../src/stretch/profile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC3B,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC1C,CAAC,EAAE,MAAM,CAAC;IACV,gFAAgF;IAChF,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,wHAAwH;IACxH,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CAChC;AAED,UAAU,KAAK;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAyDD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,WAAW,EAAE,CAwB/F;AA6ED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CA4C9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stretchArticleSvg.d.ts","sourceRoot":"","sources":["../../../../../src/stretch/stretchArticleSvg.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stretchArticleSvg.d.ts","sourceRoot":"","sources":["../../../../../src/stretch/stretchArticleSvg.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGxD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,aAAa,CAgDxI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stretchProfile.test.d.ts","sourceRoot":"","sources":["../../../../../src/tests/stretchProfile.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/planner-core",
|
|
3
|
-
"version": "26.14.0-beta.
|
|
3
|
+
"version": "26.14.0-beta.40",
|
|
4
4
|
"description": "Browser-free planner core: article SVG parsing, docking logic, dock transform math and collision geometry.",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"w3c-xmlserializer": "
|
|
6
|
+
"w3c-xmlserializer": "6.0.0"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@types/jsdom": "^21.1.7",
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"types": "./build/types/planner-core/src/index.d.ts",
|
|
21
21
|
"module": "build/esm/index.js",
|
|
22
22
|
"main": "build/cjs/index.js",
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "54d7cbb4c65b3ffb7e8059e4932cf0e4f776a535"
|
|
24
24
|
}
|