betterstart-cli 0.0.121 → 0.0.123
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/dist/assets/adapters/next/templates/init/admin-globals.css +10 -16
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/copyable-code-block.tsx +5 -5
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/dev-mode-code-mirror.tsx +1 -2
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode-integrate.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/entity-filters-bar.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-versions-drawer.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/edit-media-dialog-content.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-filters-bar.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/page-header.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/components/shared/sort-order-dialog.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-source-mode.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/media/media-page-content.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-detail-drawer.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/settings/forms/form-notifications-drawer.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/accordion.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/button.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/card.tsx +11 -7
- package/dist/assets/shared-assets/react-admin/ui/checkbox.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/combobox.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/drawer.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/input-group.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/input-otp.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/input.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/native-select.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/radio-group.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/select.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/sidebar.tsx +4 -3
- package/dist/assets/shared-assets/react-admin/ui/tabs.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/textarea.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/toggle.tsx +1 -1
- package/dist/cli.js +50 -23
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/adapters/next/templates/init/pages/container-layout.tsx +0 -3
package/dist/cli.js
CHANGED
|
@@ -16340,9 +16340,10 @@ ${join}
|
|
|
16340
16340
|
</div>`;
|
|
16341
16341
|
}
|
|
16342
16342
|
function renderFormLayoutDetailsTemplate() {
|
|
16343
|
-
return `className={
|
|
16344
|
-
|
|
16345
|
-
|
|
16343
|
+
return `className={cn('sticky space-y-4', {
|
|
16344
|
+
'top-32': initialData?.id != null,
|
|
16345
|
+
'top-14': initialData?.id == null
|
|
16346
|
+
})}`;
|
|
16346
16347
|
}
|
|
16347
16348
|
function renderFormCardContentGridTemplate({
|
|
16348
16349
|
tabSidebarEntriesGrid,
|
|
@@ -16384,8 +16385,8 @@ function renderFormCardContentDetailsTemplate({
|
|
|
16384
16385
|
}) {
|
|
16385
16386
|
return `${formGridOpen}
|
|
16386
16387
|
<div className="h-full min-w-0">
|
|
16387
|
-
<Card className="min-w-0
|
|
16388
|
-
<CardContent className="space-y-5
|
|
16388
|
+
<Card className="h-full min-w-0">
|
|
16389
|
+
<CardContent className="flex h-full min-h-0 flex-col space-y-5 p-8">
|
|
16389
16390
|
${mainFieldsJsx}
|
|
16390
16391
|
</CardContent>
|
|
16391
16392
|
</Card>
|
|
@@ -16822,7 +16823,7 @@ function renderFormLayoutDetailsBranchBodyTemplate({
|
|
|
16822
16823
|
return ` {initialData?.id != null && (
|
|
16823
16824
|
<div
|
|
16824
16825
|
className={cn(
|
|
16825
|
-
'sticky z-
|
|
16826
|
+
'sticky top-14 z-20 flex h-14 flex-row items-center justify-between gap-1 overflow-x-clip bg-background px-6 transition-shadow',
|
|
16826
16827
|
{
|
|
16827
16828
|
'shadow-modal/2': hasScrolled,
|
|
16828
16829
|
'border-b border-border/80': !hasScrolled
|
|
@@ -16874,7 +16875,7 @@ function renderFormTabContentDetailsTemplate({
|
|
|
16874
16875
|
</TabsContent>`;
|
|
16875
16876
|
}
|
|
16876
16877
|
function renderEntityFormBody({ contentComponentName }) {
|
|
16877
|
-
return ` <main className="w-full
|
|
16878
|
+
return ` <main className="h-full w-full px-6 pt-6">
|
|
16878
16879
|
<${contentComponentName} state={entityForm} />
|
|
16879
16880
|
</main>`;
|
|
16880
16881
|
}
|
|
@@ -17036,7 +17037,7 @@ function buildEntityFormArtifacts({
|
|
|
17036
17037
|
const withHandlerSection = (handlers) => handlers ? `
|
|
17037
17038
|
${handlers}
|
|
17038
17039
|
` : "";
|
|
17039
|
-
const needsCn = hasRelationship || hasSelectCombobox || shouldGuardSidebarByTab;
|
|
17040
|
+
const needsCn = hasRelationship || hasSelectCombobox || shouldGuardSidebarByTab || /\bcn\s*\(/.test(formBodyJSX);
|
|
17040
17041
|
const metadataOffsetConst = showMetadataWidget ? "const SCROLL_BORDER_OFFSET = 8;\n\n" : "";
|
|
17041
17042
|
const metadataScrollState = showMetadataWidget ? " const hasScrolled = usePageScrollThreshold(SCROLL_BORDER_OFFSET)\n" : "";
|
|
17042
17043
|
const metadataStrip = showMetadataWidget ? renderEntityFormPageRenderer({
|
|
@@ -19278,7 +19279,7 @@ function renderTextareaField(field, indent, label, hintJSX, context) {
|
|
|
19278
19279
|
`${indent} `
|
|
19279
19280
|
),
|
|
19280
19281
|
toLowerCase: label.toLowerCase(),
|
|
19281
|
-
fillControlClass: fillControlClass(field, "min-h-
|
|
19282
|
+
fillControlClass: fillControlClass(field, "min-h-20"),
|
|
19282
19283
|
fieldProps
|
|
19283
19284
|
}
|
|
19284
19285
|
});
|
|
@@ -19660,7 +19661,7 @@ function buildEntityFormLayout({
|
|
|
19660
19661
|
const sidebarVisibilityState = shouldGuardSidebarByTab ? `
|
|
19661
19662
|
const hasVisibleSidebarFields = ${sidebarTabNames.map((tabName) => `activeTab === ${JSON.stringify(tabName)}`).join(" || ")}
|
|
19662
19663
|
` : "";
|
|
19663
|
-
const formGridOpen = shouldGuardSidebarByTab ? renderEntityFormContentRenderer({ kind: "renderFormLayoutDetailsBranchTemplate" }) : ` <div className="grid ${hasSidebarFields ? "grid-cols-entity-form" : "grid-cols-1"}
|
|
19664
|
+
const formGridOpen = shouldGuardSidebarByTab ? renderEntityFormContentRenderer({ kind: "renderFormLayoutDetailsBranchTemplate" }) : ` <div className="grid h-full ${hasSidebarFields ? "grid-cols-entity-form" : "grid-cols-1"} items-start gap-6">`;
|
|
19664
19665
|
const sidebarCardJSX = !hasSidebarFields ? "" : shouldGuardSidebarByTab ? renderEntityFormContentRenderer({
|
|
19665
19666
|
kind: "renderFormContentSidebarColumnTemplate",
|
|
19666
19667
|
props: {
|
|
@@ -21261,7 +21262,8 @@ ${createButtonContent}
|
|
|
21261
21262
|
}
|
|
21262
21263
|
/>
|
|
21263
21264
|
${hasFiltersLabel}
|
|
21264
|
-
|
|
21265
|
+
|
|
21266
|
+
<main className="flex-1 space-y-4 px-6 pb-6">
|
|
21265
21267
|
<${plural}Table ${tableProps} />${sortOrderDialog}
|
|
21266
21268
|
</main>
|
|
21267
21269
|
</React.Fragment>
|
|
@@ -32263,7 +32265,8 @@ function scaffoldCoreSchemas({
|
|
|
32263
32265
|
const schemaName = "settings";
|
|
32264
32266
|
const schemaPath = path71.join(cwd, config.paths.schemas, `${schemaName}.json`);
|
|
32265
32267
|
fs60.mkdirSync(path71.dirname(schemaPath), { recursive: true });
|
|
32266
|
-
fs60.writeFileSync(schemaPath, schemaContent
|
|
32268
|
+
fs60.writeFileSync(schemaPath, `${schemaContent}
|
|
32269
|
+
`, "utf-8");
|
|
32267
32270
|
result.schemas.push(`${schemaName}.json`);
|
|
32268
32271
|
ensureSnapshotGitFiles(cwd);
|
|
32269
32272
|
try {
|
|
@@ -32510,7 +32513,6 @@ function scaffoldLayout({ cwd, config }) {
|
|
|
32510
32513
|
);
|
|
32511
32514
|
write(path74.join(config.paths.pages, "page.tsx"), readTemplate("pages/dashboard-page.tsx"));
|
|
32512
32515
|
const containerDir = path74.join(config.paths.pages, ADMIN_CONTAINER_ROUTE_GROUP);
|
|
32513
|
-
write(path74.join(containerDir, "layout.tsx"), readTemplate("pages/container-layout.tsx"));
|
|
32514
32516
|
const usersDir = path74.join(containerDir, "users");
|
|
32515
32517
|
write(path74.join(usersDir, "page.tsx"), readTemplate("pages/users/users-page.tsx"));
|
|
32516
32518
|
write(
|
|
@@ -33499,20 +33501,50 @@ function renderBaseFontDeclarations() {
|
|
|
33499
33501
|
`;
|
|
33500
33502
|
}
|
|
33501
33503
|
|
|
33504
|
+
// adapters/next/templates/renderers/init/scaffolders/tailwind/mono-font-family-rule.ts
|
|
33505
|
+
function renderMonoFontFamilyRule() {
|
|
33506
|
+
return `code,
|
|
33507
|
+
kbd,
|
|
33508
|
+
samp,
|
|
33509
|
+
pre {
|
|
33510
|
+
font-family: var(--font-geist-mono);
|
|
33511
|
+
}
|
|
33512
|
+
`;
|
|
33513
|
+
}
|
|
33514
|
+
|
|
33515
|
+
// adapters/next/templates/renderers/init/scaffolders/tailwind/root-font-family-rule.ts
|
|
33516
|
+
function renderRootFontFamilyRule() {
|
|
33517
|
+
return `html {
|
|
33518
|
+
font-family: var(--font-geist-sans);
|
|
33519
|
+
}
|
|
33520
|
+
`;
|
|
33521
|
+
}
|
|
33522
|
+
|
|
33502
33523
|
// adapters/next/init/scaffolders/tailwind/apply-base-font.ts
|
|
33503
33524
|
function applyBaseFont(content) {
|
|
33504
33525
|
const bodyRule = /(?:^|\n)body\s*\{[^}]*\}/.exec(content);
|
|
33505
33526
|
if (!bodyRule) {
|
|
33506
33527
|
return `${content}
|
|
33528
|
+
${renderRootFontFamilyRule()}
|
|
33507
33529
|
body {
|
|
33508
33530
|
${renderBaseFontDeclarations()}}
|
|
33509
|
-
|
|
33531
|
+
|
|
33532
|
+
${renderMonoFontFamilyRule()}`;
|
|
33510
33533
|
}
|
|
33511
|
-
|
|
33512
|
-
|
|
33534
|
+
const leadingNewline = bodyRule[0].startsWith("\n") ? "\n" : "";
|
|
33535
|
+
let rule = bodyRule[0].slice(leadingNewline.length).replace(/\n[ \t]*font-family:[^;]*;/g, "");
|
|
33536
|
+
if (!/font-size\s*:/.test(rule)) {
|
|
33537
|
+
const closingBrace = rule.length - 1;
|
|
33538
|
+
rule = `${rule.slice(0, closingBrace)}${renderBaseFontDeclarations()}${rule.slice(closingBrace)}`;
|
|
33513
33539
|
}
|
|
33514
|
-
const
|
|
33515
|
-
|
|
33540
|
+
const before = content.slice(0, bodyRule.index);
|
|
33541
|
+
const after = content.slice(bodyRule.index + bodyRule[0].length);
|
|
33542
|
+
const rootRule = content.includes(renderRootFontFamilyRule()) ? "" : `${renderRootFontFamilyRule()}
|
|
33543
|
+
`;
|
|
33544
|
+
const monoRule = content.includes(renderMonoFontFamilyRule()) ? "" : `
|
|
33545
|
+
|
|
33546
|
+
${renderMonoFontFamilyRule()}`;
|
|
33547
|
+
return `${before}${leadingNewline}${rootRule}${rule}${monoRule}${after}`;
|
|
33516
33548
|
}
|
|
33517
33549
|
|
|
33518
33550
|
// adapters/next/init/scaffolders/tailwind/get-admin-theme-vars.ts
|
|
@@ -38352,11 +38384,6 @@ var TEMPLATE_REGISTRY = {
|
|
|
38352
38384
|
base: "cwd",
|
|
38353
38385
|
dependencies: ["auth-gate"]
|
|
38354
38386
|
},
|
|
38355
|
-
"container-layout": {
|
|
38356
|
-
relPath: "app/(admin)/admin/(authenticated)/(container)/layout.tsx",
|
|
38357
|
-
content: () => readTemplate("pages/container-layout.tsx"),
|
|
38358
|
-
base: "cwd"
|
|
38359
|
-
},
|
|
38360
38387
|
"auth-gate": {
|
|
38361
38388
|
relPath: "app/(admin)/admin/(authenticated)/auth-gate.tsx",
|
|
38362
38389
|
content: () => readTemplate("pages/auth-gate.tsx"),
|