@mundogamernetwork/shared-ui 1.16.0 → 1.16.2

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.
@@ -293,6 +293,61 @@ const handleToggleOnline = () => {
293
293
  color: var(--sidebar-menus-fg);
294
294
  }
295
295
 
296
+ // Ported here from jobs-frontend's global _layout.scss (the only host
297
+ // that already had it) — .switch/.slider had no definition of their
298
+ // own in this file at all, so hosts without that exact global class
299
+ // pair fell back to a bare unstyled native checkbox. Self-contained
300
+ // now, using the same accent token the rest of this file already
301
+ // falls through (see .plans-pricing-link above), so every front gets
302
+ // a real toggle instead of only the one host that happened to
303
+ // already define it globally.
304
+ .switch {
305
+ position: relative;
306
+ display: inline-block;
307
+ width: 36px;
308
+ height: 20px;
309
+ flex-shrink: 0;
310
+
311
+ input {
312
+ opacity: 0;
313
+ width: 0;
314
+ height: 0;
315
+
316
+ &:checked + .slider {
317
+ background-color: var(--highlight-color, var(--header-active-fg, var(--ck-highlight-marker-blue)));
318
+
319
+ &:before {
320
+ transform: translateX(16px);
321
+ }
322
+ }
323
+
324
+ &:focus-visible + .slider {
325
+ box-shadow: 0 0 0 2px var(--ck-highlight-marker-blue);
326
+ }
327
+ }
328
+
329
+ .slider {
330
+ position: absolute;
331
+ inset: 0;
332
+ cursor: pointer;
333
+ background-color: var(--border-card, rgba(255, 255, 255, 0.2));
334
+ transition: 0.3s;
335
+ border-radius: 999px;
336
+
337
+ &:before {
338
+ position: absolute;
339
+ content: "";
340
+ height: 14px;
341
+ width: 14px;
342
+ left: 3px;
343
+ bottom: 3px;
344
+ background-color: #fff;
345
+ transition: 0.3s;
346
+ border-radius: 50%;
347
+ }
348
+ }
349
+ }
350
+
296
351
  .btn-primary-outline {
297
352
  display: flex;
298
353
  align-items: center;
package/nuxt.config.ts CHANGED
@@ -72,6 +72,30 @@ export default defineNuxtConfig({
72
72
  build: {
73
73
  transpile: ['@vue-leaflet/vue-leaflet'],
74
74
  },
75
+ // pusher-js's browser build is a webpack-bundled UMD file: `module.exports
76
+ // = factory()` where factory() internally does
77
+ // `__webpack_exports__["default"] = Pusher` and returns that object. To a
78
+ // real ES module consumer that looks exactly like "this CJS module wants
79
+ // default-export interop", but esbuild's static CJS/ESM detection doesn't
80
+ // reliably recognize that shape here — on some dep-graph paths (this repo
81
+ // doesn't import pusher-js directly, plugins/echo.client.ts here and in
82
+ // several consuming apps' own copies of the same plugin do) the raw dist
83
+ // file gets served to the browser as-is instead of through Vite's
84
+ // optimized/interop-wrapped dep cache, and `import Pusher from
85
+ // "pusher-js"` throws "does not provide an export named 'default'" at
86
+ // evaluation time — before the plugin's own pusherKey guard ever runs, so
87
+ // it takes the whole plugin down, and on hosts where that happens during
88
+ // app bootstrap it silently breaks ALL click handling on the page (every
89
+ // header dropdown, the sidebar toggle, everything — not just this
90
+ // plugin's own WebSocket setup). needsInterop forces Vite to always
91
+ // treat it as CJS needing the default-export wrapper, which is the fix
92
+ // Vite ships for exactly this class of mismatch.
93
+ vite: {
94
+ optimizeDeps: {
95
+ include: ["pusher-js", "laravel-echo"],
96
+ needsInterop: ["pusher-js"],
97
+ },
98
+ },
75
99
  components: [
76
100
  {
77
101
  path: `${packageRoot}/components`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.16.0",
3
+ "version": "1.16.2",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",