weg-shared-layout 0.0.8 → 0.0.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 (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +8 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weg-shared-layout",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Shared layout Web Components built with Stencil",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
package/readme.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # weg-shared-layout
4
4
 
5
- > Shared layout Web Components (Stencil).
5
+ > Shared layout Web Components.
6
6
 
7
7
  ## Install
8
8
 
@@ -12,14 +12,17 @@ npm i weg-shared-layout
12
12
 
13
13
  ## How it works
14
14
 
15
- `<weg-footer>` is a **presentational** Web Component: it does **not** fetch data. Your app supplies an object on the element’s **`data` property** (Stencil `@Prop()`), not a string HTML attribute (unless you pass JSON as a string — see [Vanilla / HTML](./docs/vanilla.md)).
15
+ `<weg-footer>` is a **presentational** Web Component: it does **not** fetch data.
16
+
17
+ You **can** load that object however you normally fetch JSON in your app. For example, [https://weg-payload-test.vercel.app/api/layout](https://weg-payload-test.vercel.app/api/layout) returns the same shape as **`dummy-data.json`**; pass the response into `data` on `<weg-footer>` (or your framework wrapper) like any other prop.
16
18
 
17
19
  The payload shape matches **`dummy-data.json`**:
18
20
 
19
- - **From npm:** `import layout from 'weg-shared-layout/dummy-data.json'` (enable `resolveJsonModule` in TypeScript if needed).
20
- - **In this repo:** [`src/assets/dummy-data.json`](src/assets/dummy-data.json)
21
+ - **From npm:** `import layout from 'weg-shared-layout/dummy-data.json'` (enable `resolveJsonModule` in TypeScript if needed).
22
+
23
+ - **In this repo:** [`src/assets/dummy-data.json`](src/assets/dummy-data.json)
24
+
21
25
 
22
- Only `social.platform` values `LinkedIn`, `Instagram`, `TikTok`, and `YouTube` render an icon; items with missing or invalid fields are dropped.
23
26
 
24
27
  ## Framework guides
25
28