@wippy-fe/theme 0.0.57 → 0.0.59

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.57",
3
+ "implementationRelease": "1.0.59",
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.57",
4
- "implementationRelease": "1.0.57",
3
+ "packageVersion": "0.0.59",
4
+ "implementationRelease": "1.0.59",
5
5
  "compatibility": {
6
- "themePackageVersion": "0.0.57",
6
+ "themePackageVersion": "0.0.59",
7
7
  "manifestSchemaVersion": "1.0.0",
8
- "implementationRelease": "1.0.57",
8
+ "implementationRelease": "1.0.59",
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": "8ab9d158851abc071fd4b61a14a689e850499f7704a325cfceb72c75ad758013",
17
+ "themeContract": "f9f9bd1cfedcc9ffe78bbfe8f49928ace81cbcb700ad56ff087b7ae1985dae34",
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": "079b3ddbcb7a53c661b52ce0e8930e3e93e83a4f231dde37f0f581e98c263958",
38
+ "inputHash": "9a14e8578298f45bdbb515f450bd63516f73941d3e2f6ad680bc8f8cd5eb4abf",
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.57",
3
+ "version": "0.0.59",
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",
@@ -1,5 +1,6 @@
1
1
  import type { App, VNode } from 'vue'
2
2
  import PrimeVue from 'primevue/config'
3
+ import ContextMenu from 'primevue/contextmenu'
3
4
  import Menu from 'primevue/menu'
4
5
  import Portal from 'primevue/portal'
5
6
  import { createCommentVNode, h, renderSlot, Teleport } from 'vue'
@@ -464,6 +465,65 @@ function patchMenuOutsideClick(): void {
464
465
  menuOutsideClickPatched = true
465
466
  }
466
467
 
468
+ interface PrimeVueContextMenuOptions {
469
+ methods?: {
470
+ bindOutsideClickListener?: (this: PrimeVueContextMenuInstance) => void
471
+ }
472
+ }
473
+
474
+ interface PrimeVueContextMenuInstance {
475
+ container: HTMLElement | null
476
+ target: HTMLElement | null
477
+ outsideClickListener: ((event: MouseEvent) => void) | null
478
+ visible: boolean
479
+ hide: () => void
480
+ }
481
+
482
+ let contextMenuOutsideClickPatched = false
483
+
484
+ /**
485
+ * ContextMenu carries the same `event.target` bug as Menu and is NOT covered by
486
+ * the patch above — they are separate components with their own copy of the
487
+ * listener.
488
+ *
489
+ * The failure inside a shadow root is worse here than for Menu: the retargeted
490
+ * click makes `container.contains(target)` false, so `hide()` runs in the
491
+ * CAPTURE phase — before the menu item's own click handler. The command still
492
+ * fires (Vue re-renders on a microtask, so the synchronous dispatch completes),
493
+ * but the menu flickers shut on every interaction and submenus never stay open.
494
+ *
495
+ * ContextMenu's listener differs from Menu's: it has no popup/inline split and
496
+ * no `focusedOptionIndex` reset, and it gates the target test on `visible`.
497
+ * Keep that shape and change only how membership is tested.
498
+ */
499
+ function patchContextMenuOutsideClick(): void {
500
+ if (contextMenuOutsideClickPatched)
501
+ return
502
+
503
+ const contextMenu = ContextMenu as unknown as PrimeVueContextMenuOptions
504
+ if (!contextMenu.methods || typeof contextMenu.methods.bindOutsideClickListener !== 'function')
505
+ return
506
+
507
+ contextMenu.methods.bindOutsideClickListener = function (this: PrimeVueContextMenuInstance) {
508
+ if (this.outsideClickListener)
509
+ return
510
+
511
+ this.outsideClickListener = (event: MouseEvent) => {
512
+ const path = event.composedPath()
513
+ // `path.includes(target)` covers both upstream branches at once —
514
+ // `target === event.target` and `target.contains(event.target)`.
515
+ const isOutsideContainer = this.container && !path.includes(this.container)
516
+ const isOutsideTarget = this.visible ? !(this.target && path.includes(this.target)) : true
517
+
518
+ if (isOutsideContainer && isOutsideTarget)
519
+ this.hide()
520
+ }
521
+ document.addEventListener('click', this.outsideClickListener, true)
522
+ }
523
+
524
+ contextMenuOutsideClickPatched = true
525
+ }
526
+
467
527
  let patched = false
468
528
 
469
529
  /**
@@ -565,6 +625,7 @@ export function patchOverlayPortal(): void {
565
625
  export const PrimeVuePlugin = {
566
626
  install: (app: App) => {
567
627
  patchMenuOutsideClick()
628
+ patchContextMenuOutsideClick()
568
629
  patchOverlayPortal()
569
630
  app.use(PrimeVue, { theme: 'none' })
570
631
  },
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "packageVersion": "0.0.57",
3
+ "packageVersion": "0.0.59",
4
4
  "compatibility": {
5
- "themePackageVersion": "0.0.57",
5
+ "themePackageVersion": "0.0.59",
6
6
  "manifestSchemaVersion": "1.0.0",
7
- "implementationRelease": "1.0.57",
7
+ "implementationRelease": "1.0.59",
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": "8ab9d158851abc071fd4b61a14a689e850499f7704a325cfceb72c75ad758013",
16
+ "themeContract": "f9f9bd1cfedcc9ffe78bbfe8f49928ace81cbcb700ad56ff087b7ae1985dae34",
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": "079b3ddbcb7a53c661b52ce0e8930e3e93e83a4f231dde37f0f581e98c263958",
37
+ "inputHash": "9a14e8578298f45bdbb515f450bd63516f73941d3e2f6ad680bc8f8cd5eb4abf",
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.57",
4
- "implementationRelease": "1.0.57",
3
+ "packageVersion": "0.0.59",
4
+ "implementationRelease": "1.0.59",
5
5
  "generatedFrom": [
6
6
  "theme-config.css",
7
7
  "contracts/theme-contract.json"
8
8
  ],
9
9
  "compatibility": {
10
- "themePackageVersion": "0.0.57",
10
+ "themePackageVersion": "0.0.59",
11
11
  "manifestSchemaVersion": "1.0.0",
12
- "implementationRelease": "1.0.57",
12
+ "implementationRelease": "1.0.59",
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": "8ab9d158851abc071fd4b61a14a689e850499f7704a325cfceb72c75ad758013",
21
+ "themeContract": "f9f9bd1cfedcc9ffe78bbfe8f49928ace81cbcb700ad56ff087b7ae1985dae34",
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": "079b3ddbcb7a53c661b52ce0e8930e3e93e83a4f231dde37f0f581e98c263958",
42
+ "inputHash": "9a14e8578298f45bdbb515f450bd63516f73941d3e2f6ad680bc8f8cd5eb4abf",
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
  },