@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.
Files changed (109) hide show
  1. package/README.md +9 -10
  2. package/dist/{Chip-Cq3AiAji.d.mts → Chip-BzuNgJIa.d.mts} +81 -23
  3. package/dist/{Chip-Cq3AiAji.d.ts → Chip-BzuNgJIa.d.ts} +81 -23
  4. package/dist/{ai-message-blocknote-WABTHFY7.mjs → ai-message-blocknote-D4Z6DUCJ.mjs} +9 -3
  5. package/dist/chunk-2EO5VCXP.mjs +3912 -0
  6. package/dist/chunk-APKRZQRO.mjs +251 -0
  7. package/dist/chunk-BS7BZI5W.mjs +19 -0
  8. package/dist/chunk-IULORI3A.mjs +8 -0
  9. package/dist/index.d.mts +3 -3
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +997 -576
  12. package/dist/index.mjs +49 -45
  13. package/dist/suite.d.mts +157 -55
  14. package/dist/suite.d.ts +157 -55
  15. package/dist/suite.js +4249 -801
  16. package/dist/suite.mjs +2578 -594
  17. package/dist/theme-boot-P-oqKVZF.d.mts +74 -0
  18. package/dist/theme-boot-P-oqKVZF.d.ts +74 -0
  19. package/dist/theme-boot.d.mts +2 -0
  20. package/dist/theme-boot.d.ts +2 -0
  21. package/dist/theme-boot.js +44 -0
  22. package/dist/theme-boot.mjs +8 -0
  23. package/dist/ui.d.mts +5 -29
  24. package/dist/ui.d.ts +5 -29
  25. package/dist/ui.js +647 -352
  26. package/dist/ui.mjs +10 -12
  27. package/docs/README.md +34 -0
  28. package/docs/ai-quick-reference.md +56 -0
  29. package/docs/component-library-improvement-plan.md +751 -0
  30. package/docs/component-reference.md +81 -0
  31. package/docs/components.md +48 -0
  32. package/docs/demos.md +19 -0
  33. package/docs/installation.md +117 -0
  34. package/docs/suite-audit.md +34 -0
  35. package/docs/theme-token-reference.md +67 -0
  36. package/docs/themes.md +164 -0
  37. package/package.json +22 -21
  38. package/public/fonts/OpenRunde-Bold.woff2 +0 -0
  39. package/public/fonts/OpenRunde-Medium.woff2 +0 -0
  40. package/public/fonts/OpenRunde-Regular.woff2 +0 -0
  41. package/public/fonts/OpenRunde-Semibold.woff2 +0 -0
  42. package/scripts/package-smoke.mjs +43 -0
  43. package/src/app/globals.css +2 -1
  44. package/src/components/ui/Accordion.tsx +20 -6
  45. package/src/components/ui/Avatar.tsx +5 -3
  46. package/src/components/ui/Calendar.tsx +187 -63
  47. package/src/components/ui/Card.test.tsx +38 -0
  48. package/src/components/ui/Card.tsx +77 -14
  49. package/src/components/ui/CollapsibleSection.tsx +12 -4
  50. package/src/components/ui/CommandPalette.test.tsx +91 -4
  51. package/src/components/ui/CommandPalette.tsx +138 -128
  52. package/src/components/ui/EmptyState.tsx +2 -2
  53. package/src/components/ui/FormField.tsx +1 -1
  54. package/src/components/ui/Input.tsx +42 -18
  55. package/src/components/ui/Kbd.tsx +18 -3
  56. package/src/components/ui/Modal.tsx +3 -1
  57. package/src/components/ui/Progress.tsx +14 -5
  58. package/src/components/ui/SegmentedControl.tsx +2 -2
  59. package/src/components/ui/SettingsLayout.tsx +1 -1
  60. package/src/components/ui/Stat.tsx +3 -2
  61. package/src/components/ui/Table.tsx +8 -3
  62. package/src/components/ui/Tooltip.test.tsx +70 -1
  63. package/src/components/ui/Tooltip.tsx +53 -29
  64. package/src/components/ui/Typography.tsx +103 -49
  65. package/src/components/ui/avatar-stat.test.tsx +23 -0
  66. package/src/components/ui/calendar.test.tsx +88 -0
  67. package/src/components/ui/disclosure.test.tsx +39 -0
  68. package/src/components/ui/index.ts +44 -6
  69. package/src/components/ui/progress.test.tsx +15 -0
  70. package/src/components/ui/typography.test.tsx +26 -1
  71. package/src/styles/suite-skin.css +8 -2
  72. package/src/styles/themes.css +184 -68
  73. package/src/suite/components/ai-message-blocknote.tsx +13 -2
  74. package/src/suite/components/ai-panel.tsx +41 -10
  75. package/src/suite/components/app-switcher.test.tsx +21 -6
  76. package/src/suite/components/app-switcher.tsx +7 -11
  77. package/src/suite/components/suite-app-layout.tsx +12 -3
  78. package/src/suite/components/suite-bottom-nav.tsx +0 -1
  79. package/src/suite/components/suite-clients-projects-directory.test.tsx +71 -0
  80. package/src/suite/components/suite-clients-projects-directory.tsx +943 -0
  81. package/src/suite/components/suite-integration-picker.test.tsx +224 -0
  82. package/src/suite/components/suite-integration-picker.tsx +939 -0
  83. package/src/suite/components/suite-integration-rules.test.tsx +157 -0
  84. package/src/suite/components/suite-integration-rules.tsx +471 -0
  85. package/src/suite/components/suite-mobile-drawer.test.tsx +18 -2
  86. package/src/suite/components/suite-mobile-drawer.tsx +65 -98
  87. package/src/suite/components/suite-notification-bell.tsx +29 -4
  88. package/src/suite/components/suite-sidebar.tsx +25 -25
  89. package/src/suite/components/suite-skeleton.tsx +2 -2
  90. package/src/suite/components/suite-user-menu.tsx +9 -8
  91. package/src/suite/components/theme-provider.test.tsx +87 -3
  92. package/src/suite/components/theme-provider.tsx +144 -23
  93. package/src/suite/components/today-ui.tsx +79 -68
  94. package/src/suite/components/workspace-switcher.test.tsx +56 -0
  95. package/src/suite/components/workspace-switcher.tsx +3 -3
  96. package/src/suite/icons/app-accents.ts +12 -12
  97. package/src/suite/icons/glyphs.ts +6 -12
  98. package/src/suite/index.ts +27 -0
  99. package/src/suite/lib/apps.test.ts +9 -1
  100. package/src/suite/lib/apps.ts +14 -8
  101. package/src/suite/lib/cookies.ts +53 -0
  102. package/src/suite/lib/theme-boot.ts +32 -0
  103. package/src/suite/lib/theme-cookie.ts +7 -0
  104. package/src/suite/lib/use-sidebar-width.ts +5 -51
  105. package/dist/chunk-KDR6HI6F.mjs +0 -1075
  106. package/dist/chunk-NOI42JNZ.mjs +0 -151
  107. package/dist/chunk-VXISSXTB.mjs +0 -2564
  108. package/src/suite/lib/use-lock-mobile-page-zoom.test.tsx +0 -65
  109. 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
- }