customforge 0.1.0-alpha.1 → 0.1.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +79 -24
  2. package/LICENSES/NunitoSans-OFL.txt +93 -0
  3. package/LICENSES/plain-mug-CC-BY-4.0.txt +11 -0
  4. package/README.md +592 -290
  5. package/README.zh-CN.md +589 -290
  6. package/dist/NunitoSans-Variable.ttf +0 -0
  7. package/dist/ProductCustomizer-4ytA68eg.js +2350 -0
  8. package/dist/ProductCustomizer-4ytA68eg.js.map +1 -0
  9. package/dist/bridge/TextureBridge.d.ts +1 -1
  10. package/dist/core/api.d.ts +94 -0
  11. package/dist/core/api.d.ts.map +1 -0
  12. package/dist/core/config.d.ts +3 -12
  13. package/dist/core/config.d.ts.map +1 -1
  14. package/dist/core/design.d.ts.map +1 -1
  15. package/dist/core/types.d.ts +217 -8
  16. package/dist/core/types.d.ts.map +1 -1
  17. package/dist/core/uv.d.ts +8 -0
  18. package/dist/core/uv.d.ts.map +1 -0
  19. package/dist/cup_decal_small_margins.glb +0 -0
  20. package/dist/customizer/ProductCustomizer.d.ts +174 -7
  21. package/dist/customizer/ProductCustomizer.d.ts.map +1 -1
  22. package/dist/editor/DesignEditor.d.ts +224 -14
  23. package/dist/editor/DesignEditor.d.ts.map +1 -1
  24. package/dist/editor/DesignHistory.d.ts +27 -0
  25. package/dist/editor/DesignHistory.d.ts.map +1 -0
  26. package/dist/editor/uvBounds.d.ts +15 -0
  27. package/dist/editor/uvBounds.d.ts.map +1 -0
  28. package/dist/index.d.ts +4 -2
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +1 -1108
  31. package/dist/index.js.map +1 -1
  32. package/dist/style.css +2123 -11
  33. package/dist/viewer/ProductViewer.d.ts +37 -6
  34. package/dist/viewer/ProductViewer.d.ts.map +1 -1
  35. package/dist/viewer/uvLayout.d.ts +11 -0
  36. package/dist/viewer/uvLayout.d.ts.map +1 -0
  37. package/dist/workbench/CustomForgeWorkbench.d.ts +205 -0
  38. package/dist/workbench/CustomForgeWorkbench.d.ts.map +1 -0
  39. package/dist/workbench/assets/catalog.d.ts +8 -0
  40. package/dist/workbench/assets/catalog.d.ts.map +1 -0
  41. package/dist/workbench/config.d.ts +96 -0
  42. package/dist/workbench/config.d.ts.map +1 -0
  43. package/dist/workbench/icons.d.ts +4 -0
  44. package/dist/workbench/icons.d.ts.map +1 -0
  45. package/dist/workbench/index.d.ts +25 -0
  46. package/dist/workbench/index.d.ts.map +1 -0
  47. package/dist/workbench/template.d.ts +3 -0
  48. package/dist/workbench/template.d.ts.map +1 -0
  49. package/dist/workbench/types.d.ts +542 -0
  50. package/dist/workbench/types.d.ts.map +1 -0
  51. package/dist/workbench.js +3052 -0
  52. package/dist/workbench.js.map +1 -0
  53. package/package.json +77 -71
package/CHANGELOG.md CHANGED
@@ -1,9 +1,64 @@
1
- # Changelog
2
-
3
- All notable changes to CustomForge will be documented in this file
4
-
1
+ # Changelog
2
+
3
+ All notable changes to CustomForge will be documented in this file
4
+
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.1.0] - 2026-09-21
8
+
9
+ ### Added
10
+
11
+ - Display the active Mesh UV printable region and boundary as a non-exported editor overlay
12
+ - Add an Office-style contextual text formatting bar with font, size, color, highlight, emphasis, alignment, line-height, and letter-spacing controls
13
+ - Persist rich text formatting in backward-compatible Design JSON version 1 documents and expose `updateText()`, `editText()`, and `clearSelection()` APIs
14
+ - Add stable `ProductCustomizerApi` and `CustomForgeWorkbenchApi` contracts for headless and default-UI integrations
15
+ - Expose state snapshots, printable bounds, multi-selection, object transforms, PNG Data URL and Blob output, and 3D view persistence
16
+ - Add instance-scoped Workbench classes, runtime theme access, and configurable editor and viewer drawing appearance
17
+ - Add validated Workbench extension buttons with stable global, editor, selection, and layer action placements
18
+ - Add stable-release metadata checks, independent tarball consumers, and a packaged browser smoke gate
19
+ - Add continuous integration and provenance-enabled npm release workflows
20
+
21
+ ### Changed
22
+
23
+ - Replaced the procedural demo cup with the bundled `cup_decal_small_margins.glb` model, separating `MugBody` from the customizable `PrintArea` overlay
24
+ - Keep the design canvas and printable overlay transparent when no base texture is configured
25
+ - Replace the shadow-casting viewer setup with balanced non-shadow studio lighting and remove the floor and fixed scene background
26
+ - Adjust the initial and reset camera framing for a smaller, more front-facing product view
27
+ - Seed the demo with the built-in CustomForge logo and 22px project-name text
28
+ - Publish the first non-prerelease version through npm's default `latest` channel without imposing a Node.js engine on browser consumers
29
+
30
+ ### Fixed
31
+
32
+ - Keep Fabric selection borders and transform controls out of the live 3D texture
33
+ - Keep compact layer actions beside the type label so they never cover the layer name
34
+ - Present the design canvas as a clean gridded artboard with a restrained UV boundary
35
+
36
+ ## [0.1.0-alpha.2] - 2026-08-27
37
+
38
+ ### Added
39
+
40
+ - Optional configurable Workbench UI exported from `customforge/workbench`
41
+ - Public object querying, selection, removal, naming, visibility, locking, and layer ordering APIs
42
+ - Object names, visibility, and locking state in backward-compatible Design JSON version 1 documents
43
+ - Undo and redo history with keyboard shortcuts and public history state APIs
44
+ - Text composition Dialog with replaceable typography presets
45
+ - Image Dialog with upload, configurable background, and decorative element catalogs
46
+ - Custom branding, labels, theme tokens, icon visibility, and semantic icon overrides
47
+ - Design background images that persist in Design JSON and remain locked at the bottom layer
48
+
49
+ ### Changed
50
+
51
+ - Built-in demo now consumes the same public Workbench available to package users
52
+ - Workbench presentation uses a quieter responsive studio layout with clearer control hierarchy
53
+ - Default controls now use softer neutral surfaces, light selection states, and restrained 7px radii
54
+ - Workbench now bundles the rounded Nunito Sans UI font with system font fallbacks
55
+ - Solid accent buttons now consistently use the configured high-contrast text color
56
+ - Layer selection and Dialog transitions now use subtle motion with reduced-motion support
57
+ - Nunito Sans is emitted as a cacheable font asset instead of being inlined into the stylesheet
58
+ - Package verification now parses actual ESM imports without matching examples inside bundled strings
59
+ - The bundled CustomForge logo is now the default Workbench brand mark
60
+ - Successful product changes reset design history while preserving current design objects
61
+
7
62
  ## [0.1.0-alpha.1] - 2026-08-27
8
63
 
9
64
  ### Changed
@@ -13,23 +68,23 @@ All notable changes to CustomForge will be documented in this file
13
68
  - Library builds continue to keep both engines external
14
69
 
15
70
  ## [0.1.0-alpha.0] - 2026-08-27
16
-
17
- ### Added
18
-
19
- - ESM Library build configuration with source maps
20
- - TypeScript declaration and declaration map generation
21
- - Namespaced core stylesheet exported as `customforge/style.css`
22
- - Local package verification and npm consumer example
23
- - Versioned, Fabric-independent Design JSON types and runtime validation
24
- - Public `saveDesign()` and transactional `loadDesign()` methods
25
- - Design JSON save and load controls in the built-in and npm consumer demos
26
-
27
- ### Changed
28
-
29
- - Fabric.js and Three.js are peer dependencies for Library consumers
30
- - Demo-only Lucide icons are development dependencies
31
- - `ProductCustomizer` no longer exposes its Fabric.js editor or Three.js viewer instances
32
- - Package version `0.1.0-alpha.0` is published publicly under the `alpha` dist-tag
33
- - Text and image objects remain fully inside the editor canvas while being added or transformed
34
- - The built-in demo product no longer includes the obstructive torus handle
35
- - Blob URL images are converted to persistent Data URLs when added
71
+
72
+ ### Added
73
+
74
+ - ESM Library build configuration with source maps
75
+ - TypeScript declaration and declaration map generation
76
+ - Namespaced core stylesheet exported as `customforge/style.css`
77
+ - Local package verification and npm consumer example
78
+ - Versioned, Fabric-independent Design JSON types and runtime validation
79
+ - Public `saveDesign()` and transactional `loadDesign()` methods
80
+ - Design JSON save and load controls in the built-in and npm consumer demos
81
+
82
+ ### Changed
83
+
84
+ - Fabric.js and Three.js are peer dependencies for Library consumers
85
+ - Demo-only Lucide icons are development dependencies
86
+ - `ProductCustomizer` no longer exposes its Fabric.js editor or Three.js viewer instances
87
+ - Package version `0.1.0-alpha.0` is published publicly under the `alpha` dist-tag
88
+ - Text and image objects remain fully inside the editor canvas while being added or transformed
89
+ - The built-in demo product no longer includes the obstructive torus handle
90
+ - Blob URL images are converted to persistent Data URLs when added
@@ -0,0 +1,93 @@
1
+ Copyright 2016 The Nunito Sans Project Authors (https://github.com/Fonthausen/NunitoSans)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,11 @@
1
+ Plain Mug
2
+
3
+ Author: LightSwitch (https://sketchfab.com/edwardlewis450)
4
+ Source: https://sketchfab.com/3d-models/plain-mug-19c8fe5702b544d0a1409d3dac1cf90e
5
+ License: Creative Commons Attribution 4.0 International (CC BY 4.0)
6
+ License URL: https://creativecommons.org/licenses/by/4.0/
7
+
8
+ The bundled cup_decal_small_margins.glb is adapted from the original model. The
9
+ original cup geometry is retained as MugBody, and CustomForge adds a separately
10
+ named PrintArea overlay with its own UV layout and material for printable-area
11
+ customization.