@marvalt/digivalt-core 0.2.34 → 0.2.36
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 +15 -0
- package/GLOBAL-SHORTCODES.md +33 -1
- package/dist/generators/wp-guard.d.ts +11 -0
- package/dist/generators.cjs +625 -506
- package/dist/generators.cjs.map +1 -1
- package/dist/generators.esm.js +625 -506
- package/dist/generators.esm.js.map +1 -1
- package/dist/icons.cjs +73 -0
- package/dist/icons.cjs.map +1 -0
- package/dist/icons.d.ts +6 -0
- package/dist/icons.esm.js +71 -0
- package/dist/icons.esm.js.map +1 -0
- package/dist/index.cjs +625 -506
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +625 -506
- package/dist/index.esm.js.map +1 -1
- package/dist/registry/iconShortcode.d.ts +3 -0
- package/dist/registry/index.d.ts +1 -0
- package/dist/registry.cjs +68 -2
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.d.ts +5 -1
- package/dist/registry.esm.js +68 -3
- package/dist/registry.esm.js.map +1 -1
- package/docs/SHORTCODES.md +35 -0
- package/package.json +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.36] - 2026-09-28
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `[icon name="shield"]` via `getIconShortcodeHandlers()`, merged by `createContentRegistry()`. Optional `tone`, `shape`, `size`, and `label`. The app self-hosts Material Symbols Outlined; core does not ship the font.
|
|
12
|
+
- `@marvalt/digivalt-core/icons` exports the handler alone, so apps with a local registry can merge it without loading `react-helmet-async`.
|
|
13
|
+
|
|
14
|
+
**Publish/deploy:** publish **`@marvalt/digivalt-core@0.2.36`**. Consumer apps install that version, add `@fontsource/material-symbols-outlined`, and merge `getIconShortcodeHandlers()` when they keep a local registry. Update **wp-custom-api-endpoints 1.6.20** for the dashboard hint.
|
|
15
|
+
|
|
16
|
+
## [0.2.35] - 2026-09-23
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- WordPress generation rejects a payload that does not contain the configured front page, restores the previous `wordpress-data.json`, and returns failure so the build exits. A two-page multi-frontend payload that includes the front page still passes. Fixture mode (`VITE_IS_LOVABLE`) skips the check.
|
|
20
|
+
|
|
21
|
+
**Publish/deploy:** publish **`@marvalt/digivalt-core@0.2.35`**. Then bump consumer apps (including **digivalt-landing**, whose lockfile still pins 0.2.32) and redeploy. No WordPress plugin publish.
|
|
22
|
+
|
|
8
23
|
## [0.2.34] - 2026-09-22
|
|
9
24
|
|
|
10
25
|
### Added
|
package/GLOBAL-SHORTCODES.md
CHANGED
|
@@ -11,7 +11,39 @@ This document lists the shortcodes supported by `createContentRegistry()` from `
|
|
|
11
11
|
|
|
12
12
|
**Do not register these as WordPress PHP shortcodes.** They must remain literal text in REST/HTML so `@marvalt/wparser` can replace them with React components. Content editors type them into WordPress; the headless app renders them.
|
|
13
13
|
|
|
14
|
-
Merge order in `createContentRegistry`: adapter handlers (`@marvalt/madapter`, `@marvalt/plister`) plus core Gravity Forms and popup shortcodes. Apps can merge project-specific CPT handlers separately.
|
|
14
|
+
Merge order in `createContentRegistry`: adapter handlers (`@marvalt/madapter`, `@marvalt/plister`) plus core icon, Gravity Forms, and popup shortcodes. Apps can merge project-specific CPT handlers separately.
|
|
15
|
+
|
|
16
|
+
## Icons (core)
|
|
17
|
+
|
|
18
|
+
Handler: `getIconShortcodeHandlers()`. `createContentRegistry()` merges it. Apps with their own registry import it from `@marvalt/digivalt-core/icons` (that entry does not load `react-helmet-async`).
|
|
19
|
+
|
|
20
|
+
- `[icon name="shield"]` — Material Symbols ligature. `name` is required and must match `[a-z0-9_]+` (for example `shield`, `account_balance`). A missing or invalid name renders nothing.
|
|
21
|
+
- Optional `tone`: `neutral` (default), `positive`, `negative`, `brand`.
|
|
22
|
+
- Optional `shape`: `none` (default), `circle`, `rounded`, `square`.
|
|
23
|
+
- Optional `size`: `sm`, `md` (default), `lg`.
|
|
24
|
+
- Optional `label`: accessible name. Without it the icon is hidden from assistive tech.
|
|
25
|
+
|
|
26
|
+
The app hosts the font. Do not load it from Google at runtime. In the app CSS:
|
|
27
|
+
|
|
28
|
+
```css
|
|
29
|
+
@import "@fontsource/material-symbols-outlined/400.css";
|
|
30
|
+
|
|
31
|
+
.material-symbols-outlined {
|
|
32
|
+
font-family: "Material Symbols Outlined";
|
|
33
|
+
font-weight: normal;
|
|
34
|
+
font-style: normal;
|
|
35
|
+
line-height: 1;
|
|
36
|
+
letter-spacing: normal;
|
|
37
|
+
text-transform: none;
|
|
38
|
+
display: inline-block;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
direction: ltr;
|
|
41
|
+
font-feature-settings: "liga";
|
|
42
|
+
-webkit-font-smoothing: antialiased;
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`@fontsource/material-symbols-outlined` already sets `font-display: swap`. Icon names are listed at [fonts.google.com/icons](https://fonts.google.com/icons). Do not register `[icon]` as a WordPress PHP shortcode.
|
|
15
47
|
|
|
16
48
|
## Gravity Forms (core)
|
|
17
49
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type WordPressPayloadCheck = {
|
|
2
|
+
ok: true;
|
|
3
|
+
warnEmptyChrome: boolean;
|
|
4
|
+
} | {
|
|
5
|
+
ok: false;
|
|
6
|
+
expectedSlug?: string;
|
|
7
|
+
pageCount: number;
|
|
8
|
+
receivedSlugs: string[];
|
|
9
|
+
};
|
|
10
|
+
/** Reject a WordPress payload that cannot be the app's front page. */
|
|
11
|
+
export declare function checkWordPressPayload(payload: unknown): WordPressPayloadCheck;
|