@tduniec/plugin-template-designer 0.3.6 → 0.4.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 (77) hide show
  1. package/CHANGELOG.md +39 -37
  2. package/README.md +8 -115
  3. package/dist/alpha.esm.js +1 -1
  4. package/dist/alpha.esm.js.map +1 -1
  5. package/dist/components/TemplateDesigner/TemplateDesigner.esm.js +14 -12
  6. package/dist/components/TemplateDesigner/TemplateDesigner.esm.js.map +1 -1
  7. package/dist/index.d.ts +10 -4
  8. package/dist/index.esm.js +3 -1
  9. package/dist/index.esm.js.map +1 -1
  10. package/dist/package.json.esm.js +53 -92
  11. package/dist/package.json.esm.js.map +1 -1
  12. package/dist/plugin.esm.js +1 -2
  13. package/dist/plugin.esm.js.map +1 -1
  14. package/package.json +46 -77
  15. package/LICENSE +0 -201
  16. package/dist/api/mockScaffolderActions.esm.js +0 -85
  17. package/dist/api/mockScaffolderActions.esm.js.map +0 -1
  18. package/dist/api/scaffolderActions.esm.js +0 -57
  19. package/dist/api/scaffolderActions.esm.js.map +0 -1
  20. package/dist/components/DesignerFlow/DesignerFlow.esm.js +0 -431
  21. package/dist/components/DesignerFlow/DesignerFlow.esm.js.map +0 -1
  22. package/dist/components/DesignerFlow/flowConfig.esm.js +0 -21
  23. package/dist/components/DesignerFlow/flowConfig.esm.js.map +0 -1
  24. package/dist/components/DesignerFlow/handlers.esm.js +0 -322
  25. package/dist/components/DesignerFlow/handlers.esm.js.map +0 -1
  26. package/dist/components/DesignerFlow/model.esm.js +0 -185
  27. package/dist/components/DesignerFlow/model.esm.js.map +0 -1
  28. package/dist/components/DesignerFlow/nodeLayout.esm.js +0 -138
  29. package/dist/components/DesignerFlow/nodeLayout.esm.js.map +0 -1
  30. package/dist/components/DesignerFlow/parameterTransforms.esm.js +0 -184
  31. package/dist/components/DesignerFlow/parameterTransforms.esm.js.map +0 -1
  32. package/dist/components/Nodes/ActionNode.esm.js +0 -602
  33. package/dist/components/Nodes/ActionNode.esm.js.map +0 -1
  34. package/dist/components/Nodes/OutputNode.esm.js +0 -370
  35. package/dist/components/Nodes/OutputNode.esm.js.map +0 -1
  36. package/dist/components/Nodes/ParameterInputNode.esm.js +0 -310
  37. package/dist/components/Nodes/ParameterInputNode.esm.js.map +0 -1
  38. package/dist/components/Nodes/ParameterTitlesNode.esm.js +0 -251
  39. package/dist/components/Nodes/ParameterTitlesNode.esm.js.map +0 -1
  40. package/dist/components/Nodes/ParametersNode.esm.js +0 -144
  41. package/dist/components/Nodes/ParametersNode.esm.js.map +0 -1
  42. package/dist/components/Nodes/action/schema.esm.js +0 -144
  43. package/dist/components/Nodes/action/schema.esm.js.map +0 -1
  44. package/dist/components/Nodes/action/useActionInputs.esm.js +0 -84
  45. package/dist/components/Nodes/action/useActionInputs.esm.js.map +0 -1
  46. package/dist/components/Nodes/common/AutoWidthPopper.esm.js +0 -22
  47. package/dist/components/Nodes/common/AutoWidthPopper.esm.js.map +0 -1
  48. package/dist/components/Nodes/common/nodeInteraction.esm.js +0 -9
  49. package/dist/components/Nodes/common/nodeInteraction.esm.js.map +0 -1
  50. package/dist/components/Nodes/output/useOutputController.esm.js +0 -191
  51. package/dist/components/Nodes/output/useOutputController.esm.js.map +0 -1
  52. package/dist/components/Nodes/parameters/useParameterSections.esm.js +0 -162
  53. package/dist/components/Nodes/parameters/useParameterSections.esm.js.map +0 -1
  54. package/dist/components/Nodes/types.esm.js +0 -8
  55. package/dist/components/Nodes/types.esm.js.map +0 -1
  56. package/dist/components/TemplateDesigner/components/FieldEditorDialog.esm.js +0 -55
  57. package/dist/components/TemplateDesigner/components/FieldEditorDialog.esm.js.map +0 -1
  58. package/dist/components/TemplateDesigner/components/TemplateLanding.esm.js +0 -157
  59. package/dist/components/TemplateDesigner/components/TemplateLanding.esm.js.map +0 -1
  60. package/dist/components/TemplateDesigner/components/TemplateWorkspace.esm.js +0 -302
  61. package/dist/components/TemplateDesigner/components/TemplateWorkspace.esm.js.map +0 -1
  62. package/dist/components/TemplateDesigner/components/codemirrorTheme.esm.js +0 -30
  63. package/dist/components/TemplateDesigner/components/codemirrorTheme.esm.js.map +0 -1
  64. package/dist/components/TemplateDesigner/useFieldEditor.esm.js +0 -95
  65. package/dist/components/TemplateDesigner/useFieldEditor.esm.js.map +0 -1
  66. package/dist/components/TemplateDesigner/useTemplateState.esm.js +0 -627
  67. package/dist/components/TemplateDesigner/useTemplateState.esm.js.map +0 -1
  68. package/dist/components/TemplateDesigner/utils.esm.js +0 -46
  69. package/dist/components/TemplateDesigner/utils.esm.js.map +0 -1
  70. package/dist/components/TemplateDesignerIcon.esm.js +0 -33
  71. package/dist/components/TemplateDesignerIcon.esm.js.map +0 -1
  72. package/dist/utils/createSequentialEdges.esm.js +0 -15
  73. package/dist/utils/createSequentialEdges.esm.js.map +0 -1
  74. package/dist/utils/sampleTemplate.esm.js +0 -40
  75. package/dist/utils/sampleTemplate.esm.js.map +0 -1
  76. package/dist/utils/yamlJsonConversion.esm.js +0 -47
  77. package/dist/utils/yamlJsonConversion.esm.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,124 +1,126 @@
1
- ## [0.3.6](https://github.com/tduniec/template-designer-plugin/compare/v0.3.5...v0.3.6) (2025-12-01)
1
+ # [0.4.0](https://github.com/tduniec/template-designer-plugin/compare/template-designer-v0.3.7...template-designer-v0.4.0) (2025-12-20)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * making the templateDesigner icon outlined ([#53](https://github.com/tduniec/template-designer-plugin/issues/53)) ([6488a74](https://github.com/tduniec/template-designer-plugin/commit/6488a74ca1e4874febce8f178c41773a78a6a1f9))
6
+ * **template-designer-foundation:** initial release ([1ddc9d7](https://github.com/tduniec/template-designer-plugin/commit/1ddc9d72f343ab944e706919788e244b8efcdb39))
7
7
 
8
- ## [0.3.5](https://github.com/tduniec/template-designer-plugin/compare/v0.3.4...v0.3.5) (2025-12-01)
9
8
 
9
+ ### Features
10
+
11
+ * bulk refactor to commons ([#55](https://github.com/tduniec/template-designer-plugin/issues/55)) optimized rendering - redesigned rendering logic ([99aa586](https://github.com/tduniec/template-designer-plugin/commit/99aa5862ffb3bac254f1bb0e69b0e94a5ed96c16))
12
+
13
+ ## [0.3.7](https://github.com/tduniec/template-designer-plugin/compare/v0.3.6...v0.3.7) (2025-12-04)
10
14
 
11
15
  ### Bug Fixes
12
16
 
13
- * adjust npm release ([#52](https://github.com/tduniec/template-designer-plugin/issues/52)) ([924ae88](https://github.com/tduniec/template-designer-plugin/commit/924ae881c47488b636b37053c8141d4bee4c10b8))
17
+ - bump the version for readme update ([93b676b](https://github.com/tduniec/template-designer-plugin/commit/93b676bfdb0a23a88bddb2b732852a5cecbc28a9))
14
18
 
15
- ## [0.3.4](https://github.com/tduniec/template-designer-plugin/compare/v0.3.3...v0.3.4) (2025-12-01)
19
+ ## [0.3.6](https://github.com/tduniec/template-designer-plugin/compare/v0.3.5...v0.3.6) (2025-12-01)
16
20
 
21
+ ### Bug Fixes
22
+
23
+ - making the templateDesigner icon outlined ([#53](https://github.com/tduniec/template-designer-plugin/issues/53)) ([6488a74](https://github.com/tduniec/template-designer-plugin/commit/6488a74ca1e4874febce8f178c41773a78a6a1f9))
24
+
25
+ ## [0.3.5](https://github.com/tduniec/template-designer-plugin/compare/v0.3.4...v0.3.5) (2025-12-01)
17
26
 
18
27
  ### Bug Fixes
19
28
 
20
- * backstage pattern resolution during publishing ([#51](https://github.com/tduniec/template-designer-plugin/issues/51)) ([57328b7](https://github.com/tduniec/template-designer-plugin/commit/57328b7b7b5ea3328bf4fb03c1c7f6cb879204ae))
29
+ - adjust npm release ([#52](https://github.com/tduniec/template-designer-plugin/issues/52)) ([924ae88](https://github.com/tduniec/template-designer-plugin/commit/924ae881c47488b636b37053c8141d4bee4c10b8))
21
30
 
22
- ## [0.3.3](https://github.com/tduniec/template-designer-plugin/compare/v0.3.2...v0.3.3) (2025-11-28)
31
+ ## [0.3.4](https://github.com/tduniec/template-designer-plugin/compare/v0.3.3...v0.3.4) (2025-12-01)
32
+
33
+ ### Bug Fixes
23
34
 
35
+ - backstage pattern resolution during publishing ([#51](https://github.com/tduniec/template-designer-plugin/issues/51)) ([57328b7](https://github.com/tduniec/template-designer-plugin/commit/57328b7b7b5ea3328bf4fb03c1c7f6cb879204ae))
36
+
37
+ ## [0.3.3](https://github.com/tduniec/template-designer-plugin/compare/v0.3.2...v0.3.3) (2025-11-28)
24
38
 
25
39
  ### Bug Fixes
26
40
 
27
- * export icon ([#50](https://github.com/tduniec/template-designer-plugin/issues/50)) ([73afac4](https://github.com/tduniec/template-designer-plugin/commit/73afac487f2112a17d19f877eaea845f68370df1))
41
+ - export icon ([#50](https://github.com/tduniec/template-designer-plugin/issues/50)) ([73afac4](https://github.com/tduniec/template-designer-plugin/commit/73afac487f2112a17d19f877eaea845f68370df1))
28
42
 
29
43
  ## [0.3.2](https://github.com/tduniec/template-designer-plugin/compare/v0.3.1...v0.3.2) (2025-11-28)
30
44
 
31
-
32
45
  ### Bug Fixes
33
46
 
34
- * visual improvements and logo ([6da7314](https://github.com/tduniec/template-designer-plugin/commit/6da73148c1b066272d760c4b49587cc7f02dad07))
47
+ - visual improvements and logo ([6da7314](https://github.com/tduniec/template-designer-plugin/commit/6da73148c1b066272d760c4b49587cc7f02dad07))
35
48
 
36
49
  ## [0.3.1](https://github.com/tduniec/template-designer-plugin/compare/v0.3.0...v0.3.1) (2025-11-28)
37
50
 
38
-
39
51
  ### Bug Fixes
40
52
 
41
- * Performance imporvements ([#48](https://github.com/tduniec/template-designer-plugin/issues/48)) ([510dec7](https://github.com/tduniec/template-designer-plugin/commit/510dec7c9c1eaebf688c170800b3c93f3d9f5411))
53
+ - Performance imporvements ([#48](https://github.com/tduniec/template-designer-plugin/issues/48)) ([510dec7](https://github.com/tduniec/template-designer-plugin/commit/510dec7c9c1eaebf688c170800b3c93f3d9f5411))
42
54
 
43
55
  # [0.3.0](https://github.com/tduniec/template-designer-plugin/compare/v0.2.3...v0.3.0) (2025-11-28)
44
56
 
45
-
46
57
  ### Features
47
58
 
48
- * add support to select existing template ([#40](https://github.com/tduniec/template-designer-plugin/issues/40)) ([6100138](https://github.com/tduniec/template-designer-plugin/commit/610013862d7264d2631018c0188341e8302e86f0))
49
- * add support for nfs ([#36](https://github.com/tduniec/template-designer-plugin/issues/36)) ([8fa3464](https://github.com/tduniec/template-designer-plugin/commit/8fa34648c0e0b85b7bb553b562eb8cb63404258a)), closes [#38](https://github.com/tduniec/template-designer-plugin/issues/38)
50
-
59
+ - add support to select existing template ([#40](https://github.com/tduniec/template-designer-plugin/issues/40)) ([6100138](https://github.com/tduniec/template-designer-plugin/commit/610013862d7264d2631018c0188341e8302e86f0))
60
+ - add support for nfs ([#36](https://github.com/tduniec/template-designer-plugin/issues/36)) ([8fa3464](https://github.com/tduniec/template-designer-plugin/commit/8fa34648c0e0b85b7bb553b562eb8cb63404258a)), closes [#38](https://github.com/tduniec/template-designer-plugin/issues/38)
51
61
 
52
62
  ## [0.2.5](https://github.com/tduniec/template-designer-plugin/compare/v0.2.3...v0.2.5) (2025-11-28)
53
63
 
54
64
  ### Bug Fixes
55
65
 
56
- * add support for nfs ([#36](https://github.com/tduniec/template-designer-plugin/issues/36)) ([8fa3464](https://github.com/tduniec/template-designer-plugin/commit/8fa34648c0e0b85b7bb553b562eb8cb63404258a)), closes [#38](https://github.com/tduniec/template-designer-plugin/issues/38)
66
+ - add support for nfs ([#36](https://github.com/tduniec/template-designer-plugin/issues/36)) ([8fa3464](https://github.com/tduniec/template-designer-plugin/commit/8fa34648c0e0b85b7bb553b562eb8cb63404258a)), closes [#38](https://github.com/tduniec/template-designer-plugin/issues/38)
57
67
 
58
68
  ## [0.2.4](https://github.com/tduniec/template-designer-plugin/compare/v0.2.3...v0.2.4) (2025-11-28)
59
69
 
60
70
  ### Bug Fixes
61
71
 
62
- * add support for nfs ([#36](https://github.com/tduniec/template-designer-plugin/issues/36)) ([8fa3464](https://github.com/tduniec/template-designer-plugin/commit/8fa34648c0e0b85b7bb553b562eb8cb63404258a)), closes [#38](https://github.com/tduniec/template-designer-plugin/issues/38)
72
+ - add support for nfs ([#36](https://github.com/tduniec/template-designer-plugin/issues/36)) ([8fa3464](https://github.com/tduniec/template-designer-plugin/commit/8fa34648c0e0b85b7bb553b562eb8cb63404258a)), closes [#38](https://github.com/tduniec/template-designer-plugin/issues/38)
63
73
 
64
74
  ## [0.2.3](https://github.com/tduniec/template-designer-plugin/compare/v0.2.2...v0.2.3) (2025-11-20)
65
75
 
66
-
67
76
  ### Bug Fixes
68
77
 
69
- * actionNode automcomplete options ([f94e905](https://github.com/tduniec/template-designer-plugin/commit/f94e9053e9e9041034b7b02bd4f348eca0ca8d4f))
70
- * adding delete actioNode option ([b23f3d3](https://github.com/tduniec/template-designer-plugin/commit/b23f3d34158c7ff6f1fd5e43a1384530dbf97e78))
71
- * adding required fields validation on the actionNode ([b0eb801](https://github.com/tduniec/template-designer-plugin/commit/b0eb8010cb62285822c70fbed44dcd31545f71c5))
72
- * improved yaml renders in codemirror ([7ea98a4](https://github.com/tduniec/template-designer-plugin/commit/7ea98a4ffada1156e81aab8134abf08d8ac78f65))
78
+ - actionNode automcomplete options ([f94e905](https://github.com/tduniec/template-designer-plugin/commit/f94e9053e9e9041034b7b02bd4f348eca0ca8d4f))
79
+ - adding delete actioNode option ([b23f3d3](https://github.com/tduniec/template-designer-plugin/commit/b23f3d34158c7ff6f1fd5e43a1384530dbf97e78))
80
+ - adding required fields validation on the actionNode ([b0eb801](https://github.com/tduniec/template-designer-plugin/commit/b0eb8010cb62285822c70fbed44dcd31545f71c5))
81
+ - improved yaml renders in codemirror ([7ea98a4](https://github.com/tduniec/template-designer-plugin/commit/7ea98a4ffada1156e81aab8134abf08d8ac78f65))
73
82
 
74
83
  ## [0.2.2](https://github.com/tduniec/template-designer-plugin/compare/v0.2.1...v0.2.2) (2025-11-20)
75
84
 
76
-
77
85
  ### Bug Fixes
78
86
 
79
- * codemirror-lang missing dependency ([4b1375e](https://github.com/tduniec/template-designer-plugin/commit/4b1375eee9527a73ddbfaae83106894259e3f7b4))
87
+ - codemirror-lang missing dependency ([4b1375e](https://github.com/tduniec/template-designer-plugin/commit/4b1375eee9527a73ddbfaae83106894259e3f7b4))
80
88
 
81
89
  ## [0.2.1](https://github.com/tduniec/template-designer-plugin/compare/v0.2.0...v0.2.1) (2025-11-19)
82
90
 
83
-
84
91
  ### Bug Fixes
85
92
 
86
- * peerDependencies for react and codemirror ([bcb20f0](https://github.com/tduniec/template-designer-plugin/commit/bcb20f002eca7ebf8f9fb15a419c220c851035ff))
93
+ - peerDependencies for react and codemirror ([bcb20f0](https://github.com/tduniec/template-designer-plugin/commit/bcb20f002eca7ebf8f9fb15a419c220c851035ff))
87
94
 
88
95
  # [0.2.0](https://github.com/tduniec/template-designer-plugin/compare/v0.1.7...v0.2.0) (2025-11-19)
89
96
 
90
-
91
97
  ### Features
92
98
 
93
- * initial public release ([72f9a9c](https://github.com/tduniec/template-designer-plugin/commit/72f9a9c9b976721560fb025362ae6d2bd2ad8f1c))
99
+ - initial public release ([72f9a9c](https://github.com/tduniec/template-designer-plugin/commit/72f9a9c9b976721560fb025362ae6d2bd2ad8f1c))
94
100
 
95
101
  ## [0.1.7](https://github.com/tduniec/template-designer-plugin/compare/v0.1.6...v0.1.7) (2025-11-17)
96
102
 
97
-
98
103
  ### Bug Fixes
99
104
 
100
- * node layout fixes ([e011101](https://github.com/tduniec/template-designer-plugin/commit/e01110143a254e1c0ad9a270fb348298f0774920))
105
+ - node layout fixes ([e011101](https://github.com/tduniec/template-designer-plugin/commit/e01110143a254e1c0ad9a270fb348298f0774920))
101
106
 
102
107
  ## [0.1.6](https://github.com/tduniec/template-designer-plugin/compare/v0.1.5...v0.1.6) (2025-11-13)
103
108
 
104
-
105
109
  ### Bug Fixes
106
110
 
107
- * major refactor of core components for readability and maintainability ([024d15e](https://github.com/tduniec/template-designer-plugin/commit/024d15e5d09820689504b6a3415457df32781cc7))
111
+ - major refactor of core components for readability and maintainability ([024d15e](https://github.com/tduniec/template-designer-plugin/commit/024d15e5d09820689504b6a3415457df32781cc7))
108
112
 
109
113
  ## [0.1.5](https://github.com/tduniec/template-designer-plugin/compare/v0.1.4...v0.1.5) (2025-11-08)
110
114
 
111
-
112
115
  ### Bug Fixes
113
116
 
114
- * adding text field editor ([#15](https://github.com/tduniec/template-designer-plugin/issues/15)) ([1e8d2c1](https://github.com/tduniec/template-designer-plugin/commit/1e8d2c1b7be8129c500bb849d21a2bd0064c251d))
117
+ - adding text field editor ([#15](https://github.com/tduniec/template-designer-plugin/issues/15)) ([1e8d2c1](https://github.com/tduniec/template-designer-plugin/commit/1e8d2c1b7be8129c500bb849d21a2bd0064c251d))
115
118
 
116
119
  ## [0.1.4](https://github.com/tduniec/template-designer-plugin/compare/v0.1.3...v0.1.4) (2025-11-08)
117
120
 
118
-
119
121
  ### Bug Fixes
120
122
 
121
- * initializing parameters as subflows ([#14](https://github.com/tduniec/template-designer-plugin/issues/14)) ([59db1bb](https://github.com/tduniec/template-designer-plugin/commit/59db1bb7cc3e313c9a53f9c03f9905eb37aa8247))
123
+ - initializing parameters as subflows ([#14](https://github.com/tduniec/template-designer-plugin/issues/14)) ([59db1bb](https://github.com/tduniec/template-designer-plugin/commit/59db1bb7cc3e313c9a53f9c03f9905eb37aa8247))
122
124
 
123
125
  ## [0.1.3](https://github.com/tduniec/template-designer-plugin/compare/v0.1.2...v0.1.3) (2025-11-05)
124
126
 
package/README.md CHANGED
@@ -1,120 +1,13 @@
1
- # Backstage Template Designer Plugin
1
+ # template-designer
2
2
 
3
- **From YAML to Canvas simplifying Backstage scaffolding**
3
+ Welcome to the template-designer plugin!
4
4
 
5
- Empowering the **Democratization of Templates** in Backstage 🚀
6
- Visually **design, connect, and manage** your Backstage scaffolder templates through an **intuitive drag-and-drop interface** — all inside your Backstage instance.
7
- No YAML complexity. No coding required. Just creativity. **We are breaking the glass!** templating in Backstage made easy! 🚀
5
+ _This plugin was created through the Backstage CLI_
8
6
 
9
- ---
7
+ ## Getting started
10
8
 
11
- ## 🌟 Why “Democratization of Templates”?
9
+ Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/template-designer](http://localhost:3000/template-designer).
12
10
 
13
- Backstage templates shouldn’t be just for developers.
14
- The Template Designer makes **template creation accessible to everyone** from DevOps engineers to product teams — enabling true **collaboration and transparency** in how your software templates are built and evolve.
15
-
16
- ---
17
-
18
- ## 🚀 Features
19
-
20
- - ⚡ **Drag & Drop Editing** — visually compose your Backstage scaffolder workflows.
21
- - 🧩 **Three Node Types**
22
- - **Action Node** – represents a single scaffolder action.
23
- - **Template Node** – groups multiple actions into a reusable unit.
24
- - **Output Node** – defines exported values or pipeline results.
25
- - 💾 **Work with Files** — open existing template definitions or save your flow as a JSON file directly from the UI.
26
- - 🔄 **Live Flow Connections** — connect nodes with arrows to define execution order.
27
- - 💡 **Frontend-Only Plugin** — zero backend setup required.
28
-
29
- ---
30
-
31
- ## 🖼️ Preview
32
-
33
- Checkout the video!
34
-
35
- [▶ Watch the PREVIEW on YouTube](https://youtu.be/Pwzlzvig4-c)
36
-
37
- ## ⚙️ Installation
38
-
39
- From your Backstage root directory
40
-
41
- ```bash
42
- yarn --cwd packages/app add @tduniec/plugin-template-designer
43
- ```
44
-
45
- In packages/app/src/App.tsx:
46
-
47
- ```tsx
48
- import { TemplateDesignerPage } from "@tduniec/plugin-template-designer";
49
-
50
- const routes = (
51
- <FlatRoutes>
52
- {/* other routes */}
53
- <Route path="/template-designer" element={<TemplateDesignerPage />} />
54
- </FlatRoutes>
55
- );
56
- ```
57
-
58
- In `packages/app/src/components/Root/Root.tsx`:
59
-
60
- ```tsx
61
- import { SidebarItem } from "@backstage/core-components";
62
- import { TemplateDesignerIcon } from "@tduniec/plugin-template-designer";
63
-
64
- <SidebarItem
65
- icon={TemplateDesignerIcon}
66
- to="template-designer"
67
- text="Template Designer"
68
- />;
69
- ```
70
-
71
- ## ⚙️ Usage
72
-
73
- Visit your local Backstage instance:
74
-
75
- http://localhost:3000/template-designer
76
-
77
- Create and connect nodes, adjust properties, and export your flow as a JSON file.
78
- You can also open an existing template file, modify it visually, and save your changes.
79
-
80
- ## 💾 File Management
81
-
82
- Template Designer allows you to easily work with your Backstage scaffolder definitions:
83
- Open a template file (.json) – load an existing flow directly into the canvas.
84
- Edit visually – move nodes, adjust connections, rename actions.
85
- Save – export your template back to a .json file ready for scaffolder integration.
86
-
87
- _Template Designer can read your registered actions!_
88
-
89
- ## 🧠 Tech Stack
90
-
91
- - React + TypeScript
92
- - React Flow
93
- - Backstage Core Components
94
-
95
- ## 🛠️ Development
96
-
97
- To run locally during development:
98
-
99
- ```bash
100
- yarn start
101
- ```
102
-
103
- This runs a local Backstage app with hot reload support for your plugin.
104
-
105
- ## ❤️ Contributing
106
-
107
- Template Designer is still fresh out of the oven, so rough edges and open questions are expected—and that’s part of the fun.
108
- If you spot a bug, have an idea, or simply want to riff on better tooling for templates, please open an issue or PR.
109
-
110
- Help us push forward the Democratization of Templates in Backstage!
111
- Ideas, feedback, and PRs are all welcome.
112
-
113
- ## 📄 License
114
-
115
- Apache-2.0 © 2025 — Created by [tduniec](https://github.com/tduniec)
116
-
117
- ## 🌐 Roadmap
118
-
119
- TODO -> please help me gather your **[feedback](https://forms.gle/wqBtpNA3SrDoofgM8)** first!
120
- Take 2 minutes to fill up the **[survey](https://forms.gle/wqBtpNA3SrDoofgM8)**!
11
+ You can also serve the plugin in isolation by running `yarn start` in the plugin directory.
12
+ This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads.
13
+ It is only meant for local development, and the setup for it can be found inside the [/dev](./dev) directory.
package/dist/alpha.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { NavItemBlueprint, PageBlueprint, createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
3
  import { rootRouteRef } from './routes.esm.js';
4
- import { TemplateDesignerIcon } from './components/TemplateDesignerIcon.esm.js';
4
+ import { TemplateDesignerIcon } from '@tduniec/plugin-template-designer-foundation';
5
5
 
6
6
  const templateDesignerNavItem = NavItemBlueprint.make({
7
7
  params: {
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["import {\n createFrontendPlugin,\n NavItemBlueprint,\n PageBlueprint,\n} from \"@backstage/frontend-plugin-api\";\nimport { rootRouteRef } from \"./routes\";\nimport { TemplateDesignerIcon } from \"./components/TemplateDesignerIcon\";\n\nconst templateDesignerNavItem = NavItemBlueprint.make({\n params: {\n title: \"Template designer\",\n routeRef: rootRouteRef,\n icon: TemplateDesignerIcon,\n },\n});\n\nconst templateDesignerPage = PageBlueprint.make({\n params: {\n path: \"/template-designer\",\n routeRef: rootRouteRef,\n loader: () =>\n import(\"./components/TemplateDesigner\").then((m) => (\n <m.TemplateDesigner />\n )),\n },\n});\n\n/**\n * Backstage frontend plugin.\n *\n * @alpha\n */\nexport default createFrontendPlugin({\n pluginId: \"template-designer\",\n info: { packageJson: () => import(\"../package.json\") },\n routes: {\n root: rootRouteRef,\n },\n extensions: [templateDesignerPage, templateDesignerNavItem],\n});\n"],"names":[],"mappings":";;;;;AAQA,MAAM,uBAAA,GAA0B,iBAAiB,IAAA,CAAK;AAAA,EACpD,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,mBAAA;AAAA,IACP,QAAA,EAAU,YAAA;AAAA,IACV,IAAA,EAAM;AAAA;AAEV,CAAC,CAAA;AAED,MAAM,oBAAA,GAAuB,cAAc,IAAA,CAAK;AAAA,EAC9C,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,oBAAA;AAAA,IACN,QAAA,EAAU,YAAA;AAAA,IACV,MAAA,EAAQ,MACN,OAAO,4CAA+B,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,qBAC5C,GAAA,CAAC,CAAA,CAAE,gBAAA,EAAF,EAAmB,CACrB;AAAA;AAEP,CAAC,CAAA;AAOD,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,mBAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAA,EAAE;AAAA,EACrD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAA,EAAY,CAAC,oBAAA,EAAsB,uBAAuB;AAC5D,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.tsx"],"sourcesContent":["import {\n createFrontendPlugin,\n NavItemBlueprint,\n PageBlueprint,\n} from \"@backstage/frontend-plugin-api\";\nimport { rootRouteRef } from \"./routes\";\nimport { TemplateDesignerIcon } from \"@tduniec/plugin-template-designer-foundation\";\n\nconst templateDesignerNavItem = NavItemBlueprint.make({\n params: {\n title: \"Template designer\",\n routeRef: rootRouteRef,\n icon: TemplateDesignerIcon,\n },\n});\n\nconst templateDesignerPage = PageBlueprint.make({\n params: {\n path: \"/template-designer\",\n routeRef: rootRouteRef,\n loader: () =>\n import(\"./components/TemplateDesigner\").then((m) => (\n <m.TemplateDesigner />\n )),\n },\n});\n\n/**\n * Backstage frontend plugin.\n *\n * @alpha\n */\nexport default createFrontendPlugin({\n pluginId: \"template-designer\",\n info: { packageJson: () => import(\"../package.json\") },\n routes: {\n root: rootRouteRef,\n },\n extensions: [templateDesignerPage, templateDesignerNavItem],\n});\n"],"names":[],"mappings":";;;;;AAQA,MAAM,uBAAA,GAA0B,iBAAiB,IAAA,CAAK;AAAA,EACpD,MAAA,EAAQ;AAAA,IACN,KAAA,EAAO,mBAAA;AAAA,IACP,QAAA,EAAU,YAAA;AAAA,IACV,IAAA,EAAM;AAAA;AAEV,CAAC,CAAA;AAED,MAAM,oBAAA,GAAuB,cAAc,IAAA,CAAK;AAAA,EAC9C,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,oBAAA;AAAA,IACN,QAAA,EAAU,YAAA;AAAA,IACV,MAAA,EAAQ,MACN,OAAO,4CAA+B,CAAA,CAAE,IAAA,CAAK,CAAC,CAAA,qBAC5C,GAAA,CAAC,CAAA,CAAE,gBAAA,EAAF,EAAmB,CACrB;AAAA;AAEP,CAAC,CAAA;AAOD,YAAe,oBAAA,CAAqB;AAAA,EAClC,QAAA,EAAU,mBAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,uBAAiB,CAAA,EAAE;AAAA,EACrD,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA,GACR;AAAA,EACA,UAAA,EAAY,CAAC,oBAAA,EAAsB,uBAAuB;AAC5D,CAAC,CAAA;;;;"}
@@ -1,13 +1,11 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useState, useCallback, useMemo } from 'react';
3
3
  import { Page, Content, ContentHeader, SupportButton } from '@backstage/core-components';
4
- import { FieldEditorDialog } from './components/FieldEditorDialog.esm.js';
5
- import { TemplateLanding } from './components/TemplateLanding.esm.js';
6
- import { TemplateWorkspace } from './components/TemplateWorkspace.esm.js';
7
- import { useFieldEditor } from './useFieldEditor.esm.js';
8
- import { useTemplateState } from './useTemplateState.esm.js';
4
+ import { useTemplateState, useFieldEditor, TemplateWorkspace, ParametersNode, TemplateLanding, FieldEditorDialog } from '@tduniec/plugin-template-designer-foundation';
9
5
 
10
- const TemplateDesigner = () => {
6
+ const TemplateDesigner = ({
7
+ FieldEditorComponent
8
+ }) => {
11
9
  const [showYaml, setShowYaml] = useState(true);
12
10
  const {
13
11
  templateObject,
@@ -73,7 +71,10 @@ const TemplateDesigner = () => {
73
71
  saveButtonLabel,
74
72
  isReloading,
75
73
  isSaving,
76
- isSyncing
74
+ isSyncing,
75
+ headerActionsSlot: null,
76
+ flowTopSlot: null,
77
+ parametersNodeComponent: ParametersNode
77
78
  }
78
79
  ) : /* @__PURE__ */ jsx(
79
80
  TemplateLanding,
@@ -113,8 +114,9 @@ const TemplateDesigner = () => {
113
114
  selectCatalogTemplate
114
115
  ]
115
116
  );
116
- return /* @__PURE__ */ jsxs("div", { ref: interactionRootRef, style: { height: "100%" }, children: [
117
- /* @__PURE__ */ jsx(Page, { themeId: "tool", children: /* @__PURE__ */ jsxs(Content, { children: [
117
+ const ResolvedFieldEditor = FieldEditorComponent ?? FieldEditorDialog;
118
+ return /* @__PURE__ */ jsxs(Page, { themeId: "tool", children: [
119
+ /* @__PURE__ */ jsxs(Content, { children: [
118
120
  /* @__PURE__ */ jsx(ContentHeader, { title: "Template Designer", children: /* @__PURE__ */ jsx(SupportButton, { children: "Template Designer turns blank Backstage YAML into a storyboard-like canvas, guiding anyone through drag-and-drop scaffolder authoring before ever touching code. Rally non-experts, broadcast best practices, and accelerate template launches directly inside Backstage." }) }),
119
121
  /* @__PURE__ */ jsx(
120
122
  "input",
@@ -126,10 +128,10 @@ const TemplateDesigner = () => {
126
128
  onChange: handleTemplateFileSelected
127
129
  }
128
130
  ),
129
- workspace
130
- ] }) }),
131
+ /* @__PURE__ */ jsx("div", { ref: interactionRootRef, children: workspace })
132
+ ] }),
131
133
  /* @__PURE__ */ jsx(
132
- FieldEditorDialog,
134
+ ResolvedFieldEditor,
133
135
  {
134
136
  open: Boolean(editorState),
135
137
  label: editorState?.label,
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateDesigner.esm.js","sources":["../../../src/components/TemplateDesigner/TemplateDesigner.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from \"react\";\nimport {\n Content,\n ContentHeader,\n Page,\n SupportButton,\n} from \"@backstage/core-components\";\nimport { FieldEditorDialog } from \"./components/FieldEditorDialog\";\nimport { TemplateLanding } from \"./components/TemplateLanding\";\nimport { TemplateWorkspace } from \"./components/TemplateWorkspace\";\nimport { useFieldEditor } from \"./useFieldEditor\";\nimport { useTemplateState } from \"./useTemplateState\";\n\nexport const TemplateDesigner = () => {\n const [showYaml, setShowYaml] = useState(true);\n const {\n templateObject,\n templateYaml,\n yamlError,\n loadError,\n templateSteps,\n templateParameters,\n templateOutput,\n templateSource,\n isReloading,\n isSaving,\n isSyncing,\n fileInputRef,\n handleStartSampleTemplate,\n handleTemplateFileSelected,\n handleOpenTemplatePicker,\n handleYamlChange,\n handleStepsChange,\n handleParametersChange,\n handleOutputChange,\n handleReloadFromFile,\n handleSaveTemplate,\n availableTemplates,\n selectCatalogTemplate,\n } = useTemplateState();\n const { editorState, interactionRootRef, closeEditor, applyEditorValue } =\n useFieldEditor();\n\n const handleToggleYaml = useCallback(() => {\n setShowYaml((prev) => !prev);\n }, []);\n\n const activeTemplateLabel = templateSource?.label;\n\n let reloadButtonLabel = \"Reset sample\";\n if (templateSource?.type === \"file\") {\n reloadButtonLabel = isReloading ? \"Reloading...\" : \"Reload file\";\n } else if (templateSource?.type === \"catalog\") {\n reloadButtonLabel = \"Reload template\";\n }\n\n let saveButtonLabel =\n templateSource?.type === \"file\" ? \"Save\" : \"Save as file\";\n if (isSaving) {\n saveButtonLabel = \"Saving...\";\n }\n\n const workspace = useMemo(\n () =>\n templateObject ? (\n <TemplateWorkspace\n templateSteps={templateSteps}\n templateParameters={templateParameters}\n templateOutput={templateOutput}\n templateYaml={templateYaml}\n yamlError={yamlError}\n loadError={loadError}\n showYaml={showYaml}\n onToggleYaml={handleToggleYaml}\n onYamlChange={handleYamlChange}\n onStepsChange={handleStepsChange}\n onParametersChange={handleParametersChange}\n onOutputChange={handleOutputChange}\n onReload={handleReloadFromFile}\n onSave={handleSaveTemplate}\n onOpenTemplatePicker={handleOpenTemplatePicker}\n activeTemplateLabel={activeTemplateLabel}\n reloadButtonLabel={reloadButtonLabel}\n saveButtonLabel={saveButtonLabel}\n isReloading={isReloading}\n isSaving={isSaving}\n isSyncing={isSyncing}\n />\n ) : (\n <TemplateLanding\n loadError={loadError}\n onStartSampleTemplate={handleStartSampleTemplate}\n onOpenTemplatePicker={handleOpenTemplatePicker}\n availableTemplates={availableTemplates}\n selectCatalogTemplate={selectCatalogTemplate}\n />\n ),\n [\n templateObject,\n templateSteps,\n templateParameters,\n templateOutput,\n templateYaml,\n yamlError,\n loadError,\n showYaml,\n handleToggleYaml,\n handleYamlChange,\n handleStepsChange,\n handleParametersChange,\n handleOutputChange,\n handleReloadFromFile,\n handleSaveTemplate,\n handleOpenTemplatePicker,\n activeTemplateLabel,\n reloadButtonLabel,\n saveButtonLabel,\n isReloading,\n isSaving,\n isSyncing,\n handleStartSampleTemplate,\n availableTemplates,\n selectCatalogTemplate,\n ]\n );\n\n return (\n <div ref={interactionRootRef} style={{ height: \"100%\" }}>\n <Page themeId=\"tool\">\n <Content>\n <ContentHeader title=\"Template Designer\">\n <SupportButton>\n Template Designer turns blank Backstage YAML into a\n storyboard-like canvas, guiding anyone through drag-and-drop\n scaffolder authoring before ever touching code. Rally non-experts,\n broadcast best practices, and accelerate template launches\n directly inside Backstage.\n </SupportButton>\n </ContentHeader>\n\n <input\n ref={fileInputRef}\n type=\"file\"\n accept=\".yaml,.yml,.json\"\n style={{ display: \"none\" }}\n onChange={handleTemplateFileSelected}\n />\n\n {workspace}\n </Content>\n </Page>\n <FieldEditorDialog\n open={Boolean(editorState)}\n label={editorState?.label}\n value={editorState?.initialValue ?? \"\"}\n onClose={closeEditor}\n onApply={applyEditorValue}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAaO,MAAM,mBAAmB,MAAM;AACpC,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAS,IAAI,CAAA;AAC7C,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,YAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,aAAA;AAAA,IACA,kBAAA;AAAA,IACA,cAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,YAAA;AAAA,IACA,yBAAA;AAAA,IACA,0BAAA;AAAA,IACA,wBAAA;AAAA,IACA,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,sBAAA;AAAA,IACA,kBAAA;AAAA,IACA,oBAAA;AAAA,IACA,kBAAA;AAAA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UACP,KAAA,EAAO,EAAE,OAAA,EAAS,MAAA,EAAO;AAAA,UACzB,QAAA,EAAU;AAAA;AAAA,OACZ;AAAA,MAEC;AAAA,KAAA,EACH,CAAA,EACF,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,iBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,QAAQ,WAAW,CAAA;AAAA,QACzB,OAAO,WAAA,EAAa,KAAA;AAAA,QACpB,KAAA,EAAO,aAAa,YAAA,IAAgB,EAAA;AAAA,QACpC,OAAA,EAAS,WAAA;AAAA,QACT,OAAA,EAAS;AAAA;AAAA;AACX,GAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"TemplateDesigner.esm.js","sources":["../../../src/components/TemplateDesigner/TemplateDesigner.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from \"react\";\nimport {\n Content,\n ContentHeader,\n Page,\n SupportButton,\n} from \"@backstage/core-components\";\nimport type { ComponentType } from \"react\";\nimport {\n FieldEditorDialog,\n FieldEditorDialogProps,\n TemplateLanding,\n TemplateWorkspace,\n type DesignerFlowProps,\n ParametersNode,\n useFieldEditor,\n} from \"@tduniec/plugin-template-designer-foundation\";\nimport { useTemplateState } from \"@tduniec/plugin-template-designer-foundation\";\n\nexport type TemplateDesignerProps = {\n FieldEditorComponent?: ComponentType<FieldEditorDialogProps>;\n};\n\nexport const TemplateDesigner = ({\n FieldEditorComponent,\n}: TemplateDesignerProps) => {\n const [showYaml, setShowYaml] = useState(true);\n const {\n templateObject,\n templateYaml,\n yamlError,\n loadError,\n templateSteps,\n templateParameters,\n templateOutput,\n templateSource,\n isReloading,\n isSaving,\n isSyncing,\n fileInputRef,\n handleStartSampleTemplate,\n handleTemplateFileSelected,\n handleOpenTemplatePicker,\n handleYamlChange,\n handleStepsChange,\n handleParametersChange,\n handleOutputChange,\n handleReloadFromFile,\n handleSaveTemplate,\n availableTemplates,\n selectCatalogTemplate,\n } = useTemplateState();\n const { editorState, interactionRootRef, closeEditor, applyEditorValue } =\n useFieldEditor();\n\n const handleToggleYaml = useCallback(() => {\n setShowYaml((prev) => !prev);\n }, []);\n\n const activeTemplateLabel = templateSource?.label;\n\n let reloadButtonLabel = \"Reset sample\";\n if (templateSource?.type === \"file\") {\n reloadButtonLabel = isReloading ? \"Reloading...\" : \"Reload file\";\n } else if (templateSource?.type === \"catalog\") {\n reloadButtonLabel = \"Reload template\";\n }\n\n let saveButtonLabel =\n templateSource?.type === \"file\" ? \"Save\" : \"Save as file\";\n if (isSaving) {\n saveButtonLabel = \"Saving...\";\n }\n\n const workspace = useMemo(\n () =>\n templateObject ? (\n <TemplateWorkspace\n templateSteps={templateSteps}\n templateParameters={templateParameters}\n templateOutput={templateOutput}\n templateYaml={templateYaml}\n yamlError={yamlError}\n loadError={loadError}\n showYaml={showYaml}\n onToggleYaml={handleToggleYaml}\n onYamlChange={handleYamlChange}\n onStepsChange={handleStepsChange}\n onParametersChange={handleParametersChange}\n onOutputChange={handleOutputChange}\n onReload={handleReloadFromFile}\n onSave={handleSaveTemplate}\n onOpenTemplatePicker={handleOpenTemplatePicker}\n activeTemplateLabel={activeTemplateLabel}\n reloadButtonLabel={reloadButtonLabel}\n saveButtonLabel={saveButtonLabel}\n isReloading={isReloading}\n isSaving={isSaving}\n isSyncing={isSyncing}\n headerActionsSlot={null}\n flowTopSlot={null}\n parametersNodeComponent={\n ParametersNode as DesignerFlowProps[\"parametersNodeComponent\"]\n }\n />\n ) : (\n <TemplateLanding\n loadError={loadError}\n onStartSampleTemplate={handleStartSampleTemplate}\n onOpenTemplatePicker={handleOpenTemplatePicker}\n availableTemplates={availableTemplates}\n selectCatalogTemplate={selectCatalogTemplate}\n />\n ),\n [\n templateObject,\n templateSteps,\n templateParameters,\n templateOutput,\n templateYaml,\n yamlError,\n loadError,\n showYaml,\n handleToggleYaml,\n handleYamlChange,\n handleStepsChange,\n handleParametersChange,\n handleOutputChange,\n handleReloadFromFile,\n handleSaveTemplate,\n handleOpenTemplatePicker,\n activeTemplateLabel,\n reloadButtonLabel,\n saveButtonLabel,\n isReloading,\n isSaving,\n isSyncing,\n handleStartSampleTemplate,\n availableTemplates,\n selectCatalogTemplate,\n ]\n );\n\n const ResolvedFieldEditor = FieldEditorComponent ?? FieldEditorDialog;\n\n return (\n <Page themeId=\"tool\">\n <Content>\n <ContentHeader title=\"Template Designer\">\n <SupportButton>\n Template Designer turns blank Backstage YAML into a storyboard-like\n canvas, guiding anyone through drag-and-drop scaffolder authoring\n before ever touching code. Rally non-experts, broadcast best\n practices, and accelerate template launches directly inside\n Backstage.\n </SupportButton>\n </ContentHeader>\n\n <input\n ref={fileInputRef}\n type=\"file\"\n accept=\".yaml,.yml,.json\"\n style={{ display: \"none\" }}\n onChange={handleTemplateFileSelected}\n />\n\n <div ref={interactionRootRef}>{workspace}</div>\n </Content>\n <ResolvedFieldEditor\n open={Boolean(editorState)}\n label={editorState?.label}\n value={editorState?.initialValue ?? \"\"}\n onClose={closeEditor}\n onApply={applyEditorValue}\n />\n </Page>\n );\n};\n"],"names":[],"mappings":";;;;;AAuBO,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AACF,CAAA,KAA6B;AAC3B,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAS,IAAI,CAAA;AAC7C,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,YAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,aAAA;AAAA,IACA,kBAAA;AAAA,IACA,cAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,YAAA;AAAA,IACA,yBAAA;AAAA,IACA,0BAAA;AAAA,IACA,wBAAA;AAAA,IACA,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,sBAAA;AAAA,IACA,kBAAA;AAAA,IACA,oBAAA;AAAA,IACA,kBAAA;AAAA,IACA,kBAAA;AAAA,IACA;AAAA,MACE,gBAAA,EAAiB;AACr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AAA,EAAO,EAAE,OAAA,EAAS,MAAA,EAAO;AAAA,UACzB,QAAA,EAAU;AAAA;AAAA,OACZ;AAAA,sBAEA,GAAA,CAAC,KAAA,EAAA,EAAI,GAAA,EAAK,kBAAA,EAAqB,QAAA,EAAA,SAAA,EAAU;AAAA,KAAA,EAC3C,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,mBAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAM,QAAQ,WAAW,CAAA;AAAA,QACzB,OAAO,WAAA,EAAa,KAAA;AAAA,QACpB,KAAA,EAAO,aAAa,YAAA,IAAgB,EAAA;AAAA,QACpC,OAAA,EAAS,WAAA;AAAA,QACT,OAAA,EAAS;AAAA;AAAA;AACX,GAAA,EACF,CAAA;AAEJ;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,12 +1,18 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ComponentType } from 'react';
3
+ import { FieldEditorDialogProps } from '@tduniec/plugin-template-designer-foundation';
4
+ export * from '@tduniec/plugin-template-designer-foundation';
5
+ export { DesignerFlow, DesignerFlowProps, ParametersNode, TemplateDesignerIcon, TemplateLanding, TemplateWorkspace, useFieldEditor } from '@tduniec/plugin-template-designer-foundation';
2
6
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
3
- import { SvgIconProps } from '@material-ui/core/SvgIcon';
4
7
 
5
- declare const TemplateDesignerIcon: (props: SvgIconProps) => react_jsx_runtime.JSX.Element;
8
+ type TemplateDesignerProps = {
9
+ FieldEditorComponent?: ComponentType<FieldEditorDialogProps>;
10
+ };
11
+ declare const TemplateDesigner: ({ FieldEditorComponent, }: TemplateDesignerProps) => react_jsx_runtime.JSX.Element;
6
12
 
7
13
  declare const templateDesignerPlugin: _backstage_core_plugin_api.BackstagePlugin<{
8
14
  root: _backstage_core_plugin_api.RouteRef<undefined>;
9
15
  }, {}, {}>;
10
- declare const TemplateDesignerPage: () => react_jsx_runtime.JSX.Element;
16
+ declare const TemplateDesignerPage: ({ FieldEditorComponent, }: TemplateDesignerProps) => react_jsx_runtime.JSX.Element;
11
17
 
12
- export { TemplateDesignerIcon, TemplateDesignerPage, templateDesignerPlugin };
18
+ export { TemplateDesigner, TemplateDesignerPage, templateDesignerPlugin };
package/dist/index.esm.js CHANGED
@@ -1,3 +1,5 @@
1
1
  export { TemplateDesignerPage, templateDesignerPlugin } from './plugin.esm.js';
2
- export { TemplateDesignerIcon } from './components/TemplateDesignerIcon.esm.js';
2
+ export * from '@tduniec/plugin-template-designer-foundation';
3
+ export { DesignerFlow, ParametersNode, TemplateDesignerIcon, TemplateLanding, TemplateWorkspace, useFieldEditor } from '@tduniec/plugin-template-designer-foundation';
4
+ export { TemplateDesigner } from './components/TemplateDesigner/TemplateDesigner.esm.js';
3
5
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}