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.
Files changed (40) hide show
  1. package/dist/Drawing.svelte +275 -262
  2. package/dist/Drawing.svelte.d.ts +8 -24
  3. package/dist/DrawingList.svelte +38 -33
  4. package/dist/DrawingList.svelte.d.ts +5 -18
  5. package/dist/InputParams.svelte +338 -283
  6. package/dist/InputParams.svelte.d.ts +7 -25
  7. package/dist/LabelCheckbox.svelte +12 -11
  8. package/dist/LabelCheckbox.svelte.d.ts +16 -14
  9. package/dist/LocStorRead.svelte +29 -17
  10. package/dist/LocStorRead.svelte.d.ts +6 -19
  11. package/dist/LocStorTable.svelte +88 -68
  12. package/dist/LocStorTable.svelte.d.ts +7 -20
  13. package/dist/LocStorWrite.svelte +28 -22
  14. package/dist/LocStorWrite.svelte.d.ts +6 -19
  15. package/dist/ModalDiag.svelte +33 -15
  16. package/dist/ModalDiag.svelte.d.ts +10 -22
  17. package/dist/ModalImg.svelte +11 -6
  18. package/dist/ModalImg.svelte.d.ts +6 -19
  19. package/dist/OneDesign.svelte +15 -6
  20. package/dist/OneDesign.svelte.d.ts +6 -19
  21. package/dist/ParamDrawExport.svelte +220 -134
  22. package/dist/ParamDrawExport.svelte.d.ts +7 -20
  23. package/dist/SimpleDrawing.svelte +82 -49
  24. package/dist/SimpleDrawing.svelte.d.ts +7 -23
  25. package/dist/SubDesign.svelte +64 -45
  26. package/dist/SubDesign.svelte.d.ts +8 -21
  27. package/dist/TimeControl.svelte +84 -69
  28. package/dist/TimeControl.svelte.d.ts +8 -21
  29. package/dist/ZoomControl.svelte +21 -14
  30. package/dist/ZoomControl.svelte.d.ts +5 -18
  31. package/dist/initStore.js +12 -11
  32. package/dist/stateDrawing.svelte.d.ts +8 -0
  33. package/dist/stateDrawing.svelte.js +8 -0
  34. package/dist/stateParams.svelte.d.ts +5 -0
  35. package/dist/stateParams.svelte.js +3 -0
  36. package/package.json +21 -21
  37. package/dist/drawingLayers.d.ts +0 -2
  38. package/dist/drawingLayers.js +0 -6
  39. package/dist/storePVal.d.ts +0 -5
  40. package/dist/storePVal.js +0 -4
@@ -1,25 +1,7 @@
1
- import { SvelteComponent } from "svelte";
2
- import type { tParamDef, tGeomFunc, tCanvasAdjust } from 'geometrix';
3
- declare const __propDef: {
4
- props: {
5
- pDef: tParamDef;
6
- fgeom: tGeomFunc;
7
- selFace: string;
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>import { dLayers } from "./drawingLayers";
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={$dLayers.main} />main part</label>
6
- <label><input type="checkbox" bind:checked={$dLayers.mainB} />main skeleton</label>
7
- <label><input type="checkbox" bind:checked={$dLayers.second} />second parts</label>
8
- <label><input type="checkbox" bind:checked={$dLayers.secondB} />second skeletons</label>
9
- <label><input type="checkbox" bind:checked={$dLayers.dynamics} />dynamics</label>
10
- <label><input type="checkbox" bind:checked={$dLayers.ruler} />ruler</label>
11
- <label><input type="checkbox" bind:checked={$dLayers.refframe} />frame of reference</label>
12
- <label><input type="checkbox" bind:checked={$dLayers.points} />points</label>
13
- <label><input type="checkbox" bind:checked={$dLayers.lines} />lines</label>
14
- <label><input type="checkbox" bind:checked={$dLayers.vectors} />vectors</label>
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
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: Record<string, never>;
4
- events: {
5
- [evt: string]: CustomEvent<any>;
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
- slots: {};
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
- export {};
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;
@@ -1,20 +1,32 @@
1
- <script>import LocStorTable from "./LocStorTable.svelte";
2
- export let pageName;
3
- export let storeName;
4
- let localKeys = [];
5
- function defaultName(ilocalKeys) {
6
- let rname = storeName;
7
- const nameUpdate = !ilocalKeys.includes(rname);
8
- if (nameUpdate) {
9
- if (ilocalKeys.length > 0) {
10
- rname = ilocalKeys[0];
11
- } else {
12
- rname = "";
13
- }
14
- }
15
- return rname;
16
- }
17
- $: storeName = defaultName(localKeys);
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
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- pageName: string;
5
- storeName: string;
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;
@@ -1,72 +1,92 @@
1
- <script>import ModalDiag from "./ModalDiag.svelte";
2
- import { browser } from "$app/environment";
3
- export let pageName;
4
- export let storeName;
5
- export let localKeys;
6
- function getLocalKey() {
7
- let rKeyList = [];
8
- const re = new RegExp(`^${pageName}_`);
9
- if (browser) {
10
- const keyList = Object.keys(window.localStorage).filter((k) => re.test(k));
11
- rKeyList = keyList.map((k) => k.replace(re, ""));
12
- }
13
- return rKeyList;
14
- }
15
- localKeys = getLocalKey();
16
- function modifInput(iname) {
17
- storeName = iname;
18
- }
19
- let localDate = {};
20
- function getLocalDate(iKeys) {
21
- let rLocalDate = {};
22
- if (browser) {
23
- for (const k of iKeys) {
24
- let lastModif = "";
25
- const k2 = `${pageName}_${k}`;
26
- const storeStr = window.localStorage.getItem(k2);
27
- if (storeStr !== null) {
28
- const val2 = JSON.parse(storeStr);
29
- lastModif = val2.lastModif;
30
- }
31
- rLocalDate[k] = lastModif;
32
- }
33
- }
34
- return rLocalDate;
35
- }
36
- localDate = getLocalDate(localKeys);
37
- let localDel = {};
38
- function getInitDel(iKeys) {
39
- let rLocalDel = {};
40
- for (const k of iKeys) {
41
- rLocalDel[k] = false;
42
- }
43
- return rLocalDel;
44
- }
45
- localDel = getInitDel(localKeys);
46
- let globalDel = false;
47
- function setGlobalDel(iGlobalDel) {
48
- for (const k of localKeys) {
49
- localDel[k] = iGlobalDel;
50
- }
51
- }
52
- $: setGlobalDel(globalDel);
53
- function actionDel() {
54
- if (browser) {
55
- for (const k of localKeys) {
56
- if (localDel[k]) {
57
- const k2 = `${pageName}_${k}`;
58
- window.localStorage.removeItem(k2);
59
- }
60
- }
61
- }
62
- localKeys = getLocalKey();
63
- }
64
- let modalDelConfirm = false;
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
- on:click={() => {
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 on:click={() => modifInput(kname)}>{kname}</button></td>
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
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- pageName: string;
5
- storeName: string;
6
- localKeys: string[];
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;
@@ -1,24 +1,31 @@
1
- <script>import LocStorTable from "./LocStorTable.svelte";
2
- export let pageName;
3
- export let storeName;
4
- let localKeys = [];
5
- function defaultName(prefix) {
6
- const re1 = /[-:]/g;
7
- const re2 = /\..*$/;
8
- const datestr = (/* @__PURE__ */ new Date()).toISOString().replace(re1, "").replace(re2, "").replace("T", "_");
9
- const rname = `${prefix}_${datestr}`;
10
- return rname;
11
- }
12
- storeName = defaultName(pageName);
13
- let warn = false;
14
- function checkWarning(iname) {
15
- warn = localKeys.includes(iname);
16
- }
17
- function validInput(eve) {
18
- const storeName2 = eve.target.value;
19
- checkWarning(storeName2);
20
- }
21
- $: checkWarning(storeName);
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
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- pageName: string;
5
- storeName: string;
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;
@@ -1,27 +1,45 @@
1
- <script context="module"></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>export let okName = "Ok";
4
- export let okFunc;
5
- export let modalOpen;
6
- export let sizeLarge = false;
7
- function mCancel() {
8
- modalOpen = false;
9
- }
10
- function mOk() {
11
- okFunc();
12
- modalOpen = false;
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
- <slot />
38
+ {@render children()}
21
39
  </article>
22
40
  <footer>
23
- <button class="cancel" on:click={mCancel}>Cancel</button>
24
- <button class="ok" on:click={mOk}>{okName}</button>
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 { SvelteComponent } from "svelte";
1
+ import type { Snippet } from 'svelte';
2
2
  type tOkFunc = () => void;
3
3
  export type { tOkFunc };
4
- declare const __propDef: {
5
- props: {
6
- okName?: string;
7
- okFunc: tOkFunc;
8
- modalOpen: boolean;
9
- sizeLarge?: boolean;
10
- };
11
- events: {
12
- [evt: string]: CustomEvent<any>;
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;
@@ -1,14 +1,19 @@
1
- <script>export let svgPath;
2
- export let modalOpen;
3
- function mCancel() {
4
- modalOpen = false;
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 on:click={mCancel}>
16
+ <button onclick={mCancel}>
12
17
  <img src={svgPath} alt={svgPath} />
13
18
  </button>
14
19
  </div>
@@ -1,19 +1,6 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- svgPath: string;
5
- modalOpen: boolean;
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;
@@ -1,9 +1,18 @@
1
- <script>import { incrStore } from "./initStore";
2
- import DrawingList from "./DrawingList.svelte";
3
- import ParamDrawExport from "./ParamDrawExport.svelte";
4
- export let pageDef;
5
- export let pLink;
6
- $: incrStore(pageDef);
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>