@lucasvu/scope-ui 0.0.5 → 0.0.7
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/AI_SETUP.md +16 -5
- package/README.md +18 -4
- package/bin/scope-ui-init.mjs +101 -3
- package/dist/index.cjs +210 -0
- package/dist/index.d.cts +286 -2
- package/dist/index.d.ts +286 -2
- package/dist/index.js +209 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6625,6 +6625,7 @@ var uiAiManifest = {
|
|
|
6625
6625
|
rules: [
|
|
6626
6626
|
"Import the stylesheet once at the app entry before rendering any component.",
|
|
6627
6627
|
"If the project declares an approved theme preset in AGENTS.md or ui-theme.css, stay inside that preset and do not invent a second palette.",
|
|
6628
|
+
"Collect the screen brief first: route url, sidebar items, active sidebar item, page title, actions, and the page-specific content schema.",
|
|
6628
6629
|
"Prefer the canonical component for each intent instead of mixing legacy MainFe components.",
|
|
6629
6630
|
"Use Input/Textarea/Select label props directly for simple fields; use Field only to wrap custom controls or grouped content.",
|
|
6630
6631
|
"Use Select for small fixed option lists, SearchableSelect for larger local lists, Combobox for type-and-pick flows, and AsyncCombobox for remote search.",
|
|
@@ -6840,6 +6841,213 @@ var uiAiManifest = {
|
|
|
6840
6841
|
]
|
|
6841
6842
|
};
|
|
6842
6843
|
|
|
6844
|
+
// src/screen-blueprint.ts
|
|
6845
|
+
var uiScreenBriefFields = [
|
|
6846
|
+
{
|
|
6847
|
+
id: "pageKind",
|
|
6848
|
+
label: "Page kind",
|
|
6849
|
+
description: "Choose the base recipe for the screen.",
|
|
6850
|
+
required: true,
|
|
6851
|
+
appliesTo: ["all"],
|
|
6852
|
+
example: "list"
|
|
6853
|
+
},
|
|
6854
|
+
{
|
|
6855
|
+
id: "routeUrl",
|
|
6856
|
+
label: "Route URL",
|
|
6857
|
+
description: "Final route for the screen or feature entry.",
|
|
6858
|
+
required: true,
|
|
6859
|
+
appliesTo: ["all"],
|
|
6860
|
+
example: "/admin/users"
|
|
6861
|
+
},
|
|
6862
|
+
{
|
|
6863
|
+
id: "sidebarItems",
|
|
6864
|
+
label: "Sidebar items",
|
|
6865
|
+
description: "Sidebar entries with at least id, title, and href so the shell stays consistent.",
|
|
6866
|
+
required: true,
|
|
6867
|
+
appliesTo: ["all"],
|
|
6868
|
+
example: '[{ id: "users", title: "Users", href: "/admin/users" }]'
|
|
6869
|
+
},
|
|
6870
|
+
{
|
|
6871
|
+
id: "activeSidebarItemId",
|
|
6872
|
+
label: "Active sidebar item id",
|
|
6873
|
+
description: "The sidebar item that should appear active on this screen.",
|
|
6874
|
+
required: true,
|
|
6875
|
+
appliesTo: ["all"],
|
|
6876
|
+
example: "users"
|
|
6877
|
+
},
|
|
6878
|
+
{
|
|
6879
|
+
id: "breadcrumbs",
|
|
6880
|
+
label: "Breadcrumbs",
|
|
6881
|
+
description: "Ordered breadcrumb items for the page header.",
|
|
6882
|
+
required: false,
|
|
6883
|
+
appliesTo: ["all"],
|
|
6884
|
+
example: '[{ label: "Admin", href: "/admin" }, { label: "Users", current: true }]'
|
|
6885
|
+
},
|
|
6886
|
+
{
|
|
6887
|
+
id: "pageTitle",
|
|
6888
|
+
label: "Page title",
|
|
6889
|
+
description: "Main page heading shown in the content header.",
|
|
6890
|
+
required: true,
|
|
6891
|
+
appliesTo: ["all"],
|
|
6892
|
+
example: "Users"
|
|
6893
|
+
},
|
|
6894
|
+
{
|
|
6895
|
+
id: "pageSubtitle",
|
|
6896
|
+
label: "Page subtitle",
|
|
6897
|
+
description: "Short supporting text under the title.",
|
|
6898
|
+
required: false,
|
|
6899
|
+
appliesTo: ["all"],
|
|
6900
|
+
example: "Manage internal user accounts and permissions."
|
|
6901
|
+
},
|
|
6902
|
+
{
|
|
6903
|
+
id: "primaryAction",
|
|
6904
|
+
label: "Primary action",
|
|
6905
|
+
description: "The highest-emphasis action shown in the page header.",
|
|
6906
|
+
required: false,
|
|
6907
|
+
appliesTo: ["all"],
|
|
6908
|
+
example: '{ label: "Create user", href: "/admin/users/create" }'
|
|
6909
|
+
},
|
|
6910
|
+
{
|
|
6911
|
+
id: "secondaryActions",
|
|
6912
|
+
label: "Secondary actions",
|
|
6913
|
+
description: "Additional header actions such as export, refresh, or cancel.",
|
|
6914
|
+
required: false,
|
|
6915
|
+
appliesTo: ["all"],
|
|
6916
|
+
example: '[{ label: "Export" }, { label: "Refresh" }]'
|
|
6917
|
+
},
|
|
6918
|
+
{
|
|
6919
|
+
id: "summaryStats",
|
|
6920
|
+
label: "Summary stats",
|
|
6921
|
+
description: "Top-line numbers for dashboard or overview screens.",
|
|
6922
|
+
required: false,
|
|
6923
|
+
appliesTo: ["dashboard", "detail"],
|
|
6924
|
+
example: '[{ label: "Active users", value: "1,204", trend: "up", delta: "+12%" }]'
|
|
6925
|
+
},
|
|
6926
|
+
{
|
|
6927
|
+
id: "filters",
|
|
6928
|
+
label: "Filters",
|
|
6929
|
+
description: "Filter bar controls shown above list or dashboard content.",
|
|
6930
|
+
required: false,
|
|
6931
|
+
appliesTo: ["list", "dashboard"],
|
|
6932
|
+
example: '[{ type: "search", label: "Search user" }, { type: "select", label: "Role" }]'
|
|
6933
|
+
},
|
|
6934
|
+
{
|
|
6935
|
+
id: "tableColumns",
|
|
6936
|
+
label: "Table columns",
|
|
6937
|
+
description: "Columns for a list table, including label and render intent.",
|
|
6938
|
+
required: false,
|
|
6939
|
+
appliesTo: ["list", "detail", "dashboard"],
|
|
6940
|
+
example: '[{ key: "name", title: "Name" }, { key: "role", title: "Role" }]'
|
|
6941
|
+
},
|
|
6942
|
+
{
|
|
6943
|
+
id: "rowActions",
|
|
6944
|
+
label: "Row actions",
|
|
6945
|
+
description: "Per-row actions for table screens.",
|
|
6946
|
+
required: false,
|
|
6947
|
+
appliesTo: ["list", "detail"],
|
|
6948
|
+
example: '[{ label: "Edit" }, { label: "Reset password" }]'
|
|
6949
|
+
},
|
|
6950
|
+
{
|
|
6951
|
+
id: "formSections",
|
|
6952
|
+
label: "Form sections",
|
|
6953
|
+
description: "Grouped form sections and the fields inside each section.",
|
|
6954
|
+
required: false,
|
|
6955
|
+
appliesTo: ["form"],
|
|
6956
|
+
example: '[{ title: "Basic info", fields: ["name", "email", "role"] }]'
|
|
6957
|
+
},
|
|
6958
|
+
{
|
|
6959
|
+
id: "fields",
|
|
6960
|
+
label: "Fields",
|
|
6961
|
+
description: "Detailed field list with type, label, required state, and helper text.",
|
|
6962
|
+
required: false,
|
|
6963
|
+
appliesTo: ["form", "detail"],
|
|
6964
|
+
example: '[{ name: "email", type: "input", label: "Email", required: true }]'
|
|
6965
|
+
},
|
|
6966
|
+
{
|
|
6967
|
+
id: "detailSections",
|
|
6968
|
+
label: "Detail sections",
|
|
6969
|
+
description: "Cards or sections for detail pages such as profile, activity, permissions, or related records.",
|
|
6970
|
+
required: false,
|
|
6971
|
+
appliesTo: ["detail"],
|
|
6972
|
+
example: '[{ title: "Profile" }, { title: "Recent activity" }]'
|
|
6973
|
+
},
|
|
6974
|
+
{
|
|
6975
|
+
id: "emptyState",
|
|
6976
|
+
label: "Empty state",
|
|
6977
|
+
description: "Fallback title, description, and action when there is no data.",
|
|
6978
|
+
required: false,
|
|
6979
|
+
appliesTo: ["list", "dashboard", "detail"],
|
|
6980
|
+
example: '{ title: "No users yet", description: "Create the first user to get started." }'
|
|
6981
|
+
},
|
|
6982
|
+
{
|
|
6983
|
+
id: "permissions",
|
|
6984
|
+
label: "Permissions",
|
|
6985
|
+
description: "Permission keys that affect sidebar visibility or action availability.",
|
|
6986
|
+
required: false,
|
|
6987
|
+
appliesTo: ["all"],
|
|
6988
|
+
example: '["user.read", "user.write"]'
|
|
6989
|
+
}
|
|
6990
|
+
];
|
|
6991
|
+
var uiScreenBlueprint = {
|
|
6992
|
+
pageKinds: [
|
|
6993
|
+
{
|
|
6994
|
+
id: "list",
|
|
6995
|
+
label: "List page",
|
|
6996
|
+
frame: [
|
|
6997
|
+
"Sidebar shell",
|
|
6998
|
+
"Breadcrumb",
|
|
6999
|
+
"PageTitle with actions",
|
|
7000
|
+
"Optional stats",
|
|
7001
|
+
"Filter card",
|
|
7002
|
+
"DataTable card"
|
|
7003
|
+
]
|
|
7004
|
+
},
|
|
7005
|
+
{
|
|
7006
|
+
id: "form",
|
|
7007
|
+
label: "Form page",
|
|
7008
|
+
frame: [
|
|
7009
|
+
"Sidebar shell",
|
|
7010
|
+
"Breadcrumb",
|
|
7011
|
+
"PageTitle with primary and cancel actions",
|
|
7012
|
+
"Sectioned form cards",
|
|
7013
|
+
"Bottom action row"
|
|
7014
|
+
]
|
|
7015
|
+
},
|
|
7016
|
+
{
|
|
7017
|
+
id: "detail",
|
|
7018
|
+
label: "Detail page",
|
|
7019
|
+
frame: [
|
|
7020
|
+
"Sidebar shell",
|
|
7021
|
+
"Breadcrumb",
|
|
7022
|
+
"PageTitle with status/actions",
|
|
7023
|
+
"Summary stats or metadata card",
|
|
7024
|
+
"Detail cards and related tables"
|
|
7025
|
+
]
|
|
7026
|
+
},
|
|
7027
|
+
{
|
|
7028
|
+
id: "dashboard",
|
|
7029
|
+
label: "Dashboard page",
|
|
7030
|
+
frame: [
|
|
7031
|
+
"Sidebar shell",
|
|
7032
|
+
"Breadcrumb",
|
|
7033
|
+
"PageTitle with actions",
|
|
7034
|
+
"Stat cards row",
|
|
7035
|
+
"Filters",
|
|
7036
|
+
"Main insight cards and tables"
|
|
7037
|
+
]
|
|
7038
|
+
}
|
|
7039
|
+
],
|
|
7040
|
+
workflow: [
|
|
7041
|
+
"Collect the screen brief before coding. Do not invent sidebar items, route urls, filters, fields, or table columns if the brief is missing.",
|
|
7042
|
+
"Use Sidebar plus Breadcrumb and PageTitle to lock the shell before building the page body.",
|
|
7043
|
+
"Choose only canonical root exports from @lucasvu/scope-ui.",
|
|
7044
|
+
"Use Card and ui-grid utilities to create the frame first, then place controls and data components inside.",
|
|
7045
|
+
"Keep all palette, radius, surface, and shadow decisions in the shared ui-theme.css preset file.",
|
|
7046
|
+
"End with a consistency check against the selected preset and the screen brief."
|
|
7047
|
+
],
|
|
7048
|
+
briefFields: uiScreenBriefFields
|
|
7049
|
+
};
|
|
7050
|
+
|
|
6843
7051
|
// src/theme-contract.ts
|
|
6844
7052
|
var uiThemePresets = [
|
|
6845
7053
|
{
|
|
@@ -7215,4 +7423,4 @@ var uiProjectAiRules = [
|
|
|
7215
7423
|
"Prefer root exports and avoid MainFe unless the task explicitly targets a legacy screen."
|
|
7216
7424
|
];
|
|
7217
7425
|
|
|
7218
|
-
export { Alert, ArgonSidebar, AsyncCombobox, Badge, Breadcrumb, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Combobox, FormControl as Control, DataTable, FormDescription as Description, FormField as Field, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, FormItem as Item, FormLabel as Label, LineClampTooltip, Loading, main_fe_exports as MainFe, FormMessage as Message, MultiSelect, NumericInput, OverflowTooltip, PageTitle, Pagination, SearchableSelect, SectionTitle, Select, Sidebar, SidebarItem, Stat, Table, TableBody, TableCell, TableHeader, TableRow, Tabs, Textarea, Tooltip, TruncatedText, cn, defaultPermissionChecker, filterSidebarItems, hasActiveDescendant, uiAiManifest, uiDefaultThemePreset, uiProjectAiRules, uiThemeContract, uiThemePresets };
|
|
7426
|
+
export { Alert, ArgonSidebar, AsyncCombobox, Badge, Breadcrumb, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Combobox, FormControl as Control, DataTable, FormDescription as Description, FormField as Field, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, FormItem as Item, FormLabel as Label, LineClampTooltip, Loading, main_fe_exports as MainFe, FormMessage as Message, MultiSelect, NumericInput, OverflowTooltip, PageTitle, Pagination, SearchableSelect, SectionTitle, Select, Sidebar, SidebarItem, Stat, Table, TableBody, TableCell, TableHeader, TableRow, Tabs, Textarea, Tooltip, TruncatedText, cn, defaultPermissionChecker, filterSidebarItems, hasActiveDescendant, uiAiManifest, uiDefaultThemePreset, uiProjectAiRules, uiScreenBlueprint, uiScreenBriefFields, uiThemeContract, uiThemePresets };
|