@ossy/platform 0.0.1-alpha.1 → 0.0.1-alpha.2
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 +12 -0
- package/README.md +6 -2
- package/package.json +3 -2
- package/src/platform/home.page.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.0.1-alpha.2 (2026-03-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ossy/platform
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## 0.0.1-alpha.1 (2026-03-29)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @ossy/platform
|
|
@@ -13,6 +21,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
13
21
|
|
|
14
22
|
# Changelog
|
|
15
23
|
|
|
24
|
+
## Unreleased
|
|
25
|
+
|
|
26
|
+
- Platform home route ships from **`src/platform/home.page.js`**; sites add **`@ossy/platform`** to **`modules`** (formerly `pagesModules`) and provide **`src/page-shell.jsx`** (see README).
|
|
27
|
+
|
|
16
28
|
## 0.0.1-alpha.0
|
|
17
29
|
|
|
18
30
|
- Initial extract from `website-ossy`: `Definition`, `PlatformResourceTemplates`, `PlatformHomeBody`, `platformHomeMetadata`.
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ npm install @ossy/platform
|
|
|
11
11
|
Peer dependencies (your app should already include them):
|
|
12
12
|
|
|
13
13
|
- `react`
|
|
14
|
+
- `@ossy/connected-components` (for **`usePageShell`** on module pages)
|
|
14
15
|
- `@ossy/design-system`
|
|
15
16
|
- `@ossy/router-react`
|
|
16
17
|
- `@ossy/sdk-react`
|
|
@@ -18,8 +19,11 @@ Peer dependencies (your app should already include them):
|
|
|
18
19
|
## Use in a website
|
|
19
20
|
|
|
20
21
|
1. Spread **`PlatformResourceTemplates`** into your app `resourceTemplates` (and sync to the API via publish / cms upload).
|
|
21
|
-
2. Add
|
|
22
|
-
3.
|
|
22
|
+
2. Add **`@ossy/platform`** to **`modules`** in `src/config.js` so **`src/platform/home.page.js`** is picked up (JSX-free so Rollup can parse `.page.js`; **`*.page.jsx`** works under `src/` for other files if the bundler accepts JSX there).
|
|
23
|
+
3. Add **`src/page-shell.jsx`** (or `.js`) that default-exports your site layout (e.g. ossy.se re-exports **`Layout`**). Module pages call **`usePageShell()`** so they do not depend on site paths.
|
|
24
|
+
4. Register **`Definition`** in your navigation / module registry.
|
|
25
|
+
|
|
26
|
+
**Surface in this package:** **`*.page.*`** files may live anywhere under **`src/`**; resources are exported from the package root (`PlatformResourceTemplates`, constants). **API routes** and **worker tasks** can follow the same `*.api.js` / `*.task.js` conventions under the site `src/` today; pulling those from installable modules can mirror **`modules`** later (e.g. shared discovery for APIs / worker tasks).
|
|
23
27
|
|
|
24
28
|
## Publishing
|
|
25
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/platform",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/ossy-se/ossy.git",
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
"registry": "https://registry.npmjs.org"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
+
"@ossy/connected-components": ">=0.14.0",
|
|
33
34
|
"@ossy/design-system": ">=0.14.0",
|
|
34
35
|
"@ossy/router-react": ">=0.14.0",
|
|
35
36
|
"@ossy/sdk-react": ">=0.14.0",
|
|
36
37
|
"react": ">=19.0.0"
|
|
37
38
|
},
|
|
38
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "280ce1f62d7daf721909ac5eabe4181991e00456"
|
|
39
40
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { usePageShell } from '@ossy/connected-components'
|
|
3
|
+
import { PlatformHomeBody } from '../PlatformHomeBody.jsx'
|
|
4
|
+
import { platformHomeMetadata } from '../platformHomeMetadata.js'
|
|
5
|
+
|
|
6
|
+
export const metadata = platformHomeMetadata
|
|
7
|
+
|
|
8
|
+
export default function PlatformHomePage () {
|
|
9
|
+
const Shell = usePageShell()
|
|
10
|
+
return React.createElement(Shell, null, React.createElement(PlatformHomeBody))
|
|
11
|
+
}
|