@jscad/io 3.0.3-alpha.0 → 3.0.4-alpha.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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.4-alpha.0](/compare/@jscad/io@3.0.3-alpha.0...@jscad/io@3.0.4-alpha.0) (2026-04-12)
7
+
8
+ **Note:** Version bump only for package @jscad/io
9
+
6
10
  ## [3.0.3-alpha.0](https://github.com/jscad/OpenJSCAD/compare/@jscad/io@3.0.2-alpha.0...@jscad/io@3.0.3-alpha.0) (2026-01-18)
7
11
 
8
12
  **Note:** Version bump only for package @jscad/io
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jscad/io",
3
- "version": "3.0.3-alpha.0",
3
+ "version": "3.0.4-alpha.0",
4
4
  "description": "Meta Package for JSCAD IO Packages",
5
5
  "homepage": "https://openjscad.xyz/",
6
6
  "repository": "https://github.com/jscad/OpenJSCAD.org",
@@ -34,27 +34,27 @@
34
34
  ],
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
- "@jscad/3mf-deserializer": "3.0.3-alpha.0",
38
- "@jscad/3mf-serializer": "3.0.3-alpha.0",
39
- "@jscad/array-utils": "3.0.1-alpha.0",
40
- "@jscad/dxf-deserializer": "3.0.3-alpha.0",
41
- "@jscad/dxf-serializer": "3.0.3-alpha.0",
42
- "@jscad/io-utils": "3.0.3-alpha.0",
43
- "@jscad/json-deserializer": "3.0.3-alpha.0",
44
- "@jscad/json-serializer": "3.0.3-alpha.0",
45
- "@jscad/modeling": "3.0.3-alpha.0",
46
- "@jscad/obj-deserializer": "3.0.3-alpha.0",
47
- "@jscad/obj-serializer": "3.0.3-alpha.0",
48
- "@jscad/stl-deserializer": "3.0.3-alpha.0",
49
- "@jscad/stl-serializer": "3.0.3-alpha.0",
50
- "@jscad/svg-deserializer": "3.0.3-alpha.0",
51
- "@jscad/svg-serializer": "3.0.3-alpha.0",
52
- "@jscad/x3d-deserializer": "3.0.3-alpha.0",
53
- "@jscad/x3d-serializer": "3.0.3-alpha.0"
37
+ "@jscad/3mf-deserializer": "3.0.4-alpha.0",
38
+ "@jscad/3mf-serializer": "3.0.4-alpha.0",
39
+ "@jscad/array-utils": "3.0.2-alpha.0",
40
+ "@jscad/dxf-deserializer": "3.0.4-alpha.0",
41
+ "@jscad/dxf-serializer": "3.0.4-alpha.0",
42
+ "@jscad/io-utils": "3.0.4-alpha.0",
43
+ "@jscad/json-deserializer": "3.0.4-alpha.0",
44
+ "@jscad/json-serializer": "3.0.4-alpha.0",
45
+ "@jscad/modeling": "3.0.4-alpha.0",
46
+ "@jscad/obj-deserializer": "3.0.4-alpha.0",
47
+ "@jscad/obj-serializer": "3.0.4-alpha.0",
48
+ "@jscad/stl-deserializer": "3.0.4-alpha.0",
49
+ "@jscad/stl-serializer": "3.0.4-alpha.0",
50
+ "@jscad/svg-deserializer": "3.0.4-alpha.0",
51
+ "@jscad/svg-serializer": "3.0.4-alpha.0",
52
+ "@jscad/x3d-deserializer": "3.0.4-alpha.0",
53
+ "@jscad/x3d-serializer": "3.0.4-alpha.0"
54
54
  },
55
55
  "devDependencies": {
56
- "ava": "^4.3.3",
57
- "c8": "^8.0.0"
56
+ "ava": "^6.3.0",
57
+ "c8": "^10.1.0"
58
58
  },
59
- "gitHead": "b0a83db054ec02ccddd9e19e51f86bf30f72a69e"
59
+ "gitHead": "1de52a2b7b6bd31134fd0b72a2842f31ecf8f237"
60
60
  }
@@ -14,14 +14,17 @@ const transformers = {
14
14
 
15
15
  /**
16
16
  * Deserialize the given source as per the given mimeType.
17
+ *
17
18
  * Options can be provided to over-ride or suppliment the defaults used during deserialization.
18
- * Options must include 'output' as either 'script' or 'geometry'.
19
+ *
19
20
  * @param {Object} options - options used during deserializing
20
21
  * @param {String} mimeType - MIME type of the file
21
22
  * @param {String} source - the contents of the file
22
- * @return {[objects]|string} a list of objects (geometry) or a string (script)
23
+ * @returns {(Array|String)} either an array of objects (geometry) or a string (script)
24
+ * @alias module:io.deserialize
23
25
  *
24
26
  * @example
27
+ * import { getMimeType, deserialize } from '@jscad/io'
25
28
  * const mimetype = getMimeType('svg')
26
29
  * const myobjects = deserialize({output: 'geometry', target: 'path2'}, mimetype, source)
27
30
  */
package/src/index.js CHANGED
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @module io
3
+ */
1
4
  export { deserialize } from './deserialize.js'
2
5
  export { deserializers } from './deserializers.js'
3
6
 
package/src/serialize.js CHANGED
@@ -4,14 +4,18 @@ import { serializers } from './serializers.js'
4
4
 
5
5
  /**
6
6
  * Serialize the given objects as per the given mimeType into the external format.
7
+ *
7
8
  * Options can be provided to over-ride or suppliment the defaults used during serialization.
8
- * See each serializer package for available options.
9
+ * @See each serializer package for available options.
10
+ *
9
11
  * @param {Object} options - options used during deserializing
10
12
  * @param {String} mimeType - MIME type of the file
11
13
  * @param {Object} objects - one or more objects of which to serialize
12
14
  * @return {Object} an object containing the serialize data as well as mime type
15
+ * @alias module:io.serialize
13
16
  *
14
17
  * @example
18
+ * import { getMimeType, serialize } from '@jscad/io'
15
19
  * const mimetype = getMimeType('svg')
16
20
  * const shapes = [primitives.cirlce(), primitives.star()]
17
21
  * const output = serialize({units: 'inches'}, mimetype, shapes)