Problem: the hexagonal refactor churns the backend tree for nine more phases; the UI delivery stack (web/ SPA, cmd/desktop Wails wrapper, compose/web image) must move to its own repo first so doc/layout rewrites land once on a backend-only tree. Change: - New repo git.hubris.network/dtoro/oikos-web (v0.33.0): web/, desktop/ (updateURL repointed to oikos-web releases), compose/, own CI (web + desktop jobs), own deploy script (CI-green gate, TOCTOU guard, version-tagged images, prune-to-3), own webhook receiver on :9798 + launchd unit, own compose project publishing the same 8091:80. - Cutover executed on mac-mini in order: oikos stack's web service stopped+removed, oikos-web project brought up on 8091; outer Caddy untouched (targets the published port) — serving + Authentik flow + /wails 404 quirk verified post-cutover. - Stripped from oikos: web/, cmd/desktop/, compose/web/, desktop CI workflow, ci.yml web job, Makefile ui/desktop/desktop-package/install targets, the compose web service, oikos-web from deploy.sh's fallback prune list; wails + go-keyring dropped from go.mod, vendor synced. - README / CONTRIBUTING / AGENTS.md / .agents dev+operations docs now point at the new repo; mbse + mascot design docs carry a path note. Risk: production SPA serving depends on the new pipeline now; rollback is versioned-image re-up of the old web service from a pre-split checkout (port 8091). Desktop builds installed before the split still check dtoro/oikos releases — one manual reinstall, noted in the oikos-web release notes. Verification: go vet, make test (race), make generate-check, golangci (no new findings; baseline down 400→365); post-cutover curls — localhost:8091 200, /wails/runtime.js 404, outer Caddy 302 Authentik.
1 line
5.3 KiB
Plaintext
1 line
5.3 KiB
Plaintext
{"version":3,"sources":["../src/plugins/popout.ts"],"names":[],"mappings":";;;AA4BO,SAAS,iBAAA,GAA6B;AAC3C,EAAA,OAAO,OAAO,MAAA,KAAW,WAAA,IAAe,MAAA,CAAO,wBAAA,KAA6B,MAAA;AAC9E;AAEA,SAAS,cAAA,CAAe,WAAmB,MAAA,EAAwB;AACjE,EAAA,KAAA,MAAW,KAAA,IAAS,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,WAAW,CAAA,EAAG;AAClD,IAAA,MAAM,QAAQ,KAAA,CAAM,SAAA;AACpB,IAAA,IAAI,CAAC,KAAA,EAAO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GAAQ;AACN,MAAA,SAAA,CAAU,KAAA,EAAM;AAChB,MAAA,YAAA,EAAa;AAAA,IACf;AAAA,GACF;AACF","file":"popout.cjs","sourcesContent":["import type { WindowManager } from '../core/types'\n\ninterface DocumentPictureInPictureApi {\n requestWindow(options?: {\n width?: number\n height?: number\n disallowReturnToOpener?: boolean\n }): Promise<Window>\n}\n\ndeclare global {\n interface Window {\n documentPictureInPicture?: DocumentPictureInPictureApi\n }\n}\n\nexport interface PopoutOptions {\n width?: number\n height?: number\n copyStyles?: boolean\n minimizeWhilePopped?: boolean\n}\n\nexport interface PopoutHandle {\n pipWindow: Window\n close(): void\n}\n\nexport function isPopoutSupported(): boolean {\n return typeof window !== 'undefined' && window.documentPictureInPicture !== undefined\n}\n\nfunction copyStylesInto(pipWindow: Window, source: Document): void {\n for (const sheet of Array.from(source.styleSheets)) {\n const owner = sheet.ownerNode\n if (!owner) continue\n try {\n const rules = Array.from(sheet.cssRules)\n .map((rule) => rule.cssText)\n .join('\\n')\n const style = pipWindow.document.createElement('style')\n style.textContent = rules\n pipWindow.document.head.append(style)\n } catch {\n if (owner instanceof HTMLLinkElement && owner.href) {\n const link = pipWindow.document.createElement('link')\n link.rel = 'stylesheet'\n link.href = owner.href\n pipWindow.document.head.append(link)\n }\n }\n }\n}\n\nexport async function popout(\n wm: WindowManager,\n id: string,\n content: HTMLElement,\n options: PopoutOptions = {},\n): Promise<PopoutHandle> {\n const win = wm.get(id)\n if (!win) throw new Error(`wmkit: cannot pop out unknown window \"${id}\"`)\n const api = typeof window !== 'undefined' ? window.documentPictureInPicture : undefined\n if (!api) throw new Error('wmkit: Document Picture-in-Picture is not supported in this browser')\n\n const pipWindow = await api.requestWindow({\n width: options.width ?? Math.round(win.bounds.width),\n height: options.height ?? Math.round(win.bounds.height),\n })\n\n if (options.copyStyles !== false) copyStylesInto(pipWindow, content.ownerDocument)\n\n const parent = content.parentNode\n const marker = content.ownerDocument.createComment('wmkit-popout')\n parent?.insertBefore(marker, content)\n pipWindow.document.body.append(content)\n pipWindow.document.title = win.title\n\n const minimizeWhilePopped = options.minimizeWhilePopped !== false\n if (minimizeWhilePopped) wm.minimize(id)\n\n let closed = false\n function handleReturn(): void {\n if (closed) return\n closed = true\n if (marker.parentNode) {\n marker.parentNode.insertBefore(content, marker)\n marker.remove()\n }\n if (minimizeWhilePopped && wm.get(id)) wm.restore(id)\n }\n\n pipWindow.addEventListener('pagehide', handleReturn)\n\n return {\n pipWindow,\n close() {\n pipWindow.close()\n handleReturn()\n },\n }\n}\n"]} |