@xenide-io/the-old-ui-theme 0.7.0 → 0.9.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.
- package/README.md +9 -10
- package/dist/{Chip-Cq3AiAji.d.mts → Chip-BzuNgJIa.d.mts} +81 -23
- package/dist/{Chip-Cq3AiAji.d.ts → Chip-BzuNgJIa.d.ts} +81 -23
- package/dist/{ai-message-blocknote-WABTHFY7.mjs → ai-message-blocknote-D4Z6DUCJ.mjs} +9 -3
- package/dist/chunk-2EO5VCXP.mjs +3912 -0
- package/dist/chunk-APKRZQRO.mjs +251 -0
- package/dist/chunk-BS7BZI5W.mjs +19 -0
- package/dist/chunk-IULORI3A.mjs +8 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +997 -576
- package/dist/index.mjs +49 -45
- package/dist/suite.d.mts +157 -55
- package/dist/suite.d.ts +157 -55
- package/dist/suite.js +4249 -801
- package/dist/suite.mjs +2578 -594
- package/dist/theme-boot-P-oqKVZF.d.mts +74 -0
- package/dist/theme-boot-P-oqKVZF.d.ts +74 -0
- package/dist/theme-boot.d.mts +2 -0
- package/dist/theme-boot.d.ts +2 -0
- package/dist/theme-boot.js +44 -0
- package/dist/theme-boot.mjs +8 -0
- package/dist/ui.d.mts +5 -29
- package/dist/ui.d.ts +5 -29
- package/dist/ui.js +647 -352
- package/dist/ui.mjs +10 -12
- package/docs/README.md +34 -0
- package/docs/ai-quick-reference.md +56 -0
- package/docs/component-library-improvement-plan.md +751 -0
- package/docs/component-reference.md +81 -0
- package/docs/components.md +48 -0
- package/docs/demos.md +19 -0
- package/docs/installation.md +117 -0
- package/docs/suite-audit.md +34 -0
- package/docs/theme-token-reference.md +67 -0
- package/docs/themes.md +164 -0
- package/package.json +22 -21
- package/public/fonts/OpenRunde-Bold.woff2 +0 -0
- package/public/fonts/OpenRunde-Medium.woff2 +0 -0
- package/public/fonts/OpenRunde-Regular.woff2 +0 -0
- package/public/fonts/OpenRunde-Semibold.woff2 +0 -0
- package/scripts/package-smoke.mjs +43 -0
- package/src/app/globals.css +2 -1
- package/src/components/ui/Accordion.tsx +20 -6
- package/src/components/ui/Avatar.tsx +5 -3
- package/src/components/ui/Calendar.tsx +187 -63
- package/src/components/ui/Card.test.tsx +38 -0
- package/src/components/ui/Card.tsx +77 -14
- package/src/components/ui/CollapsibleSection.tsx +12 -4
- package/src/components/ui/CommandPalette.test.tsx +91 -4
- package/src/components/ui/CommandPalette.tsx +138 -128
- package/src/components/ui/EmptyState.tsx +2 -2
- package/src/components/ui/FormField.tsx +1 -1
- package/src/components/ui/Input.tsx +42 -18
- package/src/components/ui/Kbd.tsx +18 -3
- package/src/components/ui/Modal.tsx +3 -1
- package/src/components/ui/Progress.tsx +14 -5
- package/src/components/ui/SegmentedControl.tsx +2 -2
- package/src/components/ui/SettingsLayout.tsx +1 -1
- package/src/components/ui/Stat.tsx +3 -2
- package/src/components/ui/Table.tsx +8 -3
- package/src/components/ui/Tooltip.test.tsx +70 -1
- package/src/components/ui/Tooltip.tsx +53 -29
- package/src/components/ui/Typography.tsx +103 -49
- package/src/components/ui/avatar-stat.test.tsx +23 -0
- package/src/components/ui/calendar.test.tsx +88 -0
- package/src/components/ui/disclosure.test.tsx +39 -0
- package/src/components/ui/index.ts +44 -6
- package/src/components/ui/progress.test.tsx +15 -0
- package/src/components/ui/typography.test.tsx +26 -1
- package/src/styles/suite-skin.css +8 -2
- package/src/styles/themes.css +184 -68
- package/src/suite/components/ai-message-blocknote.tsx +13 -2
- package/src/suite/components/ai-panel.tsx +41 -10
- package/src/suite/components/app-switcher.test.tsx +21 -6
- package/src/suite/components/app-switcher.tsx +7 -11
- package/src/suite/components/suite-app-layout.tsx +12 -3
- package/src/suite/components/suite-bottom-nav.tsx +0 -1
- package/src/suite/components/suite-clients-projects-directory.test.tsx +71 -0
- package/src/suite/components/suite-clients-projects-directory.tsx +943 -0
- package/src/suite/components/suite-integration-picker.test.tsx +224 -0
- package/src/suite/components/suite-integration-picker.tsx +939 -0
- package/src/suite/components/suite-integration-rules.test.tsx +157 -0
- package/src/suite/components/suite-integration-rules.tsx +471 -0
- package/src/suite/components/suite-mobile-drawer.test.tsx +18 -2
- package/src/suite/components/suite-mobile-drawer.tsx +65 -98
- package/src/suite/components/suite-notification-bell.tsx +29 -4
- package/src/suite/components/suite-sidebar.tsx +25 -25
- package/src/suite/components/suite-skeleton.tsx +2 -2
- package/src/suite/components/suite-user-menu.tsx +9 -8
- package/src/suite/components/theme-provider.test.tsx +87 -3
- package/src/suite/components/theme-provider.tsx +144 -23
- package/src/suite/components/today-ui.tsx +79 -68
- package/src/suite/components/workspace-switcher.test.tsx +56 -0
- package/src/suite/components/workspace-switcher.tsx +3 -3
- package/src/suite/icons/app-accents.ts +12 -12
- package/src/suite/icons/glyphs.ts +6 -12
- package/src/suite/index.ts +27 -0
- package/src/suite/lib/apps.test.ts +9 -1
- package/src/suite/lib/apps.ts +14 -8
- package/src/suite/lib/cookies.ts +53 -0
- package/src/suite/lib/theme-boot.ts +32 -0
- package/src/suite/lib/theme-cookie.ts +7 -0
- package/src/suite/lib/use-sidebar-width.ts +5 -51
- package/dist/chunk-KDR6HI6F.mjs +0 -1075
- package/dist/chunk-NOI42JNZ.mjs +0 -151
- package/dist/chunk-VXISSXTB.mjs +0 -2564
- package/src/suite/lib/use-lock-mobile-page-zoom.test.tsx +0 -65
- package/src/suite/lib/use-lock-mobile-page-zoom.ts +0 -51
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { cleanup, render } from "@testing-library/react";
|
|
2
|
-
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
3
|
-
|
|
4
|
-
import { useLockMobilePageZoom } from "./use-lock-mobile-page-zoom";
|
|
5
|
-
|
|
6
|
-
function Probe() {
|
|
7
|
-
useLockMobilePageZoom();
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function stubMedia(matches: boolean) {
|
|
12
|
-
vi.stubGlobal(
|
|
13
|
-
"matchMedia",
|
|
14
|
-
(query: string) =>
|
|
15
|
-
({
|
|
16
|
-
matches: query.includes("pointer: coarse") ? matches : false,
|
|
17
|
-
media: query,
|
|
18
|
-
addEventListener: vi.fn(),
|
|
19
|
-
removeEventListener: vi.fn(),
|
|
20
|
-
addListener: vi.fn(),
|
|
21
|
-
removeListener: vi.fn(),
|
|
22
|
-
dispatchEvent: vi.fn(),
|
|
23
|
-
onchange: null,
|
|
24
|
-
}) satisfies MediaQueryList,
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
afterEach(() => {
|
|
29
|
-
cleanup();
|
|
30
|
-
vi.unstubAllGlobals();
|
|
31
|
-
document.documentElement.removeAttribute("data-suite-lock-page-zoom");
|
|
32
|
-
document.head.innerHTML = "";
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
describe("mobile page zoom lock", () => {
|
|
36
|
-
it("locks the viewport on phones and tablets", () => {
|
|
37
|
-
document.head.innerHTML =
|
|
38
|
-
'<meta name="viewport" content="width=device-width, initial-scale=1">';
|
|
39
|
-
stubMedia(true);
|
|
40
|
-
|
|
41
|
-
render(<Probe />);
|
|
42
|
-
|
|
43
|
-
expect(document.documentElement).toHaveAttribute(
|
|
44
|
-
"data-suite-lock-page-zoom",
|
|
45
|
-
);
|
|
46
|
-
expect(
|
|
47
|
-
document.querySelector('meta[name="viewport"]')?.getAttribute("content"),
|
|
48
|
-
).toContain("user-scalable=no");
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it("leaves desktop page zoom alone", () => {
|
|
52
|
-
document.head.innerHTML =
|
|
53
|
-
'<meta name="viewport" content="width=device-width, initial-scale=1">';
|
|
54
|
-
stubMedia(false);
|
|
55
|
-
|
|
56
|
-
render(<Probe />);
|
|
57
|
-
|
|
58
|
-
expect(document.documentElement).not.toHaveAttribute(
|
|
59
|
-
"data-suite-lock-page-zoom",
|
|
60
|
-
);
|
|
61
|
-
expect(
|
|
62
|
-
document.querySelector('meta[name="viewport"]')?.getAttribute("content"),
|
|
63
|
-
).toBe("width=device-width, initial-scale=1");
|
|
64
|
-
});
|
|
65
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useEffect } from "react";
|
|
4
|
-
|
|
5
|
-
const MOBILE_PAGE_ZOOM_QUERY = "(hover: none) and (pointer: coarse)";
|
|
6
|
-
const LOCKED_VIEWPORT =
|
|
7
|
-
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover";
|
|
8
|
-
|
|
9
|
-
function preventGesture(event: Event) {
|
|
10
|
-
event.preventDefault();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* App-like mobile chrome: no pinch/page zoom. Desktop zoom is unchanged.
|
|
15
|
-
* CSS `touch-action` covers Chromium; viewport + gesture events cover iOS.
|
|
16
|
-
*/
|
|
17
|
-
export function useLockMobilePageZoom() {
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (typeof window.matchMedia !== "function") return;
|
|
20
|
-
const media = window.matchMedia(MOBILE_PAGE_ZOOM_QUERY);
|
|
21
|
-
const meta = document.querySelector('meta[name="viewport"]');
|
|
22
|
-
const original = meta?.getAttribute("content");
|
|
23
|
-
|
|
24
|
-
const apply = () => {
|
|
25
|
-
const lock = media.matches;
|
|
26
|
-
document.documentElement.toggleAttribute(
|
|
27
|
-
"data-suite-lock-page-zoom",
|
|
28
|
-
lock,
|
|
29
|
-
);
|
|
30
|
-
document.removeEventListener("gesturestart", preventGesture);
|
|
31
|
-
document.removeEventListener("gesturechange", preventGesture);
|
|
32
|
-
if (lock) {
|
|
33
|
-
meta?.setAttribute("content", LOCKED_VIEWPORT);
|
|
34
|
-
document.addEventListener("gesturestart", preventGesture);
|
|
35
|
-
document.addEventListener("gesturechange", preventGesture);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (original) meta?.setAttribute("content", original);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
apply();
|
|
42
|
-
media.addEventListener("change", apply);
|
|
43
|
-
return () => {
|
|
44
|
-
media.removeEventListener("change", apply);
|
|
45
|
-
document.documentElement.removeAttribute("data-suite-lock-page-zoom");
|
|
46
|
-
if (original) meta?.setAttribute("content", original);
|
|
47
|
-
document.removeEventListener("gesturestart", preventGesture);
|
|
48
|
-
document.removeEventListener("gesturechange", preventGesture);
|
|
49
|
-
};
|
|
50
|
-
}, []);
|
|
51
|
-
}
|