geomui 0.5.52 → 0.5.56
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 +275 -262
- package/dist/Drawing.svelte.d.ts +8 -24
- package/dist/DrawingList.svelte +38 -33
- package/dist/DrawingList.svelte.d.ts +5 -18
- package/dist/InputParams.svelte +338 -283
- package/dist/InputParams.svelte.d.ts +7 -25
- package/dist/LabelCheckbox.svelte +12 -11
- package/dist/LabelCheckbox.svelte.d.ts +16 -14
- package/dist/LocStorRead.svelte +29 -17
- package/dist/LocStorRead.svelte.d.ts +6 -19
- package/dist/LocStorTable.svelte +88 -68
- package/dist/LocStorTable.svelte.d.ts +7 -20
- package/dist/LocStorWrite.svelte +28 -22
- package/dist/LocStorWrite.svelte.d.ts +6 -19
- package/dist/ModalDiag.svelte +33 -15
- package/dist/ModalDiag.svelte.d.ts +10 -22
- package/dist/ModalImg.svelte +11 -6
- package/dist/ModalImg.svelte.d.ts +6 -19
- package/dist/OneDesign.svelte +15 -6
- package/dist/OneDesign.svelte.d.ts +6 -19
- package/dist/ParamDrawExport.svelte +220 -134
- package/dist/ParamDrawExport.svelte.d.ts +7 -20
- package/dist/SimpleDrawing.svelte +82 -49
- package/dist/SimpleDrawing.svelte.d.ts +7 -23
- package/dist/SubDesign.svelte +64 -45
- package/dist/SubDesign.svelte.d.ts +8 -21
- package/dist/TimeControl.svelte +84 -69
- package/dist/TimeControl.svelte.d.ts +8 -21
- package/dist/ZoomControl.svelte +21 -14
- package/dist/ZoomControl.svelte.d.ts +5 -18
- 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 +21 -21
- 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
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
zAdjust: tCanvasAdjust;
|
|
9
|
-
simTime?: number;
|
|
10
|
-
};
|
|
11
|
-
events: {
|
|
12
|
-
paramChg: CustomEvent<any>;
|
|
13
|
-
} & {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
};
|
|
16
|
-
slots: {};
|
|
17
|
-
exports?: {} | undefined;
|
|
18
|
-
bindings?: string | undefined;
|
|
19
|
-
};
|
|
20
|
-
export type InputParamsProps = typeof __propDef.props;
|
|
21
|
-
export type InputParamsEvents = typeof __propDef.events;
|
|
22
|
-
export type InputParamsSlots = typeof __propDef.slots;
|
|
23
|
-
export default class InputParams extends SvelteComponent<InputParamsProps, InputParamsEvents, InputParamsSlots> {
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
1
|
+
import type { tParamDef, Figure } from 'geometrix';
|
|
2
|
+
declare const InputParams: import("svelte").Component<{
|
|
3
|
+
pDef: tParamDef;
|
|
4
|
+
pFig: Figure;
|
|
5
|
+
}, {}, "">;
|
|
6
|
+
type InputParams = ReturnType<typeof InputParams>;
|
|
7
|
+
export default InputParams;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { sDraw } from './stateDrawing.svelte';
|
|
2
3
|
</script>
|
|
3
4
|
|
|
4
5
|
<div>
|
|
5
|
-
<label><input type="checkbox" bind:checked={
|
|
6
|
-
<label><input type="checkbox" bind:checked={
|
|
7
|
-
<label><input type="checkbox" bind:checked={
|
|
8
|
-
<label><input type="checkbox" bind:checked={
|
|
9
|
-
<label><input type="checkbox" bind:checked={
|
|
10
|
-
<label><input type="checkbox" bind:checked={
|
|
11
|
-
<label><input type="checkbox" bind:checked={
|
|
12
|
-
<label><input type="checkbox" bind:checked={
|
|
13
|
-
<label><input type="checkbox" bind:checked={
|
|
14
|
-
<label><input type="checkbox" bind:checked={
|
|
6
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.main} />main part</label>
|
|
7
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.mainB} />main skeleton</label>
|
|
8
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.second} />second parts</label>
|
|
9
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.secondB} />second skeletons</label>
|
|
10
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.dynamics} />dynamics</label>
|
|
11
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.ruler} />ruler</label>
|
|
12
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.refframe} />frame of reference</label>
|
|
13
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.points} />points</label>
|
|
14
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.lines} />lines</label>
|
|
15
|
+
<label><input type="checkbox" bind:checked={sDraw.dLayers.vectors} />vectors</label>
|
|
15
16
|
</div>
|
|
16
17
|
|
|
17
18
|
<style>/*
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
6
11
|
};
|
|
7
|
-
|
|
8
|
-
exports?: {} | undefined;
|
|
9
|
-
bindings?: string | undefined;
|
|
10
|
-
};
|
|
11
|
-
export type LabelCheckboxProps = typeof __propDef.props;
|
|
12
|
-
export type LabelCheckboxEvents = typeof __propDef.events;
|
|
13
|
-
export type LabelCheckboxSlots = typeof __propDef.slots;
|
|
14
|
-
export default class LabelCheckbox extends SvelteComponent<LabelCheckboxProps, LabelCheckboxEvents, LabelCheckboxSlots> {
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
15
13
|
}
|
|
16
|
-
|
|
14
|
+
declare const LabelCheckbox: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type LabelCheckbox = InstanceType<typeof LabelCheckbox>;
|
|
18
|
+
export default LabelCheckbox;
|
package/dist/LocStorRead.svelte
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import LocStorTable from './LocStorTable.svelte';
|
|
3
|
+
|
|
4
|
+
// props
|
|
5
|
+
interface Props {
|
|
6
|
+
pageName: string;
|
|
7
|
+
storeName: string;
|
|
8
|
+
}
|
|
9
|
+
let { pageName, storeName = $bindable() }: Props = $props();
|
|
10
|
+
|
|
11
|
+
// state
|
|
12
|
+
let localKeys: string[] = $state([]);
|
|
13
|
+
|
|
14
|
+
// default storeName
|
|
15
|
+
function defaultName(ilocalKeys: string[]) {
|
|
16
|
+
let rname = storeName;
|
|
17
|
+
const nameUpdate = !ilocalKeys.includes(rname);
|
|
18
|
+
if (nameUpdate) {
|
|
19
|
+
if (ilocalKeys.length > 0) {
|
|
20
|
+
rname = ilocalKeys[0];
|
|
21
|
+
} else {
|
|
22
|
+
rname = '';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return rname;
|
|
26
|
+
}
|
|
27
|
+
$effect(() => {
|
|
28
|
+
storeName = defaultName(localKeys);
|
|
29
|
+
});
|
|
18
30
|
</script>
|
|
19
31
|
|
|
20
32
|
<LocStorTable {pageName} bind:storeName bind:localKeys />
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
exports?: {} | undefined;
|
|
12
|
-
bindings?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
export type LocStorReadProps = typeof __propDef.props;
|
|
15
|
-
export type LocStorReadEvents = typeof __propDef.events;
|
|
16
|
-
export type LocStorReadSlots = typeof __propDef.slots;
|
|
17
|
-
export default class LocStorRead extends SvelteComponent<LocStorReadProps, LocStorReadEvents, LocStorReadSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
declare const LocStorRead: import("svelte").Component<{
|
|
2
|
+
pageName: string;
|
|
3
|
+
storeName: string;
|
|
4
|
+
}, {}, "storeName">;
|
|
5
|
+
type LocStorRead = ReturnType<typeof LocStorRead>;
|
|
6
|
+
export default LocStorRead;
|
package/dist/LocStorTable.svelte
CHANGED
|
@@ -1,72 +1,92 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ModalDiag from './ModalDiag.svelte';
|
|
3
|
+
import { browser } from '$app/environment';
|
|
4
|
+
|
|
5
|
+
// props
|
|
6
|
+
interface Props {
|
|
7
|
+
pageName: string;
|
|
8
|
+
storeName: string;
|
|
9
|
+
localKeys: string[];
|
|
10
|
+
}
|
|
11
|
+
let { pageName, storeName = $bindable(), localKeys = $bindable() }: Props = $props();
|
|
12
|
+
|
|
13
|
+
// state
|
|
14
|
+
let localDel: tLocalDel = $state({});
|
|
15
|
+
let globalDel = $state(false);
|
|
16
|
+
let modalDelConfirm = $state(false);
|
|
17
|
+
|
|
18
|
+
// get the list of localStorage keys
|
|
19
|
+
function getLocalKey() {
|
|
20
|
+
let rKeyList: string[] = [];
|
|
21
|
+
const re = new RegExp(`^${pageName}_`);
|
|
22
|
+
if (browser) {
|
|
23
|
+
const keyList = Object.keys(window.localStorage).filter((k) => re.test(k));
|
|
24
|
+
//console.log(keyList);
|
|
25
|
+
rKeyList = keyList.map((k) => k.replace(re, ''));
|
|
26
|
+
}
|
|
27
|
+
rKeyList.sort(); // order the list for consistent UX
|
|
28
|
+
//console.log(rKeyList);
|
|
29
|
+
return rKeyList;
|
|
30
|
+
}
|
|
31
|
+
localKeys = getLocalKey();
|
|
32
|
+
function modifInput(iname: string) {
|
|
33
|
+
storeName = iname;
|
|
34
|
+
}
|
|
35
|
+
// last modification date
|
|
36
|
+
type tLocalDate = Record<string, string>;
|
|
37
|
+
function getLocalDate(iKeys: string[]): tLocalDate {
|
|
38
|
+
let rLocalDate: tLocalDate = {};
|
|
39
|
+
if (browser) {
|
|
40
|
+
for (const k of iKeys) {
|
|
41
|
+
let lastModif = '';
|
|
42
|
+
const k2 = `${pageName}_${k}`;
|
|
43
|
+
const storeStr = window.localStorage.getItem(k2);
|
|
44
|
+
if (storeStr !== null) {
|
|
45
|
+
const val2 = JSON.parse(storeStr);
|
|
46
|
+
lastModif = val2.lastModif;
|
|
47
|
+
}
|
|
48
|
+
//console.log(`dbg194: ${lastModif}`);
|
|
49
|
+
rLocalDate[k] = lastModif;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return rLocalDate;
|
|
53
|
+
}
|
|
54
|
+
let localDate: tLocalDate = $derived(getLocalDate(localKeys));
|
|
55
|
+
// delete checkbox
|
|
56
|
+
type tLocalDel = Record<string, boolean>;
|
|
57
|
+
function getInitDel(iKeys: string[]): tLocalDel {
|
|
58
|
+
let rLocalDel: tLocalDel = {};
|
|
59
|
+
for (const k of iKeys) {
|
|
60
|
+
rLocalDel[k] = false;
|
|
61
|
+
}
|
|
62
|
+
return rLocalDel;
|
|
63
|
+
}
|
|
64
|
+
localDel = getInitDel(localKeys);
|
|
65
|
+
// global delete
|
|
66
|
+
function setGlobalDel() {
|
|
67
|
+
for (const k of localKeys) {
|
|
68
|
+
localDel[k] = globalDel;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// delete action
|
|
72
|
+
function actionDel() {
|
|
73
|
+
if (browser) {
|
|
74
|
+
for (const k of localKeys) {
|
|
75
|
+
if (localDel[k]) {
|
|
76
|
+
//console.log(`delete ${k}`);
|
|
77
|
+
const k2 = `${pageName}_${k}`;
|
|
78
|
+
window.localStorage.removeItem(k2);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
globalDel = false; // reset global delete checkbox
|
|
83
|
+
localKeys = getLocalKey();
|
|
84
|
+
}
|
|
65
85
|
</script>
|
|
66
86
|
|
|
67
87
|
<div class="deleteKeys">
|
|
68
88
|
<button
|
|
69
|
-
|
|
89
|
+
onclick={() => {
|
|
70
90
|
modalDelConfirm = true;
|
|
71
91
|
}}>Delete</button
|
|
72
92
|
>
|
|
@@ -86,16 +106,16 @@ let modalDelConfirm = false;
|
|
|
86
106
|
<td>Last modification</td>
|
|
87
107
|
</tr>
|
|
88
108
|
<tr>
|
|
89
|
-
<td><input type="checkbox" bind:checked={globalDel} /></td>
|
|
109
|
+
<td><input type="checkbox" bind:checked={globalDel} onchange={setGlobalDel} /></td>
|
|
90
110
|
<td class="instruction">delete all</td>
|
|
91
|
-
<td
|
|
111
|
+
<td></td>
|
|
92
112
|
</tr>
|
|
93
113
|
</thead>
|
|
94
114
|
<tbody>
|
|
95
115
|
{#each localKeys as kname}
|
|
96
116
|
<tr>
|
|
97
117
|
<td><input type="checkbox" bind:checked={localDel[kname]} /></td>
|
|
98
|
-
<td><button
|
|
118
|
+
<td><button onclick={() => modifInput(kname)}>{kname}</button></td>
|
|
99
119
|
<td>{localDate[kname]}</td>
|
|
100
120
|
</tr>
|
|
101
121
|
{/each}
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
events: {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {};
|
|
12
|
-
exports?: {} | undefined;
|
|
13
|
-
bindings?: string | undefined;
|
|
14
|
-
};
|
|
15
|
-
export type LocStorTableProps = typeof __propDef.props;
|
|
16
|
-
export type LocStorTableEvents = typeof __propDef.events;
|
|
17
|
-
export type LocStorTableSlots = typeof __propDef.slots;
|
|
18
|
-
export default class LocStorTable extends SvelteComponent<LocStorTableProps, LocStorTableEvents, LocStorTableSlots> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
declare const LocStorTable: import("svelte").Component<{
|
|
2
|
+
pageName: string;
|
|
3
|
+
storeName: string;
|
|
4
|
+
localKeys: string[];
|
|
5
|
+
}, {}, "storeName" | "localKeys">;
|
|
6
|
+
type LocStorTable = ReturnType<typeof LocStorTable>;
|
|
7
|
+
export default LocStorTable;
|
package/dist/LocStorWrite.svelte
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import LocStorTable from './LocStorTable.svelte';
|
|
3
|
+
|
|
4
|
+
// props
|
|
5
|
+
interface Props {
|
|
6
|
+
pageName: string;
|
|
7
|
+
storeName: string;
|
|
8
|
+
}
|
|
9
|
+
let { pageName, storeName = $bindable() }: Props = $props();
|
|
10
|
+
|
|
11
|
+
// state
|
|
12
|
+
let localKeys: string[] = $state([]);
|
|
13
|
+
|
|
14
|
+
// create a default key name
|
|
15
|
+
function defaultName(prefix: string) {
|
|
16
|
+
const re1 = /[-:]/g;
|
|
17
|
+
const re2 = /\..*$/;
|
|
18
|
+
const datestr = new Date()
|
|
19
|
+
.toISOString()
|
|
20
|
+
.replace(re1, '')
|
|
21
|
+
.replace(re2, '')
|
|
22
|
+
.replace('T', '_');
|
|
23
|
+
const rname = `${prefix}_${datestr}`;
|
|
24
|
+
return rname;
|
|
25
|
+
}
|
|
26
|
+
storeName = defaultName(pageName);
|
|
27
|
+
// check if the key already exist
|
|
28
|
+
let warn: boolean = $derived(localKeys.includes(storeName));
|
|
22
29
|
</script>
|
|
23
30
|
|
|
24
31
|
<LocStorTable {pageName} bind:storeName bind:localKeys />
|
|
@@ -32,7 +39,6 @@ $: checkWarning(storeName);
|
|
|
32
39
|
minlength="4"
|
|
33
40
|
maxlength="30"
|
|
34
41
|
size="32"
|
|
35
|
-
on:input={validInput}
|
|
36
42
|
/>
|
|
37
43
|
{#if warn}
|
|
38
44
|
<p class="warnMsg">Warning: name {storeName} already used</p>
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
exports?: {} | undefined;
|
|
12
|
-
bindings?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
export type LocStorWriteProps = typeof __propDef.props;
|
|
15
|
-
export type LocStorWriteEvents = typeof __propDef.events;
|
|
16
|
-
export type LocStorWriteSlots = typeof __propDef.slots;
|
|
17
|
-
export default class LocStorWrite extends SvelteComponent<LocStorWriteProps, LocStorWriteEvents, LocStorWriteSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
declare const LocStorWrite: import("svelte").Component<{
|
|
2
|
+
pageName: string;
|
|
3
|
+
storeName: string;
|
|
4
|
+
}, {}, "storeName">;
|
|
5
|
+
type LocStorWrite = ReturnType<typeof LocStorWrite>;
|
|
6
|
+
export default LocStorWrite;
|
package/dist/ModalDiag.svelte
CHANGED
|
@@ -1,27 +1,45 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
type tOkFunc = () => void;
|
|
4
|
+
export type { tOkFunc };
|
|
5
|
+
</script>
|
|
2
6
|
|
|
3
|
-
<script
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
// props
|
|
9
|
+
interface Props {
|
|
10
|
+
okName?: string;
|
|
11
|
+
okFunc: tOkFunc;
|
|
12
|
+
modalOpen: boolean;
|
|
13
|
+
sizeLarge?: boolean;
|
|
14
|
+
children: Snippet;
|
|
15
|
+
}
|
|
16
|
+
let {
|
|
17
|
+
okName = 'Ok',
|
|
18
|
+
okFunc,
|
|
19
|
+
modalOpen = $bindable(),
|
|
20
|
+
sizeLarge = false,
|
|
21
|
+
children
|
|
22
|
+
}: Props = $props();
|
|
23
|
+
|
|
24
|
+
// actions
|
|
25
|
+
function mCancel() {
|
|
26
|
+
modalOpen = false;
|
|
27
|
+
}
|
|
28
|
+
function mOk() {
|
|
29
|
+
okFunc();
|
|
30
|
+
modalOpen = false;
|
|
31
|
+
}
|
|
14
32
|
</script>
|
|
15
33
|
|
|
16
34
|
{#if modalOpen}
|
|
17
35
|
<aside class="backdrop">
|
|
18
36
|
<div class="dialog" class:sizeLarge>
|
|
19
37
|
<article class="question">
|
|
20
|
-
|
|
38
|
+
{@render children()}
|
|
21
39
|
</article>
|
|
22
40
|
<footer>
|
|
23
|
-
<button class="cancel"
|
|
24
|
-
<button class="ok"
|
|
41
|
+
<button class="cancel" onclick={mCancel}>Cancel</button>
|
|
42
|
+
<button class="ok" onclick={mOk}>{okName}</button>
|
|
25
43
|
</footer>
|
|
26
44
|
</div>
|
|
27
45
|
</aside>
|
|
@@ -1,24 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
2
|
type tOkFunc = () => void;
|
|
3
3
|
export type { tOkFunc };
|
|
4
|
-
declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
slots: {
|
|
15
|
-
default: {};
|
|
16
|
-
};
|
|
17
|
-
exports?: {} | undefined;
|
|
18
|
-
bindings?: string | undefined;
|
|
19
|
-
};
|
|
20
|
-
export type ModalDiagProps = typeof __propDef.props;
|
|
21
|
-
export type ModalDiagEvents = typeof __propDef.events;
|
|
22
|
-
export type ModalDiagSlots = typeof __propDef.slots;
|
|
23
|
-
export default class ModalDiag extends SvelteComponent<ModalDiagProps, ModalDiagEvents, ModalDiagSlots> {
|
|
24
|
-
}
|
|
4
|
+
declare const ModalDiag: import("svelte").Component<{
|
|
5
|
+
okName?: string;
|
|
6
|
+
okFunc: tOkFunc;
|
|
7
|
+
modalOpen: boolean;
|
|
8
|
+
sizeLarge?: boolean;
|
|
9
|
+
children: Snippet;
|
|
10
|
+
}, {}, "modalOpen">;
|
|
11
|
+
type ModalDiag = ReturnType<typeof ModalDiag>;
|
|
12
|
+
export default ModalDiag;
|
package/dist/ModalImg.svelte
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
svgPath: string;
|
|
4
|
+
modalOpen: boolean;
|
|
5
|
+
}
|
|
6
|
+
let { svgPath, modalOpen = $bindable() }: Props = $props();
|
|
7
|
+
|
|
8
|
+
function mCancel() {
|
|
9
|
+
modalOpen = false;
|
|
10
|
+
}
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
13
|
{#if modalOpen}
|
|
9
14
|
<aside class="backdrop">
|
|
10
15
|
<div class="dialog">
|
|
11
|
-
<button
|
|
16
|
+
<button onclick={mCancel}>
|
|
12
17
|
<img src={svgPath} alt={svgPath} />
|
|
13
18
|
</button>
|
|
14
19
|
</div>
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
events: {
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
};
|
|
10
|
-
slots: {};
|
|
11
|
-
exports?: {} | undefined;
|
|
12
|
-
bindings?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
export type ModalImgProps = typeof __propDef.props;
|
|
15
|
-
export type ModalImgEvents = typeof __propDef.events;
|
|
16
|
-
export type ModalImgSlots = typeof __propDef.slots;
|
|
17
|
-
export default class ModalImg extends SvelteComponent<ModalImgProps, ModalImgEvents, ModalImgSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
declare const ModalImg: import("svelte").Component<{
|
|
2
|
+
svgPath: string;
|
|
3
|
+
modalOpen: boolean;
|
|
4
|
+
}, {}, "modalOpen">;
|
|
5
|
+
type ModalImg = ReturnType<typeof ModalImg>;
|
|
6
|
+
export default ModalImg;
|
package/dist/OneDesign.svelte
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { tPageDef, tAllLink } from 'geometrix';
|
|
3
|
+
import { incrStore } from './initStore';
|
|
4
|
+
import DrawingList from './DrawingList.svelte';
|
|
5
|
+
import ParamDrawExport from './ParamDrawExport.svelte';
|
|
6
|
+
|
|
7
|
+
// props
|
|
8
|
+
interface Props {
|
|
9
|
+
pageDef: tPageDef;
|
|
10
|
+
pLink: tAllLink;
|
|
11
|
+
}
|
|
12
|
+
let { pageDef, pLink }: Props = $props();
|
|
13
|
+
|
|
14
|
+
// initialization
|
|
15
|
+
incrStore(pageDef);
|
|
7
16
|
</script>
|
|
8
17
|
|
|
9
18
|
<h1>{pageDef.pTitle}</h1>
|