@wpmoo/ui 1.0.0-rc.7 → 1.0.0-rc.8

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/ASSET_LICENSE.md CHANGED
@@ -14,6 +14,6 @@ product, site, template, library, training dataset, or marketing asset without
14
14
  prior written permission from WPMoo.
15
15
 
16
16
  Third-party assets remain under their own licenses. See the
17
- [version-pinned third-party notices](https://github.com/wpmoo-org/ui/blob/v1.0.0-rc.7/THIRD_PARTY_NOTICES.md).
17
+ [version-pinned third-party notices](https://github.com/wpmoo-org/ui/blob/v1.0.0-rc.8/THIRD_PARTY_NOTICES.md).
18
18
  Those notices are repository-only and are intentionally not shipped in the npm
19
19
  package.
package/README.md CHANGED
@@ -40,10 +40,6 @@ language needs to feel more current.
40
40
  - **Explicit runtime.** Optional Moo UI behavior loads through ESM entrypoints
41
41
  only when a component needs behavior Bootstrap does not provide.
42
42
 
43
- This branch prepares `@wpmoo/ui@1.0.0-rc.7` for release. The published RC6
44
- package remains the CDN baseline for catalog CodePen exports until the RC7 npm
45
- tag exists.
46
-
47
43
  ## Try It in 30 Seconds
48
44
 
49
45
  The quick demo intentionally follows the floating npm tag:
@@ -93,6 +89,41 @@ import "bootstrap/dist/js/bootstrap.bundle.min.js"; // only when plugins are use
93
89
  </div>
94
90
  ```
95
91
 
92
+ ### Theme ownership and first paint
93
+
94
+ Resolve the initial `light` or `dark` value on the server whenever the host
95
+ knows the request or session preference. Put it on the first application owner;
96
+ keep `lang` and the document's default `dir` on `html`:
97
+
98
+ ```html
99
+ <!-- Server-resolved document: no prepaint required. -->
100
+ <html lang="en" dir="ltr">
101
+ <body>
102
+ <div class="moo-ui" data-bs-theme="dark" data-moo-document-owner="true">
103
+ <!-- Moo UI application -->
104
+ </div>
105
+ </body>
106
+ </html>
107
+ ```
108
+
109
+ For a static or strict-CSP host without an inline bootstrap, keep the classic
110
+ external asset as the root's first child. An embedded owner uses explicit keys
111
+ when it needs independent browser persistence:
112
+
113
+ ```html
114
+ <!-- Static or strict-CSP fallback: classic script is the root's first child. -->
115
+ <div class="moo-ui" data-bs-theme="light" data-moo-theme-key="portal:theme">
116
+ <script src="/vendor/@wpmoo/ui/theme-prepaint.js"></script>
117
+ <!-- embedded Moo UI fragment -->
118
+ </div>
119
+ ```
120
+
121
+ On a first visit, a static host without a known server preference can only
122
+ correct a browser-only preference after the external asset is fetched, so that
123
+ correction may be visible. The server value remains the deterministic fallback;
124
+ an external fetch cannot guarantee zero flash in this profile. The published
125
+ asset is available as `@wpmoo/ui/theme-prepaint.js`.
126
+
96
127
  ### Optional runtime
97
128
 
98
129
  ```js
@@ -135,7 +166,7 @@ calm.
135
166
 
136
167
  ## Status And Support
137
168
 
138
- Moo UI is preparing the `1.0.0-rc.7` release candidate. Public exports, package boundaries, browser support, and release evidence live in [Support & Evidence](https://ui.wpmoo.org/support/).
169
+ Moo UI is preparing the `1.0.0-rc.8` release candidate. Public exports, package boundaries, browser support, and release evidence live in [Support & Evidence](https://ui.wpmoo.org/support/).
139
170
  Complete release notes are on
140
171
  [GitHub Releases](https://github.com/wpmoo-org/ui/releases).
141
172
 
@@ -158,4 +189,4 @@ Moo UI source code is MIT licensed. License details live in
158
189
  [LICENSE](LICENSE) and the [License page](https://ui.wpmoo.org/license/).
159
190
  Asset terms live in [ASSET_LICENSE.md](ASSET_LICENSE.md); dependency notices
160
191
  live in the
161
- [version-pinned third-party notices](https://github.com/wpmoo-org/ui/blob/v1.0.0-rc.7/THIRD_PARTY_NOTICES.md).
192
+ [version-pinned third-party notices](https://github.com/wpmoo-org/ui/blob/v1.0.0-rc.8/THIRD_PARTY_NOTICES.md).
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "0.1",
3
3
  "status": "preview",
4
- "coreVersion": "1.0.0-rc.7",
4
+ "coreVersion": "1.0.0-rc.8",
5
5
  "bootstrap": {
6
6
  "canonicalVersion": "5.3.3",
7
7
  "targetRange": ">=5.3.0 <5.4",
@@ -40,9 +40,13 @@
40
40
  "./scss/components",
41
41
  "./scss/settings"
42
42
  ],
43
+ "browser": [
44
+ "./theme-prepaint.js"
45
+ ],
43
46
  "metadata": [
44
47
  "./certification.json",
45
- "./package.json"
48
+ "./package.json",
49
+ "./release-manifest.json"
46
50
  ]
47
51
  },
48
52
  "supportPolicy": "https://github.com/wpmoo-org/ui/blob/main/SUPPORT.md"