@mohsinonxrm/pptb-dataverse-request-studio 1.1.1 → 1.1.3

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/index.html CHANGED
@@ -1,231 +1,263 @@
1
- <!doctype html>
2
- <html lang="en" data-theme="light">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Dataverse Request Studio</title>
7
- <style>
8
- html, body, #root { height: 100%; margin: 0; padding: 0; }
9
- body { font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif; }
10
-
11
- /* Brand / method colors — CSS-var bridge per gotcha G-001.
12
- Switched on data-theme attribute on <html>. */
13
- :root[data-theme='light'] {
14
- --color-request-read: #005a9e;
15
- --color-request-write: #107c10;
16
- --color-request-relate: #8764b8;
17
- --color-request-execute: #ca5010;
18
- --color-request-binary: #9d432c;
19
-
20
- --color-method-get: #005a9e;
21
- --color-method-post: #107c10;
22
- --color-method-patch: #ca5010;
23
- --color-method-put: #9d432c;
24
- --color-method-delete: #a4262c;
25
- --color-method-batch: #8764b8;
26
-
27
- --canvas-bg: #f0eee9;
28
- }
29
- :root[data-theme='dark'] {
30
- --color-request-read: #62b1f8;
31
- --color-request-write: #6ccb5f;
32
- --color-request-relate: #b4a0ff;
33
- --color-request-execute: #f7894a;
34
- --color-request-binary: #d69c8b;
35
-
36
- --color-method-get: #62b1f8;
37
- --color-method-post: #6ccb5f;
38
- --color-method-patch: #f7894a;
39
- --color-method-put: #d69c8b;
40
- --color-method-delete: #f1707b;
41
- --color-method-batch: #b4a0ff;
42
-
43
- --canvas-bg: #1a1a1a;
44
- }
45
-
46
- /* ─────────────────────────────────────────────────────────────
47
- Group-color cascade — per v3-design-review P0-1.
48
- When the frame body carries `data-mode-group="<group>"`, every
49
- Fluent v9 token that drives "brand" chrome (primary button,
50
- active tab underline, focus ring, tinted backgrounds) is
51
- remapped to the group color. Result: the Execute button on
52
- Create reads green, the active tab underline on Associate
53
- reads purple, etc. — without touching component code.
54
-
55
- Tokens we override:
56
- --colorBrandBackground : primary button bg
57
- --colorBrandBackgroundHover : primary button hover bg
58
- --colorBrandStroke1 : focus rings, active borders
59
- --colorBrandStroke2 : tinted card borders
60
- --colorBrandBackground2 : tinted card backgrounds
61
- --colorBrandBackground2Hover : tinted card hover bg
62
- --colorBrandForeground1 : icon + emphasis fg
63
- --colorBrandForeground2 : caption + helper fg
64
- --colorCompoundBrandBackground: TabList active underline
65
- --colorCompoundBrandStroke : compound borders
66
-
67
- The Read group keeps the v9 defaults (blue) since v9's brand
68
- IS blue, so we only override for non-read groups. This avoids
69
- a no-op cascade for the most common mode group.
70
- ───────────────────────────────────────────────────────────── */
71
- [data-mode-group='write'] {
72
- --colorBrandBackground: var(--color-request-write);
73
- --colorBrandBackgroundHover: var(--color-request-write);
74
- --colorBrandBackgroundPressed: var(--color-request-write);
75
- --colorBrandBackgroundSelected: var(--color-request-write);
76
- --colorBrandStroke1: var(--color-request-write);
77
- --colorBrandStroke2: var(--color-request-write);
78
- --colorBrandForeground1: var(--color-request-write);
79
- --colorBrandForeground2: var(--color-request-write);
80
- --colorCompoundBrandBackground: var(--color-request-write);
81
- --colorCompoundBrandStroke: var(--color-request-write);
82
- }
83
- [data-mode-group='relate'] {
84
- --colorBrandBackground: var(--color-request-relate);
85
- --colorBrandBackgroundHover: var(--color-request-relate);
86
- --colorBrandBackgroundPressed: var(--color-request-relate);
87
- --colorBrandBackgroundSelected: var(--color-request-relate);
88
- --colorBrandStroke1: var(--color-request-relate);
89
- --colorBrandStroke2: var(--color-request-relate);
90
- --colorBrandForeground1: var(--color-request-relate);
91
- --colorBrandForeground2: var(--color-request-relate);
92
- --colorCompoundBrandBackground: var(--color-request-relate);
93
- --colorCompoundBrandStroke: var(--color-request-relate);
94
- }
95
- [data-mode-group='execute'] {
96
- --colorBrandBackground: var(--color-request-execute);
97
- --colorBrandBackgroundHover: var(--color-request-execute);
98
- --colorBrandBackgroundPressed: var(--color-request-execute);
99
- --colorBrandBackgroundSelected: var(--color-request-execute);
100
- --colorBrandStroke1: var(--color-request-execute);
101
- --colorBrandStroke2: var(--color-request-execute);
102
- --colorBrandForeground1: var(--color-request-execute);
103
- --colorBrandForeground2: var(--color-request-execute);
104
- --colorCompoundBrandBackground: var(--color-request-execute);
105
- --colorCompoundBrandStroke: var(--color-request-execute);
106
- }
107
- [data-mode-group='binary'] {
108
- --colorBrandBackground: var(--color-request-binary);
109
- --colorBrandBackgroundHover: var(--color-request-binary);
110
- --colorBrandBackgroundPressed: var(--color-request-binary);
111
- --colorBrandBackgroundSelected: var(--color-request-binary);
112
- --colorBrandStroke1: var(--color-request-binary);
113
- --colorBrandStroke2: var(--color-request-binary);
114
- --colorBrandForeground1: var(--color-request-binary);
115
- --colorBrandForeground2: var(--color-request-binary);
116
- --colorCompoundBrandBackground: var(--color-request-binary);
117
- --colorCompoundBrandStroke: var(--color-request-binary);
118
- }
119
-
120
- /* ─────────────────────────────────────────────────────────────
121
- Slim Fluent-themed scrollbars.
122
-
123
- Default Windows / Chromium scrollbars on Win 11 at 125% DPI are
124
- the thick "flat" style (~17 px) and look out of place inside a
125
- Fluent v9 surface. We replace them with the slim overlay style
126
- Microsoft 365 web apps use: ~10 px width, semi-transparent gray
127
- thumb, transparent track, slightly bolder on hover. Theme-aware
128
- via [data-theme='dark'].
129
-
130
- Design rationale (Fluent 2 + WCAG 2.5.7 "Dragging movements"):
131
- we deliberately do NOT hide scrollbars. Hidden scrollbars hurt
132
- discoverability + keyboard nav. Slim-but-visible is the right
133
- balance: present but unobtrusive.
134
-
135
- Applied via `*` so every scrollable surface gets the treatment
136
- (mainBody, virtualized grid body, drawer scroll, etc.). Monaco
137
- paints its own scrollbar over an internally-hidden native one,
138
- so it's unaffected.
139
- ───────────────────────────────────────────────────────────── */
140
-
141
- /* Firefox + standards-track Chromium 121+ */
142
- * {
143
- scrollbar-width: thin;
144
- scrollbar-color: rgba(96, 94, 92, 0.40) transparent;
145
- }
146
-
147
- /* WebKit / Blink — finer control */
148
- *::-webkit-scrollbar {
149
- width: 10px;
150
- height: 10px;
151
- }
152
- *::-webkit-scrollbar-track {
153
- background: transparent;
154
- }
155
- *::-webkit-scrollbar-thumb {
156
- background-color: rgba(96, 94, 92, 0.35);
157
- border-radius: 8px;
158
- /* 2 px transparent border + background-clip gives the thumb a
159
- visual gap from the track edge (overlay-scrollbar feel)
160
- without the actual track ever being visible. */
161
- border: 2px solid transparent;
162
- background-clip: content-box;
163
- }
164
- *::-webkit-scrollbar-thumb:hover {
165
- background-color: rgba(96, 94, 92, 0.65);
166
- background-clip: content-box;
167
- }
168
- *::-webkit-scrollbar-thumb:active {
169
- background-color: rgba(96, 94, 92, 0.80);
170
- background-clip: content-box;
171
- }
172
- *::-webkit-scrollbar-corner {
173
- background: transparent;
174
- }
175
-
176
- /* Dark theme — flip thumb color so it remains visible against
177
- dark surfaces. Same opacity progression idle → hover → active. */
178
- :root[data-theme='dark'] * {
179
- scrollbar-color: rgba(200, 198, 196, 0.35) transparent;
180
- }
181
- :root[data-theme='dark'] *::-webkit-scrollbar-thumb {
182
- background-color: rgba(200, 198, 196, 0.30);
183
- background-clip: content-box;
184
- }
185
- :root[data-theme='dark'] *::-webkit-scrollbar-thumb:hover {
186
- background-color: rgba(200, 198, 196, 0.55);
187
- background-clip: content-box;
188
- }
189
- :root[data-theme='dark'] *::-webkit-scrollbar-thumb:active {
190
- background-color: rgba(200, 198, 196, 0.75);
191
- background-clip: content-box;
192
- }
193
-
194
- #boot-splash {
195
- position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
196
- flex-direction: column; gap: 16px; background: var(--canvas-bg); z-index: 1;
197
- }
198
- #boot-splash .ring {
199
- width: 32px; height: 32px; border: 3px solid #e0dfde; border-top-color: #0f6cbd;
200
- border-radius: 50%; animation: spin 1s linear infinite;
201
- }
202
- #boot-splash .label { font-size: 13px; color: #605e5c; }
203
- #boot-splash.hide { opacity: 0; pointer-events: none; transition: opacity 0.2s; }
204
- @keyframes spin { to { transform: rotate(360deg); } }
205
- </style>
206
- </head>
207
- <body>
208
- <div id="boot-splash">
209
- <div class="ring"></div>
210
- <div class="label">Loading Dataverse Request Studio…</div>
211
- </div>
212
- <div id="root"></div>
213
- <!-- Anti-flash theme bootstrap.
214
- When embedded in PPTB the host appends `?pptb=1&theme=dark` (or light).
215
- Reading it synchronously here lets us paint the right background before
216
- the React bundle parses + mounts. Without this the iframe flashes light
217
- even when the host is in dark mode. -->
218
- <script>
219
- (function () {
220
- try {
221
- var p = new URLSearchParams(window.location.search);
222
- var t = p.get('theme');
223
- if (t === 'dark' || t === 'light') {
224
- document.documentElement.setAttribute('data-theme', t);
225
- }
226
- } catch (e) { /* ignore — fall back to default light */ }
227
- })();
228
- </script>
229
- <script type="module" src="/src/main.tsx"></script>
230
- </body>
231
- </html>
1
+ <!doctype html>
2
+ <html lang="en" data-theme="light">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Dataverse Request Studio</title>
7
+ <style>
8
+ html,
9
+ body,
10
+ #root {
11
+ height: 100%;
12
+ margin: 0;
13
+ padding: 0;
14
+ }
15
+ body {
16
+ font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, sans-serif;
17
+ }
18
+
19
+ /* Brand / method colors — CSS-var bridge per gotcha G-001.
20
+ Switched on data-theme attribute on <html>. */
21
+ :root[data-theme='light'] {
22
+ --color-request-read: #005a9e;
23
+ --color-request-write: #107c10;
24
+ --color-request-relate: #8764b8;
25
+ --color-request-execute: #ca5010;
26
+ --color-request-binary: #9d432c;
27
+
28
+ --color-method-get: #005a9e;
29
+ --color-method-post: #107c10;
30
+ --color-method-patch: #ca5010;
31
+ --color-method-put: #9d432c;
32
+ --color-method-delete: #a4262c;
33
+ --color-method-batch: #8764b8;
34
+
35
+ --canvas-bg: #f0eee9;
36
+ }
37
+ :root[data-theme='dark'] {
38
+ --color-request-read: #62b1f8;
39
+ --color-request-write: #6ccb5f;
40
+ --color-request-relate: #b4a0ff;
41
+ --color-request-execute: #f7894a;
42
+ --color-request-binary: #d69c8b;
43
+
44
+ --color-method-get: #62b1f8;
45
+ --color-method-post: #6ccb5f;
46
+ --color-method-patch: #f7894a;
47
+ --color-method-put: #d69c8b;
48
+ --color-method-delete: #f1707b;
49
+ --color-method-batch: #b4a0ff;
50
+
51
+ --canvas-bg: #1a1a1a;
52
+ }
53
+
54
+ /* ─────────────────────────────────────────────────────────────
55
+ Group-color cascade — per v3-design-review P0-1.
56
+ When the frame body carries `data-mode-group="<group>"`, every
57
+ Fluent v9 token that drives "brand" chrome (primary button,
58
+ active tab underline, focus ring, tinted backgrounds) is
59
+ remapped to the group color. Result: the Execute button on
60
+ Create reads green, the active tab underline on Associate
61
+ reads purple, etc. — without touching component code.
62
+
63
+ Tokens we override:
64
+ --colorBrandBackground : primary button bg
65
+ --colorBrandBackgroundHover : primary button hover bg
66
+ --colorBrandStroke1 : focus rings, active borders
67
+ --colorBrandStroke2 : tinted card borders
68
+ --colorBrandBackground2 : tinted card backgrounds
69
+ --colorBrandBackground2Hover : tinted card hover bg
70
+ --colorBrandForeground1 : icon + emphasis fg
71
+ --colorBrandForeground2 : caption + helper fg
72
+ --colorCompoundBrandBackground: TabList active underline
73
+ --colorCompoundBrandStroke : compound borders
74
+
75
+ The Read group keeps the v9 defaults (blue) since v9's brand
76
+ IS blue, so we only override for non-read groups. This avoids
77
+ a no-op cascade for the most common mode group.
78
+ ───────────────────────────────────────────────────────────── */
79
+ [data-mode-group='write'] {
80
+ --colorBrandBackground: var(--color-request-write);
81
+ --colorBrandBackgroundHover: var(--color-request-write);
82
+ --colorBrandBackgroundPressed: var(--color-request-write);
83
+ --colorBrandBackgroundSelected: var(--color-request-write);
84
+ --colorBrandStroke1: var(--color-request-write);
85
+ --colorBrandStroke2: var(--color-request-write);
86
+ --colorBrandForeground1: var(--color-request-write);
87
+ --colorBrandForeground2: var(--color-request-write);
88
+ --colorCompoundBrandBackground: var(--color-request-write);
89
+ --colorCompoundBrandStroke: var(--color-request-write);
90
+ }
91
+ [data-mode-group='relate'] {
92
+ --colorBrandBackground: var(--color-request-relate);
93
+ --colorBrandBackgroundHover: var(--color-request-relate);
94
+ --colorBrandBackgroundPressed: var(--color-request-relate);
95
+ --colorBrandBackgroundSelected: var(--color-request-relate);
96
+ --colorBrandStroke1: var(--color-request-relate);
97
+ --colorBrandStroke2: var(--color-request-relate);
98
+ --colorBrandForeground1: var(--color-request-relate);
99
+ --colorBrandForeground2: var(--color-request-relate);
100
+ --colorCompoundBrandBackground: var(--color-request-relate);
101
+ --colorCompoundBrandStroke: var(--color-request-relate);
102
+ }
103
+ [data-mode-group='execute'] {
104
+ --colorBrandBackground: var(--color-request-execute);
105
+ --colorBrandBackgroundHover: var(--color-request-execute);
106
+ --colorBrandBackgroundPressed: var(--color-request-execute);
107
+ --colorBrandBackgroundSelected: var(--color-request-execute);
108
+ --colorBrandStroke1: var(--color-request-execute);
109
+ --colorBrandStroke2: var(--color-request-execute);
110
+ --colorBrandForeground1: var(--color-request-execute);
111
+ --colorBrandForeground2: var(--color-request-execute);
112
+ --colorCompoundBrandBackground: var(--color-request-execute);
113
+ --colorCompoundBrandStroke: var(--color-request-execute);
114
+ }
115
+ [data-mode-group='binary'] {
116
+ --colorBrandBackground: var(--color-request-binary);
117
+ --colorBrandBackgroundHover: var(--color-request-binary);
118
+ --colorBrandBackgroundPressed: var(--color-request-binary);
119
+ --colorBrandBackgroundSelected: var(--color-request-binary);
120
+ --colorBrandStroke1: var(--color-request-binary);
121
+ --colorBrandStroke2: var(--color-request-binary);
122
+ --colorBrandForeground1: var(--color-request-binary);
123
+ --colorBrandForeground2: var(--color-request-binary);
124
+ --colorCompoundBrandBackground: var(--color-request-binary);
125
+ --colorCompoundBrandStroke: var(--color-request-binary);
126
+ }
127
+
128
+ /* ─────────────────────────────────────────────────────────────
129
+ Slim Fluent-themed scrollbars.
130
+
131
+ Default Windows / Chromium scrollbars on Win 11 at 125% DPI are
132
+ the thick "flat" style (~17 px) and look out of place inside a
133
+ Fluent v9 surface. We replace them with the slim overlay style
134
+ Microsoft 365 web apps use: ~10 px width, semi-transparent gray
135
+ thumb, transparent track, slightly bolder on hover. Theme-aware
136
+ via [data-theme='dark'].
137
+
138
+ Design rationale (Fluent 2 + WCAG 2.5.7 "Dragging movements"):
139
+ we deliberately do NOT hide scrollbars. Hidden scrollbars hurt
140
+ discoverability + keyboard nav. Slim-but-visible is the right
141
+ balance: present but unobtrusive.
142
+
143
+ Applied via `*` so every scrollable surface gets the treatment
144
+ (mainBody, virtualized grid body, drawer scroll, etc.). Monaco
145
+ paints its own scrollbar over an internally-hidden native one,
146
+ so it's unaffected.
147
+ ───────────────────────────────────────────────────────────── */
148
+
149
+ /* Firefox + standards-track Chromium 121+ */
150
+ * {
151
+ scrollbar-width: thin;
152
+ scrollbar-color: rgba(96, 94, 92, 0.4) transparent;
153
+ }
154
+
155
+ /* WebKit / Blink — finer control */
156
+ *::-webkit-scrollbar {
157
+ width: 10px;
158
+ height: 10px;
159
+ }
160
+ *::-webkit-scrollbar-track {
161
+ background: transparent;
162
+ }
163
+ *::-webkit-scrollbar-thumb {
164
+ background-color: rgba(96, 94, 92, 0.35);
165
+ border-radius: 8px;
166
+ /* 2 px transparent border + background-clip gives the thumb a
167
+ visual gap from the track edge (overlay-scrollbar feel)
168
+ without the actual track ever being visible. */
169
+ border: 2px solid transparent;
170
+ background-clip: content-box;
171
+ }
172
+ *::-webkit-scrollbar-thumb:hover {
173
+ background-color: rgba(96, 94, 92, 0.65);
174
+ background-clip: content-box;
175
+ }
176
+ *::-webkit-scrollbar-thumb:active {
177
+ background-color: rgba(96, 94, 92, 0.8);
178
+ background-clip: content-box;
179
+ }
180
+ *::-webkit-scrollbar-corner {
181
+ background: transparent;
182
+ }
183
+
184
+ /* Dark theme — flip thumb color so it remains visible against
185
+ dark surfaces. Same opacity progression idle → hover → active. */
186
+ :root[data-theme='dark'] * {
187
+ scrollbar-color: rgba(200, 198, 196, 0.35) transparent;
188
+ }
189
+ :root[data-theme='dark'] *::-webkit-scrollbar-thumb {
190
+ background-color: rgba(200, 198, 196, 0.3);
191
+ background-clip: content-box;
192
+ }
193
+ :root[data-theme='dark'] *::-webkit-scrollbar-thumb:hover {
194
+ background-color: rgba(200, 198, 196, 0.55);
195
+ background-clip: content-box;
196
+ }
197
+ :root[data-theme='dark'] *::-webkit-scrollbar-thumb:active {
198
+ background-color: rgba(200, 198, 196, 0.75);
199
+ background-clip: content-box;
200
+ }
201
+
202
+ #boot-splash {
203
+ position: fixed;
204
+ inset: 0;
205
+ display: flex;
206
+ align-items: center;
207
+ justify-content: center;
208
+ flex-direction: column;
209
+ gap: 16px;
210
+ background: var(--canvas-bg);
211
+ z-index: 1;
212
+ }
213
+ #boot-splash .ring {
214
+ width: 32px;
215
+ height: 32px;
216
+ border: 3px solid #e0dfde;
217
+ border-top-color: #0f6cbd;
218
+ border-radius: 50%;
219
+ animation: spin 1s linear infinite;
220
+ }
221
+ #boot-splash .label {
222
+ font-size: 13px;
223
+ color: #605e5c;
224
+ }
225
+ #boot-splash.hide {
226
+ opacity: 0;
227
+ pointer-events: none;
228
+ transition: opacity 0.2s;
229
+ }
230
+ @keyframes spin {
231
+ to {
232
+ transform: rotate(360deg);
233
+ }
234
+ }
235
+ </style>
236
+ </head>
237
+ <body>
238
+ <div id="boot-splash">
239
+ <div class="ring"></div>
240
+ <div class="label">Loading Dataverse Request Studio…</div>
241
+ </div>
242
+ <div id="root"></div>
243
+ <!-- Anti-flash theme bootstrap.
244
+ When embedded in PPTB the host appends `?pptb=1&theme=dark` (or light).
245
+ Reading it synchronously here lets us paint the right background before
246
+ the React bundle parses + mounts. Without this the iframe flashes light
247
+ even when the host is in dark mode. -->
248
+ <script>
249
+ (function () {
250
+ try {
251
+ var p = new URLSearchParams(window.location.search);
252
+ var t = p.get('theme');
253
+ if (t === 'dark' || t === 'light') {
254
+ document.documentElement.setAttribute('data-theme', t);
255
+ }
256
+ } catch (e) {
257
+ /* ignore — fall back to default light */
258
+ }
259
+ })();
260
+ </script>
261
+ <script type="module" src="/src/main.tsx"></script>
262
+ </body>
263
+ </html>