@plone/aurora 1.0.0-alpha.10

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.
Files changed (41) hide show
  1. package/.release-it.json +32 -0
  2. package/.stylelintrc +8 -0
  3. package/CHANGELOG.md +251 -0
  4. package/LICENSE.md +21 -0
  5. package/Makefile +82 -0
  6. package/README.md +61 -0
  7. package/acceptance/tests/basic.test.ts +14 -0
  8. package/app/config/index.test.ts +19 -0
  9. package/app/config/index.ts +15 -0
  10. package/app/config/server/content-migrations.server.test.ts +184 -0
  11. package/app/config/server/content-migrations.server.ts +59 -0
  12. package/app/config/server/migrations.server.ts +137 -0
  13. package/app/config/server.server.test.ts +33 -0
  14. package/app/config/server.server.ts +52 -0
  15. package/app/config/types.ts +49 -0
  16. package/app/entry.client.tsx +51 -0
  17. package/app/entry.server.tsx +81 -0
  18. package/app/i18n.ts +11 -0
  19. package/app/i18next.server.ts +26 -0
  20. package/app/middleware.server.test.ts +1088 -0
  21. package/app/middleware.server.ts +241 -0
  22. package/app/okroute.test.tsx +9 -0
  23. package/app/okroute.tsx +5 -0
  24. package/app/reset-fetcher.test.tsx +13 -0
  25. package/app/reset-fetcher.tsx +7 -0
  26. package/app/root.test.tsx +300 -0
  27. package/app/root.tsx +188 -0
  28. package/app/routes.ts +20 -0
  29. package/news/.gitkeep +0 -0
  30. package/package.json +104 -0
  31. package/public/favicon.ico +0 -0
  32. package/public/icon.svg +13 -0
  33. package/react-router.config.ts +5 -0
  34. package/registry-publicui.config.ts +11 -0
  35. package/registry.config.ts +13 -0
  36. package/tests/setup.ts +6 -0
  37. package/tests/testHelpers.tsx +29 -0
  38. package/towncrier.toml +33 -0
  39. package/tsconfig.json +35 -0
  40. package/vite.config.ts +111 -0
  41. package/vitest.config.ts +32 -0
@@ -0,0 +1,32 @@
1
+ {
2
+ "plugins": {
3
+ "../../packages/scripts/prepublish.js": {}
4
+ },
5
+ "hooks": {
6
+ "after:bump": [
7
+ "pipx run towncrier build --draft --yes --version ${version} > .changelog.draft",
8
+ "pipx run towncrier build --yes --version ${version}"
9
+ ],
10
+ "after:release": [
11
+ "rm .changelog.draft",
12
+ "pnpm dist-tag add @plone/aurora@${version} latest"
13
+ ]
14
+ },
15
+ "npm": {
16
+ "publish": false
17
+ },
18
+ "git": {
19
+ "commitArgs": ["--no-verify"],
20
+ "changelog": "pipx run towncrier build --draft --yes --version 0.0.0",
21
+ "requireUpstream": false,
22
+ "requireCleanWorkingDir": false,
23
+ "commitMessage": "Releasing @plone/aurora ${version}",
24
+ "tagName": "${version}",
25
+ "tagAnnotation": "${version}"
26
+ },
27
+ "github": {
28
+ "release": true,
29
+ "releaseName": "${version}",
30
+ "releaseNotes": "cat .changelog.draft"
31
+ }
32
+ }
package/.stylelintrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": ["stylelint-config-idiomatic-order"],
3
+ "plugins": ["stylelint-prettier"],
4
+ "rules": {
5
+ "prettier/prettier": true,
6
+ "order/properties-alphabetical-order": null
7
+ }
8
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,251 @@
1
+ # @plone/aurora Release Notes
2
+
3
+ <!-- Do *NOT* add new change log entries to this file.
4
+ Instead create a file in the news directory.
5
+ For helpful instructions, see:
6
+ https://6.docs.plone.org/contributing/index.html#change-log-entry
7
+ -->
8
+
9
+ <!-- towncrier release notes start -->
10
+
11
+ ## 1.0.0-alpha.10 (2026-09-21)
12
+
13
+ ### Internal
14
+
15
+ - Replaced `__dirname` with `import.meta.dirname` and added the `.js` extension to the `./.plone/vite.loader` import in `vite.config.ts` to silence the Vite native config loader deprecation warnings. @sneridagh
16
+ - Replaced remaining `Seven`/`volto` references with `Plone Aurora`/`aurora` across repository docs, Makefile, and CI configuration. @sneridagh
17
+ - Update to support Plone 6.2.2. @sneridagh
18
+
19
+ ### Documentation
20
+
21
+ - Expanded the "Create a package" and "Create a project" get-started guides to explain what a frontend add-on and a full project are, when to choose one over the other, and why an add-on's backend can only run a vanilla Plone Docker image. Also added the missing `create-project` link under "Integrators" in the docs index. @sneridagh
22
+
23
+ ## 1.0.0-alpha.9 (2026-09-16)
24
+
25
+ ### Documentation
26
+
27
+ - Update the root-loader how-to and the Prisma tutorial so `rootLoaderData` utilities return the `{ status, data }` envelope that the root loader unwraps and merges. @sneridagh [#169](https://github.com/plone/volto/issues/169)
28
+
29
+ ## 1.0.0-alpha.8 (2026-09-14)
30
+
31
+ ### Breaking
32
+
33
+ - The fixed wiring up the `rootLoaderData` utility envelope in the root loader provokes a breaking change for all `rootLoaderData` utilities so they must return a `{ status, data }` envelope (matching the PloneClient response shape), but the root loader spread the whole envelope onto the root loader data instead of merging each utility's `data`. It now merges `data`, so utilities that namespace their payload (for example `{ status, data: { likes: {...} } }`) are exposed correctly. @sneridagh
34
+
35
+ ### Bugfix
36
+
37
+ - Wire up the `rootLoaderData` utility envelope in the root loader. Utilities return a `{ status, data }` envelope (matching the PloneClient response shape), but the root loader spread the whole envelope onto the root loader data instead of merging each utility's `data`. It now merges `data`, so utilities that namespace their payload (for example `{ status, data: { likes: {...} } }`) are exposed correctly. Acting on `status` is left for a follow-up. @sneridagh
38
+
39
+ ## 1.0.0-alpha.7 (2026-09-05)
40
+
41
+ ### Internal
42
+
43
+ - Re-release for adjust tag in repo and in npm automatically during the alpha phase. @sneridagh
44
+
45
+ ## 1.0.0-alpha.6 (2026-09-05)
46
+
47
+ ### Internal
48
+
49
+ - Re-release for update the README in npm. @sneridagh
50
+
51
+ ## 1.0.0-alpha.5 (2026-09-05)
52
+
53
+ ### Breaking
54
+
55
+ - Refactored the `Content` type to properly match the basic Plone types and allow TypeScript to narrow this type automatically. @pnicolli
56
+ - Renamed the Seven app package and import alias to `@plone/aurora`. @sneridagh
57
+
58
+ ### Feature
59
+
60
+ - Added `isAuthenticated` boolean to root loader data. @arybakov05 [#6710](https://github.com/plone/volto/issues/6710)
61
+ - Added a middleware to handle Link Content Type View redirecting users that don't have Edit permissions. @pnicolli
62
+ - Added recurrence widget. @sabrina-bongiovanni
63
+ - Handled redirect responses from the backend when fetching content objects. @pnicolli
64
+ - Registered Aurora native blocks are now migrated into the Somersault field as `type: 'ploneBlock'` nodes with migrated `blockWidth` defaults so they can be rendered by the new editor pipeline later. @sneridagh
65
+ - Registered the new `@plone/contents` add-on in the Seven app. @pnicolli @giuliaghisini @sneridagh
66
+
67
+ ### Bugfix
68
+
69
+ - Fixed the dev server due to stale react-i18next imports. @sneridagh
70
+ - Gracefully clear stale `auth_seven` cookies and retry public page and asset requests anonymously instead of surfacing a `401` error boundary. @sneridagh
71
+
72
+ ### Internal
73
+
74
+ - Add the missing `@babel/core` dev dependency and ignore the local `var/` runtime directory for app development. @sneridagh
75
+ - Added `optimizeDeps.include` entries for non-addon workspace packages and app-level deps to reduce lazy dependency discovery reloads on dev server startup. @arybakov05
76
+ - Excluded `i18next-fs-backend` and `remix-i18next/server` from the client `optimizeDeps` bundle — they were still being picked up by Vite's client-side dependency scanner despite only being declared in `ssr.optimizeDeps.include`. @sneridagh
77
+ - Unify Makefile files across the packages. @ionlizarazu
78
+ - Update the Babel Vite plugin configuration for Vite 8 dependency optimization and apply the React Compiler transform to TypeScript modules outside dependencies. @sneridagh
79
+ - Updated development, CI, and documentation tooling to use pnpm 11.20.0 reproducibly through Corepack. @sneridagh
80
+ - Upgraded React Router to v8 and migrated `remix-i18next` to its v8 middleware-based API (`createI18nextMiddleware`), replacing the removed `RemixI18Next` class and its subpath exports. @sneridagh
81
+
82
+ ### Documentation
83
+
84
+ - Search and replace seven->aurora. @sneridagh
85
+
86
+ ## 1.0.0-alpha.4 (2026-05-13)
87
+
88
+ ## 1.0.0-alpha.3 (2026-05-07)
89
+
90
+ ### Internal
91
+
92
+ - Added AGENTS.md file. @pnicolli
93
+ - Aligned the Seven app TypeScript configuration and root loader typing with the monorepo-wide typecheck cleanup.
94
+
95
+ ## 1.0.0-alpha.2 (2026-04-16)
96
+
97
+ ### Breaking
98
+
99
+ - Removed Cypress support.
100
+ Added Playwright support. Move all existing Cypress tests to Playwright. @sneridagh [#7827](https://github.com/plone/volto/issues/7827)
101
+
102
+ ### Feature
103
+
104
+ - Listing block @ebrehault [#7603](https://github.com/plone/volto/issues/7603)
105
+ - Somersault editor support. @sneridagh [#7921](https://github.com/plone/volto/issues/7921)
106
+ - Create video block view @tedw87 [#8004](https://github.com/plone/volto/issues/8004)
107
+ - Refactored runtime migrations to match the somersault editor, reorganize server config files. Fixed tests. @sneridagh [#8021](https://github.com/plone/volto/issues/8021)
108
+ - Added runtime migration for default blockWidths. @sneridagh [#8071](https://github.com/plone/volto/issues/8071)
109
+ - Update to Vite 8 and RR7 7.14.0. @sneridagh [#8106](https://github.com/plone/volto/issues/8106)
110
+ - Moved the initialize client to the middleware from the config. @sneridagh [#8108](https://github.com/plone/volto/issues/8108)
111
+ - Added user data in the context for authenticated users @pnicolli
112
+ - Apply add-on-provided Vite extension loaders in the Seven app configuration so installed add-ons can extend the app build setup. @sneridagh
113
+ - Moved basic data fetching to a middleware to allow all loaders and actions to use it @pnicolli
114
+
115
+ ### Bugfix
116
+
117
+ - Added safeguard when checking for a contents blocks data @arybakov05 [#8001](https://github.com/plone/volto/issues/8001)
118
+ - Fixed SOMERSAULT_KEY constant, it is centralized now. @sneridagh [#8078](https://github.com/plone/volto/issues/8078)
119
+ - Added auth token to the requests in the root loader @pnicolli
120
+
121
+ ### Internal
122
+
123
+ - Upgraded to use RR 7.12.0. @sneridagh [#7787](https://github.com/plone/volto/issues/7787)
124
+ - Adapt Seven middleware to the updated `@plone/client` user lookup argument names. @sneridagh
125
+ - Updated app test and eslint config. @pnicolli
126
+ - Use Plone 6.2.0rc1 for development. @davisagli
127
+
128
+ ## 1.0.0-alpha.1 (2025-12-23)
129
+
130
+ ### Feature
131
+
132
+ - Server side add-on configuration. @sneridagh [#7443](https://github.com/plone/volto/issues/7443)
133
+ - Added loading of rootLoaderData utilities in the root route. @sneridagh [#7449](https://github.com/plone/volto/issues/7449)
134
+ - Improve `rootLoaderData` utility call. @sneridagh [#7455](https://github.com/plone/volto/issues/7455)
135
+ - Cypress tests for @@edit view. @sneridagh [#7650](https://github.com/plone/volto/issues/7650)
136
+ - Rename plugin to CypressPlugin. Removed support for using registry based `useBlocksAPI`, using the embedded editor instead. Removed dependency on `@platejs/playwright`. Added Cypress Plate helpers and documentation. @sneridagh [#7668](https://github.com/plone/volto/issues/7668)
137
+
138
+ ### Bugfix
139
+
140
+ - Fixed locales load on production builds. @sneridagh [#7461](https://github.com/plone/volto/issues/7461)
141
+ - Fixed problem on how `routes.ts` loaded the add-ons config for routes, in case that there's more than one add-on in the setup. @sneridagh [#7580](https://github.com/plone/volto/issues/7580)
142
+ - Fixed root loader type. @pnicolli
143
+ - Fixed styles when the main theme is tailwind-based. @pnicolli
144
+
145
+ ### Internal
146
+
147
+ - Make plate configure itself before blocks at the top. @sneridagh [#7393](https://github.com/plone/volto/issues/7393)
148
+ - Fixed unused vars linting rule. Fixed all code that violated this rule. @sneridagh [#7395](https://github.com/plone/volto/issues/7395)
149
+ - Fixed make install in case that `.vscode/extensions.json` is not created yet. @sneridagh [#7495](https://github.com/plone/volto/issues/7495)
150
+ - Include other *.md files in the repo root for link checking, fix redirecting links, and remove non-responsive server. @stevepiercy [#7712](https://github.com/plone/volto/issues/7712)
151
+ - Adjusted `pnpmfile.cjs` to be more resilient. @sneridagh
152
+ - Change the way ESlint detects add-ons for applying the JSX runtime rules. @sneridagh
153
+ - Fixed cookieplone test now that the Seven template has been merged there. @pnicolli
154
+ - Updated versions of libraries. @sneridagh
155
+ - Use a single folder for autogenerated files. @pnicolli
156
+
157
+ ### Documentation
158
+
159
+ - Added document for explaining the differences between Seven and Volto. @sneridagh [#7463.1](https://github.com/plone/volto/issues/7463.1)
160
+ - Added document for explaining what's new in React 19. @sneridagh [#7463.2](https://github.com/plone/volto/issues/7463.2)
161
+ - Added i18n documentation. @pnicolli [#7410](https://github.com/plone/volto/issues/7410)
162
+ - Rename main.css -> publicui.css for placing the publicui CSS in add-ons. @sneridagh [#7426](https://github.com/plone/volto/issues/7426)
163
+ - Added tutorial for external Prisma database support for a Seven add-on. @sneridagh [#7447](https://github.com/plone/volto/issues/7447)
164
+ - Added documentation on how to fetch additional data in the root loader. @sneridagh [#7455](https://github.com/plone/volto/issues/7455)
165
+ - Added `@plone/components` Quanta icon system documentation. @sneridagh [#7492](https://github.com/plone/volto/issues/7492)
166
+ - Document Cypress and Plate integration. @sneridagh [#7650](https://github.com/plone/volto/issues/7650)
167
+ - Added documentation of how to add Tailwind CSS support to your add-on. @sneridagh
168
+ - Added monorepo anatomy documentation. @sneridagh
169
+ - Fixed imports in Icon system how-to guide. @sneridagh
170
+
171
+ ## 1.0.0-alpha.0 (2025-09-29)
172
+
173
+ ### Feature
174
+
175
+ - Initial push of the package holding the Plone 7 codebase. @sneridagh [#6599](https://github.com/plone/volto/issues/6599)
176
+ - Do not use the dotted notation for registry generated files. @sneridagh [#6630](https://github.com/plone/volto/issues/6630)
177
+ - Simplify the data fetching, do not expose the API server to the client.
178
+ Use the addons style loader. @sneridagh [#6636](https://github.com/plone/volto/issues/6636)
179
+ - Added sitemap route. @ksuess [#6695](https://github.com/plone/volto/issues/6695)
180
+ - Add @plone/components Vite SVGR plugin proxy. @sneridagh [#6779](https://github.com/plone/volto/issues/6779)
181
+ - Fix some READMEs and release-it setup. @sneridagh [#6797](https://github.com/plone/volto/issues/6797)
182
+ - Added i18n support for projects and add-ons @pnicolli [#6866](https://github.com/plone/volto/issues/6866)
183
+ - Upgraded react-router to version 7.4.0. @pnicolli [#6888](https://github.com/plone/volto/issues/6888)
184
+ - Moved public ui routes to a new add-on to allow for easier customization @pnicolli [#6896](https://github.com/plone/volto/issues/6896)
185
+ - Unified the `quanta` app into the `seven` app. @pnicolli [#6902](https://github.com/plone/volto/issues/6902)
186
+ - Images and files proxy middleware. @pnicolli @sneridagh [#6908](https://github.com/plone/volto/issues/6908)
187
+ - Modify Cypress tests to use a centralized configuration in `@plone/tooling`. @sneridagh [#6944](https://github.com/plone/volto/issues/6944)
188
+ - Added React Compiler RC2. @sneridagh [#7107](https://github.com/plone/volto/issues/7107)
189
+ - Added a new base route for resetting react router fecthers. @deodorhunter [#7201](https://github.com/plone/volto/issues/7201)
190
+ - Add-ons registry style loader support for `cmsui.css` stylesheet in add-ons. @sneridagh [#7221](https://github.com/plone/volto/issues/7221)
191
+ - Separated publicui and cmsui styles. @pnicolli [#7225](https://github.com/plone/volto/issues/7225)
192
+ - Added language switcher in Seven. @nileshgulia1 [#7352](https://github.com/plone/volto/issues/7352)
193
+
194
+ ### Bugfix
195
+
196
+ - Fixed the upgrade to 7.2.0 problem introduced in remix-run/react-router#13078 @sneridagh [#6780](https://github.com/plone/volto/issues/6780)
197
+ - Fixed unified `flattenToAppURL` in main loader. @sneridagh [#6865](https://github.com/plone/volto/issues/6865)
198
+ - Fixed root loader error handling @pnicolli [#6901](https://github.com/plone/volto/issues/6901)
199
+ - Fixed 404 error in `/.well-known/appspecific/com.chrome.devtools.json` request. @sneridagh [#7327](https://github.com/plone/volto/issues/7327)
200
+ - Fix resource proxy to resources. Fix typings. @sneridagh [#7374](https://github.com/plone/volto/issues/7374)
201
+
202
+ ### Internal
203
+
204
+ - Update Makefile. @davisagli [#6393](https://github.com/plone/volto/issues/6393)
205
+ - Update internal `peerDependencies` to include React 19.
206
+ Update to latest RR7, and use React 19.
207
+ Update TS version. @sneridagh [#6641](https://github.com/plone/volto/issues/6641)
208
+ - Test with Plone 6.1.0rc1. @sneridagh [#6682](https://github.com/plone/volto/issues/6682)
209
+ - Back to use `react` 18 for now, due to the incompatibilities with Volto `react` @sneridagh [#6728](https://github.com/plone/volto/issues/6728)
210
+ - Fix dev in Seven projects. @sneridagh [#6733](https://github.com/plone/volto/issues/6733)
211
+ - Move Seven to [its own branch](https://github.com/plone/volto/tree/7). @sneridagh [#6770](https://github.com/plone/volto/issues/6770)
212
+ - Adjust existing tests, disable API-first PoC tests, disable Volto related tests. @sneridagh [#6770](https://github.com/plone/volto/issues/6770)
213
+ - General packages cleanup, disable Volto related packages from the build. @sneridagh [#6770](https://github.com/plone/volto/issues/6770)
214
+ - Move Seven to `apps` folder. @sneridagh [#6770](https://github.com/plone/volto/issues/6770)
215
+ - Use ESlint 9. @sneridagh [#6775](https://github.com/plone/volto/issues/6775)
216
+ - Update `prettier` and `stylelint` to latest. @sneridagh [#6777](https://github.com/plone/volto/issues/6777)
217
+ - Use latest RR and RAC. @sneridagh [#6821](https://github.com/plone/volto/issues/6821)
218
+ - Use the new `@plone/client` refactored code. @sneridagh [#6898](https://github.com/plone/volto/issues/6898)
219
+ - Upgrade `tailwind-variants` version. @sneridagh [#6899](https://github.com/plone/volto/issues/6899)
220
+ - Set the full Seven app with CMSUI as the default app and the Public UI only as opt-in. @pnicolli [#6913](https://github.com/plone/volto/issues/6913)
221
+ - Added unit tests configuration and github workflow for Seven. @pnicolli [#6916](https://github.com/plone/volto/issues/6916)
222
+ - Improve CI actions. @sneridagh [#6922](https://github.com/plone/volto/issues/6922)
223
+ - Update to Plone 6.1.1 and cleanup of Makefile. @sneridagh [#6923](https://github.com/plone/volto/issues/6923)
224
+ - Added more root layout tests. @pnicolli [#6936](https://github.com/plone/volto/issues/6936)
225
+ - Update to React Router 7.6.0 which fixes
226
+ https://github.com/remix-run/react-router/issues/13078
227
+ @sneridagh [#7060](https://github.com/plone/volto/issues/7060)
228
+ - Load catalog versions from catalog.json @sneridagh [#7065](https://github.com/plone/volto/issues/7065)
229
+ - Update to pnpm 10.10.0 @sneridagh [#7065](https://github.com/plone/volto/issues/7065)
230
+ - Seven does not rely anymore in `@plone/providers`. @sneridagh [#7105](https://github.com/plone/volto/issues/7105)
231
+ - Rename `@plone/slots` to `@plone/layout`. @sneridagh [#7119](https://github.com/plone/volto/issues/7119)
232
+ - Use @plone/helpers. @giuliaghisini [#7133](https://github.com/plone/volto/issues/7133)
233
+ - Update to latest versions. @sneridagh [#7298](https://github.com/plone/volto/issues/7298)
234
+ - Added support for `@plone/plate` package. @sneridagh [#7346](https://github.com/plone/volto/issues/7346)
235
+ - Adjust peer dependencies and engine. @sneridagh
236
+ - Remove providers from the package builds. @sneridagh
237
+ - Remove the proxy from Vite config, since we no longer use it. @sneridagh
238
+ - Update to RR7.9.1. Middleware is stable now. @sneridagh
239
+
240
+ ### Documentation
241
+
242
+ - Move docs from `source` to the `docs` root. @sneridagh [#6856](https://github.com/plone/volto/issues/6856)
243
+ - Add missing docs for release management. @sneridagh [#6951](https://github.com/plone/volto/issues/6951)
244
+ - Updated docs based on feedback provided in #7221. @pnicolli @stevepiercy [#7226](https://github.com/plone/volto/issues/7226)
245
+ - Copied and adapted some of the content from existing in `@plone/registry` docs that are fundamental for Seven. @sneridagh [#7360](https://github.com/plone/volto/issues/7360)
246
+ - Add conventions and decisions made during this year's sprints. @sneridagh [#7375](https://github.com/plone/volto/issues/7375)
247
+ - Added Shadowing documentation. @sneridagh
248
+ - Added documentation on how to create a route in Seven. @sneridagh
249
+ - Sync core development docs with main, amend `PACKAGES.md` to match Seven packages. @sneridagh
250
+
251
+ ## 1.0.0 (unreleased)
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Plone Foundation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Makefile ADDED
@@ -0,0 +1,82 @@
1
+ # Volto development
2
+
3
+ # Project settings (read from repo root)
4
+ include ../../variables.mk
5
+
6
+ # Allow setting the language for backend-docker-start. Default is `en`.
7
+ LANGUAGE ?=en
8
+
9
+ # Recipe snippets for reuse
10
+
11
+ CHECKOUT_BASENAME="$(shell basename $(shell realpath ./))"
12
+ CHECKOUT_BRANCH=$(shell git branch --show-current)
13
+ CHECKOUT_TMP=../$(CHECKOUT_BASENAME).tmp
14
+ CHECKOUT_TMP_ABS="$(shell realpath $(CHECKOUT_TMP))"
15
+
16
+ CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
17
+
18
+ # Top-level targets
19
+
20
+ .PHONY: all
21
+ all: help
22
+
23
+ # Add the following 'help' target to your Makefile
24
+ # and add help text after each target name starting with ' ##'
25
+ # to return a pretty list of targets and their descriptions.
26
+ .PHONY: help
27
+ help: ## This help message
28
+ @echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/$(CYAN)\1$(RESET):\2/' | column -c2 -t -s :)"
29
+
30
+ .PHONY: start
31
+ start: ## Starts Plone 7 in development mode
32
+ pnpm start
33
+
34
+ .PHONY: build
35
+ build: ## Build a production bundle for distribution
36
+ pnpm build
37
+
38
+ .PHONY: test
39
+ test: ## Run unit tests
40
+ pnpm test
41
+
42
+ .PHONY: clean
43
+ clean: ## Clean development environment
44
+ rm -rf node_modules
45
+
46
+ ##### Build
47
+
48
+ ../../packages/registry/dist: $(shell find ../../packages/registry/src -type f)
49
+ (cd ../../ && pnpm build:registry)
50
+
51
+ ../../packages/components/dist: $(shell find ../../packages/components/src -type f)
52
+ (cd ../../ && pnpm build:components)
53
+
54
+ ../../packages/client/dist: $(shell find ../../packages/client/src -type f)
55
+ (cd ../../ && pnpm build:client)
56
+
57
+ ../../packages/helpers/dist: $(shell find ../../packages/helpers/src -type f)
58
+ (cd ../../ && pnpm build:helpers)
59
+
60
+ ../../packages/react-router/dist: $(shell find ../../packages/react-router/src -type f)
61
+ (cd ../../ && pnpm build:react-router)
62
+
63
+ .PHONY: build-deps
64
+ build-deps: ../../packages/registry/dist ../../packages/components/dist ../../packages/client/dist ../../packages/react-router/dist ../../packages/helpers/dist ## Build dependencies
65
+
66
+ ## Storybook
67
+
68
+ .PHONY: storybook-start
69
+ storybook-start: ## Start Storybook server on port 6006
70
+ @echo "$(GREEN)==> Start Storybook$(RESET)"
71
+ pnpm run storybook
72
+
73
+ .PHONY: storybook-build
74
+ storybook-build: build-deps ## Build Storybook
75
+ pnpm build-storybook -o ../../docs/_build/html/storybook
76
+
77
+ ##### Release (it runs the one inside)
78
+
79
+ .PHONY: release-notes-copy-to-docs
80
+ release-notes-copy-to-docs: ## Copy release notes into documentation
81
+ cp CHANGELOG.md ../../docs/source/release-notes/index.md
82
+ git add ../../docs/source/release-notes/index.md
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # Plone Aurora
2
+
3
+ Plone Aurora is a fast, elegant, and intuitive React-based frontend for [Plone](https://plone.org) and [`plone.restapi`](https://github.com/plone/plone.restapi)-compatible backends.
4
+
5
+ It succeeds Plone Volto and combines React 19, [React Router 8](https://reactrouter.com/), and the modular `@plone/*` packages.
6
+
7
+ > [!WARNING]
8
+ > Plone Aurora is experimental and currently released as an alpha.
9
+ > It isn't ready for production use and has no formal support.
10
+ > Its public interfaces, behavior, and package structure may change without notice between alpha releases.
11
+
12
+ ## Get started
13
+
14
+ The recommended way to start a Plone Aurora project is with [Cookieplone](https://github.com/plone/cookieplone), which creates a ready-to-use frontend add-on project with development and deployment tooling.
15
+
16
+ Follow the [Create a package](https://plone-aurora.readthedocs.io/get-started/create-package.html) guide to create and run your first project.
17
+
18
+ ## Documentation
19
+
20
+ - [Plone Aurora documentation](https://plone-aurora.readthedocs.io/)
21
+ - [Online demo](https://aurora.demo.plone.org/)
22
+ - [Storybook](https://plone-storybook.readthedocs.io/?path=/docs/introduction--docs)
23
+ - [Source code](https://github.com/plone/aurora)
24
+ - [Issue tracker](https://github.com/plone/aurora/issues)
25
+
26
+ ## Develop Plone Aurora core
27
+
28
+ For requirements and detailed instructions, see [Develop Plone Aurora core](https://plone-aurora.readthedocs.io/contributing/developing-core.html).
29
+
30
+ Clone the repository and install its dependencies:
31
+
32
+ ```shell
33
+ git clone https://github.com/plone/aurora.git
34
+ cd aurora
35
+ make install
36
+ ```
37
+
38
+ Start the backend in one terminal:
39
+
40
+ ```shell
41
+ make backend-docker-start
42
+ ```
43
+
44
+ Start the frontend in a second terminal:
45
+
46
+ ```shell
47
+ pnpm start
48
+ ```
49
+
50
+ The frontend is available at <http://localhost:3000> and the backend at <http://localhost:8080>.
51
+
52
+ ## Releases
53
+
54
+ The Plone team publishes Aurora as a sequence of alpha releases during active development.
55
+ The npm package uses the `alpha` dist-tag.
56
+ Follow [Update Plone Aurora](https://plone-aurora.readthedocs.io/conceptual-guides/cookieplone-frontend-add-on.html#update-plone-aurora) to pin or update the Aurora version in a Cookieplone-generated project.
57
+
58
+ ## License
59
+
60
+ The [MIT License](https://github.com/plone/aurora/blob/main/LICENSE.md) covers Plone Aurora.
61
+ The [Plone Foundation](https://plone.org/foundation/) holds the copyrights.
@@ -0,0 +1,14 @@
1
+ import { expect, test } from '../../../../packages/tooling/playwright/test';
2
+
3
+ test.describe('Basic Playwright Test', () => {
4
+ test('should visit the root URL', async ({ page }) => {
5
+ await page.goto('/');
6
+ await expect(page).toHaveURL(/\/$/);
7
+ await expect(page.getByText('Home')).toBeVisible();
8
+ });
9
+
10
+ test('html tag has the lang attr', async ({ page }) => {
11
+ await page.goto('/');
12
+ await expect(page.locator('html')).toHaveAttribute('lang', 'en');
13
+ });
14
+ });
@@ -0,0 +1,19 @@
1
+ import { expect, describe, it, afterEach } from 'vitest';
2
+ import config from '@plone/registry';
3
+ import install from './index';
4
+
5
+ describe('config', () => {
6
+ afterEach(() => {
7
+ config.settings = {};
8
+ });
9
+
10
+ it('should set the default config', () => {
11
+ install();
12
+ expect(config.settings).toStrictEqual(
13
+ expect.objectContaining({
14
+ supportedLanguages: ['en'],
15
+ defaultLanguage: 'en',
16
+ }),
17
+ );
18
+ });
19
+ });
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This is the client side config entry point
3
+ */
4
+ import config from '@plone/registry';
5
+ // eslint-disable-next-line import/no-unresolved
6
+ import applyAddonConfiguration from '../../.plone/registry.loader';
7
+
8
+ export default function install() {
9
+ config.settings.defaultLanguage = 'en';
10
+ config.settings.supportedLanguages = ['en'];
11
+
12
+ applyAddonConfiguration(config);
13
+
14
+ return config;
15
+ }