geomui 0.5.61 → 1.0.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/dist/InputParams.svelte +41 -8
- package/dist/ParamDrawExport.svelte +5 -1
- package/dist/SubDesign.svelte +3 -3
- package/dist/TimeControl.svelte +1 -0
- package/dist/ZoomControl.svelte +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -3
- package/package.json +12 -12
package/dist/InputParams.svelte
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
import { sParams } from './stateParams.svelte';
|
|
11
11
|
import { downloadParams, generateUrl } from './downloadParams';
|
|
12
12
|
import { browser } from '$app/environment';
|
|
13
|
-
import { page } from '$app/
|
|
13
|
+
import { page } from '$app/state';
|
|
14
14
|
import { base } from '$app/paths';
|
|
15
|
+
import { afterNavigate } from '$app/navigation';
|
|
15
16
|
|
|
16
17
|
// props
|
|
17
18
|
interface Props {
|
|
@@ -40,6 +41,10 @@
|
|
|
40
41
|
let htableVis: tHTableVis = $state(makeHTableVis(makeHTable(pDef.params)));
|
|
41
42
|
|
|
42
43
|
// initialization
|
|
44
|
+
afterNavigate(() => {
|
|
45
|
+
paramSvg = checkPict(pDef.params[0].name);
|
|
46
|
+
htableVis = makeHTableVis(makeHTable(pDef.params));
|
|
47
|
+
});
|
|
43
48
|
// tolerant applyParamVal
|
|
44
49
|
function tolerantApply(iPartName: string, ipVal: tParamVal): [string, boolean] {
|
|
45
50
|
let rMsg = '';
|
|
@@ -86,9 +91,37 @@
|
|
|
86
91
|
const rApplyWarn = applyWarn1 || applyWarn2;
|
|
87
92
|
return [rMsg, rApplyWarn];
|
|
88
93
|
}
|
|
89
|
-
function
|
|
94
|
+
async function fetchAndLoad(fUrl: string) {
|
|
95
|
+
try {
|
|
96
|
+
const res = await fetch(fUrl);
|
|
97
|
+
if (!res.ok) {
|
|
98
|
+
throw `err627: error while fetching ${fUrl}`;
|
|
99
|
+
}
|
|
100
|
+
const txt = await res.text();
|
|
101
|
+
const [paramJson] = parseParamFile(txt);
|
|
102
|
+
[loadMsg, applyWarn] = tolerantApply(paramJson.partName, paramJson.pVal);
|
|
103
|
+
inputComment = paramJson.comment;
|
|
104
|
+
} catch (emsg) {
|
|
105
|
+
let errMsg = 'err223: error by fetching px file\n';
|
|
106
|
+
errMsg += emsg as string;
|
|
107
|
+
loadMsg = errMsg;
|
|
108
|
+
applyWarn = true;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async function initParams2() {
|
|
90
112
|
if (browser) {
|
|
91
|
-
const searchParams = new URLSearchParams(
|
|
113
|
+
const searchParams = new URLSearchParams(page.url.search);
|
|
114
|
+
const cPxUrl = 'pxUrl';
|
|
115
|
+
if (searchParams.has(cPxUrl)) {
|
|
116
|
+
const fUrl = searchParams.get(cPxUrl);
|
|
117
|
+
searchParams.delete(cPxUrl);
|
|
118
|
+
if (fUrl) {
|
|
119
|
+
await fetchAndLoad(fUrl);
|
|
120
|
+
} else {
|
|
121
|
+
loadMsg = 'err123: error by parsing URL-search-params\n';
|
|
122
|
+
applyWarn = true;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
92
125
|
const pVal2: tParamVal = {};
|
|
93
126
|
for (const [kk, vv] of searchParams) {
|
|
94
127
|
//console.log(`dbg638: ${kk} ${vv}`);
|
|
@@ -187,7 +220,7 @@
|
|
|
187
220
|
}
|
|
188
221
|
// Save as URL
|
|
189
222
|
function generateUrl2(): string {
|
|
190
|
-
const url1 = generateUrl(
|
|
223
|
+
const url1 = generateUrl(page.url.href, sParams[pDef.partName], false);
|
|
191
224
|
return url1.toString();
|
|
192
225
|
}
|
|
193
226
|
function openModalUrl() {
|
|
@@ -218,7 +251,7 @@
|
|
|
218
251
|
interface tHTableSection {
|
|
219
252
|
sectionName: string;
|
|
220
253
|
sectionID: string;
|
|
221
|
-
|
|
254
|
+
sectionVisCollapse: boolean;
|
|
222
255
|
params: tParam[];
|
|
223
256
|
}
|
|
224
257
|
function makeHTable(iParams: tParam[]): tHTableSection[] {
|
|
@@ -226,7 +259,7 @@
|
|
|
226
259
|
const sectionMain: tHTableSection = {
|
|
227
260
|
sectionName: 'main',
|
|
228
261
|
sectionID: 'g0main',
|
|
229
|
-
|
|
262
|
+
sectionVisCollapse: false,
|
|
230
263
|
params: []
|
|
231
264
|
};
|
|
232
265
|
let section = sectionMain;
|
|
@@ -238,7 +271,7 @@
|
|
|
238
271
|
const sectionNew: tHTableSection = {
|
|
239
272
|
sectionName: param.name,
|
|
240
273
|
sectionID: `g${sectionID}${param.name}`,
|
|
241
|
-
|
|
274
|
+
sectionVisCollapse: true,
|
|
242
275
|
params: []
|
|
243
276
|
};
|
|
244
277
|
section = sectionNew;
|
|
@@ -252,7 +285,7 @@
|
|
|
252
285
|
function makeHTableVis(iHTable: tHTableSection[]): tHTableVis {
|
|
253
286
|
const rVis: tHTableVis = {};
|
|
254
287
|
for (const section of iHTable) {
|
|
255
|
-
rVis[section.sectionID] = section.
|
|
288
|
+
rVis[section.sectionID] = section.sectionVisCollapse;
|
|
256
289
|
}
|
|
257
290
|
return rVis;
|
|
258
291
|
}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
import Drawing from './Drawing.svelte';
|
|
22
22
|
import SubDesign from './SubDesign.svelte';
|
|
23
23
|
import { sParams } from './stateParams.svelte';
|
|
24
|
+
import { afterNavigate } from '$app/navigation';
|
|
24
25
|
|
|
25
26
|
// properties
|
|
26
27
|
interface Props {
|
|
@@ -74,7 +75,10 @@
|
|
|
74
75
|
|
|
75
76
|
// state
|
|
76
77
|
let simTime: number = $state(0);
|
|
77
|
-
let selFace: string = $state(
|
|
78
|
+
let selFace: string = $state(c_ParametrixAll);
|
|
79
|
+
afterNavigate(() => {
|
|
80
|
+
selFace = checkFace(Object.keys(fgeom(0, sParams[pDef.partName]).fig), '');
|
|
81
|
+
});
|
|
78
82
|
// internal state that should not need state
|
|
79
83
|
let exportFace: string = $state('zip'); // TODO5 keep state otherwise svelte complains
|
|
80
84
|
|
package/dist/SubDesign.svelte
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
//import { downloadParams, generateUrl } from './downloadParams';
|
|
5
5
|
import { downloadParams } from './downloadParams';
|
|
6
6
|
import { updateStore } from './initStore';
|
|
7
|
-
//import { page } from '$app/
|
|
7
|
+
//import { page } from '$app/state';
|
|
8
8
|
import { base } from '$app/paths';
|
|
9
9
|
import { goto } from '$app/navigation';
|
|
10
10
|
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
const subObj = subD[subInstName];
|
|
25
25
|
// modify the global store sParams
|
|
26
26
|
updateStore(subObj.partName, paramListToVal(subObj.dparam), true);
|
|
27
|
-
//const rUrl = generateUrl(`${
|
|
28
|
-
//const rUrl = generateUrl(`${
|
|
27
|
+
//const rUrl = generateUrl(`${page.url.origin}${base}/${subObj.link}`, paramListToVal(subObj.dparam), true);
|
|
28
|
+
//const rUrl = generateUrl(`${page.url.origin}${base}/${subObj.link}`, {}, true);
|
|
29
29
|
const rUrl = `${base}${pLink[subObj.partName]}`;
|
|
30
30
|
//const rUrl = pLink[subObj.partName];
|
|
31
31
|
//console.log(`dbg505: ${rUrl}`);
|
package/dist/TimeControl.svelte
CHANGED
package/dist/ZoomControl.svelte
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Reexport your entry components here
|
|
2
2
|
import OneDesign from './OneDesign.svelte';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { OneDesign };
|
|
3
|
+
import { initStore } from './initStore';
|
|
4
|
+
export { OneDesign, initStore };
|
|
5
|
+
//export { OneDesign };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geomui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "The svelte-library of the webapp-UI of Parametrix",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"scripts": {
|
|
53
53
|
"cp_pgdsvg": "fse copy ../../node_modules/designix/dist/pgdsvg static/pgdsvg",
|
|
54
54
|
"dev": "vite dev",
|
|
55
|
-
"build": "vite build && npm run package",
|
|
55
|
+
"build": "svelte-kit sync && vite build && npm run package",
|
|
56
56
|
"preview": "vite preview",
|
|
57
57
|
"package": "svelte-kit sync && svelte-package && publint",
|
|
58
58
|
"prepublishOnly": "npm run package",
|
|
@@ -66,21 +66,21 @@
|
|
|
66
66
|
"clean": "rimraf .svelte-kit build node_modules dist static/pgdsvg"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@sveltejs/kit": "^2.
|
|
70
|
-
"svelte": "^5.
|
|
69
|
+
"@sveltejs/kit": "^2.16.0",
|
|
70
|
+
"svelte": "^5.19.0"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"geometrix": "^0.5.
|
|
73
|
+
"geometrix": "^0.5.59"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@atao60/fse-cli": "^0.1.9",
|
|
77
77
|
"@sveltejs/adapter-auto": "^4.0.0",
|
|
78
78
|
"@sveltejs/adapter-static": "^3.0.8",
|
|
79
|
-
"@sveltejs/kit": "^2.16.
|
|
80
|
-
"@sveltejs/package": "^2.3.
|
|
79
|
+
"@sveltejs/kit": "^2.16.1",
|
|
80
|
+
"@sveltejs/package": "^2.3.9",
|
|
81
81
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
82
82
|
"@types/eslint": "^9.6.1",
|
|
83
|
-
"designix": "^0.5.
|
|
83
|
+
"designix": "^0.5.60",
|
|
84
84
|
"eslint": "^9.18.0",
|
|
85
85
|
"eslint-config-prettier": "^10.0.1",
|
|
86
86
|
"eslint-plugin-svelte": "^2.46.1",
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"publint": "^0.3.2",
|
|
92
92
|
"rimraf": "^6.0.1",
|
|
93
93
|
"sass": "^1.83.4",
|
|
94
|
-
"svelte": "^5.19.
|
|
94
|
+
"svelte": "^5.19.2",
|
|
95
95
|
"svelte-check": "^4.1.4",
|
|
96
96
|
"typescript": "^5.7.3",
|
|
97
|
-
"typescript-eslint": "^8.
|
|
98
|
-
"vite": "^6.0.
|
|
99
|
-
"vitest": "^3.0.
|
|
97
|
+
"typescript-eslint": "^8.21.0",
|
|
98
|
+
"vite": "^6.0.11",
|
|
99
|
+
"vitest": "^3.0.3"
|
|
100
100
|
}
|
|
101
101
|
}
|