geomui 0.5.55 → 0.5.57
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/dist/Drawing.svelte +131 -180
- package/dist/Drawing.svelte.d.ts +6 -24
- package/dist/DrawingList.svelte +20 -28
- package/dist/DrawingList.svelte.d.ts +3 -18
- package/dist/InputParams.svelte +107 -115
- package/dist/InputParams.svelte.d.ts +5 -25
- package/dist/LabelCheckbox.svelte +11 -11
- package/dist/LocStorRead.svelte +13 -7
- package/dist/LocStorRead.svelte.d.ts +3 -18
- package/dist/LocStorTable.svelte +20 -14
- package/dist/LocStorTable.svelte.d.ts +3 -18
- package/dist/LocStorWrite.svelte +10 -19
- package/dist/LocStorWrite.svelte.d.ts +3 -18
- package/dist/ModalDiag.svelte +22 -8
- package/dist/ModalDiag.svelte.d.ts +5 -27
- package/dist/ModalImg.svelte +6 -3
- package/dist/ModalImg.svelte.d.ts +3 -18
- package/dist/OneDesign.svelte +8 -4
- package/dist/OneDesign.svelte.d.ts +3 -18
- package/dist/ParamDrawExport.svelte +103 -37
- package/dist/ParamDrawExport.svelte.d.ts +3 -18
- package/dist/SimpleDrawing.svelte +67 -50
- package/dist/SimpleDrawing.svelte.d.ts +6 -24
- package/dist/SubDesign.svelte +15 -12
- package/dist/SubDesign.svelte.d.ts +6 -21
- package/dist/TimeControl.svelte +17 -10
- package/dist/TimeControl.svelte.d.ts +3 -18
- package/dist/ZoomControl.svelte +11 -21
- package/dist/ZoomControl.svelte.d.ts +4 -19
- package/dist/initStore.js +12 -11
- package/dist/stateDrawing.svelte.d.ts +8 -0
- package/dist/stateDrawing.svelte.js +8 -0
- package/dist/stateParams.svelte.d.ts +5 -0
- package/dist/stateParams.svelte.js +3 -0
- package/package.json +20 -20
- package/dist/drawingLayers.d.ts +0 -2
- package/dist/drawingLayers.js +0 -6
- package/dist/storePVal.d.ts +0 -5
- package/dist/storePVal.js +0 -4
package/dist/SubDesign.svelte
CHANGED
|
@@ -4,22 +4,25 @@
|
|
|
4
4
|
//import { downloadParams, generateUrl } from './downloadParams';
|
|
5
5
|
import { downloadParams } from './downloadParams';
|
|
6
6
|
import { updateStore } from './initStore';
|
|
7
|
-
//import { onMount, createEventDispatcher } from 'svelte';
|
|
8
|
-
//import { browser } from '$app/environment';
|
|
9
7
|
//import { page } from '$app/stores';
|
|
10
8
|
import { base } from '$app/paths';
|
|
11
9
|
import { goto } from '$app/navigation';
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
// props
|
|
12
|
+
interface Props {
|
|
13
|
+
subD: tSubDesign;
|
|
14
|
+
origPartName: string;
|
|
15
|
+
pLink: tAllLink;
|
|
16
|
+
}
|
|
17
|
+
let { subD, origPartName, pLink }: Props = $props();
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
// derived
|
|
20
|
+
const dSubInstList: string[] = $derived(Object.keys(subD));
|
|
19
21
|
|
|
22
|
+
// actions
|
|
20
23
|
async function goToUrl(subInstName: string) {
|
|
21
24
|
const subObj = subD[subInstName];
|
|
22
|
-
// modify the global store
|
|
25
|
+
// modify the global store sParams
|
|
23
26
|
updateStore(subObj.partName, paramListToVal(subObj.dparam), true);
|
|
24
27
|
//const rUrl = generateUrl(`${$page.url.origin}${base}/${subObj.link}`, paramListToVal(subObj.dparam), true);
|
|
25
28
|
//const rUrl = generateUrl(`${$page.url.origin}${base}/${subObj.link}`, {}, true);
|
|
@@ -59,20 +62,20 @@
|
|
|
59
62
|
<section>
|
|
60
63
|
<h2>
|
|
61
64
|
Sub-designs
|
|
62
|
-
<span>(Number of sub-instances: {
|
|
65
|
+
<span>(Number of sub-instances: {dSubInstList.length})</span>
|
|
63
66
|
</h2>
|
|
64
67
|
<ol>
|
|
65
|
-
{#each
|
|
68
|
+
{#each dSubInstList as subInst}
|
|
66
69
|
<li>
|
|
67
70
|
<input type="checkbox" id="cb_{subInst}" class="toggle" checked={false} />
|
|
68
71
|
<label for="cb_{subInst}" class="label">
|
|
69
72
|
<div class="arrow"></div>
|
|
70
73
|
{subInst}
|
|
71
74
|
</label>
|
|
72
|
-
<button
|
|
75
|
+
<button onclick={() => goToUrl(subInst)}
|
|
73
76
|
>Go to {pLink[subD[subInst].partName]}</button
|
|
74
77
|
>
|
|
75
|
-
<button
|
|
78
|
+
<button onclick={() => dwnParams2(subInst)}>Export parameters</button>
|
|
76
79
|
<div class="nested">
|
|
77
80
|
<article>
|
|
78
81
|
{Object.keys(subD[subInst].dparam).length} parameters of
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import type { tAllLink } from 'geometrix';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} & Exports;
|
|
6
|
-
(internal: unknown, props: Props & {
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const SubDesign: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
subD?: any;
|
|
17
|
-
origPartName?: string;
|
|
1
|
+
import type { tSubDesign, tAllLink } from 'geometrix';
|
|
2
|
+
declare const SubDesign: import("svelte").Component<{
|
|
3
|
+
subD: tSubDesign;
|
|
4
|
+
origPartName: string;
|
|
18
5
|
pLink: tAllLink;
|
|
19
|
-
}, {
|
|
20
|
-
|
|
21
|
-
}, {}, {}, string>;
|
|
22
|
-
type SubDesign = InstanceType<typeof SubDesign>;
|
|
6
|
+
}, {}, "">;
|
|
7
|
+
type SubDesign = ReturnType<typeof SubDesign>;
|
|
23
8
|
export default SubDesign;
|
package/dist/TimeControl.svelte
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onDestroy } from 'svelte';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
// props
|
|
5
|
+
interface Props {
|
|
6
|
+
tMax?: number;
|
|
7
|
+
tStep?: number;
|
|
8
|
+
tUpdate?: number;
|
|
9
|
+
simTime?: number;
|
|
10
|
+
}
|
|
11
|
+
let { tMax = 10, tStep = 0.1, tUpdate = 500, simTime = $bindable(0) }: Props = $props();
|
|
8
12
|
|
|
13
|
+
// internal state: no need of $state() because no UI update
|
|
9
14
|
let intervalID: ReturnType<typeof setTimeout> | null = null;
|
|
10
15
|
let speed = 0;
|
|
11
16
|
let inc: number;
|
|
12
17
|
const speedMax = 4;
|
|
18
|
+
|
|
19
|
+
// actions
|
|
13
20
|
function clearInterval2() {
|
|
14
21
|
if (intervalID !== null) {
|
|
15
22
|
clearInterval(intervalID);
|
|
@@ -72,12 +79,12 @@
|
|
|
72
79
|
</script>
|
|
73
80
|
|
|
74
81
|
<nav>
|
|
75
|
-
<button
|
|
76
|
-
<button
|
|
77
|
-
<button
|
|
78
|
-
<button
|
|
79
|
-
<button
|
|
80
|
-
<button
|
|
82
|
+
<button onclick={simZero}>0</button>
|
|
83
|
+
<button onclick={simPlayBackward}><-</button>
|
|
84
|
+
<button onclick={simDecrem}>|<</button>
|
|
85
|
+
<button onclick={simPause}>||</button>
|
|
86
|
+
<button onclick={simIncrem}>>|</button>
|
|
87
|
+
<button onclick={simPlayForward}>-></button>
|
|
81
88
|
<input type="range" bind:value={simTime} min="0" max={tMax} step={tStep} />
|
|
82
89
|
<input type="number" bind:value={simTime} min="0" max={tMax} step={tStep} />
|
|
83
90
|
</nav>
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const TimeControl: $$__sveltets_2_IsomorphicComponent<{
|
|
1
|
+
declare const TimeControl: import("svelte").Component<{
|
|
15
2
|
tMax?: number;
|
|
16
3
|
tStep?: number;
|
|
17
4
|
tUpdate?: number;
|
|
18
5
|
simTime?: number;
|
|
19
|
-
}, {
|
|
20
|
-
|
|
21
|
-
}, {}, {}, string>;
|
|
22
|
-
type TimeControl = InstanceType<typeof TimeControl>;
|
|
6
|
+
}, {}, "simTime">;
|
|
7
|
+
type TimeControl = ReturnType<typeof TimeControl>;
|
|
23
8
|
export default TimeControl;
|
package/dist/ZoomControl.svelte
CHANGED
|
@@ -1,35 +1,25 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function theClick(actionName: string) {
|
|
7
|
-
dispatch('myevent', {
|
|
8
|
-
action: actionName
|
|
9
|
-
});
|
|
2
|
+
// props
|
|
3
|
+
interface Props {
|
|
4
|
+
zoomClick: (action: string) => void;
|
|
10
5
|
}
|
|
6
|
+
let { zoomClick }: Props = $props();
|
|
11
7
|
</script>
|
|
12
8
|
|
|
13
9
|
<nav>
|
|
14
|
-
<button aria-labelledby="zoomInit"
|
|
10
|
+
<button aria-labelledby="zoomInit" onclick={() => zoomClick('zoomInit')}
|
|
15
11
|
><div class="zero"></div></button
|
|
16
|
-
|
|
17
|
-
<button aria-labelledby="zoomIn" on:click={() => theClick('zoomIn')}
|
|
12
|
+
><button aria-labelledby="zoomIn" onclick={() => zoomClick('zoomIn')}
|
|
18
13
|
><div class="zoomin"></div></button
|
|
19
|
-
|
|
20
|
-
<button aria-labelledby="zoomOut" on:click={() => theClick('zoomOut')}
|
|
14
|
+
><button aria-labelledby="zoomOut" onclick={() => zoomClick('zoomOut')}
|
|
21
15
|
><div class="zoomout"></div></button
|
|
22
|
-
|
|
23
|
-
<button aria-labelledby="moveLeft" on:click={() => theClick('moveLeft')}
|
|
16
|
+
><button aria-labelledby="moveLeft" onclick={() => zoomClick('moveLeft')}
|
|
24
17
|
><div class="arrowleft"></div></button
|
|
25
|
-
|
|
26
|
-
<button aria-labelledby="moveRight" on:click={() => theClick('moveRight')}
|
|
18
|
+
><button aria-labelledby="moveRight" onclick={() => zoomClick('moveRight')}
|
|
27
19
|
><div class="arrowright"></div></button
|
|
28
|
-
|
|
29
|
-
<button aria-labelledby="moveUp" on:click={() => theClick('moveUp')}
|
|
20
|
+
><button aria-labelledby="moveUp" onclick={() => zoomClick('moveUp')}
|
|
30
21
|
><div class="arrowup"></div></button
|
|
31
|
-
|
|
32
|
-
<button aria-labelledby="moveDown" on:click={() => theClick('moveDown')}
|
|
22
|
+
><button aria-labelledby="moveDown" onclick={() => zoomClick('moveDown')}
|
|
33
23
|
><div class="arrowdown"></div></button
|
|
34
24
|
>
|
|
35
25
|
</nav>
|
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const ZoomControl: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
myevent: CustomEvent<any>;
|
|
16
|
-
} & {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
}, {}, {}, string>;
|
|
19
|
-
type ZoomControl = InstanceType<typeof ZoomControl>;
|
|
1
|
+
declare const ZoomControl: import("svelte").Component<{
|
|
2
|
+
zoomClick: (action: string) => void;
|
|
3
|
+
}, {}, "">;
|
|
4
|
+
type ZoomControl = ReturnType<typeof ZoomControl>;
|
|
20
5
|
export default ZoomControl;
|
package/dist/initStore.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// initStore
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
//import { PType } from 'geometrix';
|
|
3
|
+
//import type { tStateParams } from './stateParams.svelte';
|
|
4
|
+
import { sParams } from './stateParams.svelte';
|
|
4
5
|
function initStore(designDefs) {
|
|
5
|
-
const iniPV = {};
|
|
6
|
+
//const iniPV: tStateParams = {};
|
|
6
7
|
for (const design of Object.keys(designDefs)) {
|
|
7
8
|
const designParam = {};
|
|
8
9
|
for (const param of designDefs[design].pDef.params) {
|
|
@@ -10,15 +11,15 @@ function initStore(designDefs) {
|
|
|
10
11
|
designParam[param.name] = param.init;
|
|
11
12
|
//}
|
|
12
13
|
}
|
|
13
|
-
|
|
14
|
+
sParams[design] = designParam;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
//sParams = iniPV;
|
|
16
17
|
}
|
|
17
18
|
function updateStore(iPartName, dParams, overwrite) {
|
|
18
|
-
const iniPV =
|
|
19
|
-
const designNames = Object.keys(
|
|
19
|
+
//const iniPV = sParams;
|
|
20
|
+
const designNames = Object.keys(sParams);
|
|
20
21
|
if (designNames.includes(iPartName)) {
|
|
21
|
-
const inidParams =
|
|
22
|
+
const inidParams = sParams[iPartName];
|
|
22
23
|
const inidParamNames = Object.keys(inidParams);
|
|
23
24
|
for (const pa of Object.keys(dParams)) {
|
|
24
25
|
if (!inidParamNames.includes(pa)) {
|
|
@@ -28,14 +29,14 @@ function updateStore(iPartName, dParams, overwrite) {
|
|
|
28
29
|
inidParams[pa] = dParams[pa];
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
+
sParams[iPartName] = inidParams;
|
|
32
33
|
//console.log(`dbg781: updateStore of ${iPartName}`);
|
|
33
34
|
}
|
|
34
35
|
else {
|
|
35
|
-
|
|
36
|
+
sParams[iPartName] = dParams;
|
|
36
37
|
//console.log(`dbg782: updateStore of new ${iPartName}`);
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
//sParams = iniPV;
|
|
39
40
|
}
|
|
40
41
|
function incrStore(oneDesignDef) {
|
|
41
42
|
const dName = oneDesignDef.pDef.partName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geomui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.57",
|
|
4
4
|
"description": "The svelte-library of the webapp-UI of Parametrix",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -66,36 +66,36 @@
|
|
|
66
66
|
"clean": "rimraf .svelte-kit build node_modules dist static/pgdsvg"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@sveltejs/kit": "^2.0
|
|
70
|
-
"svelte": "^
|
|
69
|
+
"@sveltejs/kit": "^2.7.0",
|
|
70
|
+
"svelte": "^5.1.0"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"geometrix": "^0.5.
|
|
73
|
+
"geometrix": "^0.5.54"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@atao60/fse-cli": "^0.1.9",
|
|
77
|
-
"@sveltejs/adapter-auto": "^3.3.
|
|
78
|
-
"@sveltejs/adapter-static": "^3.0.
|
|
79
|
-
"@sveltejs/kit": "^2.
|
|
80
|
-
"@sveltejs/package": "^2.3.
|
|
77
|
+
"@sveltejs/adapter-auto": "^3.3.1",
|
|
78
|
+
"@sveltejs/adapter-static": "^3.0.6",
|
|
79
|
+
"@sveltejs/kit": "^2.8.1",
|
|
80
|
+
"@sveltejs/package": "^2.3.7",
|
|
81
81
|
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
82
82
|
"@types/eslint": "^9.6.1",
|
|
83
|
-
"designix": "^0.5.
|
|
84
|
-
"eslint": "^9.
|
|
83
|
+
"designix": "^0.5.55",
|
|
84
|
+
"eslint": "^9.14.0",
|
|
85
85
|
"eslint-config-prettier": "^9.1.0",
|
|
86
86
|
"eslint-plugin-svelte": "^2.46.0",
|
|
87
|
-
"globals": "^15.
|
|
88
|
-
"npm-run-all2": "^7.0.
|
|
87
|
+
"globals": "^15.12.0",
|
|
88
|
+
"npm-run-all2": "^7.0.1",
|
|
89
89
|
"prettier": "^3.3.3",
|
|
90
|
-
"prettier-plugin-svelte": "^3.2.
|
|
91
|
-
"publint": "^0.2.
|
|
90
|
+
"prettier-plugin-svelte": "^3.2.8",
|
|
91
|
+
"publint": "^0.2.12",
|
|
92
92
|
"rimraf": "^6.0.1",
|
|
93
|
-
"sass": "^1.80.
|
|
94
|
-
"svelte": "^5.
|
|
95
|
-
"svelte-check": "^4.0.
|
|
93
|
+
"sass": "^1.80.7",
|
|
94
|
+
"svelte": "^5.1.16",
|
|
95
|
+
"svelte-check": "^4.0.7",
|
|
96
96
|
"typescript": "^5.6.3",
|
|
97
|
-
"typescript-eslint": "^8.
|
|
98
|
-
"vite": "^5.4.
|
|
99
|
-
"vitest": "^2.1.
|
|
97
|
+
"typescript-eslint": "^8.14.0",
|
|
98
|
+
"vite": "^5.4.11",
|
|
99
|
+
"vitest": "^2.1.5"
|
|
100
100
|
}
|
|
101
101
|
}
|
package/dist/drawingLayers.d.ts
DELETED
package/dist/drawingLayers.js
DELETED
package/dist/storePVal.d.ts
DELETED
package/dist/storePVal.js
DELETED