@plone/aurora 1.0.0-alpha.5

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 +29 -0
  2. package/.stylelintrc +8 -0
  3. package/CHANGELOG.md +211 -0
  4. package/LICENSE.md +21 -0
  5. package/Makefile +82 -0
  6. package/README.md +33 -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 +42 -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 +178 -0
  28. package/app/routes.ts +20 -0
  29. package/news/.gitkeep +0 -0
  30. package/package.json +103 -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,29 @@
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": "rm .changelog.draft"
11
+ },
12
+ "npm": {
13
+ "publish": false
14
+ },
15
+ "git": {
16
+ "commitArgs": ["--no-verify"],
17
+ "changelog": "pipx run towncrier build --draft --yes --version 0.0.0",
18
+ "requireUpstream": false,
19
+ "requireCleanWorkingDir": false,
20
+ "commitMessage": "Release @plone/aurora ${version}",
21
+ "tagName": "plone-aurora-${version}",
22
+ "tagAnnotation": "Release @plone/aurora ${version}"
23
+ },
24
+ "github": {
25
+ "release": true,
26
+ "releaseName": "@plone/aurora ${version}",
27
+ "releaseNotes": "cat .changelog.draft"
28
+ }
29
+ }
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,211 @@
1
+ # Seven 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.5 (2026-09-05)
12
+
13
+ ### Breaking
14
+
15
+ - Refactored the `Content` type to properly match the basic Plone types and allow TypeScript to narrow this type automatically. @pnicolli
16
+ - Renamed the Seven app package and import alias to `@plone/aurora`. @sneridagh
17
+
18
+ ### Feature
19
+
20
+ - Added `isAuthenticated` boolean to root loader data. @arybakov05 [#6710](https://github.com/plone/volto/issues/6710)
21
+ - Added a middleware to handle Link Content Type View redirecting users that don't have Edit permissions. @pnicolli
22
+ - Added recurrence widget. @sabrina-bongiovanni
23
+ - Handled redirect responses from the backend when fetching content objects. @pnicolli
24
+ - 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
25
+ - Registered the new `@plone/contents` add-on in the Seven app. @pnicolli @giuliaghisini @sneridagh
26
+
27
+ ### Bugfix
28
+
29
+ - Fixed the dev server due to stale react-i18next imports. @sneridagh
30
+ - Gracefully clear stale `auth_seven` cookies and retry public page and asset requests anonymously instead of surfacing a `401` error boundary. @sneridagh
31
+
32
+ ### Internal
33
+
34
+ - Add the missing `@babel/core` dev dependency and ignore the local `var/` runtime directory for app development. @sneridagh
35
+ - Added `optimizeDeps.include` entries for non-addon workspace packages and app-level deps to reduce lazy dependency discovery reloads on dev server startup. @arybakov05
36
+ - 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
37
+ - Unify Makefile files across the packages. @ionlizarazu
38
+ - Update the Babel Vite plugin configuration for Vite 8 dependency optimization and apply the React Compiler transform to TypeScript modules outside dependencies. @sneridagh
39
+ - Updated development, CI, and documentation tooling to use pnpm 11.20.0 reproducibly through Corepack. @sneridagh
40
+ - 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
41
+
42
+ ### Documentation
43
+
44
+ - Search and replace seven->aurora. @sneridagh
45
+
46
+ ## 1.0.0-alpha.4 (2026-05-13)
47
+
48
+ ## 1.0.0-alpha.3 (2026-05-07)
49
+
50
+ ### Internal
51
+
52
+ - Added AGENTS.md file. @pnicolli
53
+ - Aligned the Seven app TypeScript configuration and root loader typing with the monorepo-wide typecheck cleanup.
54
+
55
+ ## 1.0.0-alpha.2 (2026-04-16)
56
+
57
+ ### Breaking
58
+
59
+ - Removed Cypress support.
60
+ Added Playwright support. Move all existing Cypress tests to Playwright. @sneridagh [#7827](https://github.com/plone/volto/issues/7827)
61
+
62
+ ### Feature
63
+
64
+ - Listing block @ebrehault [#7603](https://github.com/plone/volto/issues/7603)
65
+ - Somersault editor support. @sneridagh [#7921](https://github.com/plone/volto/issues/7921)
66
+ - Create video block view @tedw87 [#8004](https://github.com/plone/volto/issues/8004)
67
+ - Refactored runtime migrations to match the somersault editor, reorganize server config files. Fixed tests. @sneridagh [#8021](https://github.com/plone/volto/issues/8021)
68
+ - Added runtime migration for default blockWidths. @sneridagh [#8071](https://github.com/plone/volto/issues/8071)
69
+ - Update to Vite 8 and RR7 7.14.0. @sneridagh [#8106](https://github.com/plone/volto/issues/8106)
70
+ - Moved the initialize client to the middleware from the config. @sneridagh [#8108](https://github.com/plone/volto/issues/8108)
71
+ - Added user data in the context for authenticated users @pnicolli
72
+ - Apply add-on-provided Vite extension loaders in the Seven app configuration so installed add-ons can extend the app build setup. @sneridagh
73
+ - Moved basic data fetching to a middleware to allow all loaders and actions to use it @pnicolli
74
+
75
+ ### Bugfix
76
+
77
+ - Added safeguard when checking for a contents blocks data @arybakov05 [#8001](https://github.com/plone/volto/issues/8001)
78
+ - Fixed SOMERSAULT_KEY constant, it is centralized now. @sneridagh [#8078](https://github.com/plone/volto/issues/8078)
79
+ - Added auth token to the requests in the root loader @pnicolli
80
+
81
+ ### Internal
82
+
83
+ - Upgraded to use RR 7.12.0. @sneridagh [#7787](https://github.com/plone/volto/issues/7787)
84
+ - Adapt Seven middleware to the updated `@plone/client` user lookup argument names. @sneridagh
85
+ - Updated app test and eslint config. @pnicolli
86
+ - Use Plone 6.2.0rc1 for development. @davisagli
87
+
88
+ ## 1.0.0-alpha.1 (2025-12-23)
89
+
90
+ ### Feature
91
+
92
+ - Server side add-on configuration. @sneridagh [#7443](https://github.com/plone/volto/issues/7443)
93
+ - Added loading of rootLoaderData utilities in the root route. @sneridagh [#7449](https://github.com/plone/volto/issues/7449)
94
+ - Improve `rootLoaderData` utility call. @sneridagh [#7455](https://github.com/plone/volto/issues/7455)
95
+ - Cypress tests for @@edit view. @sneridagh [#7650](https://github.com/plone/volto/issues/7650)
96
+ - 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)
97
+
98
+ ### Bugfix
99
+
100
+ - Fixed locales load on production builds. @sneridagh [#7461](https://github.com/plone/volto/issues/7461)
101
+ - 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)
102
+ - Fixed root loader type. @pnicolli
103
+ - Fixed styles when the main theme is tailwind-based. @pnicolli
104
+
105
+ ### Internal
106
+
107
+ - Make plate configure itself before blocks at the top. @sneridagh [#7393](https://github.com/plone/volto/issues/7393)
108
+ - Fixed unused vars linting rule. Fixed all code that violated this rule. @sneridagh [#7395](https://github.com/plone/volto/issues/7395)
109
+ - Fixed make install in case that `.vscode/extensions.json` is not created yet. @sneridagh [#7495](https://github.com/plone/volto/issues/7495)
110
+ - 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)
111
+ - Adjusted `pnpmfile.cjs` to be more resilient. @sneridagh
112
+ - Change the way ESlint detects add-ons for applying the JSX runtime rules. @sneridagh
113
+ - Fixed cookieplone test now that the Seven template has been merged there. @pnicolli
114
+ - Updated versions of libraries. @sneridagh
115
+ - Use a single folder for autogenerated files. @pnicolli
116
+
117
+ ### Documentation
118
+
119
+ - Added document for explaining the differences between Seven and Volto. @sneridagh [#7463.1](https://github.com/plone/volto/issues/7463.1)
120
+ - Added document for explaining what's new in React 19. @sneridagh [#7463.2](https://github.com/plone/volto/issues/7463.2)
121
+ - Added i18n documentation. @pnicolli [#7410](https://github.com/plone/volto/issues/7410)
122
+ - Rename main.css -> publicui.css for placing the publicui CSS in add-ons. @sneridagh [#7426](https://github.com/plone/volto/issues/7426)
123
+ - Added tutorial for external Prisma database support for a Seven add-on. @sneridagh [#7447](https://github.com/plone/volto/issues/7447)
124
+ - Added documentation on how to fetch additional data in the root loader. @sneridagh [#7455](https://github.com/plone/volto/issues/7455)
125
+ - Added `@plone/components` Quanta icon system documentation. @sneridagh [#7492](https://github.com/plone/volto/issues/7492)
126
+ - Document Cypress and Plate integration. @sneridagh [#7650](https://github.com/plone/volto/issues/7650)
127
+ - Added documentation of how to add Tailwind CSS support to your add-on. @sneridagh
128
+ - Added monorepo anatomy documentation. @sneridagh
129
+ - Fixed imports in Icon system how-to guide. @sneridagh
130
+
131
+ ## 1.0.0-alpha.0 (2025-09-29)
132
+
133
+ ### Feature
134
+
135
+ - Initial push of the package holding the Plone 7 codebase. @sneridagh [#6599](https://github.com/plone/volto/issues/6599)
136
+ - Do not use the dotted notation for registry generated files. @sneridagh [#6630](https://github.com/plone/volto/issues/6630)
137
+ - Simplify the data fetching, do not expose the API server to the client.
138
+ Use the addons style loader. @sneridagh [#6636](https://github.com/plone/volto/issues/6636)
139
+ - Added sitemap route. @ksuess [#6695](https://github.com/plone/volto/issues/6695)
140
+ - Add @plone/components Vite SVGR plugin proxy. @sneridagh [#6779](https://github.com/plone/volto/issues/6779)
141
+ - Fix some READMEs and release-it setup. @sneridagh [#6797](https://github.com/plone/volto/issues/6797)
142
+ - Added i18n support for projects and add-ons @pnicolli [#6866](https://github.com/plone/volto/issues/6866)
143
+ - Upgraded react-router to version 7.4.0. @pnicolli [#6888](https://github.com/plone/volto/issues/6888)
144
+ - Moved public ui routes to a new add-on to allow for easier customization @pnicolli [#6896](https://github.com/plone/volto/issues/6896)
145
+ - Unified the `quanta` app into the `seven` app. @pnicolli [#6902](https://github.com/plone/volto/issues/6902)
146
+ - Images and files proxy middleware. @pnicolli @sneridagh [#6908](https://github.com/plone/volto/issues/6908)
147
+ - Modify Cypress tests to use a centralized configuration in `@plone/tooling`. @sneridagh [#6944](https://github.com/plone/volto/issues/6944)
148
+ - Added React Compiler RC2. @sneridagh [#7107](https://github.com/plone/volto/issues/7107)
149
+ - Added a new base route for resetting react router fecthers. @deodorhunter [#7201](https://github.com/plone/volto/issues/7201)
150
+ - Add-ons registry style loader support for `cmsui.css` stylesheet in add-ons. @sneridagh [#7221](https://github.com/plone/volto/issues/7221)
151
+ - Separated publicui and cmsui styles. @pnicolli [#7225](https://github.com/plone/volto/issues/7225)
152
+ - Added language switcher in Seven. @nileshgulia1 [#7352](https://github.com/plone/volto/issues/7352)
153
+
154
+ ### Bugfix
155
+
156
+ - Fixed the upgrade to 7.2.0 problem introduced in remix-run/react-router#13078 @sneridagh [#6780](https://github.com/plone/volto/issues/6780)
157
+ - Fixed unified `flattenToAppURL` in main loader. @sneridagh [#6865](https://github.com/plone/volto/issues/6865)
158
+ - Fixed root loader error handling @pnicolli [#6901](https://github.com/plone/volto/issues/6901)
159
+ - Fixed 404 error in `/.well-known/appspecific/com.chrome.devtools.json` request. @sneridagh [#7327](https://github.com/plone/volto/issues/7327)
160
+ - Fix resource proxy to resources. Fix typings. @sneridagh [#7374](https://github.com/plone/volto/issues/7374)
161
+
162
+ ### Internal
163
+
164
+ - Update Makefile. @davisagli [#6393](https://github.com/plone/volto/issues/6393)
165
+ - Update internal `peerDependencies` to include React 19.
166
+ Update to latest RR7, and use React 19.
167
+ Update TS version. @sneridagh [#6641](https://github.com/plone/volto/issues/6641)
168
+ - Test with Plone 6.1.0rc1. @sneridagh [#6682](https://github.com/plone/volto/issues/6682)
169
+ - Back to use `react` 18 for now, due to the incompatibilities with Volto `react` @sneridagh [#6728](https://github.com/plone/volto/issues/6728)
170
+ - Fix dev in Seven projects. @sneridagh [#6733](https://github.com/plone/volto/issues/6733)
171
+ - Move Seven to [its own branch](https://github.com/plone/volto/tree/7). @sneridagh [#6770](https://github.com/plone/volto/issues/6770)
172
+ - Adjust existing tests, disable API-first PoC tests, disable Volto related tests. @sneridagh [#6770](https://github.com/plone/volto/issues/6770)
173
+ - General packages cleanup, disable Volto related packages from the build. @sneridagh [#6770](https://github.com/plone/volto/issues/6770)
174
+ - Move Seven to `apps` folder. @sneridagh [#6770](https://github.com/plone/volto/issues/6770)
175
+ - Use ESlint 9. @sneridagh [#6775](https://github.com/plone/volto/issues/6775)
176
+ - Update `prettier` and `stylelint` to latest. @sneridagh [#6777](https://github.com/plone/volto/issues/6777)
177
+ - Use latest RR and RAC. @sneridagh [#6821](https://github.com/plone/volto/issues/6821)
178
+ - Use the new `@plone/client` refactored code. @sneridagh [#6898](https://github.com/plone/volto/issues/6898)
179
+ - Upgrade `tailwind-variants` version. @sneridagh [#6899](https://github.com/plone/volto/issues/6899)
180
+ - 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)
181
+ - Added unit tests configuration and github workflow for Seven. @pnicolli [#6916](https://github.com/plone/volto/issues/6916)
182
+ - Improve CI actions. @sneridagh [#6922](https://github.com/plone/volto/issues/6922)
183
+ - Update to Plone 6.1.1 and cleanup of Makefile. @sneridagh [#6923](https://github.com/plone/volto/issues/6923)
184
+ - Added more root layout tests. @pnicolli [#6936](https://github.com/plone/volto/issues/6936)
185
+ - Update to React Router 7.6.0 which fixes
186
+ https://github.com/remix-run/react-router/issues/13078
187
+ @sneridagh [#7060](https://github.com/plone/volto/issues/7060)
188
+ - Load catalog versions from catalog.json @sneridagh [#7065](https://github.com/plone/volto/issues/7065)
189
+ - Update to pnpm 10.10.0 @sneridagh [#7065](https://github.com/plone/volto/issues/7065)
190
+ - Seven does not rely anymore in `@plone/providers`. @sneridagh [#7105](https://github.com/plone/volto/issues/7105)
191
+ - Rename `@plone/slots` to `@plone/layout`. @sneridagh [#7119](https://github.com/plone/volto/issues/7119)
192
+ - Use @plone/helpers. @giuliaghisini [#7133](https://github.com/plone/volto/issues/7133)
193
+ - Update to latest versions. @sneridagh [#7298](https://github.com/plone/volto/issues/7298)
194
+ - Added support for `@plone/plate` package. @sneridagh [#7346](https://github.com/plone/volto/issues/7346)
195
+ - Adjust peer dependencies and engine. @sneridagh
196
+ - Remove providers from the package builds. @sneridagh
197
+ - Remove the proxy from Vite config, since we no longer use it. @sneridagh
198
+ - Update to RR7.9.1. Middleware is stable now. @sneridagh
199
+
200
+ ### Documentation
201
+
202
+ - Move docs from `source` to the `docs` root. @sneridagh [#6856](https://github.com/plone/volto/issues/6856)
203
+ - Add missing docs for release management. @sneridagh [#6951](https://github.com/plone/volto/issues/6951)
204
+ - Updated docs based on feedback provided in #7221. @pnicolli @stevepiercy [#7226](https://github.com/plone/volto/issues/7226)
205
+ - 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)
206
+ - Add conventions and decisions made during this year's sprints. @sneridagh [#7375](https://github.com/plone/volto/issues/7375)
207
+ - Added Shadowing documentation. @sneridagh
208
+ - Added documentation on how to create a route in Seven. @sneridagh
209
+ - Sync core development docs with main, amend `PACKAGES.md` to match Seven packages. @sneridagh
210
+
211
+ ## 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,33 @@
1
+ # Seven
2
+
3
+ > [!WARNING]
4
+ > This package and all the efforts around it are not even in an alpha state and are experimental.
5
+ > The community offers no support whatsoever for it.
6
+ > Breaking changes may occur without notice.
7
+
8
+ This is the initial (and very early) implementation of Plone 7 public app.
9
+ After the design and first implementations of all the required pieces (the `@plone/*` libraries) that will compose Plone 7, this package will concentrate all the development during the next years.
10
+
11
+ It is based on [React Router](https://reactrouter.com/home) 7, using the `@plone/*` libraries.
12
+
13
+ The name of this package and its folder name in `apps` may also change since it's undecided yet.
14
+
15
+ ## Releases
16
+
17
+ Even in experimental phase, this package will be soft released periodically, under a tag.
18
+ This will provide a way to try it out in real development and deploy scenarios.
19
+
20
+ ## Development
21
+
22
+ To start, from the root of the monorepo, issue the following commands.
23
+
24
+ ```shell
25
+ pnpm install
26
+ pnpm --filter @plone/aurora run dev
27
+ ```
28
+
29
+ Then start the Plone backend.
30
+
31
+ ```shell
32
+ make backend-docker-start
33
+ ```
@@ -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
+ }
@@ -0,0 +1,184 @@
1
+ import { afterEach, describe, expect, it } from 'vitest';
2
+ import { PLONE_BLOCK_TYPE } from '@plone/helpers';
3
+ import config from '@plone/registry';
4
+ import { SOMERSAULT_KEY } from '@plone/plate/constants';
5
+ import type { Content, ContentBase } from '@plone/types';
6
+ import installMigrations from './migrations.server';
7
+ import { migrateContent } from './content-migrations.server';
8
+
9
+ type TestContent = Partial<ContentBase> & {
10
+ '@id': string;
11
+ title: string;
12
+ blocks: Record<string, unknown>;
13
+ blocks_layout: {
14
+ items: string[];
15
+ };
16
+ };
17
+
18
+ describe('content migrations', () => {
19
+ afterEach(() => {
20
+ config.settings = {};
21
+ config.blocks = {} as typeof config.blocks;
22
+ const utilities = config.utilities as Partial<Record<string, unknown>>;
23
+ delete utilities.somersaultBlockMigration;
24
+ delete utilities.somersaultMigration;
25
+ });
26
+
27
+ it('migrates title and legacy value blocks into the somersault block', () => {
28
+ config.blocks = {
29
+ blocksConfig: {},
30
+ } as typeof config.blocks;
31
+ installMigrations();
32
+
33
+ const content: TestContent = {
34
+ '@id': 'http://example.com/',
35
+ title: 'Page title',
36
+ blocks: {
37
+ text: {
38
+ '@type': 'slate',
39
+ value: [{ type: 'p', children: [{ text: 'First block' }] }],
40
+ },
41
+ titleBlock: {
42
+ '@type': 'title',
43
+ },
44
+ },
45
+ blocks_layout: {
46
+ items: ['text', 'titleBlock'],
47
+ },
48
+ };
49
+
50
+ const migrated = migrateContent(content as unknown as Content);
51
+
52
+ expect(migrated.blocks?.[SOMERSAULT_KEY]).toEqual({
53
+ '@type': SOMERSAULT_KEY,
54
+ value: [
55
+ {
56
+ blockWidth: 'default',
57
+ type: 'p',
58
+ children: [{ text: 'First block' }],
59
+ },
60
+ {
61
+ blockWidth: 'default',
62
+ type: 'title',
63
+ children: [{ text: 'Page title' }],
64
+ },
65
+ ],
66
+ });
67
+ });
68
+
69
+ it('moves native blocks into the somersault field as ploneBlock nodes', () => {
70
+ config.blocks = {
71
+ blocksConfig: {
72
+ listing: {},
73
+ image: {},
74
+ configuredWidth: {
75
+ defaultBlockWidth: 'layout',
76
+ blockSchema: {
77
+ title: 'Configured width block',
78
+ fieldsets: [],
79
+ required: [],
80
+ properties: {},
81
+ },
82
+ },
83
+ schemaWidth: {
84
+ blockSchema: {
85
+ title: 'Schema width block',
86
+ fieldsets: [],
87
+ required: [],
88
+ properties: {
89
+ blockWidth: {
90
+ widget: 'width',
91
+ default: 'full',
92
+ styleField: true,
93
+ },
94
+ },
95
+ },
96
+ },
97
+ },
98
+ } as unknown as typeof config.blocks;
99
+ installMigrations();
100
+
101
+ const content: TestContent = {
102
+ '@id': 'http://example.com/',
103
+ title: 'Page title',
104
+ blocks: {
105
+ titleBlock: {
106
+ '@type': 'title',
107
+ },
108
+ listing: {
109
+ '@type': 'listing',
110
+ querystring: {
111
+ criteria: [],
112
+ },
113
+ },
114
+ image: {
115
+ '@type': 'image',
116
+ url: '/image',
117
+ alt: 'Example image',
118
+ },
119
+ configuredWidth: {
120
+ '@type': 'configuredWidth',
121
+ },
122
+ schemaWidth: {
123
+ '@type': 'schemaWidth',
124
+ },
125
+ custom: {
126
+ '@type': 'custom-unregistered',
127
+ foo: 'bar',
128
+ },
129
+ },
130
+ blocks_layout: {
131
+ items: [
132
+ 'titleBlock',
133
+ 'listing',
134
+ 'image',
135
+ 'configuredWidth',
136
+ 'schemaWidth',
137
+ 'custom',
138
+ ],
139
+ },
140
+ };
141
+
142
+ const migrated = migrateContent(content as unknown as Content);
143
+
144
+ expect(migrated.blocks?.[SOMERSAULT_KEY]).toEqual({
145
+ '@type': SOMERSAULT_KEY,
146
+ value: [
147
+ {
148
+ blockWidth: 'default',
149
+ type: 'title',
150
+ children: [{ text: 'Page title' }],
151
+ },
152
+ {
153
+ '@type': 'listing',
154
+ blockWidth: 'default',
155
+ children: [{ text: '' }],
156
+ querystring: {
157
+ criteria: [],
158
+ },
159
+ type: PLONE_BLOCK_TYPE,
160
+ },
161
+ {
162
+ '@type': 'image',
163
+ alt: 'Example image',
164
+ blockWidth: 'default',
165
+ children: [{ text: '' }],
166
+ type: PLONE_BLOCK_TYPE,
167
+ url: '/image',
168
+ },
169
+ {
170
+ '@type': 'configuredWidth',
171
+ blockWidth: 'layout',
172
+ children: [{ text: '' }],
173
+ type: PLONE_BLOCK_TYPE,
174
+ },
175
+ {
176
+ '@type': 'schemaWidth',
177
+ blockWidth: 'full',
178
+ children: [{ text: '' }],
179
+ type: PLONE_BLOCK_TYPE,
180
+ },
181
+ ],
182
+ });
183
+ });
184
+ });