@shipsite.dev/cli 0.2.4 → 0.2.6
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/workspace/generators/layout.d.ts.map +1 -1
- package/dist/workspace/generators/layout.js +5 -0
- package/dist/workspace/generators/layout.js.map +1 -1
- package/dist/workspace/generators/page.d.ts.map +1 -1
- package/dist/workspace/generators/page.js +12 -2
- package/dist/workspace/generators/page.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/workspace/generators/layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/workspace/generators/layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CA8F1D"}
|
|
@@ -11,6 +11,11 @@ export function generateLayout(ctx) {
|
|
|
11
11
|
apple: '/apple-touch-icon.png',
|
|
12
12
|
},`;
|
|
13
13
|
}
|
|
14
|
+
// Root layout — prevents Next.js from auto-generating one without lang
|
|
15
|
+
writeFileSync(join(ctx.srcDir, 'app', 'layout.tsx'), `export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
16
|
+
return children;
|
|
17
|
+
}
|
|
18
|
+
`);
|
|
14
19
|
writeFileSync(join(ctx.srcDir, 'app', '[locale]', 'layout.tsx'), `import { notFound } from 'next/navigation';
|
|
15
20
|
import { routing } from '../../i18n/routing';
|
|
16
21
|
import { ShipSiteProvider } from '@shipsite.dev/components/context';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/workspace/generators/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAGnC,MAAM,UAAU,cAAc,CAAC,GAAqB;IAClD,mCAAmC;IACnC,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC;IACnC,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,IAAI,OAAO,EAAE,CAAC;QACZ,UAAU,GAAG;;aAEJ,OAAO;;KAEf,CAAC;IACJ,CAAC;IAED,aAAa,CACX,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,CAAC,EACjD;;;;;;;;;;;;;;;;;qEAiBiE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoD9E,CACE,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/workspace/generators/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAGnC,MAAM,UAAU,cAAc,CAAC,GAAqB;IAClD,mCAAmC;IACnC,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC;IACnC,IAAI,UAAU,GAAG,EAAE,CAAC;IACpB,IAAI,OAAO,EAAE,CAAC;QACZ,UAAU,GAAG;;aAEJ,OAAO;;KAEf,CAAC;IACJ,CAAC;IAED,uEAAuE;IACvE,aAAa,CACX,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,YAAY,CAAC,EACrC;;;CAGH,CACE,CAAC;IAEF,aAAa,CACX,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,CAAC,EACjD;;;;;;;;;;;;;;;;;qEAiBiE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoD9E,CACE,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../src/workspace/generators/page.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,wBAAgB,YAAY,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../src/workspace/generators/page.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,wBAAgB,YAAY,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CA6FxD"}
|
|
@@ -6,8 +6,8 @@ export function generatePage(ctx) {
|
|
|
6
6
|
? `import * as CustomComponents from '../../../../components';\n`
|
|
7
7
|
: '';
|
|
8
8
|
const allComponentsMerge = hasCustomComponents
|
|
9
|
-
? 'const AllComponents = { ...Components, ...CustomComponents };\n'
|
|
10
|
-
: 'const AllComponents = Components;\n';
|
|
9
|
+
? 'const AllComponents = { ...mdxHtmlOverrides, ...Components, ...CustomComponents };\n'
|
|
10
|
+
: 'const AllComponents = { ...mdxHtmlOverrides, ...Components };\n';
|
|
11
11
|
writeFileSync(join(ctx.srcDir, 'app', '[locale]', '[[...slug]]', 'page.tsx'), `import { setRequestLocale } from 'next-intl/server';
|
|
12
12
|
import { notFound } from 'next/navigation';
|
|
13
13
|
import { getPageContent } from '@shipsite.dev/core/mdx';
|
|
@@ -17,6 +17,16 @@ import { getConfig, getSiteUrl } from '@shipsite.dev/core/config';
|
|
|
17
17
|
import * as Components from '@shipsite.dev/components';
|
|
18
18
|
${customComponentsImport}import type { Metadata } from 'next';
|
|
19
19
|
|
|
20
|
+
// Map shadcn Table components to HTML element names for Markdown tables
|
|
21
|
+
const mdxHtmlOverrides = {
|
|
22
|
+
table: Components.Table,
|
|
23
|
+
thead: Components.TableHeader,
|
|
24
|
+
tbody: Components.TableBody,
|
|
25
|
+
th: Components.TableHead,
|
|
26
|
+
tr: Components.TableRow,
|
|
27
|
+
td: Components.TableCell,
|
|
28
|
+
};
|
|
29
|
+
|
|
20
30
|
${allComponentsMerge}
|
|
21
31
|
interface PageProps {
|
|
22
32
|
params: Promise<{ locale: string; slug?: string[] }>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/workspace/generators/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAG/C,MAAM,UAAU,YAAY,CAAC,GAAqB;IAChD,MAAM,mBAAmB,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;IACxE,MAAM,sBAAsB,GAAG,mBAAmB;QAChD,CAAC,CAAC,+DAA+D;QACjE,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,kBAAkB,GAAG,mBAAmB;QAC5C,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/workspace/generators/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAG/C,MAAM,UAAU,YAAY,CAAC,GAAqB;IAChD,MAAM,mBAAmB,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;IACxE,MAAM,sBAAsB,GAAG,mBAAmB;QAChD,CAAC,CAAC,+DAA+D;QACjE,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,kBAAkB,GAAG,mBAAmB;QAC5C,CAAC,CAAC,sFAAsF;QACxF,CAAC,CAAC,iEAAiE,CAAC;IAEtE,aAAa,CACX,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,CAAC,EAC9D;;;;;;;EAOF,sBAAsB;;;;;;;;;;;;EAYtB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DnB,CACE,CAAC;AACJ,CAAC"}
|