@wippy-fe/theme 0.0.62 → 0.0.64

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "implementationRelease": "1.0.62",
3
+ "implementationRelease": "1.0.64",
4
4
  "upstream": {
5
5
  "package": "@primeuix/themes",
6
6
  "version": "2.0.3",
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "packageVersion": "0.0.62",
4
- "implementationRelease": "1.0.62",
3
+ "packageVersion": "0.0.64",
4
+ "implementationRelease": "1.0.64",
5
5
  "compatibility": {
6
- "themePackageVersion": "0.0.62",
6
+ "themePackageVersion": "0.0.64",
7
7
  "manifestSchemaVersion": "1.0.0",
8
- "implementationRelease": "1.0.62",
8
+ "implementationRelease": "1.0.64",
9
9
  "tailwindVersion": "3.4.19",
10
10
  "tailwindcssPrimeuiVersion": "0.6.1",
11
11
  "primevueVersion": "4.5.5",
@@ -14,7 +14,7 @@
14
14
  "referencePrimeuixThemesVersion": "2.0.3",
15
15
  "referencePrimeuixThemesIntegrity": "sha512-3fS1883mtCWhgUgNf/feiaaDSOND4EBIOu9tZnzJlJ8QtYyL6eFLcA6V3ymCWqLVXQ1+lTVEZv1gl47FIdXReg==",
16
16
  "sourceHashes": {
17
- "themeContract": "12b153ce7e8c50f1ed3a9acacf7cca18a1879eb0263252ce82adde4c54cba724",
17
+ "themeContract": "a47fc609d0054e11f71cd21f64160c5be8b1e6ac0641329614da8c81fea87bed",
18
18
  "runtimeAcceptanceRequirements": "6bac23fb52a87b18b1661b5ac73747a972e07f40af6961571b5f4dd831d4cb85",
19
19
  "themeConfig": "9b484e9da76871d11edda5a555b0d0443a262acd80fb42c74c4fd78e2b23b5ae",
20
20
  "tailwindConfig": "f1e862105254f082a78823ea685e3c6dc3ff5822516b7434a1e1141c976adc1d",
@@ -35,7 +35,7 @@
35
35
  "acceptance": {
36
36
  "status": "unverified",
37
37
  "evidenceSchemaVersion": "1.0.0",
38
- "inputHash": "322274f50fc263f822a296425594e91841dc2a0826ddd7e733066d29cff6c41a",
38
+ "inputHash": "9fdbfaa932b0d0774028e43152812dbbb6a4150651ddb6f85a2e7dc03c56200d",
39
39
  "requirements": "contracts/runtime-acceptance-requirements.json",
40
40
  "gate": "node scripts/build-theme-contract.mjs --check --acceptance --evidence <path> --evidence-sha256 <hash>"
41
41
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wippy-fe/theme",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
4
4
  "description": "Theme variables, shared Tailwind config, and PrimeVue styling for Wippy web components.",
5
5
  "type": "module",
6
6
  "main": "theme-config.css",
@@ -255,6 +255,11 @@ function onViewportChange(): void {
255
255
  requestAnimationFrame(syncActiveLayers)
256
256
  }
257
257
 
258
+ function syncLayerTheme(layer: HTMLElement, host: Element): void {
259
+ layer.classList.toggle('w-theme-light', host.classList.contains('w-theme-light'))
260
+ layer.classList.toggle('w-theme-dark', host.classList.contains('w-theme-dark'))
261
+ }
262
+
258
263
  /**
259
264
  * Create a fresh per-OVERLAY layer (one per Portal instance, NOT shared per shadow root),
260
265
  * pinned to viewport origin and kept in sync as its overlay opens (a per-layer
@@ -263,9 +268,13 @@ function onViewportChange(): void {
263
268
  * for components that open several overlays at once; {@link teardownOverlayLayer} removes
264
269
  * it on unmount or a switch to inline.
265
270
  */
266
- function createLayer(root: ShadowRoot): HTMLElement {
271
+ function createLayer(root: ShadowRoot, themeSource: Element): HTMLElement {
267
272
  const layer = document.createElement('div')
268
273
  layer.setAttribute(LAYER_ATTR, '')
274
+ // Forced-mode selectors need an in-shadow ancestor. The theme-root marker
275
+ // keeps their token defaults from masking inherited Facade custom values.
276
+ layer.setAttribute('data-wippy-theme-root', '')
277
+ syncLayerTheme(layer, themeSource)
269
278
  const topLayer = supportsTopLayer()
270
279
  // Inline reset of the UA `[popover]` styling — scoped to this one private element,
271
280
  // NEVER a global rule that could leak across modules. A shown popover gets the UA
@@ -318,6 +327,7 @@ function createLayer(root: ShadowRoot): HTMLElement {
318
327
  // observer is referenced only via the WeakMap, so it is disconnected when the layer
319
328
  // detaches (in syncActiveLayers) and otherwise GC'd with the layer.
320
329
  const observer = new MutationObserver((records) => {
330
+ syncLayerTheme(layer, themeSource)
321
331
  // S2: this layer serves exactly ONE overlay (one Portal instance), so its
322
332
  // `__wippyAnchorName` — the trigger anchor-name stamped by `setupOverlayLayer` — is unambiguous.
323
333
  // Anchor the overlay when it teleports in; release its style observer when it leaves.
@@ -338,6 +348,7 @@ function createLayer(root: ShadowRoot): HTMLElement {
338
348
  syncLayer(layer)
339
349
  })
340
350
  observer.observe(layer, { childList: true })
351
+ observer.observe(themeSource, { attributes: true, attributeFilter: ['class'] })
341
352
  layerObservers.set(layer, observer)
342
353
 
343
354
  activeLayers.add(layer)
@@ -391,7 +402,8 @@ function setupOverlayLayer(inst: PortalInstance): void {
391
402
  return
392
403
  // Eager: the layer is promoted to the top layer BEFORE the overlay opens, so PrimeVue
393
404
  // never measures a not-yet-promoted box.
394
- inst.layer = createLayer(inst.hostRoot)
405
+ const themeSource = inst.$el?.parentElement?.closest('[data-wippy-theme-root], .w-theme-light, .w-theme-dark') ?? inst.hostRoot.host
406
+ inst.layer = createLayer(inst.hostRoot, themeSource)
395
407
  // S2: stamp a unique `anchor-name` on the trigger (the placeholder's parent is the
396
408
  // component root the self-anchored families align to) and hand it to this layer.
397
409
  if (supportsAnchor()) {
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "packageVersion": "0.0.62",
3
+ "packageVersion": "0.0.64",
4
4
  "compatibility": {
5
- "themePackageVersion": "0.0.62",
5
+ "themePackageVersion": "0.0.64",
6
6
  "manifestSchemaVersion": "1.0.0",
7
- "implementationRelease": "1.0.62",
7
+ "implementationRelease": "1.0.64",
8
8
  "tailwindVersion": "3.4.19",
9
9
  "tailwindcssPrimeuiVersion": "0.6.1",
10
10
  "primevueVersion": "4.5.5",
@@ -13,7 +13,7 @@
13
13
  "referencePrimeuixThemesVersion": "2.0.3",
14
14
  "referencePrimeuixThemesIntegrity": "sha512-3fS1883mtCWhgUgNf/feiaaDSOND4EBIOu9tZnzJlJ8QtYyL6eFLcA6V3ymCWqLVXQ1+lTVEZv1gl47FIdXReg==",
15
15
  "sourceHashes": {
16
- "themeContract": "12b153ce7e8c50f1ed3a9acacf7cca18a1879eb0263252ce82adde4c54cba724",
16
+ "themeContract": "a47fc609d0054e11f71cd21f64160c5be8b1e6ac0641329614da8c81fea87bed",
17
17
  "runtimeAcceptanceRequirements": "6bac23fb52a87b18b1661b5ac73747a972e07f40af6961571b5f4dd831d4cb85",
18
18
  "themeConfig": "9b484e9da76871d11edda5a555b0d0443a262acd80fb42c74c4fd78e2b23b5ae",
19
19
  "tailwindConfig": "f1e862105254f082a78823ea685e3c6dc3ff5822516b7434a1e1141c976adc1d",
@@ -34,7 +34,7 @@
34
34
  "acceptance": {
35
35
  "status": "unverified",
36
36
  "evidenceSchemaVersion": "1.0.0",
37
- "inputHash": "322274f50fc263f822a296425594e91841dc2a0826ddd7e733066d29cff6c41a",
37
+ "inputHash": "9fdbfaa932b0d0774028e43152812dbbb6a4150651ddb6f85a2e7dc03c56200d",
38
38
  "requirements": "contracts/runtime-acceptance-requirements.json",
39
39
  "gate": "node scripts/build-theme-contract.mjs --check --acceptance --evidence <path> --evidence-sha256 <hash>"
40
40
  },
package/tokens.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "packageVersion": "0.0.62",
4
- "implementationRelease": "1.0.62",
3
+ "packageVersion": "0.0.64",
4
+ "implementationRelease": "1.0.64",
5
5
  "generatedFrom": [
6
6
  "theme-config.css",
7
7
  "contracts/theme-contract.json"
8
8
  ],
9
9
  "compatibility": {
10
- "themePackageVersion": "0.0.62",
10
+ "themePackageVersion": "0.0.64",
11
11
  "manifestSchemaVersion": "1.0.0",
12
- "implementationRelease": "1.0.62",
12
+ "implementationRelease": "1.0.64",
13
13
  "tailwindVersion": "3.4.19",
14
14
  "tailwindcssPrimeuiVersion": "0.6.1",
15
15
  "primevueVersion": "4.5.5",
@@ -18,7 +18,7 @@
18
18
  "referencePrimeuixThemesVersion": "2.0.3",
19
19
  "referencePrimeuixThemesIntegrity": "sha512-3fS1883mtCWhgUgNf/feiaaDSOND4EBIOu9tZnzJlJ8QtYyL6eFLcA6V3ymCWqLVXQ1+lTVEZv1gl47FIdXReg==",
20
20
  "sourceHashes": {
21
- "themeContract": "12b153ce7e8c50f1ed3a9acacf7cca18a1879eb0263252ce82adde4c54cba724",
21
+ "themeContract": "a47fc609d0054e11f71cd21f64160c5be8b1e6ac0641329614da8c81fea87bed",
22
22
  "runtimeAcceptanceRequirements": "6bac23fb52a87b18b1661b5ac73747a972e07f40af6961571b5f4dd831d4cb85",
23
23
  "themeConfig": "9b484e9da76871d11edda5a555b0d0443a262acd80fb42c74c4fd78e2b23b5ae",
24
24
  "tailwindConfig": "f1e862105254f082a78823ea685e3c6dc3ff5822516b7434a1e1141c976adc1d",
@@ -39,7 +39,7 @@
39
39
  "acceptance": {
40
40
  "status": "unverified",
41
41
  "evidenceSchemaVersion": "1.0.0",
42
- "inputHash": "322274f50fc263f822a296425594e91841dc2a0826ddd7e733066d29cff6c41a",
42
+ "inputHash": "9fdbfaa932b0d0774028e43152812dbbb6a4150651ddb6f85a2e7dc03c56200d",
43
43
  "requirements": "contracts/runtime-acceptance-requirements.json",
44
44
  "gate": "node scripts/build-theme-contract.mjs --check --acceptance --evidence <path> --evidence-sha256 <hash>"
45
45
  },