@k2b/cloud 0.36.0 → 0.38.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/package.json +5 -3
- package/scripts/README.md +1 -0
- package/scripts/cli-pack.ts +123 -0
- package/src/_internal/help-catalog.ts +123 -4
- package/src/_internal/help.ts +27 -6
- package/src/_internal/shell-focus.ts +11 -0
- package/src/access/PermissionEditor.browser-harness.tsx +46 -0
- package/src/access/PermissionEditor.tsx +38 -9
- package/src/access/ui.ts +1 -0
- package/src/account/Avatar.tsx +20 -2
- package/src/account/ui.ts +1 -1
- package/src/ai/browser.ts +1 -0
- package/src/ai/chart-block.ts +44 -13
- package/src/ai/chat/answer-links.ts +8 -0
- package/src/ai/chat/chart-block.tsx +2 -11
- package/src/ai/chat/messages.ts +12 -0
- package/src/ai/chat/primitives.tsx +2 -1
- package/src/ai/chat/web-tools.tsx +23 -6
- package/src/ai/chat-tasks.ts +65 -1
- package/src/ai/default-tool-contracts.ts +30 -13
- package/src/ai/executor.ts +46 -3
- package/src/ai/fetch-file-tool.ts +37 -3
- package/src/ai/migrate.ts +19 -2
- package/src/ai/readable-html.ts +1057 -0
- package/src/ai/types.ts +1 -0
- package/src/api/help.ts +23 -4
- package/src/api/mcp.ts +8 -2
- package/src/browser/FileChooser.tsx +11 -3
- package/src/browser/choose-files.browser-harness.tsx +4 -1
- package/src/browser/file-chooser-messages.ts +4 -0
- package/src/browser/file-providers.ts +14 -1
- package/src/browser/provider-folder.tsx +58 -5
- package/src/browser/resource-picker.tsx +5 -1
- package/src/browser/shell-focus.ts +67 -0
- package/src/cli/admin/workflows.ts +1 -0
- package/src/cli/commands.ts +2 -0
- package/src/cli/plugin.ts +5 -5
- package/src/config/env.ts +14 -0
- package/src/contracts/file-provider.ts +48 -1
- package/src/contracts/outgoing-mail.ts +8 -1
- package/src/server/help.ts +136 -10
- package/src/server/services/geo.ts +21 -4
- package/src/services/allowed-network-fetch.ts +189 -0
- package/src/services/help/index.ts +46 -5
- package/src/services/help/store.ts +26 -5
- package/src/services/help/types.ts +10 -2
- package/src/services/index.ts +2 -0
- package/src/services/network-security.ts +28 -0
- package/src/services/outgoing-mail/dispatcher.ts +7 -2
- package/src/services/outgoing-mail/resolve-host.ts +39 -0
- package/src/services/outgoing-mail/test-send.ts +18 -3
- package/src/services/outgoing-mail/transport.ts +24 -13
- package/src/services/settings/index.ts +48 -26
- package/src/shared/help.ts +41 -0
- package/src/shared/index.ts +9 -1
- package/src/shared/markdown/extensions/guided-help.ts +208 -64
- package/src/shared/markdown/formula.ts +8 -8
- package/src/shared/markdown/index.ts +72 -11
- package/src/shared/network-address.ts +9 -0
- package/src/ssr/CloudShell.island.tsx +2 -0
- package/src/ssr/GlobalSearchTrigger.tsx +1 -1
- package/src/ssr/Layout.tsx +28 -2
- package/src/ssr/LayoutHelp.browser-harness.tsx +130 -27
- package/src/ssr/LayoutHelp.tsx +569 -410
- package/src/ssr/LayoutHelpTrigger.tsx +1 -1
- package/src/ssr/LayoutRail.tsx +1 -1
- package/src/ssr/ProfilePreferences.tsx +1 -1
- package/src/ssr/RailApps.tsx +1 -1
- package/src/ssr/ShellFocusToggle.tsx +43 -0
- package/src/ssr/ShellRuntime.island.tsx +53 -26
- package/src/ssr/app-launchpad.tsx +1 -1
- package/src/ssr/help-messages.ts +60 -38
- package/src/ssr/help.ts +3 -0
- package/src/ssr/layout-help-article.ts +41 -0
- package/src/ssr/layout-help-navigation.ts +0 -12
- package/src/ssr/layout-help-registry.tsx +4 -11
- package/src/ssr/layout-help-search.ts +9 -12
- package/src/ssr/layout-help-start.ts +68 -0
- package/src/ssr/platform-messages.ts +14 -0
- package/src/ssr/shell-data.tsx +7 -0
- package/src/ssr/shell-focus.browser-harness.tsx +83 -0
- package/src/ssr/shell-shortcuts.ts +8 -0
- package/src/styles/effects.css +688 -185
- package/src/styles/global.css +155 -26
- package/src/styles/resource-search.css +25 -0
- package/src/styles/utilities-navigation.css +11 -3
- package/src/workflows/store/events.ts +24 -0
- package/src/workflows/store/index.ts +8 -0
- package/src/workflows/store/observability.ts +6 -1
- package/src/workflows/store/retention.ts +157 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { AppWorkspace } from "@k2b/ui";
|
|
2
|
+
import { Hono } from "hono";
|
|
3
|
+
import { Dynamic } from "solid-js/web";
|
|
4
|
+
import { defineApp } from "../_internal/define-app";
|
|
5
|
+
import { person } from "../_internal/define-app.test-fixture";
|
|
6
|
+
import type { User } from "../contracts/shared";
|
|
7
|
+
import Layout from "./Layout";
|
|
8
|
+
import type { RuntimeContext } from "./runtime";
|
|
9
|
+
|
|
10
|
+
const probe = defineApp({
|
|
11
|
+
id: "shell-focus-probe",
|
|
12
|
+
name: "Focus probe",
|
|
13
|
+
icon: "ti ti-layout",
|
|
14
|
+
description: "Shell focus browser fixture",
|
|
15
|
+
baseUrl: "http://shell-focus-probe:3000",
|
|
16
|
+
routes: ["/app/focus"],
|
|
17
|
+
});
|
|
18
|
+
type Environment = { Variables: { runtime: RuntimeContext; user: User } };
|
|
19
|
+
export const server = new Hono<Environment>()
|
|
20
|
+
.use(async (c, next) => {
|
|
21
|
+
c.set("runtime", {
|
|
22
|
+
apps: [
|
|
23
|
+
{
|
|
24
|
+
id: "shell-focus-probe",
|
|
25
|
+
name: "Focus probe",
|
|
26
|
+
description: "Shell focus browser fixture",
|
|
27
|
+
icon: "ti ti-layout",
|
|
28
|
+
routes: ["/app/focus"],
|
|
29
|
+
nav: { href: "/app/focus", section: "primary" },
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
|
+
c.set("user", person);
|
|
34
|
+
await next();
|
|
35
|
+
})
|
|
36
|
+
.get(
|
|
37
|
+
"/app/focus",
|
|
38
|
+
...probe.ssr<Environment>((c) => () => (
|
|
39
|
+
<Layout c={c} fullWidth fullPage title={[{ title: "Focus probe", href: "/app/focus" }, { title: "Workspace" }]}>
|
|
40
|
+
<AppWorkspace mobileSurface="flush" class="min-h-0 flex-1">
|
|
41
|
+
<AppWorkspace.Sidebar id="focus-navigation" label="Navigation">
|
|
42
|
+
<AppWorkspace.SidebarDesktop>
|
|
43
|
+
<AppWorkspace.SidebarItem href="/app/focus" active>
|
|
44
|
+
Workspace
|
|
45
|
+
</AppWorkspace.SidebarItem>
|
|
46
|
+
</AppWorkspace.SidebarDesktop>
|
|
47
|
+
</AppWorkspace.Sidebar>
|
|
48
|
+
<AppWorkspace.Content>
|
|
49
|
+
<AppWorkspace.Main>
|
|
50
|
+
<textarea aria-label="Editor" />
|
|
51
|
+
</AppWorkspace.Main>
|
|
52
|
+
</AppWorkspace.Content>
|
|
53
|
+
</AppWorkspace>
|
|
54
|
+
</Layout>
|
|
55
|
+
)),
|
|
56
|
+
)
|
|
57
|
+
// Grids wraps Main in an island inside Content and gives it a navigation pane.
|
|
58
|
+
.get(
|
|
59
|
+
"/app/focus/panes",
|
|
60
|
+
...probe.ssr<Environment>((c) => () => (
|
|
61
|
+
<Layout c={c} fullWidth fullPage title={[{ title: "Focus probe", href: "/app/focus" }, { title: "Pages" }]}>
|
|
62
|
+
<AppWorkspace mobileSurface="flush" class="min-h-0 flex-1">
|
|
63
|
+
<AppWorkspace.Sidebar id="focus-navigation" label="Navigation">
|
|
64
|
+
<AppWorkspace.SidebarDesktop>
|
|
65
|
+
<AppWorkspace.SidebarItem href="/app/focus/panes" active>
|
|
66
|
+
Pages
|
|
67
|
+
</AppWorkspace.SidebarItem>
|
|
68
|
+
</AppWorkspace.SidebarDesktop>
|
|
69
|
+
</AppWorkspace.Sidebar>
|
|
70
|
+
<AppWorkspace.Content>
|
|
71
|
+
<Dynamic component="solid-island">
|
|
72
|
+
<AppWorkspace.Main mobilePane="main" scroll={false}>
|
|
73
|
+
<AppWorkspace.MainPane id="focus-pages" label="Pages" surface="navigation" defaultSize={280}>
|
|
74
|
+
Page list
|
|
75
|
+
</AppWorkspace.MainPane>
|
|
76
|
+
<div>Page</div>
|
|
77
|
+
</AppWorkspace.Main>
|
|
78
|
+
</Dynamic>
|
|
79
|
+
</AppWorkspace.Content>
|
|
80
|
+
</AppWorkspace>
|
|
81
|
+
</Layout>
|
|
82
|
+
)),
|
|
83
|
+
);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { platformMessages } from "./platform-messages";
|
|
2
|
+
|
|
3
|
+
export const SHELL_SHORTCUT_ORDER = ["cloud.search", "cloud.help"] as const;
|
|
4
|
+
/** The shell's always-present shortcuts, without their actions; ShellRuntime adds the actions, Help renders them before the browser reports commands. */
|
|
5
|
+
export const shellShortcuts = (t: ReturnType<typeof platformMessages.resolve>["t"]) => [
|
|
6
|
+
{ id: "cloud.search", title: t.openGlobalSearch, description: t.globalSearchDescription, icon: "ti ti-search", shortcut: "mod+k" },
|
|
7
|
+
{ id: "cloud.help", title: t.openShortcutHelp, description: t.shortcutHelpDescription, icon: "ti ti-help-circle", shortcut: "shift+/" },
|
|
8
|
+
];
|