@xpufx/paseo-top 0.4.4 → 0.4.5
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/OVERVIEW.md +17 -0
- package/client/host-ui.tsx +184 -0
- package/client/multi-host-view.tsx +57 -43
- package/client/multi-host.ts +36 -13
- package/client/pill-labels.ts +94 -1
- package/client/pill.tsx +690 -614
- package/client/resources-query.ts +1 -1
- package/client/settings-events.ts +1 -1
- package/client/settings-ui.tsx +86 -9
- package/client/surface.tsx +308 -276
- package/client/telemetry-copy.ts +8 -2
- package/client/telemetry.tsx +372 -321
- package/client/turn-panel.tsx +126 -104
- package/client/vendor/paseo-plugin-helper/{host.ts → core/host.ts} +9 -3
- package/client/vendor/paseo-plugin-helper/core/index.ts +76 -0
- package/client/vendor/paseo-plugin-helper/core/plugin-load-count.ts +89 -0
- package/client/vendor/paseo-plugin-helper/{query-refresh.ts → core/query-refresh.ts} +2 -2
- package/client/vendor/paseo-plugin-helper/{query.ts → core/query.ts} +2 -2
- package/client/vendor/paseo-plugin-helper/{settings.ts → core/settings.ts} +1 -1
- package/client/vendor/paseo-plugin-helper/{shared-settings.ts → core/shared-settings.ts} +2 -2
- package/client/vendor/paseo-plugin-helper/{utils → lifecycle}/clipboard.ts +2 -2
- package/client/vendor/paseo-plugin-helper/lifecycle/flair.ts +26 -0
- package/client/vendor/paseo-plugin-helper/{theme/color-utils.ts → lifecycle/host-color.ts} +95 -38
- package/client/vendor/paseo-plugin-helper/lifecycle/host-theme.tsx +109 -0
- package/client/vendor/paseo-plugin-helper/lifecycle/index.ts +23 -0
- package/client/vendor/paseo-plugin-helper/lifecycle/multi-host.ts +66 -0
- package/client/vendor/paseo-plugin-helper/{panel.tsx → lifecycle/panel.tsx} +7 -7
- package/client/vendor/paseo-plugin-helper/{pill.tsx → lifecycle/pill.tsx} +51 -18
- package/client/vendor/paseo-plugin-helper/lifecycle/providers.tsx +46 -0
- package/client/vendor/paseo-plugin-helper/lifecycle/scroll-owner.ts +26 -0
- package/client/vendor/paseo-plugin-helper/{surface.tsx → lifecycle/surface.tsx} +6 -6
- package/client/vendor/paseo-plugin-helper/ui/color.ts +1 -0
- package/client/vendor/paseo-plugin-helper/ui/content.tsx +1326 -0
- package/client/vendor/paseo-plugin-helper/ui/controls.tsx +1018 -0
- package/client/vendor/paseo-plugin-helper/{components/DataTable.tsx → ui/data.tsx} +50 -58
- package/client/vendor/paseo-plugin-helper/ui/index.ts +44 -0
- package/client/vendor/paseo-plugin-helper/ui/layout.tsx +263 -0
- package/client/vendor/paseo-plugin-helper/ui/modal.tsx +111 -0
- package/client/vendor/paseo-plugin-helper/ui/plugin-reload-banner.tsx +119 -0
- package/client/vendor/paseo-plugin-helper/{settings-screen.tsx → ui/settings-screen.tsx} +3 -3
- package/client/vendor/paseo-plugin-helper/ui/settings.ts +36 -0
- package/client/vendor/paseo-plugin-helper/ui/text.tsx +821 -0
- package/client/vendor/paseo-plugin-helper/ui/theme.tsx +1 -0
- package/client/vendor/permission-audit/client.tsx +706 -0
- package/client/vendor/permission-audit/index.tsx +1 -0
- package/index.client.tsx +58 -37
- package/index.server.ts +256 -234
- package/package.json +7 -4
- package/paseo-plugin.json +2 -0
- package/screenshots/1-paseo-top-modal-system.jpg +0 -0
- package/screenshots/2-paseo-top-modal-workspace.jpg +0 -0
- package/screenshots/3-paseo-top-modal-settings.jpg +0 -0
- package/screenshots/4-paseo-top-modal-about.jpg +0 -0
- package/screenshots/paseo-top-dashboard.jpg +0 -0
- package/screenshots/paseo-top-general-view.jpg +0 -0
- package/server/resources.ts +98 -0
- package/server/vendor/paseo-plugin-helper/custom-pills.ts +70 -0
- package/server/vendor/paseo-plugin-helper/index.ts +2 -0
- package/server/vendor/paseo-plugin-helper/logger.ts +5 -16
- package/server/vendor/paseo-plugin-helper/rpc-guard.ts +2 -2
- package/server/vendor/paseo-plugin-helper/storage-guard.ts +294 -0
- package/server/vendor/paseo-plugin-helper/storage.ts +36 -2
- package/server/vendor/paseo-plugin-helper/telemetry.ts +486 -0
- package/server/vendor/paseo-plugin-helper/tickets.ts +18 -67
- package/server/vendor/permission-audit/index.ts +1 -0
- package/server/vendor/permission-audit/server.ts +839 -0
- package/shared/helper-version.ts +1 -1
- package/shared/multi-host.ts +153 -159
- package/shared/resources.ts +145 -0
- package/shared/vendor/paseo-plugin-helper/async.ts +14 -7
- package/shared/vendor/paseo-plugin-helper/features.ts +244 -0
- package/shared/vendor/paseo-plugin-helper/forge.ts +27 -0
- package/shared/vendor/paseo-plugin-helper/index.ts +1 -0
- package/shared/vendor/paseo-plugin-helper/tickets.ts +122 -28
- package/shared/vendor/permission-audit/filter.ts +61 -0
- package/shared/vendor/permission-audit/index.ts +2 -0
- package/shared/vendor/permission-audit/shared.ts +119 -0
- package/shared/version.ts +1 -1
- package/client/vendor/paseo-plugin-helper/components/AboutSection.tsx +0 -493
- package/client/vendor/paseo-plugin-helper/components/AttentionBeacon.tsx +0 -250
- package/client/vendor/paseo-plugin-helper/components/Badge.tsx +0 -168
- package/client/vendor/paseo-plugin-helper/components/Button.tsx +0 -204
- package/client/vendor/paseo-plugin-helper/components/Card.tsx +0 -257
- package/client/vendor/paseo-plugin-helper/components/CodeBlock.tsx +0 -196
- package/client/vendor/paseo-plugin-helper/components/Collapsible.tsx +0 -277
- package/client/vendor/paseo-plugin-helper/components/CommandBox.tsx +0 -172
- package/client/vendor/paseo-plugin-helper/components/CopyButton.tsx +0 -180
- package/client/vendor/paseo-plugin-helper/components/EmptyState.tsx +0 -97
- package/client/vendor/paseo-plugin-helper/components/HighlightedText.tsx +0 -70
- package/client/vendor/paseo-plugin-helper/components/InlineButton.tsx +0 -88
- package/client/vendor/paseo-plugin-helper/components/InteractiveRow.tsx +0 -142
- package/client/vendor/paseo-plugin-helper/components/KeyValue.tsx +0 -446
- package/client/vendor/paseo-plugin-helper/components/MetricGauge.tsx +0 -247
- package/client/vendor/paseo-plugin-helper/components/ProgressBar.tsx +0 -117
- package/client/vendor/paseo-plugin-helper/components/Responsive.tsx +0 -53
- package/client/vendor/paseo-plugin-helper/components/SearchInput.tsx +0 -132
- package/client/vendor/paseo-plugin-helper/components/SectionHeader.tsx +0 -87
- package/client/vendor/paseo-plugin-helper/components/Select.tsx +0 -283
- package/client/vendor/paseo-plugin-helper/components/StatusDot.tsx +0 -80
- package/client/vendor/paseo-plugin-helper/components/Tabs.tsx +0 -319
- package/client/vendor/paseo-plugin-helper/components/TextInput.tsx +0 -150
- package/client/vendor/paseo-plugin-helper/components/Toggle.tsx +0 -163
- package/client/vendor/paseo-plugin-helper/components/TruncatedText.tsx +0 -157
- package/client/vendor/paseo-plugin-helper/components/index.ts +0 -26
- package/client/vendor/paseo-plugin-helper/custom-pills.tsx +0 -225
- package/client/vendor/paseo-plugin-helper/forge-icon.tsx +0 -79
- package/client/vendor/paseo-plugin-helper/icon.tsx +0 -39
- package/client/vendor/paseo-plugin-helper/index.ts +0 -30
- package/client/vendor/paseo-plugin-helper/layout/ActionBar.tsx +0 -49
- package/client/vendor/paseo-plugin-helper/layout/FormRow.tsx +0 -103
- package/client/vendor/paseo-plugin-helper/layout/Grid.tsx +0 -65
- package/client/vendor/paseo-plugin-helper/layout/ModalBody.tsx +0 -368
- package/client/vendor/paseo-plugin-helper/layout/ModalContent.tsx +0 -51
- package/client/vendor/paseo-plugin-helper/layout/Row.tsx +0 -39
- package/client/vendor/paseo-plugin-helper/layout/Stack.tsx +0 -39
- package/client/vendor/paseo-plugin-helper/layout/index.ts +0 -7
- package/client/vendor/paseo-plugin-helper/styles/index.ts +0 -1
- package/client/vendor/paseo-plugin-helper/styles/recipes.ts +0 -550
- package/client/vendor/paseo-plugin-helper/theme/flair.ts +0 -76
- package/client/vendor/paseo-plugin-helper/theme/host-variables.ts +0 -121
- package/client/vendor/paseo-plugin-helper/theme/index.ts +0 -7
- package/client/vendor/paseo-plugin-helper/theme/provider.tsx +0 -178
- package/client/vendor/paseo-plugin-helper/theme/responsive.ts +0 -213
- package/client/vendor/paseo-plugin-helper/theme/tokens.ts +0 -200
- package/client/vendor/paseo-plugin-helper/theme/useResponsive.ts +0 -57
- package/client/vendor/paseo-plugin-helper/tickets.tsx +0 -766
- /package/client/vendor/paseo-plugin-helper/{command-center.ts → core/command-center.ts} +0 -0
- /package/client/vendor/paseo-plugin-helper/{snapshot.ts → core/snapshot.ts} +0 -0
- /package/client/vendor/paseo-plugin-helper/{utils → lifecycle}/haptics.ts +0 -0
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import type { PlatformType, PluginTheme } from "../../../../shared/vendor/paseo-plugin-helper/types";
|
|
2
|
-
import type { DensityStyle } from "./flair";
|
|
3
|
-
import type { ResponsiveLayout } from "../../../../shared/vendor/paseo-plugin-helper/types";
|
|
4
|
-
import { resolveEffectiveCompact } from "./responsive";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Standard spacing scale (pt/px) shared by every helper surface.
|
|
8
|
-
* Density rule: compact viewports step exactly one rung down the scale.
|
|
9
|
-
*/
|
|
10
|
-
export const spacing = {
|
|
11
|
-
xxs: 2,
|
|
12
|
-
xs: 4,
|
|
13
|
-
sm: 8,
|
|
14
|
-
md: 12,
|
|
15
|
-
lg: 16,
|
|
16
|
-
xl: 24,
|
|
17
|
-
} as const;
|
|
18
|
-
|
|
19
|
-
export type SpacingKey = keyof typeof spacing;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* A gap/size value: either a named spacing token or a raw px number. Layout
|
|
23
|
-
* primitives accept this so callers never have to invent their own scale.
|
|
24
|
-
*/
|
|
25
|
-
export type SpacingValue = SpacingKey | number;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Resolves a {@link SpacingValue} to px, falling back to the theme-derived
|
|
29
|
-
* value when the caller did not specify one.
|
|
30
|
-
*/
|
|
31
|
-
export function resolveSpacing(value: SpacingValue | undefined, fallback: number): number {
|
|
32
|
-
if (value === undefined) return fallback;
|
|
33
|
-
return typeof value === "number" ? value : spacing[value];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface TypographyToken {
|
|
37
|
-
fontSize: number;
|
|
38
|
-
lineHeight: number;
|
|
39
|
-
fontWeight: "400" | "500" | "600" | "700";
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface TypographyScale {
|
|
43
|
-
title: TypographyToken;
|
|
44
|
-
heading: TypographyToken;
|
|
45
|
-
body: TypographyToken;
|
|
46
|
-
bodyStrong: TypographyToken;
|
|
47
|
-
/**
|
|
48
|
-
* Value text that pairs with a {@link TypographyScale.label}: same size as
|
|
49
|
-
* the label, normal weight, so a value never outranks its own label.
|
|
50
|
-
*/
|
|
51
|
-
bodySmall: TypographyToken;
|
|
52
|
-
caption: TypographyToken;
|
|
53
|
-
label: TypographyToken;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Semantic text sizes keep helper components visually coherent while still
|
|
58
|
-
* allowing compact panes and plugin density preferences to breathe.
|
|
59
|
-
*/
|
|
60
|
-
export function resolveTypography(
|
|
61
|
-
layout: ResponsiveLayout,
|
|
62
|
-
density: DensityStyle,
|
|
63
|
-
): TypographyScale {
|
|
64
|
-
const compact = resolveEffectiveCompact(layout);
|
|
65
|
-
const densityStep = density === "compact" ? -1 : density === "spacious" ? 1 : 0;
|
|
66
|
-
const size = (regular: number, minimum = 10) =>
|
|
67
|
-
Math.max(minimum, regular + (compact ? -1 : 0) + densityStep);
|
|
68
|
-
|
|
69
|
-
const label: TypographyToken = {
|
|
70
|
-
fontSize: size(12, 11),
|
|
71
|
-
lineHeight: size(16, 14),
|
|
72
|
-
fontWeight: "600",
|
|
73
|
-
};
|
|
74
|
-
// Derived, not a fresh literal: a paired value shares the label's metrics
|
|
75
|
-
// and drops to normal weight, so it can never render larger than its label.
|
|
76
|
-
const bodySmall: TypographyToken = {
|
|
77
|
-
fontSize: label.fontSize,
|
|
78
|
-
lineHeight: label.lineHeight,
|
|
79
|
-
fontWeight: "400",
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
title: { fontSize: size(16, 14), lineHeight: size(22, 18), fontWeight: "600" },
|
|
84
|
-
heading: { fontSize: size(14, 12), lineHeight: size(20, 16), fontWeight: "600" },
|
|
85
|
-
body: { fontSize: size(13, 12), lineHeight: size(19, 16), fontWeight: "400" },
|
|
86
|
-
bodyStrong: { fontSize: size(13, 12), lineHeight: size(19, 16), fontWeight: "600" },
|
|
87
|
-
bodySmall,
|
|
88
|
-
caption: { fontSize: size(11, 10), lineHeight: size(15, 14), fontWeight: "400" },
|
|
89
|
-
label,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/** Fallback text color on accent fills when the host omits accentForeground. */
|
|
94
|
-
export const FALLBACK_ACCENT_FOREGROUND = "#ffffff";
|
|
95
|
-
|
|
96
|
-
export type ElevationLevel = "none" | "sm" | "md" | "lg";
|
|
97
|
-
|
|
98
|
-
export interface ElevationStyle {
|
|
99
|
-
shadowColor: string;
|
|
100
|
-
shadowOpacity: number;
|
|
101
|
-
shadowRadius: number;
|
|
102
|
-
shadowOffset: { width: number; height: number };
|
|
103
|
-
elevation: number;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Standard shadow/elevation presets. shadowColor lives here once so client
|
|
108
|
-
* components never hardcode their own.
|
|
109
|
-
*/
|
|
110
|
-
export function resolveElevation(level: ElevationLevel): ElevationStyle {
|
|
111
|
-
switch (level) {
|
|
112
|
-
case "none":
|
|
113
|
-
return {
|
|
114
|
-
shadowColor: "#000",
|
|
115
|
-
shadowOpacity: 0,
|
|
116
|
-
shadowRadius: 0,
|
|
117
|
-
shadowOffset: { width: 0, height: 0 },
|
|
118
|
-
elevation: 0,
|
|
119
|
-
};
|
|
120
|
-
case "sm":
|
|
121
|
-
return {
|
|
122
|
-
shadowColor: "#000",
|
|
123
|
-
shadowOpacity: 0.12,
|
|
124
|
-
shadowRadius: 3,
|
|
125
|
-
shadowOffset: { width: 0, height: 1 },
|
|
126
|
-
elevation: 1,
|
|
127
|
-
};
|
|
128
|
-
case "lg":
|
|
129
|
-
return {
|
|
130
|
-
shadowColor: "#000",
|
|
131
|
-
shadowOpacity: 0.24,
|
|
132
|
-
shadowRadius: 12,
|
|
133
|
-
shadowOffset: { width: 0, height: 4 },
|
|
134
|
-
elevation: 4,
|
|
135
|
-
};
|
|
136
|
-
case "md":
|
|
137
|
-
default:
|
|
138
|
-
return {
|
|
139
|
-
shadowColor: "#000",
|
|
140
|
-
shadowOpacity: 0.18,
|
|
141
|
-
shadowRadius: 6,
|
|
142
|
-
shadowOffset: { width: 0, height: 2 },
|
|
143
|
-
elevation: 2,
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Native `elevation` is Android-only; iOS renders the shadow props.
|
|
150
|
-
* Kept as a helper so call sites read consistently.
|
|
151
|
-
*/
|
|
152
|
-
export function elevationForPlatform(
|
|
153
|
-
level: ElevationLevel,
|
|
154
|
-
platform: PlatformType,
|
|
155
|
-
): ElevationStyle {
|
|
156
|
-
const style = resolveElevation(level);
|
|
157
|
-
if (platform !== "android") {
|
|
158
|
-
return { ...style, elevation: 0 };
|
|
159
|
-
}
|
|
160
|
-
return style;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export const defaultDarkTheme: PluginTheme = {
|
|
164
|
-
colors: {
|
|
165
|
-
surface0: "#18181b",
|
|
166
|
-
surface1: "#27272a",
|
|
167
|
-
surface2: "#3f3f46",
|
|
168
|
-
border: "#3f3f46",
|
|
169
|
-
foreground: "#fafafa",
|
|
170
|
-
foregroundMuted: "#a1a1aa",
|
|
171
|
-
accent: "#3b82f6",
|
|
172
|
-
accentForeground: "#ffffff",
|
|
173
|
-
statusSuccess: "#22c55e",
|
|
174
|
-
statusWarning: "#eab308",
|
|
175
|
-
statusDanger: "#ef4444",
|
|
176
|
-
},
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
export const defaultLightTheme: PluginTheme = {
|
|
180
|
-
colors: {
|
|
181
|
-
surface0: "#ffffff",
|
|
182
|
-
surface1: "#f4f4f5",
|
|
183
|
-
surface2: "#e4e4e7",
|
|
184
|
-
border: "#e4e4e7",
|
|
185
|
-
foreground: "#09090b",
|
|
186
|
-
foregroundMuted: "#71717a",
|
|
187
|
-
accent: "#2563eb",
|
|
188
|
-
accentForeground: "#ffffff",
|
|
189
|
-
statusSuccess: "#16a34a",
|
|
190
|
-
statusWarning: "#ca8a04",
|
|
191
|
-
statusDanger: "#dc2626",
|
|
192
|
-
},
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
export function getDefaultTheme(scheme?: string): PluginTheme {
|
|
196
|
-
if (scheme === "light") {
|
|
197
|
-
return defaultLightTheme;
|
|
198
|
-
}
|
|
199
|
-
return defaultDarkTheme;
|
|
200
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { usePluginTheme } from "./provider";
|
|
2
|
-
import {
|
|
3
|
-
responsiveSelect,
|
|
4
|
-
type ResponsiveSelectOptions,
|
|
5
|
-
} from "./responsive";
|
|
6
|
-
import type { PlatformType } from "../../../../shared/vendor/paseo-plugin-helper/types";
|
|
7
|
-
|
|
8
|
-
export interface UseResponsiveResult {
|
|
9
|
-
/**
|
|
10
|
-
* Whether the container or viewport is in compact mode (narrow trackbar, mobile screen, or split-pane).
|
|
11
|
-
*/
|
|
12
|
-
isCompact: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Whether the current OS platform is mobile ('ios' | 'android').
|
|
15
|
-
*/
|
|
16
|
-
isMobile: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* The platform identifier ('web' | 'desktop' | 'ios' | 'android' | 'macos' | 'windows' | 'linux').
|
|
19
|
-
*/
|
|
20
|
-
platform: PlatformType;
|
|
21
|
-
/**
|
|
22
|
-
* Container width if reported by Paseo's layout.
|
|
23
|
-
*/
|
|
24
|
-
width?: number;
|
|
25
|
-
/**
|
|
26
|
-
* Container height if reported by Paseo's layout.
|
|
27
|
-
*/
|
|
28
|
-
height?: number;
|
|
29
|
-
/**
|
|
30
|
-
* Recommended minimum interactive touch target (44pt on mobile/compact, 28pt on desktop).
|
|
31
|
-
*/
|
|
32
|
-
touchTargetMin: number;
|
|
33
|
-
/**
|
|
34
|
-
* Helper function to select a value based on the current responsive environment.
|
|
35
|
-
*/
|
|
36
|
-
select: <T>(options: ResponsiveSelectOptions<T>) => T | undefined;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Universal hook for responsive plugin UI across composer pills, modals, panels, and surfaces.
|
|
41
|
-
* Automatically adapts based on Paseo's layout context (compact mode, mobile OS, touch targets).
|
|
42
|
-
*/
|
|
43
|
-
export function useResponsive(): UseResponsiveResult {
|
|
44
|
-
const { layout, isCompact, isMobile, touchTargetMin } = usePluginTheme();
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
isCompact,
|
|
48
|
-
isMobile,
|
|
49
|
-
platform: layout.platform,
|
|
50
|
-
width: layout.width,
|
|
51
|
-
height: layout.height,
|
|
52
|
-
touchTargetMin,
|
|
53
|
-
select: <T>(options: ResponsiveSelectOptions<T>): T | undefined => {
|
|
54
|
-
return responsiveSelect(layout, options);
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
}
|