@teleporthq/teleport-project-generator-next 0.43.32 → 0.43.34
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/__tests__/dashboard-layout-plugin.test.ts +93 -0
- package/__tests__/entity-mutation-ssr-finalize-plugin.test.ts +129 -0
- package/dist/cjs/dashboard-layout-plugin.d.ts.map +1 -1
- package/dist/cjs/dashboard-layout-plugin.js +1 -1
- package/dist/cjs/dashboard-layout-plugin.js.map +1 -1
- package/dist/cjs/entity-mutation-ssr-finalize-plugin.d.ts +27 -0
- package/dist/cjs/entity-mutation-ssr-finalize-plugin.d.ts.map +1 -0
- package/dist/cjs/entity-mutation-ssr-finalize-plugin.js +164 -0
- package/dist/cjs/entity-mutation-ssr-finalize-plugin.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +11 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/partial.d.ts +2 -0
- package/dist/cjs/partial.d.ts.map +1 -1
- package/dist/cjs/partial.js +6 -2
- package/dist/cjs/partial.js.map +1 -1
- package/dist/cjs/split-utils.d.ts.map +1 -1
- package/dist/cjs/split-utils.js +4 -2
- package/dist/cjs/split-utils.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/widgets/form-file-input-component.d.ts +10 -0
- package/dist/cjs/widgets/form-file-input-component.d.ts.map +1 -1
- package/dist/cjs/widgets/form-file-input-component.js +11 -1
- package/dist/cjs/widgets/form-file-input-component.js.map +1 -1
- package/dist/esm/dashboard-layout-plugin.d.ts.map +1 -1
- package/dist/esm/dashboard-layout-plugin.js +1 -1
- package/dist/esm/dashboard-layout-plugin.js.map +1 -1
- package/dist/esm/entity-mutation-ssr-finalize-plugin.d.ts +27 -0
- package/dist/esm/entity-mutation-ssr-finalize-plugin.d.ts.map +1 -0
- package/dist/esm/entity-mutation-ssr-finalize-plugin.js +137 -0
- package/dist/esm/entity-mutation-ssr-finalize-plugin.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/partial.d.ts +2 -0
- package/dist/esm/partial.d.ts.map +1 -1
- package/dist/esm/partial.js +6 -2
- package/dist/esm/partial.js.map +1 -1
- package/dist/esm/split-utils.d.ts.map +1 -1
- package/dist/esm/split-utils.js +4 -2
- package/dist/esm/split-utils.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/widgets/form-file-input-component.d.ts +10 -0
- package/dist/esm/widgets/form-file-input-component.d.ts.map +1 -1
- package/dist/esm/widgets/form-file-input-component.js +11 -1
- package/dist/esm/widgets/form-file-input-component.js.map +1 -1
- package/package.json +19 -19
- package/src/dashboard-layout-plugin.ts +156 -24
- package/src/entity-mutation-ssr-finalize-plugin.ts +110 -0
- package/src/index.ts +9 -0
- package/src/partial.ts +8 -0
- package/src/split-utils.ts +3 -0
- package/src/widgets/form-file-input-component.ts +24 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { FileType, ProjectPluginStructure } from '@teleporthq/teleport-types'
|
|
2
|
+
import { NextDashboardLayoutPlugin } from '../src/dashboard-layout-plugin'
|
|
3
|
+
|
|
4
|
+
function makeStructure(pageLayoutMode?: string): ProjectPluginStructure {
|
|
5
|
+
return {
|
|
6
|
+
uidl: {
|
|
7
|
+
name: 'test-project',
|
|
8
|
+
globals: { settings: { title: 'Test', language: 'en' }, assets: [] },
|
|
9
|
+
root: {} as never,
|
|
10
|
+
...(pageLayoutMode ? { pageLayoutMode } : {}),
|
|
11
|
+
},
|
|
12
|
+
files: new Map(),
|
|
13
|
+
dependencies: {},
|
|
14
|
+
devDependencies: {},
|
|
15
|
+
template: { files: [], subFolders: [] },
|
|
16
|
+
} as unknown as ProjectPluginStructure
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getDashboardCss(structure: ProjectPluginStructure): string {
|
|
20
|
+
const entry = structure.files.get('projectStyleSheet')
|
|
21
|
+
const cssFile = entry?.files.find((f) => f.fileType === FileType.CSS || f.fileType === 'css')
|
|
22
|
+
return (cssFile?.content as string) ?? ''
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
describe('NextDashboardLayoutPlugin', () => {
|
|
26
|
+
it('does nothing when pageLayoutMode is not "dashboard"', async () => {
|
|
27
|
+
const plugin = new NextDashboardLayoutPlugin()
|
|
28
|
+
const structure = makeStructure('standard')
|
|
29
|
+
|
|
30
|
+
await plugin.runAfter(structure)
|
|
31
|
+
|
|
32
|
+
expect(structure.files.has('projectStyleSheet')).toBe(false)
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
it('injects the dashboard layout CSS when pageLayoutMode is "dashboard"', async () => {
|
|
36
|
+
const plugin = new NextDashboardLayoutPlugin()
|
|
37
|
+
const structure = makeStructure('dashboard')
|
|
38
|
+
|
|
39
|
+
await plugin.runAfter(structure)
|
|
40
|
+
|
|
41
|
+
const css = getDashboardCss(structure)
|
|
42
|
+
expect(css).toContain('.teleport-dashboard-layout')
|
|
43
|
+
expect(css).toContain('.teleport-dashboard-sidebar')
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Bug 7 regression — see the long-form rationale comment above
|
|
48
|
+
* `.teleport-dashboard-sidebar nav` in dashboard-layout-plugin.ts: a
|
|
49
|
+
* `max-height` alone leaves the AI-authored nav auto/content-sized
|
|
50
|
+
* (verified live via a minimal repro to stay exactly content-sized, never
|
|
51
|
+
* capped-and-filled), and a `min-height: 100%` companion unconditionally
|
|
52
|
+
* wins over `max-height: 100vh` per the CSS min/max resolution order once
|
|
53
|
+
* the outer stretched sidebar is taller than one viewport — silently
|
|
54
|
+
* un-capping the nav again on exactly the long-page case this fix targets.
|
|
55
|
+
* Only a definite `height: 100vh` (with no competing min/max-height on the
|
|
56
|
+
* same rule) fixes both the visual gap and lets the AI's own inner
|
|
57
|
+
* `height: 100%` mode-wrapper resolve against a real value.
|
|
58
|
+
*/
|
|
59
|
+
it('forces a definite height: 100vh on the sidebar nav (not max-height, not min-height)', async () => {
|
|
60
|
+
const plugin = new NextDashboardLayoutPlugin()
|
|
61
|
+
const structure = makeStructure('dashboard')
|
|
62
|
+
|
|
63
|
+
await plugin.runAfter(structure)
|
|
64
|
+
|
|
65
|
+
const css = getDashboardCss(structure)
|
|
66
|
+
const withoutComments = css.replace(/\/\*[\s\S]*?\*\//g, '')
|
|
67
|
+
const navBlock =
|
|
68
|
+
withoutComments.match(/\.teleport-dashboard-sidebar nav\s*\{[^}]*\}/)?.[0] ?? ''
|
|
69
|
+
|
|
70
|
+
expect(navBlock).not.toEqual('')
|
|
71
|
+
expect(navBlock).toMatch(/height:\s*100vh/)
|
|
72
|
+
expect(navBlock).not.toMatch(/max-height/)
|
|
73
|
+
expect(navBlock).not.toMatch(/min-height/)
|
|
74
|
+
expect(navBlock).toMatch(/position:\s*sticky/)
|
|
75
|
+
expect(navBlock).toMatch(/top:\s*0/)
|
|
76
|
+
expect(navBlock).toMatch(/overflow-y:\s*auto/)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it('appends to an existing stylesheet file instead of overwriting it', async () => {
|
|
80
|
+
const plugin = new NextDashboardLayoutPlugin()
|
|
81
|
+
const structure = makeStructure('dashboard')
|
|
82
|
+
structure.files.set('projectStyleSheet', {
|
|
83
|
+
path: ['pages'],
|
|
84
|
+
files: [{ name: 'style', fileType: FileType.CSS, content: '.existing { color: red; }' }],
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
await plugin.runAfter(structure)
|
|
88
|
+
|
|
89
|
+
const css = getDashboardCss(structure)
|
|
90
|
+
expect(css).toContain('.existing')
|
|
91
|
+
expect(css).toContain('.teleport-dashboard-layout')
|
|
92
|
+
})
|
|
93
|
+
})
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import generator from '@babel/generator'
|
|
2
|
+
import * as types from '@babel/types'
|
|
3
|
+
import { ChunkType, ComponentStructure, FileType } from '@teleporthq/teleport-types'
|
|
4
|
+
import { createEntityMutationSsrFinalizerPlugin } from '../src/entity-mutation-ssr-finalize-plugin'
|
|
5
|
+
|
|
6
|
+
// Regression guard for the "Edit Press Item" ISR-staleness bug: the tail of
|
|
7
|
+
// the page-plugin pipeline must convert a getStaticProps chunk tagged
|
|
8
|
+
// `meta.useServerSideProps` (by teleport-plugin-next-static-props) into an
|
|
9
|
+
// actual getServerSideProps export, and strip any `revalidate` any
|
|
10
|
+
// LATER-running plugin (data-source/pagination/inline-fetch) attached —
|
|
11
|
+
// Next.js hard-errors at build time if `revalidate` is present alongside
|
|
12
|
+
// getServerSideProps.
|
|
13
|
+
|
|
14
|
+
const buildGetStaticPropsFunction = (withRevalidate: boolean, nested = false) => {
|
|
15
|
+
const returnProps = types.objectExpression(
|
|
16
|
+
[
|
|
17
|
+
types.objectProperty(types.identifier('props'), types.objectExpression([])),
|
|
18
|
+
withRevalidate
|
|
19
|
+
? types.objectProperty(types.identifier('revalidate'), types.numericLiteral(60))
|
|
20
|
+
: null,
|
|
21
|
+
].filter(Boolean) as types.ObjectProperty[]
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
const mainReturn = types.returnStatement(returnProps)
|
|
25
|
+
|
|
26
|
+
const body = nested
|
|
27
|
+
? types.blockStatement([
|
|
28
|
+
types.ifStatement(types.booleanLiteral(true), types.blockStatement([mainReturn])),
|
|
29
|
+
])
|
|
30
|
+
: types.blockStatement([mainReturn])
|
|
31
|
+
|
|
32
|
+
const fn = types.functionDeclaration(
|
|
33
|
+
types.identifier('getStaticProps'),
|
|
34
|
+
[types.identifier('context')],
|
|
35
|
+
body,
|
|
36
|
+
false,
|
|
37
|
+
true
|
|
38
|
+
)
|
|
39
|
+
fn.async = true
|
|
40
|
+
return types.exportNamedDeclaration(fn)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const makeStructure = (params: {
|
|
44
|
+
taggedForSSR: boolean
|
|
45
|
+
withRevalidate?: boolean
|
|
46
|
+
nestedReturn?: boolean
|
|
47
|
+
}): ComponentStructure => {
|
|
48
|
+
const { taggedForSSR, withRevalidate = false, nestedReturn = false } = params
|
|
49
|
+
return {
|
|
50
|
+
uidl: { name: 'EditPressItem', node: { type: 'element', content: {} } },
|
|
51
|
+
chunks: [
|
|
52
|
+
{
|
|
53
|
+
name: 'getStaticProps',
|
|
54
|
+
type: ChunkType.AST,
|
|
55
|
+
fileType: FileType.JS,
|
|
56
|
+
content: buildGetStaticPropsFunction(withRevalidate, nestedReturn),
|
|
57
|
+
linkAfter: ['jsx-component'],
|
|
58
|
+
meta: taggedForSSR ? { useServerSideProps: true } : undefined,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
dependencies: {},
|
|
62
|
+
options: {},
|
|
63
|
+
} as unknown as ComponentStructure
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
describe('entity-mutation-ssr-finalize-plugin', () => {
|
|
67
|
+
const plugin = createEntityMutationSsrFinalizerPlugin()
|
|
68
|
+
|
|
69
|
+
it('renames getStaticProps -> getServerSideProps when tagged useServerSideProps', async () => {
|
|
70
|
+
const structure = makeStructure({ taggedForSSR: true })
|
|
71
|
+
const result = await plugin(structure)
|
|
72
|
+
|
|
73
|
+
const chunk = result.chunks.find((c) => c.name === 'getServerSideProps')
|
|
74
|
+
expect(chunk).toBeDefined()
|
|
75
|
+
expect(result.chunks.find((c) => c.name === 'getStaticProps')).toBeUndefined()
|
|
76
|
+
|
|
77
|
+
const code = generator(chunk?.content as types.Node).code
|
|
78
|
+
expect(code).toContain('export async function getServerSideProps(context)')
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
it('strips a top-level revalidate property added by a later-running plugin', async () => {
|
|
82
|
+
const structure = makeStructure({ taggedForSSR: true, withRevalidate: true })
|
|
83
|
+
const result = await plugin(structure)
|
|
84
|
+
|
|
85
|
+
const chunk = result.chunks.find((c) => c.name === 'getServerSideProps')
|
|
86
|
+
const code = generator(chunk?.content as types.Node).code
|
|
87
|
+
expect(code).not.toContain('revalidate')
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
it('strips a revalidate property nested inside an if-branch return', async () => {
|
|
91
|
+
const structure = makeStructure({
|
|
92
|
+
taggedForSSR: true,
|
|
93
|
+
withRevalidate: true,
|
|
94
|
+
nestedReturn: true,
|
|
95
|
+
})
|
|
96
|
+
const result = await plugin(structure)
|
|
97
|
+
|
|
98
|
+
const chunk = result.chunks.find((c) => c.name === 'getServerSideProps')
|
|
99
|
+
const code = generator(chunk?.content as types.Node).code
|
|
100
|
+
expect(code).not.toContain('revalidate')
|
|
101
|
+
expect(code).toContain('props: {}')
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
it('is a no-op when the chunk is not tagged useServerSideProps (regular static page)', async () => {
|
|
105
|
+
const structure = makeStructure({ taggedForSSR: false, withRevalidate: true })
|
|
106
|
+
const result = await plugin(structure)
|
|
107
|
+
|
|
108
|
+
const chunk = result.chunks.find((c) => c.name === 'getStaticProps')
|
|
109
|
+
expect(chunk).toBeDefined()
|
|
110
|
+
expect(result.chunks.find((c) => c.name === 'getServerSideProps')).toBeUndefined()
|
|
111
|
+
|
|
112
|
+
const code = generator(chunk?.content as types.Node).code
|
|
113
|
+
expect(code).toContain('export async function getStaticProps(context)')
|
|
114
|
+
expect(code).toContain('revalidate')
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
it('is a no-op when there is no getStaticProps chunk at all', async () => {
|
|
118
|
+
const structure = {
|
|
119
|
+
uidl: { name: 'Home', node: { type: 'element', content: {} } },
|
|
120
|
+
chunks: [{ name: 'jsx-component', type: ChunkType.AST, fileType: FileType.JS, content: {} }],
|
|
121
|
+
dependencies: {},
|
|
122
|
+
options: {},
|
|
123
|
+
} as unknown as ComponentStructure
|
|
124
|
+
|
|
125
|
+
const result = await plugin(structure)
|
|
126
|
+
expect(result.chunks).toHaveLength(1)
|
|
127
|
+
expect(result.chunks[0].name).toBe('jsx-component')
|
|
128
|
+
})
|
|
129
|
+
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-layout-plugin.d.ts","sourceRoot":"","sources":["../../src/dashboard-layout-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"dashboard-layout-plugin.d.ts","sourceRoot":"","sources":["../../src/dashboard-layout-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAoQ5F,qBAAa,yBAA0B,YAAW,aAAa;IACvD,SAAS,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAI7E,QAAQ,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAoCnF"}
|
|
@@ -38,7 +38,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.NextDashboardLayoutPlugin = void 0;
|
|
40
40
|
var teleport_types_1 = require("@teleporthq/teleport-types");
|
|
41
|
-
var DASHBOARD_CSS = "\n.teleport-dashboard-layout {\n display: flex;\n min-height: 100vh;\n width: 100%;\n}\n\n.teleport-dashboard-sidebar {\n flex-shrink: 0;\n height: 100vh;\n position: sticky;\n top: 0;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 200;\n}\n\n.teleport-dashboard-content {\n flex: 1;\n min-width: 0;\n overflow-x: hidden;\n display: flex;\n flex-direction: column;\n}\n\n.teleport-dashboard-topbar {\n position: sticky;\n top: 0;\n z-index: 100;\n display: flex;\n align-items: center;\n gap: 1rem;\n padding: 0.75rem 1.5rem;\n background: var(--color-surface, #ffffff);\n border-bottom: 1px solid var(--color-neutral, #e5e7eb);\n}\n\n.teleport-mobile-sidebar-toggle {\n display: none;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n padding: 0.5rem;\n font-size: 1.5rem;\n line-height: 1;\n}\n\n.teleport-sidebar-scrim {\n display: none;\n position: fixed;\n inset: 0;\n z-index: 999;\n background: rgba(0, 0, 0, 0.5);\n}\n\n/* COLLAPSED SIDEBAR RAIL \u2014 right-side flyout escape. The collapsed variant\n (state.sidebarMode === 'collapsed') opens grouped submenus as a flyout to the\n right of the rail (position: absolute; left: 100%). Scrollable ancestors\n (the AI nav's overflow-y:auto scroll area, this wrapper's overflow-x:hidden)\n clip that horizontal overflow and hide the panel. Detect the collapsed rail\n by its mandatory #sidebar-expand-btn (collapsed branch only) and drop the\n clipping on the rail + its descendants so the flyout is visible. The rail is\n icon-only and short, so losing its internal scroll is a safe trade. */\n.teleport-dashboard-sidebar:has(#sidebar-expand-btn),\n.teleport-dashboard-sidebar:has(#sidebar-expand-btn) * {\n overflow: visible;\n}\n\n@media (max-width: 767px) {\n .teleport-mobile-sidebar-toggle {\n display: flex;\n }\n\n .teleport-dashboard-sidebar {\n position: fixed;\n left: 0;\n top: 0;\n height: 100vh;\n z-index: 1000;\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n }\n\n .teleport-dashboard-sidebar.sidebar-open {\n transform: translateX(0);\n }\n\n .teleport-sidebar-scrim.scrim-visible {\n display: block;\n }\n}\n\n/* SELF-MANAGED SIDEBAR NAV \u2014 opt out of the platform mobile drawer. A\n three-mode sidebar nav (state.sidebarMode) ships its own position:fixed\n hamburger (#sidebar-mobile-open) + overlay. The platform drawer's\n translateX(-100%) would make .teleport-dashboard-sidebar the containing block\n for those fixed descendants and shove them off-screen (blank nav on mobile),\n so make the wrapper inert and hide the redundant platform topbar + scrim. */\n@media (max-width: 767px) {\n .teleport-dashboard-sidebar:has(#sidebar-mobile-open) {\n position: static;\n transform: none;\n transition: none;\n width: auto;\n height: auto;\n overflow: visible;\n z-index: auto;\n }\n\n :root:has(.teleport-dashboard-sidebar #sidebar-mobile-open) .teleport-dashboard-topbar,\n :root:has(.teleport-dashboard-sidebar #sidebar-mobile-open) .teleport-sidebar-scrim {\n display: none !important;\n }\n}\n\n@media print {\n .teleport-dashboard-sidebar,\n .teleport-mobile-sidebar-toggle,\n .teleport-sidebar-scrim {\n display: none !important;\n }\n}\n".trim();
|
|
41
|
+
var DASHBOARD_CSS = "\n.teleport-dashboard-layout {\n display: flex;\n min-height: 100vh;\n width: 100%;\n}\n\n.teleport-dashboard-sidebar {\n /* Fixed column width on desktop. Without it the sidebar's width is\n content-driven (the generated <nav> ships an inline width:100% that\n overrides its own .navigation-sidebar{width:280px} rule), so while the\n content region is still empty during streaming the non-shrinkable sidebar\n dominates the row and hides the page content. The collapsed-rail rule\n (:has(#sidebar-expand-btn), above) hugs this to the icon-rail width, and\n the mobile (overlay) media query below overrides it. */\n width: var(--dashboard-sidebar-width, 280px);\n flex-shrink: 0;\n /* Bug 5.3 \u2014 stretch (the flex default for a row container) to match\n .teleport-dashboard-content's FULL height, whatever that is, instead of\n the previous fixed height:100vh. A flex item with a fixed 100vh height\n never grows with a taller sibling, so once page content exceeds one\n viewport height the sidebar's painted box simply stops after 100vh and\n whatever renders behind it shows for the rest of the scroll (run\n 2026-07-07 \"Edit Episode\"). The sticky/scroll behaviour that USED to live\n here moves to the '> *' rule below, applied to the sidebar's own content\n (the AI nav root), so it still visually pins to the viewport while the\n OUTER box always spans the true full content height. */\n align-self: stretch;\n z-index: 200;\n}\n\n/* Bug 5.3 \u2014 the sidebar's own sticky/scroll behaviour lives on its immediate\n content (the AI-generated nav root), NOT on the outer .teleport-dashboard-\n sidebar wrapper (which now stretches to the full content height above).\n This is the \"inner box\" half of the fix: pinned to the viewport top, capped\n at one viewport height, independently scrollable if the nav itself is\n taller than that \u2014 while the outer wrapper's box keeps growing to match\n whatever the content column's real height ends up being. */\n.teleport-dashboard-sidebar > * {\n position: sticky;\n top: 0;\n max-height: 100vh;\n overflow-y: auto;\n overflow-x: clip;\n}\n\n/* Bug 7 \u2014 the AI-authored nav root routinely ships with NO height at all\n despite the navigation prompt's explicit instruction to give its <tq-if>\n mode-wrapper \"height: 100%\" (which fills the <nav> host ONLY if that host\n itself has a definite height) \u2014 so it stays auto/content-sized (703px\n measured live) INSIDE the correctly Bug-5.3-stretched sidebar host (5094px\n measured live), leaving a large visible gap for the rest of the page's\n scroll (run 2026-07-07 \"Add Tour Date\" published site,\n https://fortunate-admirable-lyrebird-k28mpt.teleporthq.dev). This used to\n be scoped via nav[aria-label=\"Dashboard navigation\"] \u2014 but the generated\n nav root never actually carries that aria-label (only an unrelated mobile\n overlay drawer does, aria-label=\"Mobile navigation\"), so that selector\n silently never matched anything (confirmed live at\n https://grown-jaunty-kookabura-0ls4mo.teleporthq.dev \u2014 the \"strange\n scrolling\" report). Target the plain <nav> tag as a descendant of the\n sidebar instead: the nav-generation contract already mandates exactly one\n <nav> there, this reaches it through any number of display:contents\n wrapper divs, and it needs no aria-label / component-instance class name to\n match. Layered ALONGSIDE (not replacing) the '> *' rule above, which still\n matters for any other, non-<nav> direct content.\n\n height: 100vh (NOT max-height: 100vh \u2014 verified live: a max-height\n with no height leaves the box auto/content-sized, reproducing the exact\n 703px symptom, since max-height only CAPS a box, it never makes it\n definite) is what actually fixes both halves of Bug 7: it forces nav's own\n painted box (which already carries its own background per the\n generation contract) to always span a full viewport height so there is\n never a gap, AND \u2014 just as importantly \u2014 gives nav a definite height so\n the AI's inner height: 100% mode-wrapper (see HEIGHT rule in\n navigation.ts) has something real to resolve against, instead of computing\n against an indeterminate auto-height parent (where percentage heights are\n spec'd to resolve to nothing). A min-height: 100% companion here was\n tried and reverted: since 100% reads off the OUTER stretched sidebar\n (which can be thousands of px on a long page), a min-height that large\n unconditionally wins over max-height: 100vh per the CSS min/max\n resolution order \u2014 verified live via a minimal repro \u2014 silently\n un-capping nav back to the full unstretched height and defeating the\n sticky/scroll behavior on exactly the long-page case this fix targets. */\n.teleport-dashboard-sidebar nav {\n position: sticky;\n top: 0;\n height: 100vh;\n overflow-y: auto;\n overflow-x: clip;\n}\n\n.teleport-dashboard-content {\n flex: 1;\n min-width: 0;\n overflow-x: hidden;\n display: flex;\n flex-direction: column;\n}\n\n.teleport-dashboard-topbar {\n position: sticky;\n top: 0;\n z-index: 100;\n /* Hidden on desktop: it now hosts only the mobile sidebar toggle (no\n page-name title). Shown on mobile via the max-width:767px media query. */\n display: none;\n align-items: center;\n gap: 1rem;\n padding: 0.75rem 1.5rem;\n background: var(--color-surface, #ffffff);\n border-bottom: 1px solid var(--color-neutral, #e5e7eb);\n}\n\n.teleport-mobile-sidebar-toggle {\n display: none;\n background: none;\n border: none;\n cursor: pointer;\n padding: 0.5rem;\n color: var(--color-on-surface, #1f2937);\n}\n\n.teleport-dashboard-main {\n flex: 1;\n}\n\n.teleport-dashboard-page-title {\n font-size: 1.25rem;\n font-weight: 600;\n color: var(--color-on-surface, #1f2937);\n margin: 0;\n}\n\n.teleport-sidebar-scrim {\n display: none;\n position: fixed;\n inset: 0;\n z-index: 999;\n background: rgba(0, 0, 0, 0.5);\n}\n\n/* COLLAPSED SIDEBAR RAIL \u2014 width hug + right-side flyout escape.\n The three-mode nav's collapsed variant (state.sidebarMode === 'collapsed')\n is a narrow icon rail whose grouped items open a submenu FLYOUT to the right\n (position: absolute; left: 100%). That flyout is clipped away by the\n scrollable ancestors between it and the rail \u2014 the AI nav's own scroll area\n (overflow-y: auto) AND this wrapper (overflow-x: clip). A vertically\n scrollable box can never reveal horizontal overflow, so the panel vanishes\n underneath the rail. We detect the collapsed rail by its mandatory expand\n button (#sidebar-expand-btn \u2014 present ONLY in the collapsed <tq-if> branch)\n and, scoped to that rail only:\n 1. hug the wrapper to the rail's own width so it no longer reserves the\n 280px desktop column (which would otherwise leave a dead gap beside the\n icon rail once the fixed-width fallback no longer applies), and\n 2. drop the overflow clipping on the rail and every descendant so the\n right-side flyout is fully visible next to the rail.\n The collapsed rail is icon-only and short, so trading its (rarely needed)\n internal scroll for a visible flyout is a safe exchange. Expanded and mobile\n views are untouched and keep their scroll. */\n.teleport-dashboard-sidebar:has(#sidebar-expand-btn) {\n width: fit-content;\n overflow: visible;\n}\n\n.teleport-dashboard-sidebar:has(#sidebar-expand-btn) * {\n overflow: visible;\n}\n\n@media (max-width: 767px) {\n .teleport-dashboard-topbar {\n display: flex;\n }\n\n .teleport-mobile-sidebar-toggle {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .teleport-dashboard-sidebar {\n position: fixed;\n left: 0;\n top: 0;\n height: 100vh;\n z-index: 1000;\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n }\n\n .teleport-dashboard-sidebar.sidebar-open {\n transform: translateX(0);\n }\n\n .teleport-sidebar-scrim.scrim-visible {\n display: block;\n }\n}\n\n/* SELF-MANAGED SIDEBAR NAV \u2014 opt out of the platform mobile drawer.\n AI dashboard navigations are generated as a three-mode sidebar\n (state.sidebarMode = expanded | collapsed | mobile) that ships its OWN mobile\n experience: a position:fixed hamburger (#sidebar-mobile-open) plus a\n position:fixed full-screen overlay. The platform mobile drawer above must NOT\n take over for them. Its `transform: translateX(-100%)` turns\n .teleport-dashboard-sidebar into the CONTAINING BLOCK for those position:fixed\n descendants (a transformed ancestor anchors fixed children), shoving the\n nav's own trigger AND overlay off-screen with the wrapper \u2014 so the nav paints\n blank on mobile. We detect the self-managed nav by its mandatory\n #sidebar-mobile-open trigger and make the wrapper inert (no transform, no\n fixed column) so the nav's viewport-fixed trigger/overlay drive mobile. */\n@media (max-width: 767px) {\n .teleport-dashboard-sidebar:has(#sidebar-mobile-open) {\n position: static;\n transform: none;\n transition: none;\n width: auto;\n height: auto;\n overflow: visible;\n z-index: auto;\n }\n\n /* Neutralize the Bug 5.3 inner sticky/scroll wrapper too \u2014 otherwise it\n would still clip/scroll-contain the self-managed nav's own position:fixed\n mobile overlay the same way the outer wrapper's overflow used to. */\n .teleport-dashboard-sidebar:has(#sidebar-mobile-open) > * {\n position: static;\n max-height: none;\n overflow: visible;\n }\n\n /* The self-managed nav supplies its own hamburger + overlay backdrop, so the\n platform's redundant topbar toggle and scrim must not appear \u2014 otherwise a\n second hamburger shows and the scrim's .sidebar-open would re-introduce the\n trapping transform. Scoped from :root so it matches wherever the topbar /\n scrim live (inside the layout, a sibling of it, or appended to <body>). */\n :root:has(.teleport-dashboard-sidebar #sidebar-mobile-open) .teleport-dashboard-topbar,\n :root:has(.teleport-dashboard-sidebar #sidebar-mobile-open) .teleport-sidebar-scrim {\n display: none !important;\n }\n}\n\n@media print {\n .teleport-dashboard-layout {\n display: block;\n }\n .teleport-dashboard-sidebar,\n .teleport-mobile-sidebar-toggle,\n .teleport-sidebar-scrim,\n .teleport-dashboard-topbar {\n display: none !important;\n }\n .teleport-dashboard-content {\n margin: 0;\n width: 100%;\n }\n}\n".trim();
|
|
42
42
|
var NextDashboardLayoutPlugin = /** @class */ (function () {
|
|
43
43
|
function NextDashboardLayoutPlugin() {
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-layout-plugin.js","sourceRoot":"","sources":["../../src/dashboard-layout-plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA4F;AAE5F,IAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"dashboard-layout-plugin.js","sourceRoot":"","sources":["../../src/dashboard-layout-plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA4F;AAE5F,IAAM,aAAa,GAAG,q4UAgQrB,CAAC,IAAI,EAAE,CAAA;AAER;IAAA;IAyCA,CAAC;IAxCO,6CAAS,GAAf,UAAgB,SAAiC;;;gBAC/C,sBAAO,SAAS,EAAA;;;KACjB;IAEK,4CAAQ,GAAd,UAAe,SAAiC;;;;gBACtC,IAAI,GAAY,SAAS,KAArB,EAAE,KAAK,GAAK,SAAS,MAAd,CAAc;gBAC3B,cAAc,GAAI,IAA2C,CAAC,cAAc,CAAA;gBAClF,IAAI,cAAc,KAAK,WAAW,EAAE;oBAClC,sBAAO,SAAS,EAAA;iBACjB;gBAEK,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;gBACtD,IAAI,eAAe,IAAI,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;oBACjD,OAAO,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CACxC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,QAAQ,KAAK,yBAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,QAAQ,KAAK,KAAK,EAAnD,CAAmD,CAC3D,CAAA;oBACD,IAAI,OAAO,EAAE;wBACX,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,GAAG,aAAa,CAAA;qBAC3D;yBAAM;wBACL,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC;4BACzB,IAAI,EAAE,OAAO;4BACb,QAAQ,EAAE,yBAAQ,CAAC,GAAG;4BACtB,OAAO,EAAE,aAAa;yBACvB,CAAC,CAAA;qBACH;iBACF;qBAAM;oBACL,KAAK,CAAC,GAAG,CAAC,mBAAmB,EAAE;wBAC7B,IAAI,EAAE,CAAC,OAAO,CAAC;wBACf,KAAK,EAAE;4BACL;gCACE,IAAI,EAAE,OAAO;gCACb,QAAQ,EAAE,yBAAQ,CAAC,GAAG;gCACtB,OAAO,EAAE,aAAa;6BACvB;yBACF;qBACF,CAAC,CAAA;iBACH;gBAED,sBAAO,SAAS,EAAA;;;KACjB;IACH,gCAAC;AAAD,CAAC,AAzCD,IAyCC;AAzCY,8DAAyB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentPlugin, ComponentPluginFactory } from '@teleporthq/teleport-types';
|
|
2
|
+
/**
|
|
3
|
+
* Tail-of-pipeline finalizer for entity-bound pages that
|
|
4
|
+
* `createStaticPropsPlugin` (teleport-plugin-next-static-props) tagged with
|
|
5
|
+
* `meta.useServerSideProps` on the 'getStaticProps' chunk — i.e. dynamic
|
|
6
|
+
* pages that read one specific row AND have a same-page workflow that
|
|
7
|
+
* writes to that same table (see `pageHasSameTableMutationWorkflow`'s doc in
|
|
8
|
+
* that package for why this is a data-correctness signal, independent of
|
|
9
|
+
* the project's visual nav layout).
|
|
10
|
+
*
|
|
11
|
+
* Every OTHER page plugin that fetches data (inline-fetch, data-source,
|
|
12
|
+
* pagination, state-data-source, locale-fetcher) finds / merges additional
|
|
13
|
+
* fetches into that chunk by its literal name `'getStaticProps'` — so the
|
|
14
|
+
* chunk MUST keep that name for the entire per-page plugin pipeline, or
|
|
15
|
+
* every one of those lookups would miss and each would spawn its OWN
|
|
16
|
+
* second, conflicting `getStaticProps` function on the same page. This
|
|
17
|
+
* plugin is registered LAST (after every data-fetching plugin) and performs
|
|
18
|
+
* the actual getStaticProps -> getServerSideProps conversion once nothing
|
|
19
|
+
* downstream needs to find the chunk by its original name:
|
|
20
|
+
* 1. Renames the function identifier + the chunk itself.
|
|
21
|
+
* 2. Strips any `revalidate` property later plugins attached (invalid on
|
|
22
|
+
* getServerSideProps — Next.js throws a build-time error if present).
|
|
23
|
+
*/
|
|
24
|
+
export declare const createEntityMutationSsrFinalizerPlugin: ComponentPluginFactory<Record<string, never>>;
|
|
25
|
+
declare const _default: ComponentPlugin;
|
|
26
|
+
export default _default;
|
|
27
|
+
//# sourceMappingURL=entity-mutation-ssr-finalize-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-mutation-ssr-finalize-plugin.d.ts","sourceRoot":"","sources":["../../src/entity-mutation-ssr-finalize-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,eAAe,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AA0D/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sCAAsC,EAAE,sBAAsB,CACzE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAyBtB,CAAA;;AAED,wBAAuD"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
+
function step(op) {
|
|
39
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
+
switch (op[0]) {
|
|
44
|
+
case 0: case 1: t = op; break;
|
|
45
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
+
default:
|
|
49
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
+
if (t[2]) _.ops.pop();
|
|
54
|
+
_.trys.pop(); continue;
|
|
55
|
+
}
|
|
56
|
+
op = body.call(thisArg, _);
|
|
57
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
+
exports.createEntityMutationSsrFinalizerPlugin = void 0;
|
|
63
|
+
var types = __importStar(require("@babel/types"));
|
|
64
|
+
var teleport_types_1 = require("@teleporthq/teleport-types");
|
|
65
|
+
var SKIP_WALK_KEYS = new Set([
|
|
66
|
+
'loc',
|
|
67
|
+
'range',
|
|
68
|
+
'start',
|
|
69
|
+
'end',
|
|
70
|
+
'leadingComments',
|
|
71
|
+
'trailingComments',
|
|
72
|
+
]);
|
|
73
|
+
/**
|
|
74
|
+
* Recursively strips a `revalidate` property from every `return { ... }`
|
|
75
|
+
* object literal reachable from `node`. ISR's `revalidate` is meaningless
|
|
76
|
+
* (and a hard Next.js build error — "Additional keys were returned from
|
|
77
|
+
* getServerSideProps") once a page has been converted to
|
|
78
|
+
* getServerSideProps, but several upstream page plugins (data-source,
|
|
79
|
+
* inline-fetch, pagination, state-data-source) unconditionally attach one
|
|
80
|
+
* when they first CREATE the getStaticProps chunk. Walking generically
|
|
81
|
+
* (rather than only the single return statement `generateInitialPropsAST`
|
|
82
|
+
* itself emits) catches every one of those regardless of which plugin
|
|
83
|
+
* added it or how deeply nested inside try/catch or if-branches it is.
|
|
84
|
+
*/
|
|
85
|
+
function stripRevalidateFromReturns(node) {
|
|
86
|
+
var _a;
|
|
87
|
+
if (!node || typeof node !== 'object') {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
var anyNode = node;
|
|
91
|
+
if (anyNode.type === 'ReturnStatement' &&
|
|
92
|
+
((_a = anyNode.argument) === null || _a === void 0 ? void 0 : _a.type) === 'ObjectExpression') {
|
|
93
|
+
var objectExpression = anyNode.argument;
|
|
94
|
+
objectExpression.properties = objectExpression.properties.filter(function (property) {
|
|
95
|
+
return !(property.type === 'ObjectProperty' &&
|
|
96
|
+
property.key.type === 'Identifier' &&
|
|
97
|
+
property.key.name === 'revalidate');
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
for (var _i = 0, _b = Object.keys(anyNode); _i < _b.length; _i++) {
|
|
101
|
+
var key = _b[_i];
|
|
102
|
+
if (SKIP_WALK_KEYS.has(key))
|
|
103
|
+
continue;
|
|
104
|
+
var value = anyNode[key];
|
|
105
|
+
if (Array.isArray(value)) {
|
|
106
|
+
for (var _c = 0, value_1 = value; _c < value_1.length; _c++) {
|
|
107
|
+
var child = value_1[_c];
|
|
108
|
+
if (child && typeof child.type === 'string') {
|
|
109
|
+
stripRevalidateFromReturns(child);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else if (value && typeof value.type === 'string') {
|
|
114
|
+
stripRevalidateFromReturns(value);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Tail-of-pipeline finalizer for entity-bound pages that
|
|
120
|
+
* `createStaticPropsPlugin` (teleport-plugin-next-static-props) tagged with
|
|
121
|
+
* `meta.useServerSideProps` on the 'getStaticProps' chunk — i.e. dynamic
|
|
122
|
+
* pages that read one specific row AND have a same-page workflow that
|
|
123
|
+
* writes to that same table (see `pageHasSameTableMutationWorkflow`'s doc in
|
|
124
|
+
* that package for why this is a data-correctness signal, independent of
|
|
125
|
+
* the project's visual nav layout).
|
|
126
|
+
*
|
|
127
|
+
* Every OTHER page plugin that fetches data (inline-fetch, data-source,
|
|
128
|
+
* pagination, state-data-source, locale-fetcher) finds / merges additional
|
|
129
|
+
* fetches into that chunk by its literal name `'getStaticProps'` — so the
|
|
130
|
+
* chunk MUST keep that name for the entire per-page plugin pipeline, or
|
|
131
|
+
* every one of those lookups would miss and each would spawn its OWN
|
|
132
|
+
* second, conflicting `getStaticProps` function on the same page. This
|
|
133
|
+
* plugin is registered LAST (after every data-fetching plugin) and performs
|
|
134
|
+
* the actual getStaticProps -> getServerSideProps conversion once nothing
|
|
135
|
+
* downstream needs to find the chunk by its original name:
|
|
136
|
+
* 1. Renames the function identifier + the chunk itself.
|
|
137
|
+
* 2. Strips any `revalidate` property later plugins attached (invalid on
|
|
138
|
+
* getServerSideProps — Next.js throws a build-time error if present).
|
|
139
|
+
*/
|
|
140
|
+
var createEntityMutationSsrFinalizerPlugin = function () {
|
|
141
|
+
var entityMutationSsrFinalizerPlugin = function (structure) { return __awaiter(void 0, void 0, void 0, function () {
|
|
142
|
+
var chunks, getStaticPropsChunk, exportDeclaration, functionDeclaration;
|
|
143
|
+
return __generator(this, function (_a) {
|
|
144
|
+
chunks = structure.chunks;
|
|
145
|
+
getStaticPropsChunk = chunks.find(function (chunk) { var _a; return chunk.name === 'getStaticProps' && ((_a = chunk.meta) === null || _a === void 0 ? void 0 : _a.useServerSideProps) === true; });
|
|
146
|
+
if (!getStaticPropsChunk || getStaticPropsChunk.type !== teleport_types_1.ChunkType.AST) {
|
|
147
|
+
return [2 /*return*/, structure];
|
|
148
|
+
}
|
|
149
|
+
exportDeclaration = getStaticPropsChunk.content;
|
|
150
|
+
functionDeclaration = exportDeclaration === null || exportDeclaration === void 0 ? void 0 : exportDeclaration.declaration;
|
|
151
|
+
if (!functionDeclaration || functionDeclaration.type !== 'FunctionDeclaration') {
|
|
152
|
+
return [2 /*return*/, structure];
|
|
153
|
+
}
|
|
154
|
+
functionDeclaration.id = types.identifier('getServerSideProps');
|
|
155
|
+
getStaticPropsChunk.name = 'getServerSideProps';
|
|
156
|
+
stripRevalidateFromReturns(functionDeclaration.body);
|
|
157
|
+
return [2 /*return*/, structure];
|
|
158
|
+
});
|
|
159
|
+
}); };
|
|
160
|
+
return entityMutationSsrFinalizerPlugin;
|
|
161
|
+
};
|
|
162
|
+
exports.createEntityMutationSsrFinalizerPlugin = createEntityMutationSsrFinalizerPlugin;
|
|
163
|
+
exports.default = (0, exports.createEntityMutationSsrFinalizerPlugin)();
|
|
164
|
+
//# sourceMappingURL=entity-mutation-ssr-finalize-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-mutation-ssr-finalize-plugin.js","sourceRoot":"","sources":["../../src/entity-mutation-ssr-finalize-plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqC;AACrC,6DAA+F;AAE/F,IAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAC7B,KAAK;IACL,OAAO;IACP,OAAO;IACP,KAAK;IACL,iBAAiB;IACjB,kBAAkB;CACnB,CAAC,CAAA;AAEF;;;;;;;;;;;GAWG;AACH,SAAS,0BAA0B,CAAC,IAAa;;IAC/C,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACrC,OAAM;KACP;IACD,IAAM,OAAO,GAAG,IAAmD,CAAA;IAEnE,IACE,OAAO,CAAC,IAAI,KAAK,iBAAiB;QAClC,CAAA,MAAC,OAAO,CAAC,QAA0C,0CAAE,IAAI,MAAK,kBAAkB,EAChF;QACA,IAAM,gBAAgB,GAAG,OAAO,CAAC,QAAkC,CAAA;QACnE,gBAAgB,CAAC,UAAU,GAAG,gBAAgB,CAAC,UAAU,CAAC,MAAM,CAAC,UAAC,QAAQ;YACxE,OAAO,CAAC,CACN,QAAQ,CAAC,IAAI,KAAK,gBAAgB;gBAClC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY;gBAClC,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY,CACnC,CAAA;QACH,CAAC,CAAC,CAAA;KACH;IAED,KAAkB,UAAoB,EAApB,KAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAApB,cAAoB,EAApB,IAAoB,EAAE;QAAnC,IAAM,GAAG,SAAA;QACZ,IAAI,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,SAAQ;QACrC,IAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;QAC1B,IAAI,KAAK,CAA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AAA;YAEpD,sBAAO,SAAS,EAAA;;SACjB,CAAA;IAED,OAAO,gCAAgC,CAAA;AACzC,CAAC,CAAA;AA1BY,QAAA,sCAAsC,0CA0BlD;AAED,kBAAe,IAAA,8CAAsC,GAAE,CAAA"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export { NextAIChatProjectPlugin } from './ai-chat/project-plugin';
|
|
|
34
34
|
export { NextAnalyticsProjectPlugin } from './analytics/project-plugin';
|
|
35
35
|
export { NextEcommerceProjectPlugin } from './ecommerce/project-plugin';
|
|
36
36
|
export { NextDashboardLayoutPlugin } from './dashboard-layout-plugin';
|
|
37
|
+
export { createEntityMutationSsrFinalizerPlugin } from './entity-mutation-ssr-finalize-plugin';
|
|
37
38
|
export { NextRichTextEditorProjectPlugin } from './rich-text-editor/project-plugin';
|
|
38
39
|
export { createRichTextEditorComponentPlugin } from './rich-text-editor/component-plugin';
|
|
39
40
|
export { NextCalendarKitProjectPlugin } from './calendar/project-plugin';
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAiC,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAIzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,YAAY,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAiC,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAIzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,YAAY,MAAM,oBAAoB,CAAA;AA+B7C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,wBAAwB,QAAO,aAAa,EAgBxD,CAAA;AAED,QAAA,MAAM,0BAA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E,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAA;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAA;AAC/F,OAAO,EAAE,oCAAoC,EAAE,MAAM,gDAAgD,CAAA;AACrG,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAA;AAChF,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,GACpC,MAAM,8CAA8C,CAAA;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAA;AACtD,YAAY,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.splitProjectUIDL = exports.createNextPartialGenerator = exports.createNextComponentDataSourcePlugin = exports.createNextPagesDataSourcePlugin = exports.createNextFormSubmissionPlugin = exports.createNextInternationalizationPlugin = exports.createNextLocaleFetcherPlugin = exports.NextWorkflowProjectPlugin = exports.NextDataSourceUtilityPlugin = exports.NextDataSourceDependenciesPlugin = exports.NextProjectPlugini18nConfig = exports.NextFormsCaptchaScriptPlugin = exports.INTERACTIVE_PRIMITIVE_COMPONENT_FILES = exports.createLocalComponentPathPlugin = exports.generateCountdownComponentCode = exports.generateKanbanComponentCode = exports.generateDragDropComponentCode = exports.createNextWidgetProjectPlugins = exports.NextCountdownProjectPlugin = exports.NextKanbanProjectPlugin = exports.NextDragDropProjectPlugin = exports.CALENDARKIT_VERSION = exports.CALENDARKIT_CSS = exports.NextCalendarKitProjectPlugin = exports.createRichTextEditorComponentPlugin = exports.NextRichTextEditorProjectPlugin = exports.NextDashboardLayoutPlugin = exports.NextEcommerceProjectPlugin = exports.NextAnalyticsProjectPlugin = exports.NextAIChatProjectPlugin = exports.NextGlobalStateProjectPlugin = exports.createNextGlobalStateComponentPlugin = exports.NextTemplate = exports.NextProjectMapping = exports.createNextProjectGenerator = exports.createNextProjectPlugins = void 0;
|
|
15
|
+
exports.splitProjectUIDL = exports.createNextPartialGenerator = exports.createNextComponentDataSourcePlugin = exports.createNextPagesDataSourcePlugin = exports.createNextFormSubmissionPlugin = exports.createNextInternationalizationPlugin = exports.createNextLocaleFetcherPlugin = exports.NextWorkflowProjectPlugin = exports.NextDataSourceUtilityPlugin = exports.NextDataSourceDependenciesPlugin = exports.NextProjectPlugini18nConfig = exports.NextFormsCaptchaScriptPlugin = exports.INTERACTIVE_PRIMITIVE_COMPONENT_FILES = exports.createLocalComponentPathPlugin = exports.generateCountdownComponentCode = exports.generateKanbanComponentCode = exports.generateDragDropComponentCode = exports.createNextWidgetProjectPlugins = exports.NextCountdownProjectPlugin = exports.NextKanbanProjectPlugin = exports.NextDragDropProjectPlugin = exports.CALENDARKIT_VERSION = exports.CALENDARKIT_CSS = exports.NextCalendarKitProjectPlugin = exports.createRichTextEditorComponentPlugin = exports.NextRichTextEditorProjectPlugin = exports.createEntityMutationSsrFinalizerPlugin = exports.NextDashboardLayoutPlugin = exports.NextEcommerceProjectPlugin = exports.NextAnalyticsProjectPlugin = exports.NextAIChatProjectPlugin = exports.NextGlobalStateProjectPlugin = exports.createNextGlobalStateComponentPlugin = exports.NextTemplate = exports.NextProjectMapping = exports.createNextProjectGenerator = exports.createNextProjectPlugins = void 0;
|
|
16
16
|
var teleport_postprocessor_prettier_js_1 = __importDefault(require("@teleporthq/teleport-postprocessor-prettier-js"));
|
|
17
17
|
var teleport_plugin_jsx_next_image_1 = __importDefault(require("@teleporthq/teleport-plugin-jsx-next-image"));
|
|
18
18
|
var teleport_plugin_import_statements_1 = __importDefault(require("@teleporthq/teleport-plugin-import-statements"));
|
|
@@ -46,6 +46,7 @@ var project_plugin_3 = require("./analytics/project-plugin");
|
|
|
46
46
|
var project_plugin_4 = require("./nav-active-link/project-plugin");
|
|
47
47
|
var project_plugin_5 = require("./ecommerce/project-plugin");
|
|
48
48
|
var dashboard_layout_plugin_1 = require("./dashboard-layout-plugin");
|
|
49
|
+
var entity_mutation_ssr_finalize_plugin_1 = require("./entity-mutation-ssr-finalize-plugin");
|
|
49
50
|
var project_plugin_6 = require("./rich-text-editor/project-plugin");
|
|
50
51
|
var component_plugin_2 = require("./rich-text-editor/component-plugin");
|
|
51
52
|
var project_plugin_7 = require("./calendar/project-plugin");
|
|
@@ -131,6 +132,7 @@ var createNextProjectGenerator = function () {
|
|
|
131
132
|
var richTextEditorComponentPlugin = (0, component_plugin_2.createRichTextEditorComponentPlugin)({
|
|
132
133
|
basePath: ['components'],
|
|
133
134
|
});
|
|
135
|
+
var entityMutationSsrFinalizerPlugin = (0, entity_mutation_ssr_finalize_plugin_1.createEntityMutationSsrFinalizerPlugin)();
|
|
134
136
|
var generator = (0, teleport_project_generator_1.createProjectGenerator)({
|
|
135
137
|
id: 'teleport-project-next',
|
|
136
138
|
style: teleport_types_1.ReactStyleVariation.StyledJSX,
|
|
@@ -170,6 +172,12 @@ var createNextProjectGenerator = function () {
|
|
|
170
172
|
globalStateComponentPlugin,
|
|
171
173
|
richTextEditorPagePlugin,
|
|
172
174
|
localPrimitivesPagePlugin,
|
|
175
|
+
// Must run AFTER every plugin above that fetches/merges data into the
|
|
176
|
+
// 'getStaticProps' chunk by that literal name (inline-fetch,
|
|
177
|
+
// data-source, state-data-source, locale-fetcher already ran by this
|
|
178
|
+
// point) — see entity-mutation-ssr-finalize-plugin.ts for why the
|
|
179
|
+
// rename can't happen any earlier.
|
|
180
|
+
entityMutationSsrFinalizerPlugin,
|
|
173
181
|
teleport_plugin_import_statements_1.default,
|
|
174
182
|
],
|
|
175
183
|
mappings: [next_project_mapping_1.NextProjectMapping],
|
|
@@ -232,6 +240,8 @@ var project_plugin_14 = require("./ecommerce/project-plugin");
|
|
|
232
240
|
Object.defineProperty(exports, "NextEcommerceProjectPlugin", { enumerable: true, get: function () { return project_plugin_14.NextEcommerceProjectPlugin; } });
|
|
233
241
|
var dashboard_layout_plugin_2 = require("./dashboard-layout-plugin");
|
|
234
242
|
Object.defineProperty(exports, "NextDashboardLayoutPlugin", { enumerable: true, get: function () { return dashboard_layout_plugin_2.NextDashboardLayoutPlugin; } });
|
|
243
|
+
var entity_mutation_ssr_finalize_plugin_2 = require("./entity-mutation-ssr-finalize-plugin");
|
|
244
|
+
Object.defineProperty(exports, "createEntityMutationSsrFinalizerPlugin", { enumerable: true, get: function () { return entity_mutation_ssr_finalize_plugin_2.createEntityMutationSsrFinalizerPlugin; } });
|
|
235
245
|
var project_plugin_15 = require("./rich-text-editor/project-plugin");
|
|
236
246
|
Object.defineProperty(exports, "NextRichTextEditorProjectPlugin", { enumerable: true, get: function () { return project_plugin_15.NextRichTextEditorProjectPlugin; } });
|
|
237
247
|
var component_plugin_4 = require("./rich-text-editor/component-plugin");
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sHAAuE;AACvE,8GAAwE;AACxE,oHAAkF;AAClF,qFAA+E;AAC/E,yFAAmF;AACnF,qGAA8F;AAC9F,+FAAuF;AACvF,mGAAuF;AACvF,mGAAuF;AACvF,mGAGsD;AACtD,iGAGqD;AACrD,6DAAyF;AACzF,uEAAwE;AACxE,iCAA0E;AAC1E,uEAAwE;AACxE,+DAA2D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mapp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vC,iGAGqD;AAFnD,mJAAA,+BAA+B,OAAA;AAC/B,uJAAA,mCAAmC,OAAA;AAErC,qCAAsD;AAA7C,qHAAA,0BAA0B,OAAA;AAMnC,6CAAgD;AAAvC,+GAAA,gBAAgB,OAAA"}
|
package/dist/cjs/partial.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export interface NextPartialGeneratorOptions {
|
|
|
9
9
|
dataSources?: GeneratorOptions['dataSources'];
|
|
10
10
|
forms?: GeneratorOptions['forms'];
|
|
11
11
|
resources?: GeneratorOptions['resources'];
|
|
12
|
+
pageLayoutMode?: GeneratorOptions['pageLayoutMode'];
|
|
13
|
+
workflows?: GeneratorOptions['workflows'];
|
|
12
14
|
}
|
|
13
15
|
export interface PartialGenerationResult {
|
|
14
16
|
files: GeneratedFile[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partial.d.ts","sourceRoot":"","sources":["../../src/partial.ts"],"names":[],"mappings":"AA2BA,OAAO,EAEL,QAAQ,EAER,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,aAAa,EAIb,gBAAgB,EAChB,aAAa,EAGb,sBAAsB,EACtB,cAAc,EAGf,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"partial.d.ts","sourceRoot":"","sources":["../../src/partial.ts"],"names":[],"mappings":"AA2BA,OAAO,EAEL,QAAQ,EAER,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,aAAa,EAIb,gBAAgB,EAChB,aAAa,EAGb,sBAAsB,EACtB,cAAc,EAGf,MAAM,4BAA4B,CAAA;AAgCnC,MAAM,WAAW,2BAA2B;IAC1C,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAA;IACnC,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAA;IACnD,eAAe,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAA;IACrD,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,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