@xpufx/paseo-top 0.4.3 → 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 +124 -7
- package/client/pill.tsx +724 -669
- package/client/resources-query.ts +1 -1
- package/client/settings-events.ts +33 -0
- package/client/settings-ui.tsx +86 -9
- package/client/surface.tsx +310 -274
- 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} +21 -61
- 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} +118 -338
- 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/lifecycle/surface.tsx +140 -0
- 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} +55 -47
- 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 -227
- package/package.json +14 -2
- 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 +4 -0
- package/server/vendor/paseo-plugin-helper/logger.ts +5 -16
- package/server/vendor/paseo-plugin-helper/mcp-injection.ts +20 -2
- package/server/vendor/paseo-plugin-helper/plugins.ts +184 -19
- 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 +1232 -0
- package/server/vendor/permission-audit/index.ts +1 -0
- package/server/vendor/permission-audit/server.ts +839 -0
- package/shared/helper-version.ts +20 -0
- package/shared/multi-host.ts +156 -155
- package/shared/resources.ts +146 -1
- 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 +2 -0
- package/shared/vendor/paseo-plugin-helper/tickets.ts +1104 -0
- 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 -156
- package/client/vendor/paseo-plugin-helper/components/Button.tsx +0 -184
- package/client/vendor/paseo-plugin-helper/components/Card.tsx +0 -225
- 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 -75
- 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 -118
- package/client/vendor/paseo-plugin-helper/components/SectionHeader.tsx +0 -80
- package/client/vendor/paseo-plugin-helper/components/Select.tsx +0 -215
- 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 -25
- package/client/vendor/paseo-plugin-helper/custom-pills.tsx +0 -224
- 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 -29
- 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 -378
- 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/surface.tsx +0 -80
- 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/{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
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paseo Plugin Helper — UI Kit (`paseo-plugin-helper/ui`).
|
|
3
|
+
*
|
|
4
|
+
* Banner that notifies the user when a plugin bundle was reloaded by the
|
|
5
|
+
* daemon. Renders a styled row with an ⚡ icon, a warning message, and two
|
|
6
|
+
* buttons (Reload / Dismiss).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import React, { type ReactNode } from "react";
|
|
10
|
+
import { Pressable, StyleSheet, Text, View, type StyleProp, type ViewStyle } from "react-native";
|
|
11
|
+
import { useHostTheme } from "./theme";
|
|
12
|
+
import { spacing } from "./layout";
|
|
13
|
+
|
|
14
|
+
export interface PluginReloadBannerProps {
|
|
15
|
+
/** Unique plugin identifier (used for reload tracking). */
|
|
16
|
+
pluginId: string;
|
|
17
|
+
/** Optional callback invoked when the user taps Reload. */
|
|
18
|
+
onReload?: () => void;
|
|
19
|
+
/** Optional custom children to render instead of the default content. */
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/** Optional inline style override. */
|
|
22
|
+
style?: StyleProp<ViewStyle>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Inline banner shown at the top of a plugin view after the daemon has
|
|
27
|
+
* hot-reloaded the plugin bundle.
|
|
28
|
+
*
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <PluginReloadBanner pluginId="my-plugin" onReload={() => queryClient.invalidateQueries()} />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export function PluginReloadBanner({
|
|
34
|
+
pluginId,
|
|
35
|
+
onReload,
|
|
36
|
+
children,
|
|
37
|
+
style,
|
|
38
|
+
}: PluginReloadBannerProps) {
|
|
39
|
+
const { colors } = useHostTheme();
|
|
40
|
+
const [dismissed, setDismissed] = React.useState(false);
|
|
41
|
+
|
|
42
|
+
if (dismissed) return null;
|
|
43
|
+
|
|
44
|
+
const handleReload = () => {
|
|
45
|
+
onReload?.();
|
|
46
|
+
// Also trigger a full page reload when running in a browser-like host.
|
|
47
|
+
const win = globalThis as any;
|
|
48
|
+
if (typeof win?.location?.reload === "function") {
|
|
49
|
+
win.location.reload();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<View style={[styles.container, style]}>
|
|
55
|
+
<View style={styles.content}>
|
|
56
|
+
<Text style={styles.icon}>⚡</Text>
|
|
57
|
+
<Text style={styles.message}>
|
|
58
|
+
{children ?? "Plugin was reloaded on the daemon. Please refresh to load updated views."}
|
|
59
|
+
</Text>
|
|
60
|
+
<View style={styles.actions}>
|
|
61
|
+
{onReload && (
|
|
62
|
+
<Pressable onPress={handleReload} style={[styles.button, styles.reloadButton]}>
|
|
63
|
+
<Text style={styles.buttonText}>Reload</Text>
|
|
64
|
+
</Pressable>
|
|
65
|
+
)}
|
|
66
|
+
<Pressable onPress={() => setDismissed(true)} style={[styles.button, styles.dismissButton]}>
|
|
67
|
+
<Text style={[styles.buttonText, styles.dismissButtonText]}>Dismiss</Text>
|
|
68
|
+
</Pressable>
|
|
69
|
+
</View>
|
|
70
|
+
</View>
|
|
71
|
+
</View>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const styles = StyleSheet.create({
|
|
76
|
+
container: {
|
|
77
|
+
backgroundColor: "rgba(210, 153, 34, 0.12)",
|
|
78
|
+
borderBottomWidth: 1,
|
|
79
|
+
borderBottomColor: "#d29922",
|
|
80
|
+
},
|
|
81
|
+
content: {
|
|
82
|
+
flexDirection: "row",
|
|
83
|
+
alignItems: "center",
|
|
84
|
+
paddingHorizontal: spacing.md,
|
|
85
|
+
paddingVertical: spacing.sm,
|
|
86
|
+
gap: spacing.sm,
|
|
87
|
+
},
|
|
88
|
+
icon: {
|
|
89
|
+
fontSize: 16,
|
|
90
|
+
},
|
|
91
|
+
message: {
|
|
92
|
+
flex: 1,
|
|
93
|
+
fontSize: 13,
|
|
94
|
+
color: "#d29922",
|
|
95
|
+
},
|
|
96
|
+
actions: {
|
|
97
|
+
flexDirection: "row",
|
|
98
|
+
gap: spacing.sm,
|
|
99
|
+
},
|
|
100
|
+
button: {
|
|
101
|
+
paddingHorizontal: spacing.md,
|
|
102
|
+
paddingVertical: spacing.xs,
|
|
103
|
+
borderRadius: 4,
|
|
104
|
+
},
|
|
105
|
+
reloadButton: {
|
|
106
|
+
backgroundColor: "#d29922",
|
|
107
|
+
},
|
|
108
|
+
dismissButton: {
|
|
109
|
+
borderWidth: 1,
|
|
110
|
+
borderColor: "#d29922",
|
|
111
|
+
},
|
|
112
|
+
buttonText: {
|
|
113
|
+
fontSize: 12,
|
|
114
|
+
fontWeight: "600",
|
|
115
|
+
},
|
|
116
|
+
dismissButtonText: {
|
|
117
|
+
color: "#d29922",
|
|
118
|
+
},
|
|
119
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type ComponentType, type ReactNode } from "react";
|
|
2
|
-
import type { SettingsContract } from "
|
|
3
|
-
import type { HostSurfaceProps, PluginCleanup } from "
|
|
4
|
-
import { usePluginSettings } from "
|
|
2
|
+
import type { SettingsContract } from "../../../../shared/vendor/paseo-plugin-helper/settings";
|
|
3
|
+
import type { HostSurfaceProps, PluginCleanup } from "../core/host";
|
|
4
|
+
import { usePluginSettings } from "../core/settings";
|
|
5
5
|
|
|
6
6
|
export interface HelperSettingsCardProps {
|
|
7
7
|
children: ReactNode;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paseo Plugin Helper — Settings UI adapters.
|
|
3
|
+
*
|
|
4
|
+
* The bundle-driven settings renderer's entire contract is already
|
|
5
|
+
* upstream-shaped: the caller passes the host's native
|
|
6
|
+
* `@getpaseo/plugin/client/ui` primitives
|
|
7
|
+
* (`SettingsSection`, `SettingsCard`, `SettingsSwitch`, `SettingsSelect`,
|
|
8
|
+
* `SettingsInput`) as the `ui` bundle, and the helper only maps a zod
|
|
9
|
+
* settings contract to fields — no bespoke switches, rows, or cards.
|
|
10
|
+
*
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import * as UpstreamUi from "@getpaseo/plugin/client/ui";
|
|
13
|
+
* registerHelperSettingsScreen(client, contract, { ui: UpstreamUi });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
contractSchemaToFields,
|
|
19
|
+
registerHelperSettingsScreen,
|
|
20
|
+
} from "./settings-screen";
|
|
21
|
+
export type {
|
|
22
|
+
HelperSettingsUiBundle,
|
|
23
|
+
HelperSettingsCardProps,
|
|
24
|
+
HelperSettingsSectionProps,
|
|
25
|
+
HelperSettingsRowBaseProps,
|
|
26
|
+
HelperSettingsSwitchProps,
|
|
27
|
+
HelperSettingsSelectProps,
|
|
28
|
+
HelperSettingsInputProps,
|
|
29
|
+
HelperSettingsSelectComponent,
|
|
30
|
+
HelperSettingsScreenContribution,
|
|
31
|
+
HelperSettingsScreenRegistrar,
|
|
32
|
+
HelperSettingsFieldKind,
|
|
33
|
+
HelperSettingsField,
|
|
34
|
+
HelperSettingsFieldOverrides,
|
|
35
|
+
RegisterHelperSettingsScreenOptions,
|
|
36
|
+
} from "./settings-screen";
|