@jpmorganchase/mosaic-store 0.1.0-beta.97 → 1.0.0-beta.99
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/CHANGELOG.md +767 -0
- package/README.md +47 -0
- package/dist/ColorModeProvider.d.ts +14 -0
- package/dist/ColorModeProvider.js +1 -0
- package/dist/chunk-3NSZACWL.js +1 -0
- package/dist/chunk-4PLFY4NN.js +1 -0
- package/dist/{chunk-PTZQ34RQ.js → chunk-5H222LJU.js} +1 -1
- package/dist/chunk-A2IT4HHH.js +10 -0
- package/dist/chunk-A6HKQHCX.js +1 -0
- package/dist/chunk-B6GLPHOP.js +1 -0
- package/dist/chunk-GXUFOUHJ.js +1 -0
- package/dist/chunk-KWQPVKP7.js +1 -0
- package/dist/chunk-LADE2USI.js +1 -0
- package/dist/{chunk-YZFJJMDS.js → chunk-M4GOQFWO.js} +1 -1
- package/dist/chunk-NZDD6GLM.js +1 -0
- package/dist/chunk-OS5J5IZU.js +1 -0
- package/dist/chunk-PFU2OE23.js +1 -0
- package/dist/chunk-TXXGQLAG.js +1 -0
- package/dist/chunk-XF5DRSKM.js +1 -0
- package/dist/chunk-YTUGZAPU.js +1 -0
- package/dist/chunk-ZZDVWX6W.js +1 -0
- package/dist/frame.d.ts +33 -0
- package/dist/frame.js +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/store.d.ts +10 -34
- package/dist/store.js +1 -1
- package/dist/theme-preference.d.ts +12 -0
- package/dist/theme-preference.js +1 -0
- package/dist/types/appHeader.d.ts +0 -5
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +1 -1
- package/dist/types/sharedConfig.d.ts +9 -0
- package/dist/useAppHeader.js +1 -1
- package/dist/useBreadcrumbs.js +1 -1
- package/dist/useColorMode.js +1 -1
- package/dist/useFooter.js +1 -1
- package/dist/useLayout.js +1 -1
- package/dist/useMeta.js +1 -1
- package/dist/useMosaicStore.d.ts +7 -0
- package/dist/useMosaicStore.js +1 -0
- package/dist/useNavigation.js +1 -1
- package/dist/useRoute.js +1 -1
- package/dist/useSidebar.js +1 -1
- package/dist/useSourceCapabilities.d.ts +11 -0
- package/dist/useSourceCapabilities.js +1 -0
- package/dist/useStoreActions.js +1 -1
- package/dist/useTableOfContents.js +1 -1
- package/package.json +23 -9
- package/dist/chunk-256AGL5I.js +0 -1
- package/dist/chunk-5GXF566S.js +0 -1
- package/dist/chunk-6VYGXDI5.js +0 -1
- package/dist/chunk-AA7FGYRS.js +0 -1
- package/dist/chunk-ATQVZ6KV.js +0 -1
- package/dist/chunk-CF4MD2TQ.js +0 -1
- package/dist/chunk-G734VGFN.js +0 -1
- package/dist/chunk-IS7TJ54I.js +0 -0
- package/dist/chunk-JEBSAMTC.js +0 -1
- package/dist/chunk-NZGUNCV2.js +0 -1
- package/dist/chunk-PSHWPPFM.js +0 -1
- package/dist/chunk-Q3JUP6BM.js +0 -1
- package/dist/types/searchIndex.d.ts +0 -22
- package/dist/types/searchIndex.js +0 -1
- package/dist/useSearchIndex.d.ts +0 -6
- package/dist/useSearchIndex.js +0 -1
- /package/dist/{chunk-BHW7CEID.js → chunk-WCQXIIQB.js} +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
# @jpmorganchase/mosaic-store
|
|
2
|
+
|
|
3
|
+
## 1.0.0-beta.99
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 97827d1: Migrate the built-in header to section-level search and retire the legacy Fuse search path.
|
|
8
|
+
|
|
9
|
+
Server sites query `/api/search`; static exports lazily load `search-records.json` and the existing browser search engine. Results include section links, loading/error states, safe text highlighting, and protection against stale responses. `SearchProvider` configures server/browser mode, custom endpoints, namespace preference, and disabling search independently of the page store.
|
|
10
|
+
|
|
11
|
+
`SearchIndexPlugin` now emits only records. Remove its legacy `keys`, `relevancy`, `maxLineLength`, and `maxLineCount` options, and regenerate existing snapshots. `getSearchData`, `useSearchIndex`, the store's search types/fields, and the unused header search fields are removed. Replace them with `SearchProvider`, `createSearchHandler`, or `createSearchIndex`. The reference site no longer loads legacy search data into its namespace/404 stores and cleans up previously generated legacy public assets.
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 915b9ae: Secure the content server and editor, fix the save flow, and slim the App Router site
|
|
16
|
+
|
|
17
|
+
### Breaking changes
|
|
18
|
+
|
|
19
|
+
**`@jpmorganchase/mosaic-cli`**
|
|
20
|
+
|
|
21
|
+
- The `/workflows` WebSocket only runs workflows for messages carrying
|
|
22
|
+
`token` = `MOSAIC_WORKFLOWS_SECRET`; without that env var no workflow
|
|
23
|
+
runs, and the placeholder from `.env.development` only counts when
|
|
24
|
+
`NODE_ENV=development`. Messages are validated (workflow name, user,
|
|
25
|
+
route) and capped at 5 MB.
|
|
26
|
+
- Admin endpoints other than `/_mosaic_/tags/list` require
|
|
27
|
+
`MOSAIC_ADMIN_SECRET`: sent as `x-mosaic-admin-secret`, a bearer token,
|
|
28
|
+
or the password of the browser login prompt (HTTP Basic). Without the
|
|
29
|
+
env var they are open when `NODE_ENV=development` and disabled
|
|
30
|
+
otherwise.
|
|
31
|
+
- CORS headers are no longer sent to every origin. Allow specific
|
|
32
|
+
origins with `MOSAIC_CORS_ORIGINS` (comma-separated).
|
|
33
|
+
|
|
34
|
+
**Reference site (`packages/site`)**
|
|
35
|
+
|
|
36
|
+
- Editing requires `MOSAIC_EDITORS` (emails, `@domains` or `*`); when it
|
|
37
|
+
is unset nobody can sign in or edit in production. Set
|
|
38
|
+
`MOSAIC_EDITORS=*` to keep the previous "anyone who can sign in"
|
|
39
|
+
behaviour. Emails and `@domains` only match GitHub emails that
|
|
40
|
+
GitHub has verified.
|
|
41
|
+
- Saves need `MOSAIC_WORKFLOWS_URL` and `MOSAIC_WORKFLOWS_SECRET`
|
|
42
|
+
(renamed from `NEXT_PUBLIC_MOSAIC_WORKFLOWS_URL`).
|
|
43
|
+
- The committed `.env.local` is now `.env.development`, which Next.js
|
|
44
|
+
only loads for `next dev`. Production builds no longer pick up its
|
|
45
|
+
placeholder `AUTH_SECRET` or dev-only flags, and the site refuses the
|
|
46
|
+
placeholder secrets when `NODE_ENV=production`.
|
|
47
|
+
- `.env.prod` is renamed to `.env.production`, the name Next.js actually
|
|
48
|
+
loads for `next build` / `next start`. Production builds therefore now
|
|
49
|
+
default to `MOSAIC_MODE=snapshot-file`; set `MOSAIC_MODE=active` for
|
|
50
|
+
deployments that read from a running Mosaic CLI.
|
|
51
|
+
|
|
52
|
+
### Fixes
|
|
53
|
+
|
|
54
|
+
- **Saving works again.** The CLI echoes the caller's channel (the site
|
|
55
|
+
had switched to a different channel hash, so every progress message
|
|
56
|
+
was dropped and saves never finished), new pages can be created in the
|
|
57
|
+
source whose `prefixDir` contains them (the CLI required the route to
|
|
58
|
+
exist already, and the editor had no route for a new page), and saves
|
|
59
|
+
time out (`MOSAIC_WORKFLOWS_TIMEOUT_MS`, default 5 minutes) and always
|
|
60
|
+
close their socket.
|
|
61
|
+
- Workflow failures are reported to the editor instead of crashing the
|
|
62
|
+
CLI with an unhandled rejection. The GitHub workflow accepts the
|
|
63
|
+
site's `sid` when no `id` is sent.
|
|
64
|
+
- Routes are validated before they are forwarded, and workflows refuse
|
|
65
|
+
to write or rename files outside the source's content folder.
|
|
66
|
+
- Symlinks inside a content folder can no longer publish files from
|
|
67
|
+
outside it (local-folder and git-repo sources, and the CLI's
|
|
68
|
+
`/_mosaic-raw/*` route).
|
|
69
|
+
- Admin responses no longer overwrite git credentials in the live
|
|
70
|
+
config with the redacted value.
|
|
71
|
+
- Search results escape the indexed text before highlighting (it was
|
|
72
|
+
rendered as HTML), escape the query before building a regex, and
|
|
73
|
+
search the current input rather than the previous keystroke.
|
|
74
|
+
- Frontmatter edits are kept when the author leaves the Frontmatter tab
|
|
75
|
+
before saving, and frontmatter-only or first source-mode edits now
|
|
76
|
+
count as unsaved changes.
|
|
77
|
+
- `LayoutProvider` accepts the server's `isEditing` state, so
|
|
78
|
+
prerendered pages render their real layout (sidebar, breadcrumbs,
|
|
79
|
+
header controls) in the HTML instead of falling back to client
|
|
80
|
+
rendering.
|
|
81
|
+
- The Lexical editor is no longer part of every page's JavaScript:
|
|
82
|
+
`@jpmorganchase/mosaic-content-editor-plugin` exposes subpath exports
|
|
83
|
+
(`/useEditMode`, `/LayoutNamesContext`, `/components/EditorControls`,
|
|
84
|
+
…) and the site lazy-loads the editor from a Client Component.
|
|
85
|
+
- Loader caches never store not-found results. Active mode can opt in to
|
|
86
|
+
cross-request caching with `MOSAIC_ACTIVE_MODE_CACHE=true`. Compiled
|
|
87
|
+
MDX is cached by content hash.
|
|
88
|
+
- `/api/revalidate` expires the content cache immediately
|
|
89
|
+
(`{ expire: 0 }`) rather than serving stale content once more.
|
|
90
|
+
- Per-page stores are released when the page unmounts (`disposeStore`)
|
|
91
|
+
instead of leaking a store and a `storage` listener per navigation.
|
|
92
|
+
|
|
93
|
+
### Additions
|
|
94
|
+
|
|
95
|
+
- `@jpmorganchase/mosaic-content-editor-plugin`: `EditModeProvider`,
|
|
96
|
+
`useIsEditing` and `useEditModeActions`; `<Editor route>` prop.
|
|
97
|
+
- `@jpmorganchase/mosaic-store`: `registerStore` and `disposeStore`.
|
|
98
|
+
- `@jpmorganchase/mosaic-site-middleware`, `-layouts` and
|
|
99
|
+
`-site-components` now declare `next` as a peer dependency.
|
|
100
|
+
- 97827d1: Move colour mode into a root `ColorModeProvider`, independent of page and header content stores. This removes cross-store broadcasting, per-store storage listeners and content-store registration/disposal.
|
|
101
|
+
|
|
102
|
+
Migration: wrap `ThemeProvider` and all theme consumers with one `ColorModeProvider` from `@jpmorganchase/mosaic-store`. Keep using `useColorMode()` and `useStoreActions().setColorMode()`. Replace direct `SiteState.colorMode`/`actions` selectors with those hooks, and remove `registerStore`/`disposeStore` calls. Content stores now contain only document data. The existing saved preference format and cross-tab updates are preserved.
|
|
103
|
+
- 97827d1: Publish per-page useMosaicStore, a server-safe theme-preference contract, and persistent frame state/synchronization. Layouts provides NamespaceFrame and StoreShell with header, layout and renderer slots. Existing layouts frame exports share the same context, and useCreateStore retains its legacy behavior.
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- 0c4d822: Migrate the Mosaic site from Next.js Pages Router to App Router (React Server Components, Auth.js v5, server-compiled MDX, optional static export)
|
|
108
|
+
|
|
109
|
+
## What changed
|
|
110
|
+
|
|
111
|
+
The reference Mosaic site (`@jpmorganchase/mosaic-site`) and the shared
|
|
112
|
+
packages it depends on have been ported from the Next.js Pages Router to
|
|
113
|
+
the App Router. Pages-Router-only APIs in the shared packages have been
|
|
114
|
+
removed, and a new static-export build target has been added.
|
|
115
|
+
|
|
116
|
+
### Breaking changes
|
|
117
|
+
|
|
118
|
+
**`@jpmorganchase/mosaic-site-middleware` — major**
|
|
119
|
+
|
|
120
|
+
- **The Pages Router middleware chain is removed.** `withMosaicMode`,
|
|
121
|
+
`withMDXContent`, `withSharedConfig`, `withSearchIndex`, `withSession`,
|
|
122
|
+
`middlewarePresets`, `createMiddlewareRunner` and the
|
|
123
|
+
`fromGetServerSidePropsContext` adapter are gone.
|
|
124
|
+
- **Replaced by cached loaders** that App Router routes call directly
|
|
125
|
+
(in parallel): `getMdxRaw`, `getSharedConfig`,
|
|
126
|
+
`getMdxRawSource`, `getTagSuggestions`, `loadSitemap` and
|
|
127
|
+
`resolveMosaicMode`. Each is deduplicated per request with
|
|
128
|
+
`React.cache` and cached across requests with `unstable_cache`, tagged
|
|
129
|
+
`MOSAIC_CONTENT_CACHE_TAG` (also exported from the side-effect-free
|
|
130
|
+
`@jpmorganchase/mosaic-site-middleware/cache-tags` subpath).
|
|
131
|
+
- **MDX is compiled with `serializeMdxForClient`** (built on
|
|
132
|
+
`next-mdx-remote-client/serialize`, with server-side shiki
|
|
133
|
+
highlighting). It returns a JSON-safe `{ compiledSource, frontmatter, scope }` payload that a client `<MDXClient />` renders.
|
|
134
|
+
|
|
135
|
+
**`@jpmorganchase/mosaic-site-components` — major**
|
|
136
|
+
|
|
137
|
+
- **`Body` removed.** Render MDX with a renderer from
|
|
138
|
+
`createMdxRenderer({ components })` fed by `serializeMdxForClient`.
|
|
139
|
+
See `packages/site/src/app/[...route]/BodyServer.tsx` and
|
|
140
|
+
`MdxComponents.ts` for the reference implementation.
|
|
141
|
+
- **`Document` removed.** App Router has no `_document.tsx`; the file
|
|
142
|
+
was transitively pulling `next/document` and breaking App Router
|
|
143
|
+
builds. Inline what you need into your `app/layout.tsx`.
|
|
144
|
+
- **Subpath exports widened** (`./*`) so consumers can deep-import
|
|
145
|
+
individual modules (e.g.
|
|
146
|
+
`@jpmorganchase/mosaic-site-components/Metadata`) without paying for
|
|
147
|
+
the full bundle.
|
|
148
|
+
|
|
149
|
+
**`@jpmorganchase/mosaic-layouts` — major**
|
|
150
|
+
|
|
151
|
+
- **`useIsLoading` hook removed.** `router.events` no longer exists in
|
|
152
|
+
the App Router.
|
|
153
|
+
- **`Fade` component removed** (was only consumed by `LayoutBase` via
|
|
154
|
+
`useIsLoading`).
|
|
155
|
+
- **`Edit` layout** is selected by `LayoutProvider` from the edit mode
|
|
156
|
+
instead of reacting to `router.events.routeChangeStart`.
|
|
157
|
+
|
|
158
|
+
### Non-breaking additions
|
|
159
|
+
|
|
160
|
+
**`@jpmorganchase/mosaic-site` (App Router cut-over)**
|
|
161
|
+
|
|
162
|
+
- New file tree under `src/app/` (`layout.tsx`, `providers.tsx`,
|
|
163
|
+
`[...route]/page.tsx`, `not-found.tsx`, `error.tsx`, `robots.ts`,
|
|
164
|
+
`sitemap.ts`, `api/auth/[...nextauth]/route.ts`,
|
|
165
|
+
`api/revalidate/route.ts`).
|
|
166
|
+
- The editor's preview compile and save are Server Actions
|
|
167
|
+
(`previewAction.ts`, `persistAction.ts`), replacing the
|
|
168
|
+
`/api/content/preview` route and the browser-side workflows WebSocket.
|
|
169
|
+
- **Auth.js v5** wiring in `src/auth.ts` (`handlers`, `auth`, `signIn`,
|
|
170
|
+
`signOut`), replacing `next-auth` v4. `AUTH_SECRET` is required when
|
|
171
|
+
auth is enabled; `NEXTAUTH_SECRET` continues to work as a fallback.
|
|
172
|
+
- **Static-export build target.** `yarn build:static:file` produces a
|
|
173
|
+
fully-static `out/` directory servable from any CDN with no Node
|
|
174
|
+
runtime. Gated behind `MOSAIC_OUTPUT=export` and
|
|
175
|
+
`MOSAIC_MODE=snapshot-file`.
|
|
176
|
+
- **`next.config.js`** refactored into `baseConfig` / `dynamicOnlyConfig`
|
|
177
|
+
/ `exportConfig`.
|
|
178
|
+
|
|
179
|
+
**`@jpmorganchase/mosaic-cli` — patch**
|
|
180
|
+
|
|
181
|
+
- New `revalidateNotifier`: when `MOSAIC_REVALIDATE_URL` and
|
|
182
|
+
`MOSAIC_REVALIDATE_SECRET` are set, the CLI's `serve` command POSTs to
|
|
183
|
+
the site's `/api/revalidate` whenever a source emits an update, so
|
|
184
|
+
tagged caches are flushed automatically. No-op when the env vars are
|
|
185
|
+
absent.
|
|
186
|
+
|
|
187
|
+
## Benefits
|
|
188
|
+
|
|
189
|
+
- **Parallel data loading.** Frontmatter, shared config and the search
|
|
190
|
+
index are resolved in parallel rather than serially through
|
|
191
|
+
`getServerSideProps`, and identical reads collapse onto one fetch.
|
|
192
|
+
- **Server-side MDX work.** Parsing, compiling and syntax highlighting
|
|
193
|
+
run on the server; the browser only evaluates the compiled page.
|
|
194
|
+
- **Static export** unlocks CDN-only deployments (S3 + CloudFront,
|
|
195
|
+
nginx, …). A reference Docker image lives at
|
|
196
|
+
`examples/docker/static-export/`.
|
|
197
|
+
- **Revalidate notifier** keeps sites' caches fresh when sources push
|
|
198
|
+
updates.
|
|
199
|
+
- **Node 24** across all in-repo Dockerfiles.
|
|
200
|
+
|
|
201
|
+
## Migration guide
|
|
202
|
+
|
|
203
|
+
1. Replace `pages/_app.tsx` with `app/layout.tsx` + `app/providers.tsx`
|
|
204
|
+
(`'use client'`). Mount `<SessionProvider>` without a server-resolved
|
|
205
|
+
session.
|
|
206
|
+
2. Replace `pages/[...route].tsx` with `app/[...route]/page.tsx`, calling
|
|
207
|
+
the `@jpmorganchase/mosaic-site-middleware` loaders.
|
|
208
|
+
3. Replace every `from 'next/router'` import with `next/navigation` and
|
|
209
|
+
mark the file `'use client'`.
|
|
210
|
+
4. Convert `pages/api/*.ts` to `app/api/*/route.ts`.
|
|
211
|
+
5. Add `AUTH_SECRET` to your env if you enable Auth.js.
|
|
212
|
+
|
|
213
|
+
The full guide, including environment variable and CLI changes, is in
|
|
214
|
+
`docs/getting-started/migrate-to-app-router.mdx`.
|
|
215
|
+
|
|
216
|
+
For static-export deployments, see
|
|
217
|
+
`docs/configure/modes/static-export.mdx`.
|
|
218
|
+
- d1c795e: Align React peer dependencies with supported consumers. The store, icons, theme
|
|
219
|
+
and sitemap component accept React 18 or 19 and matching type
|
|
220
|
+
packages. Components and site components require React 19 types, matching their
|
|
221
|
+
existing React 19 runtime peer and the Next.js 16 site integration.
|
|
222
|
+
- 2ecdf25: Use the React 19 line of next-mdx-remote-client in the App Router host and published MDX renderer/compiler. Align their React and React DOM minimum with its React 19.1 requirement, including the workspace test renderer. The editor's serialization type contract accepts both MDX runtime majors. Update SWR and Zustand minimums so existing consumers replace older React 18-only dependency selections when installing the snapshot.
|
|
223
|
+
- 915b9ae: Fix issues found in a review of the App Router site
|
|
224
|
+
|
|
225
|
+
**`@jpmorganchase/mosaic-store`**
|
|
226
|
+
|
|
227
|
+
- Add `reseedStore(store, state)`. It replaces a store's page state with
|
|
228
|
+
a new seed while keeping the colour mode and actions; keys missing
|
|
229
|
+
from the new seed return to their defaults. The reference site's
|
|
230
|
+
`StoreShell` uses it so the sidebar, table of contents and breadcrumbs
|
|
231
|
+
follow `router.refresh()`, which previously only updated the page
|
|
232
|
+
body.
|
|
233
|
+
|
|
234
|
+
**`@jpmorganchase/mosaic-site-middleware`**
|
|
235
|
+
|
|
236
|
+
- In `snapshot-file` mode, `getMdxRaw` and `getSharedConfig` decode
|
|
237
|
+
percent-encoded routes before reading files, so pages whose names
|
|
238
|
+
contain spaces or non-ASCII characters are found. Decoded paths that
|
|
239
|
+
would leave the snapshot (`..` or `.` segments, backslashes, NUL bytes)
|
|
240
|
+
are treated as not found.
|
|
241
|
+
|
|
242
|
+
**`@jpmorganchase/mosaic-site-components`**
|
|
243
|
+
|
|
244
|
+
- The header's Login link no longer causes a hydration mismatch. Its
|
|
245
|
+
fallback `href` is built from the router pathname (which the server
|
|
246
|
+
and the browser agree on) instead of `window.location`; the click
|
|
247
|
+
handler still sends the full path, query and hash as the callback.
|
|
248
|
+
|
|
249
|
+
**`@jpmorganchase/mosaic-content-editor-plugin`**
|
|
250
|
+
|
|
251
|
+
- The `next` peer dependency is now `^15.5.28 || ^16.4.1`. Earlier
|
|
252
|
+
releases are affected by critical remote code execution advisories
|
|
253
|
+
(GHSA-2xp9-vwfh-vxw4, GHSA-p293-qw3h-jr36).
|
|
254
|
+
|
|
255
|
+
**Reference site (`packages/site`)**
|
|
256
|
+
|
|
257
|
+
- Creating a page (`?new=1`) no longer returns 404 unless the dev
|
|
258
|
+
capability bypass is on: the check now uses the shared config of the
|
|
259
|
+
folder the new page goes into.
|
|
260
|
+
- `not-found.tsx` no longer loads data on the server, because Next.js
|
|
261
|
+
renders it as part of every page response. The 404 page loads the
|
|
262
|
+
header for the section the reader was in from the browser. In
|
|
263
|
+
`next dev` it now really recovers from 404s served while the CLI is
|
|
264
|
+
still loading: it reloads the page once the URL resolves
|
|
265
|
+
(`router.refresh()` can't clear a 404), and shows nothing extra on
|
|
266
|
+
genuine 404s.
|
|
267
|
+
- Every page now gets `<link rel="canonical">` from its `route`
|
|
268
|
+
frontmatter, so folder URLs and aliases point at the page in every
|
|
269
|
+
content mode, and folder URLs are rewritten to the canonical route in
|
|
270
|
+
snapshot modes too.
|
|
271
|
+
- `error.tsx` retries with Next.js 16.3's `retry()`, which re-renders
|
|
272
|
+
Server Components; a new `global-error.tsx` handles root-layout
|
|
273
|
+
failures.
|
|
274
|
+
- `MOSAIC_OUTPUT=standalone` emits the `.next/standalone` server that
|
|
275
|
+
the Dockerfiles copy into their runtime images; `next.config.js` had
|
|
276
|
+
stopped emitting it in 2024. The Dockerfiles now set it.
|
|
277
|
+
- `yarn build:static:*` works again. The generated API route and Server
|
|
278
|
+
Action stubs accept any arguments, so the tests type-checked during
|
|
279
|
+
the build compile, and `sitemap.ts` no longer sets `revalidate = 0`,
|
|
280
|
+
which `output: 'export'` rejects. The sitemap is now regenerated every
|
|
281
|
+
five minutes in snapshot builds and stays per-request in active mode.
|
|
282
|
+
- Sites without auth no longer request `/api/auth/session` on every page
|
|
283
|
+
load.
|
|
284
|
+
- The site's ESLint config loads again and `yarn lint` now covers the
|
|
285
|
+
site. It failed with "Cannot redefine plugin react-hooks" because the
|
|
286
|
+
root used `eslint-plugin-react-hooks@5` while `eslint-config-next`
|
|
287
|
+
ships `@7`; the root now uses `^7.0.0`.
|
|
288
|
+
- Updated dependencies [b581d8b]
|
|
289
|
+
- Updated dependencies [0c4d822]
|
|
290
|
+
- Updated dependencies [97827d1]
|
|
291
|
+
- Updated dependencies [97827d1]
|
|
292
|
+
- Updated dependencies [97827d1]
|
|
293
|
+
- Updated dependencies [97827d1]
|
|
294
|
+
- Updated dependencies [97827d1]
|
|
295
|
+
- Updated dependencies [5476067]
|
|
296
|
+
- Updated dependencies [97827d1]
|
|
297
|
+
- Updated dependencies [97827d1]
|
|
298
|
+
- Updated dependencies [168391e]
|
|
299
|
+
- Updated dependencies [5d69155]
|
|
300
|
+
- @jpmorganchase/mosaic-types@1.0.0-beta.99
|
|
301
|
+
|
|
302
|
+
## 0.1.0-beta.98
|
|
303
|
+
|
|
304
|
+
## 0.1.0-beta.97
|
|
305
|
+
|
|
306
|
+
## 0.1.0-beta.96
|
|
307
|
+
|
|
308
|
+
### Patch Changes
|
|
309
|
+
|
|
310
|
+
- 5e42846: Improved logging by standardizing the prefix
|
|
311
|
+
|
|
312
|
+
## 0.1.0-beta.95
|
|
313
|
+
|
|
314
|
+
### Patch Changes
|
|
315
|
+
|
|
316
|
+
- 85bc12f: Add additional `<head/>` metadata
|
|
317
|
+
|
|
318
|
+
- added namespace to page title
|
|
319
|
+
- added new meta, lastModified timestamp
|
|
320
|
+
|
|
321
|
+
- 18bdd6a: Modernise the build and remove un-used site generator
|
|
322
|
+
|
|
323
|
+
- update yarn to 4.10.3
|
|
324
|
+
- pip dependencies to allow for internal JPM build
|
|
325
|
+
- removed `create-site` as un-used, `site` directory can be copied, refer to docs for more details
|
|
326
|
+
- remove packages `@mosaicjs/create-site` and `@jpmorganchase/mosaic-standard-generator` as they are no longer needed
|
|
327
|
+
- `fsconfig.js` has moved from `@jpmorganchase/mosaic-standard-generator` to `@jpmorganchase/mosaic-cli`
|
|
328
|
+
|
|
329
|
+
```diff
|
|
330
|
+
- import mosaicConfig from '@jpmorganchase/mosaic-standard-generator/dist/fs.config.js';
|
|
331
|
+
+ import mosaicConfig from '@jpmorganchase/mosaic-cli/fs.config.js';
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
## 0.1.0-beta.94
|
|
335
|
+
|
|
336
|
+
## 0.1.0-beta.93
|
|
337
|
+
|
|
338
|
+
## 0.1.0-beta.92
|
|
339
|
+
|
|
340
|
+
## 0.1.0-beta.91
|
|
341
|
+
|
|
342
|
+
## 0.1.0-beta.90
|
|
343
|
+
|
|
344
|
+
## 0.1.0-beta.89
|
|
345
|
+
|
|
346
|
+
## 0.1.0-beta.88
|
|
347
|
+
|
|
348
|
+
## 0.1.0-beta.87
|
|
349
|
+
|
|
350
|
+
## 0.1.0-beta.86
|
|
351
|
+
|
|
352
|
+
### Patch Changes
|
|
353
|
+
|
|
354
|
+
- 9124a6c0: Add displayName for `StoreContext`
|
|
355
|
+
|
|
356
|
+
## 0.1.0-beta.85
|
|
357
|
+
|
|
358
|
+
## 0.1.0-beta.84
|
|
359
|
+
|
|
360
|
+
## 0.1.0-beta.83
|
|
361
|
+
|
|
362
|
+
## 0.1.0-beta.82
|
|
363
|
+
|
|
364
|
+
## 0.1.0-beta.81
|
|
365
|
+
|
|
366
|
+
## 0.1.0-beta.80
|
|
367
|
+
|
|
368
|
+
## 0.1.0-beta.79
|
|
369
|
+
|
|
370
|
+
## 0.1.0-beta.78
|
|
371
|
+
|
|
372
|
+
## 0.1.0-beta.77
|
|
373
|
+
|
|
374
|
+
## 0.1.0-beta.76
|
|
375
|
+
|
|
376
|
+
### Patch Changes
|
|
377
|
+
|
|
378
|
+
- 727fcd54: feat: align to Salt Vertical Navigation pattern
|
|
379
|
+
|
|
380
|
+
- groups now expand and collapse and do not select a route
|
|
381
|
+
- sidebar group label can be defined through frontmatter `sidebar.groupLabel`
|
|
382
|
+
- breadcrumbs do not display the root page
|
|
383
|
+
- pagination now steps through all pages within the user journey
|
|
384
|
+
- paginator buttons show the group, as well as the page title
|
|
385
|
+
|
|
386
|
+
## 0.1.0-beta.75
|
|
387
|
+
|
|
388
|
+
## 0.1.0-beta.74
|
|
389
|
+
|
|
390
|
+
## 0.1.0-beta.73
|
|
391
|
+
|
|
392
|
+
### Patch Changes
|
|
393
|
+
|
|
394
|
+
- de00c017: Added the files package.json field to all of the packages to prevent unnecessary files being published.
|
|
395
|
+
|
|
396
|
+
## 0.1.0-beta.72
|
|
397
|
+
|
|
398
|
+
## 0.1.0-beta.71
|
|
399
|
+
|
|
400
|
+
## 0.1.0-beta.70
|
|
401
|
+
|
|
402
|
+
## 0.1.0-beta.69
|
|
403
|
+
|
|
404
|
+
## 0.1.0-beta.68
|
|
405
|
+
|
|
406
|
+
## 0.1.0-beta.67
|
|
407
|
+
|
|
408
|
+
## 0.1.0-beta.66
|
|
409
|
+
|
|
410
|
+
## 0.1.0-beta.65
|
|
411
|
+
|
|
412
|
+
## 0.1.0-beta.64
|
|
413
|
+
|
|
414
|
+
## 0.1.0-beta.63
|
|
415
|
+
|
|
416
|
+
## 0.1.0-beta.62
|
|
417
|
+
|
|
418
|
+
## 0.1.0-beta.61
|
|
419
|
+
|
|
420
|
+
### Patch Changes
|
|
421
|
+
|
|
422
|
+
- cec89401: add `pluginTimeout` (20 secs) to fastify to prevent loading timeout
|
|
423
|
+
|
|
424
|
+
## 0.1.0-beta.60
|
|
425
|
+
|
|
426
|
+
### Patch Changes
|
|
427
|
+
|
|
428
|
+
- a3da0830: New Readme Source
|
|
429
|
+
|
|
430
|
+
This source pulls a single Readme.md from a remote Source repo.
|
|
431
|
+
Typically used for third-party repos which exist already or don't want to
|
|
432
|
+
create a full document hierachy and use `@jpmorganchase/mosaic-source-git-repo`.
|
|
433
|
+
By pulling a single page, we can add metadata to that page via the source's config.
|
|
434
|
+
It's also more performant as we do not need to pull a whole source repo.
|
|
435
|
+
|
|
436
|
+
## 0.1.0-beta.59
|
|
437
|
+
|
|
438
|
+
## 0.1.0-beta.58
|
|
439
|
+
|
|
440
|
+
## 0.1.0-beta.57
|
|
441
|
+
|
|
442
|
+
### Patch Changes
|
|
443
|
+
|
|
444
|
+
- d214d112: Add catch-all default exports for
|
|
445
|
+
|
|
446
|
+
- `@jpmorganchase/mosaic-store`
|
|
447
|
+
- `@jpmorganchase/mosaic-theme`
|
|
448
|
+
- `@jpmorganchase/mosaic-workflows`
|
|
449
|
+
|
|
450
|
+
This resolves an issue when running tests from an external repo which depends on these packages
|
|
451
|
+
|
|
452
|
+
## 0.1.0-beta.56
|
|
453
|
+
|
|
454
|
+
### Patch Changes
|
|
455
|
+
|
|
456
|
+
- 6d30e29f: Add new Storybook source
|
|
457
|
+
|
|
458
|
+
Storybook stories can be extracted from Storybook and embedded into Mosaic pages.
|
|
459
|
+
|
|
460
|
+
The stories are extracted based on a configured filter or matching tags.
|
|
461
|
+
|
|
462
|
+
With a page created for each Story, the author can create a dynamic index of matching stories.
|
|
463
|
+
|
|
464
|
+
eg. An index of patterns which match a specific tag
|
|
465
|
+
|
|
466
|
+
## 0.1.0-beta.55
|
|
467
|
+
|
|
468
|
+
## 0.1.0-beta.54
|
|
469
|
+
|
|
470
|
+
## 0.1.0-beta.53
|
|
471
|
+
|
|
472
|
+
## 0.1.0-beta.52
|
|
473
|
+
|
|
474
|
+
## 0.1.0-beta.51
|
|
475
|
+
|
|
476
|
+
## 0.1.0-beta.50
|
|
477
|
+
|
|
478
|
+
## 0.1.0-beta.49
|
|
479
|
+
|
|
480
|
+
## 0.1.0-beta.48
|
|
481
|
+
|
|
482
|
+
## 0.1.0-beta.47
|
|
483
|
+
|
|
484
|
+
### Patch Changes
|
|
485
|
+
|
|
486
|
+
- 19b4e49a: ### Fix
|
|
487
|
+
|
|
488
|
+
Ensure that help links in the sidebar are visible when they are present in the page `sharedConfig`
|
|
489
|
+
|
|
490
|
+
## 0.1.0-beta.46
|
|
491
|
+
|
|
492
|
+
### Patch Changes
|
|
493
|
+
|
|
494
|
+
- 32e86cfd: ## Fix
|
|
495
|
+
|
|
496
|
+
When a page does not specify a property that is part of the store default props, we use what the default props specify and not what is currently in the store.
|
|
497
|
+
|
|
498
|
+
## 0.1.0-beta.45
|
|
499
|
+
|
|
500
|
+
## 0.1.0-beta.44
|
|
501
|
+
|
|
502
|
+
## 0.1.0-beta.43
|
|
503
|
+
|
|
504
|
+
## 0.1.0-beta.42
|
|
505
|
+
|
|
506
|
+
## 0.1.0-beta.41
|
|
507
|
+
|
|
508
|
+
## 0.1.0-beta.40
|
|
509
|
+
|
|
510
|
+
## 0.1.0-beta.39
|
|
511
|
+
|
|
512
|
+
## 0.1.0-beta.38
|
|
513
|
+
|
|
514
|
+
## 0.1.0-beta.37
|
|
515
|
+
|
|
516
|
+
## 0.1.0-beta.36
|
|
517
|
+
|
|
518
|
+
## 0.1.0-beta.35
|
|
519
|
+
|
|
520
|
+
## 0.1.0-beta.34
|
|
521
|
+
|
|
522
|
+
## 0.1.0-beta.33
|
|
523
|
+
|
|
524
|
+
## 0.1.0-beta.32
|
|
525
|
+
|
|
526
|
+
## 0.1.0-beta.31
|
|
527
|
+
|
|
528
|
+
### Patch Changes
|
|
529
|
+
|
|
530
|
+
- b609fd0: Added support for containerization of the site and cli as well as providing config for kubernetes development (skaffold)
|
|
531
|
+
|
|
532
|
+
## @jpmorganchase/mosaic-cli
|
|
533
|
+
|
|
534
|
+
The cli package has been updated to support containerization.
|
|
535
|
+
|
|
536
|
+
## 0.1.0-beta.30
|
|
537
|
+
|
|
538
|
+
### Patch Changes
|
|
539
|
+
|
|
540
|
+
- 18ef436: The git repo source no longer generates a double slash between the repo host and repo path.
|
|
541
|
+
|
|
542
|
+
## 0.1.0-beta.29
|
|
543
|
+
|
|
544
|
+
### Minor Changes
|
|
545
|
+
|
|
546
|
+
- c78deb4: Flatten Sidebar
|
|
547
|
+
Search Optimisation
|
|
548
|
+
Public Assets Plugin
|
|
549
|
+
TOC Indentation
|
|
550
|
+
|
|
551
|
+
## 0.1.0-beta.28
|
|
552
|
+
|
|
553
|
+
### Patch Changes
|
|
554
|
+
|
|
555
|
+
- 27ac914: 1. Layout improvements. 2. Fix: if a user hits a url that lands on a directory, the index file within that directory is resolved as the content. 3. Fix: improve Table of Contents component highlighting.
|
|
556
|
+
|
|
557
|
+
## 0.1.0-beta.27
|
|
558
|
+
|
|
559
|
+
### Patch Changes
|
|
560
|
+
|
|
561
|
+
- b465413: Improvements to vercel deployments
|
|
562
|
+
|
|
563
|
+
## 0.1.0-beta.26
|
|
564
|
+
|
|
565
|
+
### Minor Changes
|
|
566
|
+
|
|
567
|
+
- 531c87a: ## Mosaic Theme
|
|
568
|
+
|
|
569
|
+
The theme variables are now globally scoped and prefixed with `mosaic`.
|
|
570
|
+
|
|
571
|
+
## BrokenLinksPlugin
|
|
572
|
+
|
|
573
|
+
The `BrokenLinksPlugin` uses a running instance of mosaic to verify that all links in the source pages are alive.
|
|
574
|
+
|
|
575
|
+
If mosaic is running behind a corporate proxy, the `proxyEndpoint` option is required to fetch external URLs.
|
|
576
|
+
|
|
577
|
+
Configuration:
|
|
578
|
+
|
|
579
|
+
```json
|
|
580
|
+
{
|
|
581
|
+
modulePath: '@jpmorganchase/mosaic-plugins/BrokenLinksPlugin',
|
|
582
|
+
priority: -1,
|
|
583
|
+
// Exclude this plugin in builds
|
|
584
|
+
runTimeOnly: true,
|
|
585
|
+
options: {
|
|
586
|
+
baseUrl: process.env.MOSAIC_ACTIVE_MODE_URL || 'http://localhost:8080',
|
|
587
|
+
proxyEndpoint: 'http://some-proxy-url'
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
## Next/Prev button
|
|
593
|
+
|
|
594
|
+
The next and prev buttons are visible again on pages that have a layout that uses these buttons.
|
|
595
|
+
|
|
596
|
+
## 0.1.0-beta.25
|
|
597
|
+
|
|
598
|
+
### Minor Changes
|
|
599
|
+
|
|
600
|
+
- 93e9b07: The theme contract provided by the `@jpmorganchase/mosaic-theme` package now uses locally scoped variable names via a Vanilla Extract [Theme Contract](https://vanilla-extract.style/documentation/api/create-theme-contract/). Previously the theme variables were globally scoped resulting in conflicts with other design systems.
|
|
601
|
+
|
|
602
|
+
### Patch Changes
|
|
603
|
+
|
|
604
|
+
- a36219c: - Next/Prev page buttons were not appearing at the bottom of a page sequence
|
|
605
|
+
- Removed redundant snapshot page api
|
|
606
|
+
|
|
607
|
+
## 0.1.0-beta.24
|
|
608
|
+
|
|
609
|
+
### Patch Changes
|
|
610
|
+
|
|
611
|
+
- 049d9af: 1. Pip Salt version 2. Issues 155, make 500 error more specific 3. button and sidebar styles 4. search opt-out
|
|
612
|
+
|
|
613
|
+
## 0.1.0-beta.23
|
|
614
|
+
|
|
615
|
+
### Patch Changes
|
|
616
|
+
|
|
617
|
+
- 513d45f: Sidebar behavior and styling changes.
|
|
618
|
+
Add Client-side search feature.
|
|
619
|
+
Relax node engine requirements.
|
|
620
|
+
Removal of patches from the site package.
|
|
621
|
+
Update site generator templates.
|
|
622
|
+
|
|
623
|
+
## 0.1.0-beta.22
|
|
624
|
+
|
|
625
|
+
### Patch Changes
|
|
626
|
+
|
|
627
|
+
- be89e4f: fix markdown tables and update generator's Salt patches
|
|
628
|
+
|
|
629
|
+
- Salt patches in generator were out of sync with Mosaic repo
|
|
630
|
+
- Markdown now support github flavoured markdown, such as Tables
|
|
631
|
+
|
|
632
|
+
## 0.1.0-beta.21
|
|
633
|
+
|
|
634
|
+
### Patch Changes
|
|
635
|
+
|
|
636
|
+
- f75fd5e: fix sidebar which was generated after `beforeSend` had completed
|
|
637
|
+
|
|
638
|
+
## 0.1.0-beta.20
|
|
639
|
+
|
|
640
|
+
### Patch Changes
|
|
641
|
+
|
|
642
|
+
- 9c7b8ff: pip to beta.20
|
|
643
|
+
|
|
644
|
+
## 0.1.0-beta.19
|
|
645
|
+
|
|
646
|
+
### Patch Changes
|
|
647
|
+
|
|
648
|
+
- ad06d4c: ensure spinner is removed after page has loaded
|
|
649
|
+
|
|
650
|
+
## 0.1.0-beta.18
|
|
651
|
+
|
|
652
|
+
### Patch Changes
|
|
653
|
+
|
|
654
|
+
- 066efed: Update docs with quick-start guide
|
|
655
|
+
|
|
656
|
+
Sample docs now include a 'quick-start' guide to onboarding to AWS.
|
|
657
|
+
|
|
658
|
+
Also
|
|
659
|
+
|
|
660
|
+
- generator default directory is the current directory
|
|
661
|
+
- after generating a site, it will run `yarn` in the created directory. This simplifies the generator call to just `yarn mosaic-create-site`
|
|
662
|
+
|
|
663
|
+
## 0.1.0-beta.17
|
|
664
|
+
|
|
665
|
+
### Patch Changes
|
|
666
|
+
|
|
667
|
+
- b2f6d52: Fix `pre` block code block rendering
|
|
668
|
+
|
|
669
|
+
## 0.1.0-beta.16
|
|
670
|
+
|
|
671
|
+
### Patch Changes
|
|
672
|
+
|
|
673
|
+
- 3a5c88a: add missing `@types/node` dependency for generator
|
|
674
|
+
|
|
675
|
+
## 0.1.0-beta.15
|
|
676
|
+
|
|
677
|
+
### Patch Changes
|
|
678
|
+
|
|
679
|
+
- aaaf255: initial release of HTTP Source package.
|
|
680
|
+
|
|
681
|
+
An HTTP source accepts a collection of endpoints and a path to a transformer module.
|
|
682
|
+
The response from fetching is transformed and merged together into 1 single collection of pages.
|
|
683
|
+
Should 1 of the endpoints request fail then it will have no impact on the other requests.
|
|
684
|
+
|
|
685
|
+
## 0.1.0-beta.14
|
|
686
|
+
|
|
687
|
+
### Patch Changes
|
|
688
|
+
|
|
689
|
+
- dde3b5a: Feature release
|
|
690
|
+
|
|
691
|
+
- Enhanced generators now have defaults.
|
|
692
|
+
With one command (`yarn mosaic-create-site create`) it will generate a fully working site with both local and remote sources
|
|
693
|
+
- Fix an issue where we could not clone from the master branch of git repos
|
|
694
|
+
- Migrate to Next 13 image
|
|
695
|
+
|
|
696
|
+
## 0.1.0-beta.13
|
|
697
|
+
|
|
698
|
+
### Patch Changes
|
|
699
|
+
|
|
700
|
+
- d4da1df: incremental improvements
|
|
701
|
+
|
|
702
|
+
- move colormode into store
|
|
703
|
+
- ensure breadcrumbs and sidebar data is only added to frontmatter for pages which use a layout that has breadcrumbs or a sidebar
|
|
704
|
+
- improve changeset so it can work standalone without a monorepo
|
|
705
|
+
- resolev json5 vulnerability
|
|
706
|
+
|
|
707
|
+
## 0.1.0-beta.12
|
|
708
|
+
|
|
709
|
+
### Patch Changes
|
|
710
|
+
|
|
711
|
+
- 9ec358b: Upgrade React to version 18 and NextJs to version 13
|
|
712
|
+
- 3eb35bf: initial work to enable generators to run outside of the repo
|
|
713
|
+
|
|
714
|
+
## 0.1.0-beta.11
|
|
715
|
+
|
|
716
|
+
### Patch Changes
|
|
717
|
+
|
|
718
|
+
- fc5d7b5: Generators can now interactively add sources
|
|
719
|
+
|
|
720
|
+
Previously we were making local edits to our own site or examples to implement new features.
|
|
721
|
+
What we wanted was the ability to create a local rig, A local rig can be used for development purposes,
|
|
722
|
+
without touching our site code.
|
|
723
|
+
|
|
724
|
+
We have added Mosaic repo commands, to enable us to generates local rigs (`yarn gen:rig`) and deploy our own
|
|
725
|
+
tech docs via snapshot (`yarn gen`)
|
|
726
|
+
|
|
727
|
+
To generate a site+snapshot from sources defined in `mosaic-generators.js`, run `yarn gen`
|
|
728
|
+
To generate a dynamic site from sources defined in `mosaic-generators.js`, run `yarn gen:site`
|
|
729
|
+
To generate a rig `yarn gen:rig`
|
|
730
|
+
|
|
731
|
+
Equally these changes can be used to generate sites in other repos via the `mosaic-create-site` command.
|
|
732
|
+
|
|
733
|
+
`yarn mosaic-create-site init` will create a `mosaic.generators.js`.
|
|
734
|
+
|
|
735
|
+
Configure the `mosaic.generators.js` with your generator and sources, then run.
|
|
736
|
+
|
|
737
|
+
`yarn mosaic-create-site create -i -o path/to/my-site`
|
|
738
|
+
|
|
739
|
+
When this command is run, it will present an interactive menu of generators and output the site to `path/to/my-site`.
|
|
740
|
+
|
|
741
|
+
## 0.1.0-beta.10
|
|
742
|
+
|
|
743
|
+
### Patch Changes
|
|
744
|
+
|
|
745
|
+
- af2f579: Converted repo to ESM and Salt DS nomenclature
|
|
746
|
+
|
|
747
|
+
- Switch UITK nomenclature to Salt DS
|
|
748
|
+
Upgraded to first stable version of Salt DS version 1.0.0
|
|
749
|
+
- CommonJS code switched to ESM and upgraded to Node 16
|
|
750
|
+
- Removed example-nextjs-ssr package as un-required, can be replaced by documentation
|
|
751
|
+
- Sites can now generate immutable snapshots of content that loads content like a SGS (statically generated site)
|
|
752
|
+
Snapshots can be used as a serverless solution when deployed to Vercel.
|
|
753
|
+
- New Middleware package `@jpmorganchase/mosaic-site-middleware`
|
|
754
|
+
|
|
755
|
+
## 0.1.0-beta.9
|
|
756
|
+
|
|
757
|
+
### Minor Changes
|
|
758
|
+
|
|
759
|
+
- c3fee89: initial components package
|
|
760
|
+
|
|
761
|
+
- added JSDOM testing
|
|
762
|
+
|
|
763
|
+
## 0.1.0-beta.8
|
|
764
|
+
|
|
765
|
+
### Minor Changes
|
|
766
|
+
|
|
767
|
+
- 2dca0b1: initial release of Mosaic store package
|