@ossy/web 1.16.1 → 1.16.3

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/README.md CHANGED
@@ -1,12 +1,54 @@
1
1
  # @ossy/web
2
2
 
3
- Web feature package for the Ossy platform. Provides resource templates for managing web content including pages, links, profiles, and analytics.
3
+ Web **schema package** for the Ossy platform document types for pages, links, profiles, and page-view analytics.
4
4
 
5
- ## Resource Templates
5
+ ## Schemas (ADR 0006)
6
6
 
7
- | Resource | ID |
8
- |----------|----|
9
- | Link | `@ossy/web/link` |
10
- | Page | `@ossy/web/page` |
11
- | Page View | `@ossy/web/page-view` |
12
- | Profile | `@ossy/web/profile` |
7
+ Schema definitions live in `*.schema.js` and are discovered at build time.
8
+
9
+ | Schema | Id | Purpose |
10
+ |---|---|---|
11
+ | Link | `@ossy/web/schema/link` | Navigation links (`label`, `url`, `icon`) |
12
+ | Page | `@ossy/web/schema/page` | Web pages (`title`, `description`, `body`) |
13
+ | Page View | `@ossy/web/schema/page-view` | Analytics events (`path`, `referrer`, `visitorId`, `eventAt`, …) |
14
+ | Profile | `@ossy/web/schema/profile` | Public profile content (`name`, `bio`) |
15
+
16
+ Page-view documents are typically written to `/@ossy/analytics/page-views/` by `@ossy/resources` tasks.
17
+
18
+ ## Exports
19
+
20
+ | Export | Description |
21
+ |---|---|
22
+ | `linkSchema` | Link schema definition |
23
+ | `pageSchema` | Page schema definition |
24
+ | `pageViewSchema` | Page-view analytics schema definition |
25
+ | `profileSchema` | Profile schema definition |
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ npm install @ossy/web
31
+ npm run build
32
+ ```
33
+
34
+ ```js
35
+ import { pageSchema, pageViewSchema } from '@ossy/web'
36
+
37
+ pageSchema.id
38
+ // => '@ossy/web/schema/page'
39
+ ```
40
+
41
+ ## Migration from resource templates
42
+
43
+ This package migrated from `*.resource.js` to ADR 0006 schemas. Stored `resource.type` values and export names changed:
44
+
45
+ | Before | After |
46
+ |---|---|
47
+ | `@ossy/web/link` | `@ossy/web/schema/link` |
48
+ | `@ossy/web/page` | `@ossy/web/schema/page` |
49
+ | `@ossy/web/page-view` | `@ossy/web/schema/page-view` |
50
+ | `@ossy/web/profile` | `@ossy/web/schema/profile` |
51
+ | `linkResource` export | `linkSchema` |
52
+ | `pageResource` export | `pageSchema` |
53
+ | `pageViewResource` export | `pageViewSchema` |
54
+ | `profileResource` export | `profileSchema` |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ossy/web",
3
- "description": "Web feature package — link, page, page-view, and profile resource templates for Ossy web properties",
4
- "version": "1.16.1",
3
+ "description": "Web schema package — page, link, profile, and page-view document types for Ossy web properties",
4
+ "version": "1.16.3",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
7
7
  "module": "./src/index.js",
@@ -21,5 +21,5 @@
21
21
  "/src",
22
22
  "README.md"
23
23
  ],
24
- "gitHead": "c0ba5d90749690634e4dc2705178ff8d89dd3070"
24
+ "gitHead": "a0d89185a17f8de8ce328c3a648c108ff1d61d8f"
25
25
  }
package/src/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { default as linkResource } from './link.resource.js'
2
- export { default as pageResource } from './page.resource.js'
3
- export { default as pageViewResource } from './page-view.resource.js'
4
- export { default as profileResource } from './profile.resource.js'
1
+ export { default as linkSchema } from './link.schema.js'
2
+ export { default as pageSchema } from './page.schema.js'
3
+ export { default as pageViewSchema } from './page-view.schema.js'
4
+ export { default as profileSchema } from './profile.schema.js'
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  name: 'Link',
3
- id: '@ossy/web/link',
3
+ id: '@ossy/web/schema/link',
4
4
  categoryName: 'Web',
5
5
  icon: 'link',
6
6
  fields: [
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  name: 'Page View',
3
- id: '@ossy/web/page-view',
3
+ id: '@ossy/web/schema/page-view',
4
4
  categoryName: 'Analytics',
5
5
  icon: 'chart',
6
6
  fields: [
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  name: 'Page',
3
- id: '@ossy/web/page',
3
+ id: '@ossy/web/schema/page',
4
4
  categoryName: 'Web',
5
5
  icon: 'file-document',
6
6
  fields: [
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  name: 'Profile',
3
- id: '@ossy/web/profile',
3
+ id: '@ossy/web/schema/profile',
4
4
  categoryName: 'Web',
5
5
  icon: 'user',
6
6
  fields: [