geomui 0.5.37 → 0.5.39

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 CHANGED
@@ -5,64 +5,30 @@ Geomui
5
5
  Presentation
6
6
  ------------
7
7
 
8
- The svg-files, that describe the parameters, are expected to be copied in the directory *static/pgdsvg*. Per convention, each *design package* should provide its svg-files in the directory *dist/pgdsvg*.
8
+ *Geomui* is the svelte library of [parametrix](https://charlyoleg2.github.io/parametrix/).
9
+ The top-level component is *OneDesign*. It expose the parameters and the rendering of a *design*.
9
10
 
10
11
 
11
- # create-svelte
12
+ SVG files
13
+ ---------
12
14
 
13
- Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
15
+ The svg-files, that describe the parameters, are expected to be copied in the directory *static/pgdsvg*. Per convention, each *design-library* should provide its svg-files in the directory *dist/pgdsvg*.
14
16
 
15
- Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging).
16
17
 
17
- ## Creating a project
18
-
19
- If you're seeing this, you've probably already done this step. Congrats!
20
-
21
- ```bash
22
- # create a new project in the current directory
23
- npm create svelte@latest
24
-
25
- # create a new project in my-app
26
- npm create svelte@latest my-app
27
- ```
28
-
29
- ## Developing
30
-
31
- Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
32
-
33
- ```bash
34
- npm run dev
35
-
36
- # or start the server and open the app in a new browser tab
37
- npm run dev -- --open
38
- ```
39
-
40
- Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
41
-
42
- ## Building
43
-
44
- To build your library:
45
-
46
- ```bash
47
- npm run package
48
- ```
49
-
50
- To create a production version of your showcase app:
51
-
52
- ```bash
53
- npm run build
54
- ```
55
-
56
- You can preview the production build with `npm run preview`.
57
-
58
- > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
18
+ Requirements
19
+ ------------
59
20
 
60
- ## Publishing
21
+ - [node](https://nodejs.org) > 20.10.0
22
+ - [npm](https://docs.npmjs.com/cli) > 10.5.0
61
23
 
62
- Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
63
24
 
64
- To publish your library to [npm](https://www.npmjs.com):
25
+ Getting started
26
+ ---------------
65
27
 
66
28
  ```bash
67
- npm publish
29
+ git clone https://github.com/charlyoleg2/parametrix
30
+ cd parametrix
31
+ npm install
32
+ npm run ci
33
+ npm run preview
68
34
  ```
@@ -31,11 +31,11 @@ let logValue = "Dummy initial\nWill be replaced during onMount\n";
31
31
  let calcErr = false;
32
32
  let calcWarn = false;
33
33
  let subD = {};
34
- function paramChange2(iPageName) {
34
+ function paramChange2(iPageName, iSimTime) {
35
35
  const mydate = (/* @__PURE__ */ new Date()).toLocaleTimeString();
36
36
  logValue = `Geometry ${iPageName} computed at ${mydate}
37
37
  `;
38
- const geome = fgeom(simTime, $storePV[pDef.partName]);
38
+ const geome = fgeom(iSimTime, $storePV[pDef.partName]);
39
39
  logValue += geome.logstr;
40
40
  calcErr = geome.calcErr;
41
41
  calcWarn = checkWarn(geome.logstr);
@@ -44,10 +44,10 @@ function paramChange2(iPageName) {
44
44
  subD = geome.sub;
45
45
  }
46
46
  function paramChange() {
47
- paramChange2(pDef.partName);
47
+ paramChange2(pDef.partName, simTime);
48
48
  }
49
49
  $:
50
- paramChange2(pDef.partName);
50
+ paramChange2(pDef.partName, simTime);
51
51
  function download_binFile(fName, fContent) {
52
52
  const elem_a_download = document.createElement("a");
53
53
  const payload = URL.createObjectURL(fContent);
@@ -86,6 +86,8 @@ async function downloadExport(iExportFace) {
86
86
  exportFormat = EFormat.eSVGALL;
87
87
  } else if (iExportFace === "alldxf") {
88
88
  exportFormat = EFormat.eDXFALL;
89
+ } else if (iExportFace === "compute_log") {
90
+ exportFormat = EFormat.eTXTLOG;
89
91
  } else if (iExportFace === "pax") {
90
92
  exportFormat = EFormat.ePAX;
91
93
  } else if (iExportFace === "oscad") {
@@ -151,6 +153,7 @@ async function downloadExport2() {
151
153
  <option value="dxf_{optFace}">face {optFace} as dxf</option>
152
154
  {/each}
153
155
  <option value="alldxf">all faces merged as dxf</option>
156
+ <option value="compute_log">compute.log as log-file</option>
154
157
  <option value="pax">all faces as pax.json</option>
155
158
  <option value="oscad">all faces as openscad.scad</option>
156
159
  <option value="ojscad">all faces as OpenJScad.js</option>
package/package.json CHANGED
@@ -1,26 +1,15 @@
1
1
  {
2
2
  "name": "geomui",
3
- "version": "0.5.37",
3
+ "version": "0.5.39",
4
4
  "description": "The svelte-library of the webapp-UI of Parametrix",
5
- "type": "module",
6
5
  "private": false,
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "svelte": "./dist/index.js"
11
- }
12
- },
13
- "files": [
14
- "dist",
15
- "!dist/**/*.map",
16
- "!dist/**/*.test.*",
17
- "!dist/**/*.spec.*"
18
- ],
19
6
  "repository": {
20
7
  "type": "git",
21
8
  "url": "git+https://github.com/charlyoleg2/parametrix.git"
22
9
  },
23
10
  "homepage": "https://charlyoleg2.github.io/parametrix/",
11
+ "author": "charlyoleg",
12
+ "license": "ISC",
24
13
  "keywords": [
25
14
  "cad",
26
15
  "programmatic",
@@ -30,7 +19,36 @@
30
19
  "arc",
31
20
  "gear"
32
21
  ],
33
- "author": "charlyoleg",
22
+ "type": "module",
23
+ "exports": {
24
+ ".": {
25
+ "types": "./dist/index.d.ts",
26
+ "svelte": "./dist/index.js"
27
+ }
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "!dist/**/*.map",
32
+ "!dist/**/*.test.*",
33
+ "!dist/**/*.spec.*"
34
+ ],
35
+ "prettier": {
36
+ "useTabs": true,
37
+ "singleQuote": true,
38
+ "trailingComma": "none",
39
+ "printWidth": 100,
40
+ "plugins": [
41
+ "prettier-plugin-svelte"
42
+ ],
43
+ "overrides": [
44
+ {
45
+ "files": "*.svelte",
46
+ "options": {
47
+ "parser": "svelte"
48
+ }
49
+ }
50
+ ]
51
+ },
34
52
  "scripts": {
35
53
  "cp_pgdsvg": "shx cp -r ../../node_modules/designix/dist/pgdsvg static/",
36
54
  "dev": "vite dev",
@@ -52,48 +70,31 @@
52
70
  "svelte": "^4.0.0"
53
71
  },
54
72
  "dependencies": {
55
- "geometrix": "^0.5.34"
73
+ "geometrix": "^0.5.36"
56
74
  },
57
75
  "devDependencies": {
58
76
  "@sveltejs/adapter-auto": "^3.2.0",
59
77
  "@sveltejs/adapter-static": "^3.0.1",
60
- "@sveltejs/kit": "^2.5.6",
78
+ "@sveltejs/kit": "^2.5.7",
61
79
  "@sveltejs/package": "^2.3.1",
62
80
  "@sveltejs/vite-plugin-svelte": "^3.1.0",
63
81
  "@typescript-eslint/eslint-plugin": "^7.0.1",
64
82
  "@typescript-eslint/parser": "^7.0.1",
65
- "designix": "^0.5.35",
83
+ "designix": "^0.5.37",
66
84
  "eslint": "^8.57.0",
67
85
  "eslint-config-prettier": "^9.1.0",
68
- "eslint-plugin-svelte": "^2.37.0",
86
+ "eslint-plugin-svelte": "^2.38.0",
69
87
  "npm-run-all": "^4.1.5",
70
88
  "prettier": "^3.2.5",
71
89
  "prettier-plugin-svelte": "^3.2.3",
72
90
  "publint": "^0.2.7",
73
- "sass": "^1.75.0",
91
+ "sass": "^1.77.0",
74
92
  "shx": "^0.3.4",
75
- "svelte": "^4.2.14",
76
- "svelte-check": "^3.6.9",
93
+ "svelte": "^4.2.16",
94
+ "svelte-check": "^3.7.1",
77
95
  "tslib": "^2.6.2",
78
96
  "typescript": "^5.4.5",
79
- "vite": "^5.2.9",
80
- "vitest": "^1.5.0"
81
- },
82
- "prettier": {
83
- "useTabs": true,
84
- "singleQuote": true,
85
- "trailingComma": "none",
86
- "printWidth": 100,
87
- "plugins": [
88
- "prettier-plugin-svelte"
89
- ],
90
- "overrides": [
91
- {
92
- "files": "*.svelte",
93
- "options": {
94
- "parser": "svelte"
95
- }
96
- }
97
- ]
97
+ "vite": "^5.2.11",
98
+ "vitest": "^1.6.0"
98
99
  }
99
100
  }