@xenide-io/the-old-ui-theme 0.6.6 → 0.6.8
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/dist/{ai-message-blocknote-4Q4U2T2W.mjs → ai-message-blocknote-DIUICX3G.mjs} +1 -1
- package/dist/{chunk-IAH7Z46I.mjs → chunk-VIWW7AW2.mjs} +3 -0
- package/dist/{chunk-3G43JEI3.mjs → chunk-VOCHIR3W.mjs} +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/suite.d.mts +64 -15
- package/dist/suite.d.ts +64 -15
- package/dist/suite.js +753 -758
- package/dist/suite.mjs +573 -587
- package/dist/ui.js +2 -2
- package/dist/ui.mjs +1 -1
- package/package.json +1 -1
- package/src/app/globals.css +8 -1
- package/src/styles/suite-skin.css +6 -0
- package/src/styles/themes.css +36 -34
- package/src/suite/components/ai-panel.test.ts +14 -40
- package/src/suite/components/ai-panel.tsx +305 -633
- package/src/suite/components/suite-app-layout.tsx +3 -2
- package/src/suite/components/suite-layout.test.tsx +36 -2
- package/src/suite/components/suite-sidebar.tsx +235 -102
- package/src/suite/components/theme-provider.test.tsx +48 -0
- package/src/suite/components/theme-provider.tsx +4 -0
- package/src/suite/components/today-ui.tsx +1 -1
- package/src/suite/components/workspace-switcher.tsx +162 -0
- package/src/suite/index.ts +9 -0
- package/src/suite/lib/apps.test.ts +40 -0
- package/src/suite/lib/apps.ts +37 -0
- package/src/suite/lib/use-sidebar-width.ts +11 -1
package/dist/ui.js
CHANGED
|
@@ -2169,14 +2169,14 @@ var THEMES = [
|
|
|
2169
2169
|
{
|
|
2170
2170
|
id: "note",
|
|
2171
2171
|
name: "Note Light",
|
|
2172
|
-
description: "
|
|
2172
|
+
description: "OneNote purple on lavender-white chrome.",
|
|
2173
2173
|
colorScheme: "light",
|
|
2174
2174
|
group: "Note"
|
|
2175
2175
|
},
|
|
2176
2176
|
{
|
|
2177
2177
|
id: "note-dark",
|
|
2178
2178
|
name: "Note Dark",
|
|
2179
|
-
description: "
|
|
2179
|
+
description: "Office-dark chrome with OneNote purple accents.",
|
|
2180
2180
|
colorScheme: "dark",
|
|
2181
2181
|
group: "Note"
|
|
2182
2182
|
},
|
package/dist/ui.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenide-io/the-old-ui-theme",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "Props-driven React components and theme tokens inspired by classic interface design \u2014 optimized for Next.js apps and internal tools.",
|
|
5
5
|
"author": "Xenide",
|
|
6
6
|
"license": "MIT",
|
package/src/app/globals.css
CHANGED
|
@@ -1388,7 +1388,9 @@ body {
|
|
|
1388
1388
|
.ph-modal-panel {
|
|
1389
1389
|
@apply fixed left-1/2 top-1/2 z-[101] flex w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col p-6 text-ph-ink;
|
|
1390
1390
|
max-height: min(42rem, calc(100dvh - 2rem));
|
|
1391
|
-
|
|
1391
|
+
/* Visible so input focus rings and 3D button chrome are not clipped by
|
|
1392
|
+
overflow:hidden + border-radius, especially at the bottom-right action. */
|
|
1393
|
+
overflow: visible;
|
|
1392
1394
|
overscroll-behavior: contain;
|
|
1393
1395
|
background: var(--ph-surface-overlay);
|
|
1394
1396
|
border-radius: var(--ph-radius-overlay);
|
|
@@ -1404,11 +1406,16 @@ body {
|
|
|
1404
1406
|
.ph-modal-body {
|
|
1405
1407
|
@apply mt-4 min-h-0 overflow-y-auto;
|
|
1406
1408
|
overscroll-behavior: contain;
|
|
1409
|
+
/* Focus ring is a 3px outer glow; pad so overflow-y:auto does not clip it. */
|
|
1410
|
+
padding: 0.375rem;
|
|
1411
|
+
margin-inline: -0.375rem;
|
|
1407
1412
|
}
|
|
1408
1413
|
|
|
1409
1414
|
.ph-modal-footer {
|
|
1410
1415
|
@apply mt-6 flex shrink-0 flex-wrap justify-end gap-2 border-t pt-5;
|
|
1411
1416
|
border-color: var(--ph-border-subtle);
|
|
1417
|
+
overflow: visible;
|
|
1418
|
+
padding-bottom: calc(var(--ph-chrome-depth) + 0.125rem);
|
|
1412
1419
|
}
|
|
1413
1420
|
|
|
1414
1421
|
@keyframes ph-modal-overlay-in {
|
|
@@ -659,6 +659,7 @@ button:hover > .ph-card {
|
|
|
659
659
|
color: var(--ph-text-primary);
|
|
660
660
|
font-family: inherit;
|
|
661
661
|
font-size: 0.875rem;
|
|
662
|
+
overflow-wrap: anywhere;
|
|
662
663
|
}
|
|
663
664
|
.suite-ai-blocknote .bn-block-content {
|
|
664
665
|
padding-block: 2px;
|
|
@@ -672,6 +673,11 @@ button:hover > .ph-card {
|
|
|
672
673
|
border-radius: 6px;
|
|
673
674
|
background: var(--ph-surface);
|
|
674
675
|
}
|
|
676
|
+
.suite-ai-blocknote a {
|
|
677
|
+
color: var(--ph-brand);
|
|
678
|
+
text-decoration: underline;
|
|
679
|
+
text-underline-offset: 2px;
|
|
680
|
+
}
|
|
675
681
|
|
|
676
682
|
/* ── Auth / OAuth / launch handoff ──────────────────────────────────────
|
|
677
683
|
One calm opacity fade — no stacked entrance reveals on bridge pages. */
|
package/src/styles/themes.css
CHANGED
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
--ph-accent-highlight-secondary: hsl(19deg 100% 52% / 14%);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
/* OneNote — brand purple #7719aa on lavender paper. */
|
|
136
137
|
[data-theme="note"] {
|
|
137
138
|
color-scheme: light;
|
|
138
139
|
--ph-canvas: #f8f6fc;
|
|
@@ -175,55 +176,56 @@
|
|
|
175
176
|
|
|
176
177
|
[data-theme="note-dark"] {
|
|
177
178
|
color-scheme: dark;
|
|
178
|
-
|
|
179
|
-
--ph-
|
|
180
|
-
--ph-
|
|
181
|
-
--ph-
|
|
182
|
-
--ph-
|
|
183
|
-
--ph-surface-
|
|
184
|
-
--ph-surface-
|
|
185
|
-
--ph-
|
|
186
|
-
--ph-border
|
|
187
|
-
--ph-
|
|
188
|
-
--ph-text-
|
|
189
|
-
--ph-text-
|
|
190
|
-
--ph-
|
|
191
|
-
--ph-accent
|
|
179
|
+
/* Office Fluent dark neutrals — OneNote purple stays on accents only. */
|
|
180
|
+
--ph-canvas: #1b1a19;
|
|
181
|
+
--ph-surface: #252423;
|
|
182
|
+
--ph-muted: #2d2c2b;
|
|
183
|
+
--ph-toolbar: #323130;
|
|
184
|
+
--ph-surface-inset: #201f1e;
|
|
185
|
+
--ph-surface-raised: #2d2c2b;
|
|
186
|
+
--ph-surface-overlay: #3b3a39;
|
|
187
|
+
--ph-border: #484644;
|
|
188
|
+
--ph-border-strong: #8a8886;
|
|
189
|
+
--ph-text-primary: #f3f2f1;
|
|
190
|
+
--ph-text-secondary: #c8c6c4;
|
|
191
|
+
--ph-text-tertiary: #a19f9d;
|
|
192
|
+
--ph-accent: #c9a0e4;
|
|
193
|
+
--ph-accent-hover: #d8b8ed;
|
|
192
194
|
--ph-blue: #4f9ff5;
|
|
193
195
|
--ph-violet: #b146c2;
|
|
194
|
-
--ph-purple: #
|
|
196
|
+
--ph-purple: #c77dd4;
|
|
195
197
|
--ph-success: #33a867;
|
|
196
198
|
--ph-warning: #e67e22;
|
|
197
199
|
--ph-danger: #f87171;
|
|
198
200
|
--ph-info: #4f9ff5;
|
|
199
|
-
--ph-on-accent: #
|
|
201
|
+
--ph-on-accent: #1b1a19;
|
|
200
202
|
--ph-on-violet: #ffffff;
|
|
201
203
|
--ph-on-success: #ffffff;
|
|
202
204
|
--ph-on-warning: #211606;
|
|
203
205
|
--ph-on-danger: #ffffff;
|
|
204
206
|
--ph-on-info: #ffffff;
|
|
205
|
-
--ph-focus-ring: #
|
|
206
|
-
--ph-selected-bg: #
|
|
207
|
-
--ph-selected-text: #
|
|
208
|
-
--ph-selected-border: #
|
|
209
|
-
--ph-text-3000: #
|
|
210
|
-
--ph-primary-button-face: #
|
|
211
|
-
--ph-primary-button-border: #
|
|
212
|
-
--ph-primary-button-border-hover: #
|
|
207
|
+
--ph-focus-ring: #d8b8ed;
|
|
208
|
+
--ph-selected-bg: #3a2f42;
|
|
209
|
+
--ph-selected-text: #ead8f5;
|
|
210
|
+
--ph-selected-border: #9b4ec4;
|
|
211
|
+
--ph-text-3000: #f3f2f1;
|
|
212
|
+
--ph-primary-button-face: #252423;
|
|
213
|
+
--ph-primary-button-border: #8764b8;
|
|
214
|
+
--ph-primary-button-border-hover: #c9a0e4;
|
|
213
215
|
--ph-primary-frame-bg: #b146c2;
|
|
214
|
-
--ph-secondary-button-bg: #
|
|
215
|
-
--ph-secondary-frame-bg: #
|
|
216
|
-
--ph-secondary-button-border: #
|
|
217
|
-
--ph-secondary-button-border-hover: #
|
|
218
|
-
--ph-border-3000: #
|
|
219
|
-
--ph-accent-highlight-secondary: hsl(
|
|
220
|
-
--ph-data-1: #
|
|
221
|
-
--ph-data-2: #
|
|
216
|
+
--ph-secondary-button-bg: #323130;
|
|
217
|
+
--ph-secondary-frame-bg: #3b3a39;
|
|
218
|
+
--ph-secondary-button-border: #484644;
|
|
219
|
+
--ph-secondary-button-border-hover: #8764b8;
|
|
220
|
+
--ph-border-3000: #323130;
|
|
221
|
+
--ph-accent-highlight-secondary: hsl(280deg 36% 62% / 12%);
|
|
222
|
+
--ph-data-1: #c9a0e4;
|
|
223
|
+
--ph-data-2: #c77dd4;
|
|
222
224
|
--ph-data-3: #4f9ff5;
|
|
223
225
|
--ph-data-4: #f87171;
|
|
224
226
|
--ph-data-5: #e67e22;
|
|
225
227
|
--ph-data-6: #33a867;
|
|
226
|
-
--ph-data-7: #
|
|
228
|
+
--ph-data-7: #b146c2;
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
[data-theme="turtletime"] {
|
|
@@ -424,7 +426,7 @@
|
|
|
424
426
|
|
|
425
427
|
[data-theme="kraken-light"] {
|
|
426
428
|
color-scheme: light;
|
|
427
|
-
--ph-canvas: #
|
|
429
|
+
--ph-canvas: #fafafa;
|
|
428
430
|
--ph-surface: #ffffff;
|
|
429
431
|
--ph-muted: #f2f2f2;
|
|
430
432
|
--ph-toolbar: #e8e8e6;
|
|
@@ -1,46 +1,20 @@
|
|
|
1
|
-
import { describe, expect, it } from
|
|
1
|
+
import { describe, expect, it, vi } from "vitest";
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from
|
|
4
|
+
consumePendingAskAiPrompt,
|
|
5
|
+
openSuiteAskAi,
|
|
6
|
+
SUITE_OPEN_ASK_AI_EVENT,
|
|
7
|
+
} from "./ai-panel";
|
|
8
8
|
|
|
9
|
-
describe(
|
|
10
|
-
it(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
resolveSuiteAiLauncherPosition('right', 0, 900, 1000, 800, 120, 40),
|
|
16
|
-
).toEqual({ x: 868, y: 748 });
|
|
17
|
-
expect(
|
|
18
|
-
resolveSuiteAiLauncherPosition('top', -20, 900, 1000, 800, 120, 40),
|
|
19
|
-
).toEqual({ x: 12, y: 12 });
|
|
20
|
-
expect(
|
|
21
|
-
resolveSuiteAiLauncherPosition('bottom', 900, -20, 1000, 800, 120, 40),
|
|
22
|
-
).toEqual({ x: 868, y: 748 });
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
describe('resolveSuiteAiNearestEdge', () => {
|
|
27
|
-
it('docks to the closest of all four edges', () => {
|
|
28
|
-
expect(resolveSuiteAiNearestEdge(10, 400, 120, 40, 1000, 800)).toBe('left');
|
|
29
|
-
expect(resolveSuiteAiNearestEdge(870, 400, 120, 40, 1000, 800)).toBe(
|
|
30
|
-
'right',
|
|
31
|
-
);
|
|
32
|
-
expect(resolveSuiteAiNearestEdge(440, 10, 120, 40, 1000, 800)).toBe('top');
|
|
33
|
-
expect(resolveSuiteAiNearestEdge(440, 740, 120, 40, 1000, 800)).toBe(
|
|
34
|
-
'bottom',
|
|
35
|
-
);
|
|
36
|
-
});
|
|
37
|
-
});
|
|
9
|
+
describe("openSuiteAskAi", () => {
|
|
10
|
+
it("queues a prompt for the panel that mounts after the event", () => {
|
|
11
|
+
const onOpen = vi.fn();
|
|
12
|
+
window.addEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
13
|
+
openSuiteAskAi({ prompt: " Summarise this week " });
|
|
14
|
+
window.removeEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
38
15
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
expect(
|
|
42
|
-
expect(resolveSuiteAiPanelSide('right', 500, 1000)).toBe('right');
|
|
43
|
-
expect(resolveSuiteAiPanelSide('top', 100, 1000)).toBe('left');
|
|
44
|
-
expect(resolveSuiteAiPanelSide('bottom', 900, 1000)).toBe('right');
|
|
16
|
+
expect(onOpen).toHaveBeenCalledTimes(1);
|
|
17
|
+
expect(consumePendingAskAiPrompt()).toBe("Summarise this week");
|
|
18
|
+
expect(consumePendingAskAiPrompt()).toBeNull();
|
|
45
19
|
});
|
|
46
20
|
});
|