@_neronotte/theme-studio 0.1.2 → 0.1.4
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 +32 -69
- package/dist/assets/{index-BSkUzhOV.js → index-b6oMkGMK.js} +1 -1
- package/dist/index.html +1 -1
- package/npm-shrinkwrap.json +4635 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -16,37 +16,49 @@ active development; see the plan for current status.
|
|
|
16
16
|
```
|
|
17
17
|
greg-pptb-themestudio/
|
|
18
18
|
├── docs/ # requirements, implementation plan, theme XML reference, samples
|
|
19
|
+
├── public/
|
|
20
|
+
│ └── icons/
|
|
19
21
|
├── src/
|
|
20
22
|
│ ├── App.tsx # shell layout: config bar / preview / theme panel
|
|
21
23
|
│ ├── main.tsx # entry point
|
|
22
24
|
│ ├── index.css # global styling
|
|
23
25
|
│ ├── components/
|
|
24
|
-
│ │ ├── ErrorBoundary.tsx
|
|
25
|
-
│ │ ├──
|
|
26
|
-
│ │ ├──
|
|
27
|
-
│ │
|
|
28
|
-
│ │
|
|
26
|
+
│ │ ├── ErrorBoundary.tsx # top-level error boundary
|
|
27
|
+
│ │ ├── common/ # reusable UI primitives (e.g. BusyButton)
|
|
28
|
+
│ │ ├── config/ # solution/theme/scope dialogs and save flow
|
|
29
|
+
│ │ ├── theme/ # palette/typography/logo/header editors
|
|
30
|
+
│ │ └── preview/ # app shell replica, form/grid previews
|
|
31
|
+
│ │ ├── modelDriven/ # Fluent-like input controls used in previews
|
|
32
|
+
│ │ └── shell/ # header, navigation and command bar
|
|
29
33
|
│ ├── model/ # ThemeModel, XML parse/serialize, brand ramp, contrast, XML diff,
|
|
30
|
-
│ │ #
|
|
34
|
+
│ │ # color extraction and role mapping
|
|
31
35
|
│ ├── services/
|
|
32
|
-
│ │ ├──
|
|
33
|
-
│ │ ├──
|
|
34
|
-
│ │ ├──
|
|
35
|
-
│ │ ├──
|
|
36
|
-
│ │ ├──
|
|
37
|
-
│ │ ├──
|
|
38
|
-
│ │
|
|
36
|
+
│ │ ├── dataverseCore.ts # Dataverse HTTP/auth helpers
|
|
37
|
+
│ │ ├── dataverseSolutionService.ts # visible unmanaged solutions
|
|
38
|
+
│ │ ├── dataverseWebResourceService.ts
|
|
39
|
+
│ │ ├── dataverseThemeScopeService.ts
|
|
40
|
+
│ │ ├── dataverseAppService.ts # model-driven app retrieval for scope assignment
|
|
41
|
+
│ │ ├── themeFile.ts # local theme XML import/export
|
|
42
|
+
│ │ ├── webResources.ts # web resource workflows + publish
|
|
43
|
+
│ │ ├── themeScope.ts # environment/app scope assignment
|
|
44
|
+
│ │ ├── logo.ts # logo image pick/upload and validation
|
|
45
|
+
│ │ ├── imageImport.ts # screenshot import (file/clipboard/drag & drop)
|
|
46
|
+
│ │ └── siteCapture.ts # URL validation + assisted screenshot capture
|
|
39
47
|
│ ├── state/
|
|
40
48
|
│ │ ├── ThemeContext.tsx # theme state provider + derived palette/preview theme
|
|
41
49
|
│ │ ├── ConfigContext.tsx # connection, solution, theme web resource, logo
|
|
50
|
+
│ │ ├── PortalMountContext.tsx # dialog portal mount coordination
|
|
42
51
|
│ │ └── themeReducer.ts # pure reducer: edits, undo/redo, dirty tracking
|
|
43
52
|
│ └── hooks/
|
|
44
53
|
│ └── useToolboxAPI.ts # connection, host-theme and event helpers
|
|
45
54
|
├── dist/ # build output
|
|
46
55
|
├── index.html
|
|
47
56
|
├── package.json
|
|
57
|
+
├── tsconfig.node.json
|
|
58
|
+
├── tsconfig.vitest.json
|
|
48
59
|
├── tsconfig.json
|
|
49
|
-
|
|
60
|
+
├── vite.config.ts
|
|
61
|
+
└── vitest.config.ts
|
|
50
62
|
```
|
|
51
63
|
|
|
52
64
|
## Using the tool
|
|
@@ -61,13 +73,15 @@ The tool requires an active Dataverse connection in Power Platform ToolBox.
|
|
|
61
73
|
3. Edit the theme in the right-hand panel — palette, typography, logo and app header colours — and
|
|
62
74
|
watch the preview repaint live. Themes can also be imported from / exported to a local file.
|
|
63
75
|
4. **Save to Dataverse**: the pre-save dialog shows an old-vs-new XML diff, lets you name a new web
|
|
64
|
-
resource, and optionally publishes it (
|
|
65
|
-
|
|
76
|
+
resource, and optionally publishes it (enabled by default). Publishing affects the whole
|
|
77
|
+
environment, and updates are only picked up after publish.
|
|
66
78
|
5. **Get colors from a website** (Palette section): derive the theme from an existing site instead
|
|
67
79
|
of picking every colour by hand — see below.
|
|
68
80
|
6. **Apply theme**: assign the saved web resource to the whole environment or to a single app. Where
|
|
69
81
|
the setting can't be written through the API, the dialog shows the unique name to paste and deep
|
|
70
82
|
links into the solution in the maker portal.
|
|
83
|
+
7. When opening another theme or starting a new one while there are unsaved edits, the tool asks
|
|
84
|
+
for confirmation before discarding changes.
|
|
71
85
|
|
|
72
86
|
### Getting the colors from a website
|
|
73
87
|
|
|
@@ -86,60 +100,9 @@ The **Get colors from a website** button in the Palette section opens a three-st
|
|
|
86
100
|
filled in when you explicitly ask for them.
|
|
87
101
|
|
|
88
102
|
The screenshot is working data only: it is never saved to Dataverse and never stored in the
|
|
89
|
-
ToolBox settings — only the extraction options (ignore greys
|
|
90
|
-
remembered.
|
|
103
|
+
ToolBox settings — only the extraction options (ignore greys and slot overrides) are remembered.
|
|
91
104
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
**Build the tool:**
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
npm run build
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
**Dev build with sourcemaps (watch mode):**
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
npm run dev-watch
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**Run the unit tests:**
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
npm test
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**Validate tool package:**
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
npm run validate
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Shrinkwrap package:**
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
npm run finalize-package
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
or;
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
npm shrinkwrap
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
**Publish new version:**
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
npm run publish-package
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
_Further tool development documentation is available @ https://docs.powerplatformtoolbox.com/tool-development_
|
|
137
|
-
|
|
138
|
-
## Usage in ToolBox
|
|
139
|
-
|
|
140
|
-
1. Build the tool using `npm run build`
|
|
141
|
-
2. Install the tool in ToolBox
|
|
142
|
-
3. Load and use the tool from the ToolBox interface
|
|
105
|
+
Current extraction rank shows up to 5 dominant colours.
|
|
143
106
|
|
|
144
107
|
## License
|
|
145
108
|
|