@object-ui/app-shell 11.2.0 → 11.4.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 (64) hide show
  1. package/CHANGELOG.md +562 -0
  2. package/README.md +23 -0
  3. package/dist/console/ConsoleShell.js +17 -2
  4. package/dist/console/home/CloudOnboardingNext.d.ts +9 -0
  5. package/dist/console/home/CloudOnboardingNext.js +14 -4
  6. package/dist/console/home/HomePage.js +34 -7
  7. package/dist/console/organizations/CreateWorkspaceDialog.js +33 -3
  8. package/dist/console/organizations/OrganizationsPage.js +16 -7
  9. package/dist/hooks/useConsoleActionRuntime.js +32 -3
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.js +6 -0
  12. package/dist/preview/DraftChangesPanel.d.ts +3 -1
  13. package/dist/preview/DraftChangesPanel.js +6 -5
  14. package/dist/utils/deriveRelatedLists.d.ts +20 -5
  15. package/dist/utils/deriveRelatedLists.js +31 -13
  16. package/dist/utils/index.d.ts +2 -24
  17. package/dist/utils/index.js +14 -101
  18. package/dist/utils/resolveViewId.d.ts +23 -0
  19. package/dist/utils/resolveViewId.js +37 -0
  20. package/dist/utils/warnSuppressedListNav.d.ts +10 -0
  21. package/dist/utils/warnSuppressedListNav.js +40 -0
  22. package/dist/views/DashboardView.js +2 -3
  23. package/dist/views/InterfaceListPage.js +10 -5
  24. package/dist/views/ObjectView.js +65 -12
  25. package/dist/views/PageView.js +2 -3
  26. package/dist/views/RecordDetailView.js +131 -104
  27. package/dist/views/RecordFormPage.js +7 -1
  28. package/dist/views/RelatedRecordActionsBridge.d.ts +24 -0
  29. package/dist/views/RelatedRecordActionsBridge.js +114 -0
  30. package/dist/views/ReportView.js +2 -3
  31. package/dist/views/metadata-admin/PackagesPage.js +18 -7
  32. package/dist/views/metadata-admin/PermissionMatrixEditor.d.ts +18 -1
  33. package/dist/views/metadata-admin/PermissionMatrixEditor.js +73 -14
  34. package/dist/views/metadata-admin/clientValidation.js +8 -2
  35. package/dist/views/metadata-admin/color-variant-field.d.ts +1 -12
  36. package/dist/views/metadata-admin/color-variant-field.js +11 -0
  37. package/dist/views/metadata-admin/i18n.d.ts +12 -21
  38. package/dist/views/metadata-admin/i18n.js +343 -2
  39. package/dist/views/metadata-admin/inspectors/ObjectFieldInspector.js +25 -11
  40. package/dist/views/metadata-admin/permission-slice.d.ts +66 -0
  41. package/dist/views/metadata-admin/permission-slice.js +70 -0
  42. package/dist/views/metadata-admin/previews/AppNavCanvas.js +11 -7
  43. package/dist/views/metadata-admin/previews/FlowRunsPanel.d.ts +16 -7
  44. package/dist/views/metadata-admin/previews/FlowRunsPanel.js +18 -2
  45. package/dist/views/metadata-admin/previews/OutlineStrip.d.ts +1 -13
  46. package/dist/views/metadata-admin/previews/OutlineStrip.js +12 -0
  47. package/dist/views/metadata-admin/previews/PagePreview.js +9 -0
  48. package/dist/views/metadata-admin/previews/SourcePageEditor.d.ts +28 -0
  49. package/dist/views/metadata-admin/previews/SourcePageEditor.js +83 -0
  50. package/dist/views/studio-design/BuilderLanding.d.ts +15 -0
  51. package/dist/views/studio-design/BuilderLanding.js +133 -0
  52. package/dist/views/studio-design/ObjectFormDesigner.d.ts +31 -0
  53. package/dist/views/studio-design/ObjectFormDesigner.js +226 -0
  54. package/dist/views/studio-design/ObjectSettingsPanel.d.ts +30 -0
  55. package/dist/views/studio-design/ObjectSettingsPanel.js +45 -0
  56. package/dist/views/studio-design/ObjectValidationsPanel.d.ts +30 -0
  57. package/dist/views/studio-design/ObjectValidationsPanel.js +78 -0
  58. package/dist/views/studio-design/StudioDesignSurface.d.ts +20 -0
  59. package/dist/views/studio-design/StudioDesignSurface.js +1306 -0
  60. package/dist/views/studio-design/metadataError.d.ts +23 -0
  61. package/dist/views/studio-design/metadataError.js +44 -0
  62. package/dist/views/studio-design/packages-io.d.ts +27 -0
  63. package/dist/views/studio-design/packages-io.js +61 -0
  64. package/package.json +46 -43
@@ -0,0 +1,23 @@
1
+ import type { MetadataValidationIssue } from '@object-ui/data-objectstack';
2
+ /** Pull structured validation issues off a caught error (empty if none). */
3
+ export declare function extractIssues(e: unknown): MetadataValidationIssue[];
4
+ /**
5
+ * Format a caught save/publish error for a banner/toast. When the error carries
6
+ * spec-validation issues, list them (one field per line) so the user sees the
7
+ * offending fields; otherwise fall back to the plain message. Rendered with
8
+ * `whitespace-pre-line` so the lines show as a list.
9
+ */
10
+ export declare function formatMetadataError(e: unknown): string;
11
+ /** A single failed draft from a publish response's `data.failed[]`. */
12
+ export interface PublishFailure {
13
+ type: string;
14
+ name: string;
15
+ error: string;
16
+ issues?: MetadataValidationIssue[];
17
+ }
18
+ /**
19
+ * Format the `failed[]` from a partial publish (the server returns 200 with the
20
+ * drafts that DIDN'T go live). Each failed draft gets a heading and, when the
21
+ * failure was a validation error, its field-anchored issues indented below.
22
+ */
23
+ export declare function formatPublishFailures(failed: PublishFailure[]): string;
@@ -0,0 +1,44 @@
1
+ // Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.
2
+ //
3
+ // Turn a metadata save/publish failure into a FIELD-ANCHORED message. The
4
+ // framework validates a draft against its spec and returns structured issues
5
+ // (`error.details.issues: [{ path, message }]`, surfaced on `MetadataError.issues`
6
+ // by the client); a publish carries per-draft failures in `data.failed[]`. These
7
+ // helpers render "which field, and why" instead of a single opaque banner line —
8
+ // the point of surfacing validation at the save/publish moment.
9
+ /** Pull structured validation issues off a caught error (empty if none). */
10
+ export function extractIssues(e) {
11
+ const issues = e?.issues;
12
+ return Array.isArray(issues) ? issues : [];
13
+ }
14
+ /** One issue → a single field-anchored line: `• fields.amount.type — Required`. */
15
+ function issueLine(i) {
16
+ return `• ${i.path && i.path.length > 0 ? i.path : '(root)'} — ${i.message}`;
17
+ }
18
+ /**
19
+ * Format a caught save/publish error for a banner/toast. When the error carries
20
+ * spec-validation issues, list them (one field per line) so the user sees the
21
+ * offending fields; otherwise fall back to the plain message. Rendered with
22
+ * `whitespace-pre-line` so the lines show as a list.
23
+ */
24
+ export function formatMetadataError(e) {
25
+ const issues = extractIssues(e);
26
+ if (issues.length > 0)
27
+ return issues.map(issueLine).join('\n');
28
+ const err = e;
29
+ return err?.message ?? String(e);
30
+ }
31
+ /**
32
+ * Format the `failed[]` from a partial publish (the server returns 200 with the
33
+ * drafts that DIDN'T go live). Each failed draft gets a heading and, when the
34
+ * failure was a validation error, its field-anchored issues indented below.
35
+ */
36
+ export function formatPublishFailures(failed) {
37
+ return failed
38
+ .map((f) => {
39
+ const head = `${f.type}/${f.name}: ${f.error}`;
40
+ const issues = Array.isArray(f.issues) ? f.issues : [];
41
+ return [head, ...issues.map((i) => ` ${issueLine(i)}`)].join('\n');
42
+ })
43
+ .join('\n');
44
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Package-list helpers shared by the Studio package switcher and the builder
3
+ * landing page.
4
+ *
5
+ * Writability is a DISPLAY heuristic — kernel packages (scope system/cloud)
6
+ * are hidden, `scope: 'project'` marks a read-only code package (authoring is
7
+ * refused server-side by the ADR-0070 D4 gate), and a scope-less entry is a
8
+ * database base package (writable). The gate stays the authority; this only
9
+ * sets expectations up front.
10
+ */
11
+ export interface PkgEntry {
12
+ id: string;
13
+ name: string;
14
+ writable: boolean;
15
+ }
16
+ export declare function parsePackages(payload: unknown): PkgEntry[];
17
+ export declare function fetchPackages(): Promise<PkgEntry[]>;
18
+ /** Create a writable base package (POST /packages {id, name}). */
19
+ export declare function createBasePackage(id: string, name: string): Promise<void>;
20
+ /**
21
+ * Duplicate a package into a NEW writable base (ADR-0070 D4 — the Airtable
22
+ * "duplicate base" gesture; POST /packages/:id/duplicate). This is how a
23
+ * read-only code package becomes a customizable starting point: objects are
24
+ * re-namespaced and intra-package references rewritten server-side.
25
+ */
26
+ export declare function duplicatePackage(sourceId: string, targetId: string, targetName?: string): Promise<void>;
27
+ export declare const PACKAGE_ID_RE: RegExp;
@@ -0,0 +1,61 @@
1
+ // Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
2
+ export function parsePackages(payload) {
3
+ const root = payload?.data ?? payload;
4
+ const raw = Array.isArray(root) ? root : (root?.packages ?? []);
5
+ const out = [];
6
+ for (const p of raw) {
7
+ if (!p || typeof p !== 'object')
8
+ continue;
9
+ const m = (p.manifest ?? {});
10
+ const id = String(m.id ?? p.id ?? '');
11
+ if (!id)
12
+ continue;
13
+ const scope = typeof m.scope === 'string' ? m.scope : '';
14
+ if (scope === 'system' || scope === 'cloud')
15
+ continue; // kernel — not app packages
16
+ out.push({ id, name: String(m.name ?? id), writable: scope !== 'project' });
17
+ }
18
+ return out;
19
+ }
20
+ export async function fetchPackages() {
21
+ const res = await fetch('/api/v1/packages', {
22
+ credentials: 'include',
23
+ headers: { Accept: 'application/json' },
24
+ cache: 'no-store',
25
+ });
26
+ if (!res.ok)
27
+ throw new Error(`HTTP ${res.status}`);
28
+ return parsePackages(await res.json());
29
+ }
30
+ /** Create a writable base package (POST /packages {id, name}). */
31
+ export async function createBasePackage(id, name) {
32
+ const res = await fetch('/api/v1/packages', {
33
+ method: 'POST',
34
+ credentials: 'include',
35
+ headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
36
+ body: JSON.stringify({ id, name }),
37
+ });
38
+ const payload = (await res.json().catch(() => null));
39
+ if (!res.ok || payload?.success === false) {
40
+ throw new Error(payload?.error?.message || `HTTP ${res.status}`);
41
+ }
42
+ }
43
+ /**
44
+ * Duplicate a package into a NEW writable base (ADR-0070 D4 — the Airtable
45
+ * "duplicate base" gesture; POST /packages/:id/duplicate). This is how a
46
+ * read-only code package becomes a customizable starting point: objects are
47
+ * re-namespaced and intra-package references rewritten server-side.
48
+ */
49
+ export async function duplicatePackage(sourceId, targetId, targetName) {
50
+ const res = await fetch(`/api/v1/packages/${encodeURIComponent(sourceId)}/duplicate`, {
51
+ method: 'POST',
52
+ credentials: 'include',
53
+ headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
54
+ body: JSON.stringify({ targetPackageId: targetId, ...(targetName ? { targetName } : {}) }),
55
+ });
56
+ const payload = (await res.json().catch(() => null));
57
+ if (!res.ok || payload?.success === false) {
58
+ throw new Error(payload?.error?.message || `HTTP ${res.status}`);
59
+ }
60
+ }
61
+ export const PACKAGE_ID_RE = /^[a-z][a-z0-9_.-]*(\.[a-z0-9_-]+)+$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/app-shell",
3
- "version": "11.2.0",
3
+ "version": "11.4.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Minimal application shell for ObjectUI - framework-agnostic rendering engine",
@@ -25,47 +25,50 @@
25
25
  "./styles.css": "./src/styles.css"
26
26
  },
27
27
  "dependencies": {
28
+ "@dnd-kit/core": "^6.3.1",
29
+ "@dnd-kit/sortable": "^10.0.0",
30
+ "@dnd-kit/utilities": "^3.2.2",
28
31
  "@monaco-editor/react": "^4.7.0",
29
- "@objectstack/spec": "^11.0.0",
30
- "@sentry/react": "^10.59.0",
32
+ "@objectstack/spec": "^11.7.0",
33
+ "@sentry/react": "^10.62.0",
31
34
  "jsonc-parser": "^3.3.1",
32
- "lucide-react": "^1.21.0",
35
+ "lucide-react": "^1.22.0",
33
36
  "qrcode": "^1.5.4",
34
37
  "sonner": "^2.0.7",
35
38
  "zod": "^4.4.3",
36
- "@object-ui/auth": "11.2.0",
37
- "@object-ui/collaboration": "11.2.0",
38
- "@object-ui/components": "11.2.0",
39
- "@object-ui/core": "11.2.0",
40
- "@object-ui/data-objectstack": "11.2.0",
41
- "@object-ui/fields": "11.2.0",
42
- "@object-ui/i18n": "11.2.0",
43
- "@object-ui/layout": "11.2.0",
44
- "@object-ui/permissions": "11.2.0",
45
- "@object-ui/plugin-editor": "11.2.0",
46
- "@object-ui/providers": "11.2.0",
47
- "@object-ui/react": "11.2.0",
48
- "@object-ui/types": "11.2.0"
39
+ "@object-ui/auth": "11.4.0",
40
+ "@object-ui/collaboration": "11.4.0",
41
+ "@object-ui/components": "11.4.0",
42
+ "@object-ui/core": "11.4.0",
43
+ "@object-ui/data-objectstack": "11.4.0",
44
+ "@object-ui/fields": "11.4.0",
45
+ "@object-ui/i18n": "11.4.0",
46
+ "@object-ui/layout": "11.4.0",
47
+ "@object-ui/permissions": "11.4.0",
48
+ "@object-ui/plugin-editor": "11.4.0",
49
+ "@object-ui/providers": "11.4.0",
50
+ "@object-ui/react": "11.4.0",
51
+ "@object-ui/types": "11.4.0"
49
52
  },
50
53
  "peerDependencies": {
51
54
  "react": "^18.0.0 || ^19.0.0",
52
55
  "react-dom": "^18.0.0 || ^19.0.0",
53
56
  "react-router-dom": "^6.0.0 || ^7.0.0",
54
- "@object-ui/plugin-calendar": "^11.2.0",
55
- "@object-ui/plugin-charts": "^11.2.0",
56
- "@object-ui/plugin-chatbot": "^11.2.0",
57
- "@object-ui/plugin-dashboard": "^11.2.0",
58
- "@object-ui/plugin-designer": "^11.2.0",
59
- "@object-ui/plugin-detail": "^11.2.0",
60
- "@object-ui/plugin-form": "^11.2.0",
61
- "@object-ui/plugin-grid": "^11.2.0",
62
- "@object-ui/plugin-kanban": "^11.2.0",
63
- "@object-ui/plugin-list": "^11.2.0",
64
- "@object-ui/plugin-report": "^11.2.0",
65
- "@object-ui/plugin-view": "^11.2.0"
57
+ "@object-ui/plugin-calendar": "^11.4.0",
58
+ "@object-ui/plugin-charts": "^11.4.0",
59
+ "@object-ui/plugin-chatbot": "^11.4.0",
60
+ "@object-ui/plugin-dashboard": "^11.4.0",
61
+ "@object-ui/plugin-designer": "^11.4.0",
62
+ "@object-ui/plugin-detail": "^11.4.0",
63
+ "@object-ui/plugin-form": "^11.4.0",
64
+ "@object-ui/plugin-grid": "^11.4.0",
65
+ "@object-ui/plugin-kanban": "^11.4.0",
66
+ "@object-ui/plugin-list": "^11.4.0",
67
+ "@object-ui/plugin-report": "^11.4.0",
68
+ "@object-ui/plugin-view": "^11.4.0"
66
69
  },
67
70
  "devDependencies": {
68
- "@types/node": "^26.0.0",
71
+ "@types/node": "^26.0.1",
69
72
  "@types/qrcode": "^1.5.6",
70
73
  "@types/react": "19.2.17",
71
74
  "@types/react-dom": "19.2.3",
@@ -74,19 +77,19 @@
74
77
  "react-router-dom": "^7.18.0",
75
78
  "sonner": "^2.0.7",
76
79
  "typescript": "^6.0.3",
77
- "vite": "^8.0.16",
78
- "@object-ui/plugin-calendar": "11.2.0",
79
- "@object-ui/plugin-charts": "11.2.0",
80
- "@object-ui/plugin-chatbot": "11.2.0",
81
- "@object-ui/plugin-dashboard": "11.2.0",
82
- "@object-ui/plugin-designer": "11.2.0",
83
- "@object-ui/plugin-detail": "11.2.0",
84
- "@object-ui/plugin-form": "11.2.0",
85
- "@object-ui/plugin-grid": "11.2.0",
86
- "@object-ui/plugin-kanban": "11.2.0",
87
- "@object-ui/plugin-list": "11.2.0",
88
- "@object-ui/plugin-report": "11.2.0",
89
- "@object-ui/plugin-view": "11.2.0"
80
+ "vite": "^8.1.0",
81
+ "@object-ui/plugin-calendar": "11.4.0",
82
+ "@object-ui/plugin-charts": "11.4.0",
83
+ "@object-ui/plugin-chatbot": "11.4.0",
84
+ "@object-ui/plugin-dashboard": "11.4.0",
85
+ "@object-ui/plugin-designer": "11.4.0",
86
+ "@object-ui/plugin-detail": "11.4.0",
87
+ "@object-ui/plugin-form": "11.4.0",
88
+ "@object-ui/plugin-grid": "11.4.0",
89
+ "@object-ui/plugin-kanban": "11.4.0",
90
+ "@object-ui/plugin-list": "11.4.0",
91
+ "@object-ui/plugin-report": "11.4.0",
92
+ "@object-ui/plugin-view": "11.4.0"
90
93
  },
91
94
  "keywords": [
92
95
  "objectui",