@plone/aurora 1.0.0-alpha.26 → 1.0.0-alpha.28

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 (58) hide show
  1. package/dist/catalog.json +73 -0
  2. package/dist/preset.d.ts +25 -0
  3. package/dist/preset.js +14 -0
  4. package/dist/registry-publicui.config.d.ts +8 -0
  5. package/dist/registry-publicui.config.js +14 -0
  6. package/dist/registry.config.d.ts +16 -0
  7. package/dist/registry.config.js +17 -0
  8. package/dist/routes.d.ts +25 -0
  9. package/dist/routes.js +23 -0
  10. package/dist/vite.d.ts +24 -0
  11. package/dist/vite.js +135 -0
  12. package/package.json +93 -46
  13. package/pnpmfile.cjs +20 -0
  14. package/server.js +2 -1
  15. package/{app → src/app}/config/index.ts +1 -2
  16. package/{app → src/app}/config/server.server.ts +2 -4
  17. package/{app → src/app}/entry.client.tsx +12 -1
  18. package/{app → src/app}/entry.server.tsx +7 -0
  19. package/{app → src/app}/i18next.server.test.ts +48 -1
  20. package/{app → src/app}/i18next.server.ts +22 -14
  21. package/{app → src/app}/middleware.server.test.ts +0 -68
  22. package/{app → src/app}/middleware.server.ts +32 -40
  23. package/src/app/root.server.ts +124 -0
  24. package/{app → src/app}/root.test.tsx +36 -7
  25. package/src/app/root.tsx +101 -0
  26. package/.release-it.json +0 -32
  27. package/.stylelintrc +0 -8
  28. package/CHANGELOG.md +0 -450
  29. package/Makefile +0 -82
  30. package/acceptance/tests/anonymous-401-redirect.test.ts +0 -75
  31. package/acceptance/tests/basic.test.ts +0 -14
  32. package/acceptance/tests/hydration.test.ts +0 -106
  33. package/acceptance/tests/multilingual-root-redirect.test.ts +0 -45
  34. package/app/root.tsx +0 -191
  35. package/app/routes.ts +0 -20
  36. package/news/.gitkeep +0 -0
  37. package/public/favicon.ico +0 -0
  38. package/public/icon.svg +0 -13
  39. package/react-router.config.ts +0 -11
  40. package/registry-publicui.config.ts +0 -11
  41. package/registry.config.ts +0 -16
  42. package/tests/setup.ts +0 -6
  43. package/tests/testHelpers.tsx +0 -29
  44. package/towncrier.toml +0 -33
  45. package/tsconfig.json +0 -35
  46. package/vite.config.ts +0 -117
  47. package/vitest.config.ts +0 -32
  48. /package/{app → src/app}/config/index.test.ts +0 -0
  49. /package/{app → src/app}/config/server/content-migrations.server.test.ts +0 -0
  50. /package/{app → src/app}/config/server/content-migrations.server.ts +0 -0
  51. /package/{app → src/app}/config/server/migrations.server.ts +0 -0
  52. /package/{app → src/app}/config/server.server.test.ts +0 -0
  53. /package/{app → src/app}/config/types.ts +0 -0
  54. /package/{app → src/app}/i18n.ts +0 -0
  55. /package/{app → src/app}/okroute.test.tsx +0 -0
  56. /package/{app → src/app}/okroute.tsx +0 -0
  57. /package/{app → src/app}/reset-fetcher.test.tsx +0 -0
  58. /package/{app → src/app}/reset-fetcher.tsx +0 -0
package/tsconfig.json DELETED
@@ -1,35 +0,0 @@
1
- {
2
- "include": [
3
- "**/*.ts",
4
- "**/*.tsx",
5
- "**/.server/**/*.ts",
6
- "**/.server/**/*.tsx",
7
- "**/.client/**/*.ts",
8
- "**/.client/**/*.tsx",
9
- ".react-router/types/**/*"
10
- ],
11
- "exclude": ["packages/*"],
12
- "compilerOptions": {
13
- "lib": ["DOM", "DOM.Iterable", "ES2022"],
14
- "types": ["@react-router/node", "vite/client", "@plone/icons/svg"],
15
- "isolatedModules": true,
16
- "esModuleInterop": true,
17
- "jsx": "react-jsx",
18
- "module": "ESNext",
19
- "moduleResolution": "Bundler",
20
- "resolveJsonModule": true,
21
- "target": "ES2022",
22
- "strict": true,
23
- "allowJs": true,
24
- "skipLibCheck": true,
25
- "forceConsistentCasingInFileNames": true,
26
- "paths": {
27
- "~/*": ["./app/*"],
28
- "@plone/aurora/*": ["./*"],
29
- "@plone/plate/*": ["../../packages/plate/src/*"]
30
- },
31
- "noEmit": true,
32
- "rootDirs": [".", "./.react-router/types"],
33
- "plugins": [{ "name": "@react-router/dev" }]
34
- }
35
- }
package/vite.config.ts DELETED
@@ -1,117 +0,0 @@
1
- import { reactRouter } from '@react-router/dev/vite';
2
- import path from 'node:path';
3
- import { defineConfig, PluginOption } from 'vite';
4
- import { PloneRegistryVitePlugin } from '@plone/registry/vite-plugin';
5
- import { PloneSVGRVitePlugin } from '@plone/icons/vite-plugin-svgr';
6
- import applyAddonViteConfiguration from './.plone/vite.loader.js';
7
- import babel from 'vite-plugin-babel';
8
- import tailwindcss from '@tailwindcss/vite';
9
- import { visualizer } from 'rollup-plugin-visualizer';
10
- import devtoolsJson from 'vite-plugin-devtools-json';
11
-
12
- export default defineConfig(({ command, mode, isSsrBuild }) => {
13
- const analyze = process.env.ANALYZE === 'true';
14
- const target = isSsrBuild ? 'server' : 'client';
15
- const statsDir = path.resolve(import.meta.dirname, 'build', 'stats');
16
-
17
- const baseConfig = {
18
- plugins: [
19
- PloneSVGRVitePlugin(),
20
- PloneRegistryVitePlugin(),
21
- tailwindcss(),
22
- reactRouter(),
23
- babel({
24
- include: /\.tsx?$/,
25
- exclude: /node_modules/,
26
- babelConfig: {
27
- presets: ['@babel/preset-typescript'],
28
- plugins: ['babel-plugin-react-compiler'],
29
- },
30
- }),
31
- devtoolsJson(),
32
- ...(analyze
33
- ? [
34
- visualizer({
35
- filename: path.join(statsDir, `stats-${target}.html`),
36
- template: 'treemap',
37
- gzipSize: true,
38
- brotliSize: true,
39
- }),
40
- visualizer({
41
- filename: path.join(statsDir, `stats-${target}.json`),
42
- template: 'raw-data',
43
- gzipSize: true,
44
- brotliSize: true,
45
- }),
46
- ]
47
- : []),
48
- ] as PluginOption[],
49
- optimizeDeps: {
50
- // Server-only deps that Vite would otherwise still pick up for the
51
- // client bundle — keep in sync with ssr.optimizeDeps.include below
52
- exclude: [
53
- 'i18next-fs-backend',
54
- 'i18next-fs-backend/cjs',
55
- 'remix-i18next',
56
- ],
57
- include: [
58
- // App-level deps (in apps/aurora/package.json)
59
- 'i18next',
60
- 'i18next-browser-languagedetector',
61
- 'i18next-http-backend',
62
- 'react-i18next',
63
- // Injected by babel-plugin-react-compiler, not in any package.json
64
- 'react/compiler-runtime',
65
- // @plone/components, @plone/icons, @plone/quanta and @plone/helpers are
66
- // not registered add-ons, so their deps can't be declared in
67
- // vite.extend.js — list them here
68
- '@plone/components > clsx',
69
- '@plone/components > react-aria',
70
- '@plone/components > react-aria-components',
71
- '@plone/icons > @react-aria/utils',
72
- '@plone/icons > @react-spectrum/utils',
73
- '@plone/icons > clsx',
74
- '@plone/icons > tailwind-variants',
75
- '@plone/quanta > @internationalized/date',
76
- '@plone/quanta > clsx',
77
- '@plone/quanta > react-aria-components',
78
- '@plone/quanta > react-aria-components/DropZone',
79
- '@plone/quanta > react-aria-components/Form',
80
- '@plone/quanta > react-aria-components/Group',
81
- '@plone/quanta > react-aria-components/Modal',
82
- '@plone/quanta > react-aria-components/Table',
83
- '@plone/quanta > react-aria-components/Tooltip',
84
- '@plone/quanta > react-aria-components/composeRenderProps',
85
- '@plone/quanta > tailwind-merge',
86
- '@plone/quanta > tailwind-variants',
87
- '@plone/quanta > usehooks-ts',
88
- '@plone/helpers > jotai',
89
- '@plone/helpers > jotai/utils',
90
- '@plone/helpers > jotai/vanilla',
91
- '@plone/helpers > jotai-optics',
92
- ],
93
- },
94
- ssr: {
95
- optimizeDeps: {
96
- include: ['i18next-fs-backend/cjs', 'isbot', 'remix-i18next'],
97
- },
98
- },
99
- resolve: {
100
- tsconfigPaths: true,
101
- },
102
- server: {
103
- port: 3000,
104
- fs: {
105
- // Allow serving files from one level up to the project root
106
- // (required by the Cookieplone setup)
107
- allow: ['../../../.'],
108
- },
109
- },
110
- };
111
-
112
- return applyAddonViteConfiguration(baseConfig, {
113
- command,
114
- mode,
115
- isSsrBuild,
116
- });
117
- });
package/vitest.config.ts DELETED
@@ -1,32 +0,0 @@
1
- import { coverageConfigDefaults, defineConfig } from 'vitest/config';
2
-
3
- // https://vitejs.dev/config/
4
- export default defineConfig({
5
- plugins: [],
6
- test: {
7
- globals: true,
8
- environment: 'jsdom',
9
- setupFiles: ['./tests/setup.ts'],
10
- // you might want to disable it, if you don't have tests that rely on CSS
11
- // since parsing CSS is slow
12
- // css: true,
13
- exclude: ['**/node_modules/**', '**/lib/**', '**/acceptance/**'],
14
- coverage: {
15
- exclude: [
16
- ...coverageConfigDefaults.exclude,
17
- 'packages/**',
18
- 'build/**',
19
- '*.config.ts',
20
- '.plone/**',
21
- 'app/entry.server.tsx',
22
- 'app/entry.client.tsx',
23
- 'app/i18next.server.ts',
24
- 'app/i18n.ts',
25
- 'app/routes.ts',
26
- ],
27
- },
28
- },
29
- resolve: {
30
- tsconfigPaths: true,
31
- },
32
- });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes