@popmelt.com/core 0.36.0 → 0.37.1
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/README.md +106 -23
- package/claude-plugin/.claude-plugin/plugin.json +1 -1
- package/claude-plugin/skills/popmelt-core/SKILL.md +6 -1
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/codex-plugin/skills/popmelt-core/SKILL.md +6 -1
- package/dist/ExploreAttachment-6AIMXC2K.mjs +1 -0
- package/dist/PagePreviewLayer-SIH7DDBF.mjs +1 -0
- package/dist/ParticipantRuntime-RTMEFDKF.mjs +1 -0
- package/dist/PhoneHostGate-RZRGWS2E.mjs +1 -0
- package/dist/PopmeltTasteConnectedPane-FAJXJEQQ.mjs +1 -0
- package/dist/PreviewRuntime-MW33PLMV.mjs +1 -0
- package/dist/{QueuedReplies-ESIFFRKS.mjs → QueuedReplies-4APDDNQX.mjs} +1 -1
- package/dist/SamplePlacementOverlay-2VLBRDPZ.mjs +1 -0
- package/dist/ShareProjectPane-OR2LS2A3.mjs +1 -0
- package/dist/SuppliedContext-SAQKEDWW.mjs +1 -0
- package/dist/ThreadErrorCard-OSHIWSHR.mjs +1 -0
- package/dist/ThreadPanel-CMC5Q6WM.mjs +1 -0
- package/dist/adapter-react-three-fiber.d.mts +20 -3
- package/dist/adapter-react-three-fiber.mjs +1 -1
- package/dist/adapter-three.d.mts +53 -2
- package/dist/adapter-three.mjs +45 -1
- package/dist/bridge-entry.mjs +1 -1
- package/dist/bridgeSSEStream-6OMAFDFW.mjs +1 -0
- package/dist/bridgeWebSocketStream-WIOGOPJW.mjs +1 -0
- package/dist/browser-runtime-5W2ZKUCZ.mjs +1 -0
- package/dist/browser.d.mts +4 -4
- package/dist/browser.mjs +1 -1
- package/dist/canvas-chat-note-O3USBECW.mjs +1 -0
- package/dist/checkFixture-DQPLFEUL.mjs +1 -0
- package/dist/{chunk-AH6LZOQC.mjs → chunk-3PSB5BST.mjs} +1 -1
- package/dist/chunk-3QYA5LGF.mjs +1 -0
- package/dist/chunk-3VOEPWRL.mjs +1 -0
- package/dist/chunk-4LVGVKSS.mjs +1 -0
- package/dist/chunk-5GEBVPTA.mjs +1 -0
- package/dist/chunk-5IZHN3A7.mjs +1 -0
- package/dist/chunk-6EO73WJN.mjs +1 -0
- package/dist/chunk-6XEEXK3U.mjs +1 -0
- package/dist/chunk-76WRZ2NH.mjs +1 -0
- package/dist/chunk-7EISKUU7.mjs +1 -0
- package/dist/chunk-7JWADHTH.mjs +1 -0
- package/dist/chunk-A4GARXVQ.mjs +1 -0
- package/dist/chunk-AAMUU2QA.mjs +1 -0
- package/dist/chunk-AGCS65LT.mjs +1 -0
- package/dist/{chunk-RR4SHK7O.mjs → chunk-AOTDTBQO.mjs} +1 -1
- package/dist/chunk-ATLUO4G7.mjs +1 -0
- package/dist/chunk-AYZUOBFI.mjs +1 -0
- package/dist/chunk-B22WBEQC.mjs +1 -0
- package/dist/chunk-B4DYUYX4.mjs +1 -0
- package/dist/{chunk-NDGM4DAP.mjs → chunk-BYASSHKJ.mjs} +1 -1
- package/dist/chunk-C2ZSNUXQ.mjs +1 -0
- package/dist/chunk-CCFTIBCJ.mjs +1 -0
- package/dist/chunk-CIKFUS7J.mjs +1 -0
- package/dist/chunk-CK3CDA3L.mjs +1 -0
- package/dist/chunk-CVVD2OMQ.mjs +1 -0
- package/dist/chunk-EBJ23A7F.mjs +1 -0
- package/dist/chunk-ECMLCGAM.mjs +1 -0
- package/dist/chunk-EFGQKWSZ.mjs +1 -0
- package/dist/chunk-EILBHZDX.mjs +1 -0
- package/dist/{chunk-DOCRI237.mjs → chunk-ELKVFX2O.mjs} +1 -1
- package/dist/{chunk-EXIUW3JX.mjs → chunk-EUFR7R5Q.mjs} +1 -1
- package/dist/chunk-EZVFCJEG.mjs +1 -0
- package/dist/chunk-F3VZQGPM.mjs +1 -0
- package/dist/chunk-FHCKFQBY.mjs +1 -0
- package/dist/chunk-FJWWBKCQ.mjs +1 -0
- package/dist/chunk-FON4QY7P.mjs +1 -0
- package/dist/chunk-GAUQZAW6.mjs +1 -0
- package/dist/chunk-GLF7Z5IR.mjs +1 -0
- package/dist/chunk-HAN6CUNB.mjs +1 -0
- package/dist/chunk-HAZXZ5TU.mjs +1 -0
- package/dist/chunk-HBFSPXIC.mjs +1 -0
- package/dist/chunk-HKHZBKAN.mjs +1 -0
- package/dist/chunk-HPU2UMVE.mjs +1 -0
- package/dist/{chunk-YHYFWNN6.mjs → chunk-IAXSC2ZN.mjs} +1 -1
- package/dist/chunk-IW7V7WNL.mjs +1 -0
- package/dist/chunk-JEGBAHYK.mjs +1 -0
- package/dist/chunk-JJK4LAN6.mjs +1 -0
- package/dist/chunk-JSNK6NX7.mjs +1 -0
- package/dist/chunk-KCDHP4N3.mjs +1 -0
- package/dist/chunk-KF73S7MG.mjs +1 -0
- package/dist/chunk-KXVXWEN4.mjs +1 -0
- package/dist/chunk-L6S66APQ.mjs +1 -0
- package/dist/chunk-LH7HKUCK.mjs +1 -0
- package/dist/chunk-LOUWY55X.mjs +1 -0
- package/dist/chunk-MPEVFQ43.mjs +1 -0
- package/dist/{chunk-57FM7XQV.mjs → chunk-NI77Y3WC.mjs} +1 -1
- package/dist/chunk-O2ZQFLNV.mjs +1 -0
- package/dist/chunk-OA63PYHZ.mjs +1 -0
- package/dist/chunk-OIKFQ2FV.mjs +1 -0
- package/dist/chunk-OREALBUO.mjs +1 -0
- package/dist/chunk-OVZ4CQGM.mjs +1 -0
- package/dist/chunk-PRPXMDZ7.mjs +1 -0
- package/dist/chunk-PWQB3FIW.mjs +1 -0
- package/dist/chunk-QE5XGXIA.mjs +30 -0
- package/dist/chunk-QV5G3XRE.mjs +1 -0
- package/dist/chunk-ROKRMYFR.mjs +1 -0
- package/dist/chunk-SBD7GQDN.mjs +1 -0
- package/dist/chunk-SKKHZBOJ.mjs +1 -0
- package/dist/chunk-SOGN7S54.mjs +1 -0
- package/dist/chunk-SOT33EQ4.mjs +1 -0
- package/dist/chunk-SUAHDXJZ.mjs +1 -0
- package/dist/chunk-TCGXG7UA.mjs +1 -0
- package/dist/chunk-TIAPJGX2.mjs +1 -0
- package/dist/chunk-TMSGNHXH.mjs +1 -0
- package/dist/chunk-UTP56NCY.mjs +1 -0
- package/dist/chunk-UX3DTCHL.mjs +1 -0
- package/dist/chunk-VVNZ5IEG.mjs +24 -0
- package/dist/chunk-W2QQVB2H.mjs +1 -0
- package/dist/chunk-WF3YGZPI.mjs +1 -0
- package/dist/chunk-WJHYEACV.mjs +1 -0
- package/dist/chunk-WP2SHSCG.mjs +1 -0
- package/dist/chunk-X6I6KQDG.mjs +1 -0
- package/dist/chunk-XJJDBMZI.mjs +1 -0
- package/dist/chunk-YMWXWXPV.mjs +1 -0
- package/dist/chunk-YYODLRV3.mjs +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/codex-note-context-6QGJT2V3.mjs +1 -0
- package/dist/codex-project-3GJPU63O.mjs +1 -0
- package/dist/codex-session-registry-YNU6LEVH.mjs +1 -0
- package/dist/codex-store-mount-F6RBC77X.mjs +1 -0
- package/dist/{dev-server-DtX2_HCa.d.mts → dev-server-BRrhkH5t.d.mts} +11 -1
- package/dist/dev-server-KWVIMLLL.mjs +1 -0
- package/dist/focus-inspection-F25RXWZV.mjs +1 -0
- package/dist/guest-admission.d.mts +2 -0
- package/dist/guest-admission.mjs +1 -0
- package/dist/guest-live-canvas.d.mts +2 -0
- package/dist/guest-live-canvas.mjs +1 -0
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +1 -1
- package/dist/invitationLink-LUIIOAEZ.mjs +1 -0
- package/dist/inviteQr-HVHH45SN.mjs +1 -0
- package/dist/inviteQr-U77MLSEQ.mjs +1 -0
- package/dist/media.d.mts +3 -3
- package/dist/memory-store.d.mts +5 -1
- package/dist/page-interaction-TV3P6B3X.mjs +1 -0
- package/dist/page-planes-2ZepTpen.d.mts +817 -0
- package/dist/participantBootstrap-BuTrTQbo.d.mts +22 -0
- package/dist/{participantBootstrap-DFJlcKRI.d.mts → participantBootstrap-CSLsiQ-C.d.mts} +9 -3
- package/dist/peer-client-7X52EKMX.mjs +1 -0
- package/dist/plain-html-EF7MUNRZ.mjs +1 -0
- package/dist/plugin-astro.d.mts +5 -2
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-next.mjs +1 -1
- package/dist/plugin-nuxt.d.mts +4 -2
- package/dist/plugin-nuxt.mjs +1 -1
- package/dist/plugin-vite.d.mts +69 -9
- package/dist/plugin-vite.mjs +1 -1
- package/dist/qr-encoder.mjs +3 -0
- package/dist/server.d.mts +45 -20
- package/dist/server.mjs +1 -1
- package/dist/shared-page-GO76UP7I.mjs +1 -0
- package/dist/{subjects-DdavjSTL.d.mts → subjects-BQFCkehy.d.mts} +84 -1
- package/dist/taste-proposal-session-DBOUA54V.mjs +1 -0
- package/dist/toolbarFonts-GVPRHJGB.mjs +1 -0
- package/dist/{types-g9YCBx4Z.d.mts → types-CggBG-H6.d.mts} +1 -137
- package/dist/{video-adapter-DB6Hex1f.d.mts → video-adapter-C0kSwUir.d.mts} +2 -2
- package/dist/workspace-snapshot-6LN7U2NJ.mjs +1 -0
- package/package.json +45 -22
- package/samples/README.md +32 -0
- package/samples/build.d.mts +16 -0
- package/samples/build.mjs +138 -0
- package/dist/ExploreAttachment-H5WPEAZB.mjs +0 -1
- package/dist/PagePreviewLayer-WCYOBKAS.mjs +0 -1
- package/dist/ParticipantRuntime-HEC26AER.mjs +0 -1
- package/dist/PhoneHostGate-Q2AXVOSH.mjs +0 -1
- package/dist/PopmeltTasteConnectedPane-B7DHQKRQ.mjs +0 -1
- package/dist/PreviewRuntime-H2UOLP6T.mjs +0 -1
- package/dist/SuppliedContext-7ASO6GAW.mjs +0 -1
- package/dist/ThreadErrorCard-6R7W3RGZ.mjs +0 -1
- package/dist/ThreadPanel-3IS7GUYS.mjs +0 -1
- package/dist/bridgeSSEStream-K3UIMBTC.mjs +0 -1
- package/dist/bridgeWebSocketStream-2SUZUBE3.mjs +0 -1
- package/dist/browser-runtime-ILNTJLZ5.mjs +0 -1
- package/dist/canvas-chat-note-MGAEUYJO.mjs +0 -1
- package/dist/checkFixture-YE2ROOLL.mjs +0 -1
- package/dist/chunk-26P7UUHT.mjs +0 -1
- package/dist/chunk-2P2NUZW7.mjs +0 -1
- package/dist/chunk-3SEXH3AZ.mjs +0 -1
- package/dist/chunk-3XJEC6LS.mjs +0 -1
- package/dist/chunk-4LHTPRFY.mjs +0 -1
- package/dist/chunk-5D2ADU7H.mjs +0 -1
- package/dist/chunk-5K7SACPW.mjs +0 -1
- package/dist/chunk-67QNAAUC.mjs +0 -1
- package/dist/chunk-7CGKO4IU.mjs +0 -30
- package/dist/chunk-BACXPVHP.mjs +0 -1
- package/dist/chunk-DC47WNPG.mjs +0 -1
- package/dist/chunk-DJTGR3RO.mjs +0 -1
- package/dist/chunk-DLUNNAZC.mjs +0 -1
- package/dist/chunk-EX63NVDN.mjs +0 -1
- package/dist/chunk-FLTHWLRC.mjs +0 -1
- package/dist/chunk-G6RYESYI.mjs +0 -1
- package/dist/chunk-G7JR5Z3P.mjs +0 -1
- package/dist/chunk-GBVPRXA3.mjs +0 -1
- package/dist/chunk-HAE5LUJX.mjs +0 -1
- package/dist/chunk-HU2XWUJC.mjs +0 -1
- package/dist/chunk-HV7HRQ2S.mjs +0 -1
- package/dist/chunk-J4WDYITA.mjs +0 -1
- package/dist/chunk-L7QONR4K.mjs +0 -1
- package/dist/chunk-LVEMYZOA.mjs +0 -1
- package/dist/chunk-MSWXKP77.mjs +0 -1
- package/dist/chunk-NSCO633B.mjs +0 -1
- package/dist/chunk-NWE5PYKM.mjs +0 -1
- package/dist/chunk-O4HZP3RP.mjs +0 -1
- package/dist/chunk-OAHYSDJ4.mjs +0 -1
- package/dist/chunk-PNTM77NT.mjs +0 -1
- package/dist/chunk-RUTWU5W2.mjs +0 -1
- package/dist/chunk-TLREGQQB.mjs +0 -1
- package/dist/chunk-TUXBMJQZ.mjs +0 -1
- package/dist/chunk-V2I7PSJW.mjs +0 -1
- package/dist/chunk-WDAXARLI.mjs +0 -1
- package/dist/chunk-WHJEKDNP.mjs +0 -1
- package/dist/chunk-X2Q3H6X7.mjs +0 -1
- package/dist/chunk-XJQJQ5V5.mjs +0 -1
- package/dist/chunk-XT6PHPPG.mjs +0 -1
- package/dist/chunk-YD3PDEFX.mjs +0 -1
- package/dist/chunk-ZDXQ7WNW.mjs +0 -1
- package/dist/codex-note-context-YFURG7VL.mjs +0 -1
- package/dist/codex-project-3NSU5OWL.mjs +0 -1
- package/dist/codex-session-registry-ONODFWFD.mjs +0 -1
- package/dist/focus-inspection-SZJ5KP23.mjs +0 -1
- package/dist/peer-client-56EAHIGF.mjs +0 -1
- package/dist/taste-proposal-session-XU4N7RUV.mjs +0 -1
- package/dist/workspace-snapshot-RTTXNNUX.mjs +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Public, credential-free description stamped by the application's dev server.
|
|
2
|
+
* The revision is context metadata (or `unversioned`), never sync/Send authority.
|
|
3
|
+
*/
|
|
4
|
+
type ParticipantBootstrapConfig = {
|
|
5
|
+
version?: 1;
|
|
6
|
+
planeApps?: boolean;
|
|
7
|
+
lanInviteOrigin?: string;
|
|
8
|
+
/** Preferred initial transport when the host supports on-demand guest gateways. */
|
|
9
|
+
guestInvites?: 'lan' | 'tunnel';
|
|
10
|
+
tunnelAvailable?: boolean;
|
|
11
|
+
appVersion?: string;
|
|
12
|
+
url: string;
|
|
13
|
+
projectId: string;
|
|
14
|
+
revision: string;
|
|
15
|
+
};
|
|
16
|
+
declare global {
|
|
17
|
+
interface Window {
|
|
18
|
+
__POPMELT_PARTICIPANTS__?: ParticipantBootstrapConfig;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type { ParticipantBootstrapConfig as P };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Annotation, P as PopmeltSubjectAdapter } from './subjects-
|
|
2
|
-
import {
|
|
1
|
+
import { A as Annotation, P as PopmeltSubjectAdapter } from './subjects-BQFCkehy.mjs';
|
|
2
|
+
import { d as ImageRecognitionProvider, D as VideoTrackingProvider, t as VideoSegmentationProvider, f as ImageSubjectAdapterOptions, v as VideoSubjectAdapterOptions } from './video-adapter-C0kSwUir.mjs';
|
|
3
3
|
|
|
4
4
|
type CommentMetaValue = null | boolean | number | string | CommentMetaValue[] | {
|
|
5
5
|
[key: string]: CommentMetaValue;
|
|
@@ -62,7 +62,7 @@ type PopmeltExtension = {
|
|
|
62
62
|
/** Host integration options, independent of the UI renderer. */
|
|
63
63
|
type PopmeltOptions = {
|
|
64
64
|
enabled?: boolean;
|
|
65
|
-
/**
|
|
65
|
+
/** @deprecated Guest access is controlled by the host in Pair and Share. */
|
|
66
66
|
multiplayer?: boolean;
|
|
67
67
|
bridgeUrl?: string;
|
|
68
68
|
/** Stable project id generated by the framework plugin/bridge startup. */
|
|
@@ -83,6 +83,12 @@ type PopmeltOptions = {
|
|
|
83
83
|
*/
|
|
84
84
|
type ParticipantBootstrapConfig = {
|
|
85
85
|
version?: 1;
|
|
86
|
+
planeApps?: boolean;
|
|
87
|
+
lanInviteOrigin?: string;
|
|
88
|
+
/** Preferred initial transport when the host supports on-demand guest gateways. */
|
|
89
|
+
guestInvites?: 'lan' | 'tunnel';
|
|
90
|
+
tunnelAvailable?: boolean;
|
|
91
|
+
appVersion?: string;
|
|
86
92
|
url: string;
|
|
87
93
|
projectId: string;
|
|
88
94
|
revision: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as m,b as n,c as s,d as r,e as t,f as o}from"./chunk-JSNK6NX7.mjs";import"./chunk-WJHYEACV.mjs";import"./chunk-CVVD2OMQ.mjs";import"./chunk-TCGXG7UA.mjs";import"./chunk-MPEVFQ43.mjs";import"./chunk-AYZUOBFI.mjs";import"./chunk-QE5XGXIA.mjs";import"./chunk-PYGRFSUU.mjs";import"./chunk-6EO73WJN.mjs";import"./chunk-RUJC32MA.mjs";import"./chunk-QXVMGZFP.mjs";import"./chunk-JJK4LAN6.mjs";import"./chunk-IW7V7WNL.mjs";import"./chunk-HKHZBKAN.mjs";import"./chunk-CIKFUS7J.mjs";import"./chunk-UTP56NCY.mjs";import"./chunk-GLF7Z5IR.mjs";import"./chunk-YMWXWXPV.mjs";import"./chunk-KF73S7MG.mjs";import"./chunk-NOHXTT24.mjs";export{m as agentCredentialFile,t as callPeer,r as canvasChatRequest,s as enrolledCanvasEndpoint,o as runPeerCommand,n as sendThreadNote};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as m}from"./chunk-MPEVFQ43.mjs";import"./chunk-HKHZBKAN.mjs";export{m as startPlainHtml};
|
package/dist/plugin-astro.d.mts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { P as PopmeltPluginOptions } from './dev-server-
|
|
1
|
+
import { P as PopmeltPluginOptions } from './dev-server-BRrhkH5t.mjs';
|
|
2
2
|
import { popmelt as popmelt$1 } from './plugin-vite.mjs';
|
|
3
3
|
import 'node:http';
|
|
4
|
+
import './participantBootstrap-BuTrTQbo.mjs';
|
|
5
|
+
import 'vite';
|
|
6
|
+
import './page-planes-2ZepTpen.mjs';
|
|
4
7
|
|
|
5
8
|
type PopmeltAstroOptions = PopmeltPluginOptions & {
|
|
6
9
|
/** Set false when an existing provider mounts the UI. */
|
|
7
10
|
client?: boolean;
|
|
8
|
-
/**
|
|
11
|
+
/** @deprecated Guest access is controlled by the host in Pair and Share. */
|
|
9
12
|
multiplayer?: boolean;
|
|
10
13
|
};
|
|
11
14
|
type AstroSetup = {
|
package/dist/plugin-astro.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as t}from"./chunk-UX3DTCHL.mjs";import"./chunk-F3VZQGPM.mjs";import"./chunk-JJK4LAN6.mjs";import"./chunk-IW7V7WNL.mjs";import"./chunk-HKHZBKAN.mjs";import"./chunk-CIKFUS7J.mjs";import"./chunk-UTP56NCY.mjs";import"./chunk-GLF7Z5IR.mjs";import"./chunk-YMWXWXPV.mjs";import"./chunk-KF73S7MG.mjs";import"./chunk-TIAPJGX2.mjs";import"./chunk-NOHXTT24.mjs";import{fileURLToPath as e}from"url";function n(n={}){return{name:"popmelt",hooks:{"astro:config:setup"({command:r,config:i,updateConfig:s,injectScript:a}){if("dev"!==r||"1"===process.env.POPMELT_PLANE_RENDERER)return;let{client:m=!0,...d}=n;s({vite:{plugins:[t({...d,projectRoot:n.projectRoot??e(i.root)},"astro")],optimizeDeps:{include:m?["react","react/jsx-runtime","react/jsx-dev-runtime","react-dom","react-dom/client"]:[]}}}),a("page",m?o:"\nimport { bridgeUrl, projectId } from 'virtual:popmelt/bridge';\nif (bridgeUrl) window.__POPMELT_BRIDGE_URL__ = bridgeUrl;\nif (projectId) window.__POPMELT_PROJECT_ID__ = projectId;\n")}}}}var o="\nimport { bridgeUrl, projectId } from 'virtual:popmelt/bridge';\nimport { navigate } from 'astro:transitions/client';\nlet disposed = false;\nlet mounting;\nconst start = () => {\n if (disposed || mounting || !bridgeUrl || !projectId) return;\n mounting = Promise.resolve(import.meta.hot?.data.cleanup).then(async () => {\n if (disposed) return;\n const { mountPopmelt } = await import('@popmelt.com/core/browser');\n if (disposed) return;\n const handle = await mountPopmelt({ enabled: true, bridgeUrl, projectId, navigate });\n return handle;\n }).catch(error => { console.warn('[popmelt] startup failed:', error); });\n};\n// The standalone hosts live outside body, so Astro's body swaps retain them.\ndocument.addEventListener('astro:page-load', start);\nif (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start, { once: true });\nelse start();\nimport.meta.hot?.dispose(data => {\n if (disposed) return;\n disposed = true;\n document.removeEventListener('astro:page-load', start);\n document.removeEventListener('DOMContentLoaded', start);\n data.cleanup = mounting?.then(handle => handle?.unmount());\n});\n";export{n as popmelt};
|
package/dist/plugin-next.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{NextResponse as
|
|
1
|
+
import{NextResponse as j}from"next/server.js";function D(e=1111){return Array.from({length:Math.min(32,65536-e)},(t,o)=>e+o)}function T(e){return k(e).slice(0,12)}var $=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function k(e){let t=typeof TextEncoder<"u"?Array.from(new TextEncoder().encode(e)):V(e),o=t.length*8;for(t.push(128);t.length%64!==56;)t.push(0);for(let x=7;x>=0;x--)t.push(o/Math.pow(2,x*8)&255);let r=1779033703,n=3144134277,c=1013904242,u=2773480762,l=1359893119,a=2600822924,d=528734635,_=1541459225,i=new Array(64);for(let x=0;x<t.length;x+=64){for(let s=0;s<16;s++){let m=x+s*4;i[s]=(t[m]<<24|t[m+1]<<16|t[m+2]<<8|t[m+3])>>>0}for(let s=16;s<64;s++){let m=p(i[s-15],7)^p(i[s-15],18)^i[s-15]>>>3,I=p(i[s-2],17)^p(i[s-2],19)^i[s-2]>>>10;i[s]=i[s-16]+m+i[s-7]+I>>>0}let f=r,P=n,g=c,O=u,b=l,E=a,R=d,y=_;for(let s=0;s<64;s++){let m=p(b,6)^p(b,11)^p(b,25),I=b&E^~b&R,N=y+m+I+$[s]+i[s]>>>0,C=p(f,2)^p(f,13)^p(f,22),B=f&P^f&g^P&g,M=C+B>>>0;y=R,R=E,E=b,b=O+N>>>0,O=g,g=P,P=f,f=N+M>>>0}r=r+f>>>0,n=n+P>>>0,c=c+g>>>0,u=u+O>>>0,l=l+b>>>0,a=a+E>>>0,d=d+R>>>0,_=_+y>>>0}return[r,n,c,u,l,a,d,_].map(x=>x.toString(16).padStart(8,"0")).join("")}function p(e,t){return e>>>t|e<<32-t}function V(e){let t=[];for(let o=0;o<e.length;o++){let r=e.charCodeAt(o);r<128?t.push(r):r<2048?t.push(192|r>>6,128|r&63):t.push(224|r>>12,128|r>>6&63,128|r&63)}return t}function S(){if(process.env.POPMELT_BRIDGE_URL)try{let e=new URL(process.env.POPMELT_BRIDGE_URL).port;if(e)return parseInt(e,10)}catch{}return parseInt(process.env.POPMELT_BRIDGE_PORT||"1111",10)}var v=1e3,h=null;function F(){try{return typeof process<"u"&&typeof process.cwd=="function"?process.cwd():null}catch{return null}}function A(e){if(e)return T(e);let t=F();return process.env.POPMELT_PROJECT_ID||(t?T(t):null)}async function L(e,t){let o=new AbortController,r=setTimeout(()=>o.abort(),350);try{let n=new URL("/status?discovery=1",`http://localhost:${e}`);t&&n.searchParams.set("projectId",t);let c=await fetch(n,{signal:o.signal,cache:"no-store"});if(!c.ok)return null;let u=await c.json();return t&&u.projectId!==t?null:u}catch{return null}finally{clearTimeout(r)}}async function U(e,t){let o=Date.now();if(h&&h.preferredPort===e&&h.projectId===t&&h.expiresAt>o)return h.port;if(await L(e,t))return h={preferredPort:e,projectId:t,port:e,expiresAt:o+v},e;if(!t)return e;let n=D().filter(a=>a!==e),l=(await Promise.all(n.map(async a=>await L(a,t)?a:null))).find(a=>a!==null)??null;return h={preferredPort:e,projectId:t,port:l,expiresAt:o+v},l}async function w(e,t,o="/status"){let r=await U(e,t);if(r===null)return j.json({error:"Popmelt bridge unavailable for this project",projectId:t},{status:503,headers:{"Cache-Control":"no-store"}});let n=new URL(o,`http://localhost:${r}`);return t&&n.searchParams.set("projectId",t),j.rewrite(n)}function z(e,t){let o=t?.basePath??"/popmelt",r=t?.port??S(),n=t?.projectId??A(t?.projectRoot);return process.env.NODE_ENV!=="production"&&e.nextUrl.pathname==="/popmelt/phone"?w(r,n,"/phone-host"):process.env.NODE_ENV!=="production"&&process.env.POPMELT_DEV_SESSION&&e.nextUrl.pathname==="/__popmelt/host"&&n?w(r,n,"/__popmelt/host"):process.env.NODE_ENV!=="production"&&process.env.POPMELT_DEV_SESSION&&e.nextUrl.pathname.startsWith("/__popmelt/planes/")&&n?w(r,n,e.nextUrl.pathname+(e.nextUrl.search??"")):e.nextUrl.pathname===`${o}/status`?w(r,n):null}function Q(e,t){if(process.env.NODE_ENV==="production")return e;if(process.env.POPMELT_PLANE_RENDERER==="1"){let c=process.env.POPMELT_PLANE_WORKSPACE_ROOT;return c?{...e,turbopack:{...e.turbopack,root:c}}:e}let o=t?.port??S(),r=t?.projectId??A(t?.projectRoot),n=e.rewrites;return{...e,serverExternalPackages:[...new Set([...e.serverExternalPackages??[],"@napi-rs/keyring","esbuild"])],async rewrites(){let c=n?await n():[],l=`http://localhost:${await U(o,r)??o}`,a=[...process.env.POPMELT_DEV_SESSION&&r?[{source:"/__popmelt/planes/:path*",destination:`${l}/__popmelt/planes/:path*?projectId=${encodeURIComponent(r)}`},{source:"/__popmelt/host",destination:`${l}/__popmelt/host?projectId=${encodeURIComponent(r)}`}]:[],{source:"/popmelt/phone",destination:`${l}/phone-host`},{source:"/popmelt/status",destination:r?`${l}/status?projectId=${encodeURIComponent(r)}`:`${l}/status`}];return Array.isArray(c)?{beforeFiles:a,afterFiles:c,fallback:[]}:{...c,beforeFiles:[...c.beforeFiles||[],...a]}}}}export{A as getPopmeltProjectId,z as popmeltMiddleware,Q as withPopmelt};
|
package/dist/plugin-nuxt.d.mts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { NuxtModule } from 'nuxt/schema';
|
|
2
|
-
import { P as PopmeltPluginOptions } from './dev-server-
|
|
2
|
+
import { P as PopmeltPluginOptions } from './dev-server-BRrhkH5t.mjs';
|
|
3
3
|
import 'node:http';
|
|
4
|
+
import './participantBootstrap-BuTrTQbo.mjs';
|
|
4
5
|
|
|
5
6
|
type PopmeltNuxtOptions = Pick<PopmeltPluginOptions, 'port' | 'projectRoot' | 'bridge'> & {
|
|
6
|
-
/**
|
|
7
|
+
/** @deprecated Guest access is controlled by the host in Pair and Share. */
|
|
8
|
+
multiplayer?: boolean;
|
|
7
9
|
};
|
|
8
10
|
declare const popmeltNuxt: NuxtModule<PopmeltNuxtOptions>;
|
|
9
11
|
|
package/dist/plugin-nuxt.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as e,c as t}from"./chunk-TIAPJGX2.mjs";import{b as o}from"./chunk-NOHXTT24.mjs";import{addPluginTemplate as n,defineNuxtModule as r}from"nuxt/kit";var p=r({meta:{name:"@popmelt.com/core/nuxt",configKey:"popmelt"},async setup(r,p){if(!p.options.dev||"1"===process.env.POPMELT_PLANE_RENDERER)return;let s={config:{server:p.options.devServer},middlewares:{use(){}}},i=await e({...r,projectRoot:r.projectRoot??p.options.rootDir},s,3e3,void 0,"nuxt");if(null===i.port)return;i.updateOrigin&&p.hook("listen",async(e,t)=>{let o=e.address();if(!o||"string"==typeof o)return;let n="127.0.0.1"===o.address?"127.0.0.1":"::1"===o.address?"[::1]":"localhost";await i.updateOrigin(`${t.https?"https":"http"}://${n}:${o.port}`)}),p.hook("nitro:config",e=>{e.routeRules??={},Object.assign(e.routeRules,{...i.bootstrap?.planeApps&&{"/__popmelt/planes/**":{proxy:{to:`http://127.0.0.1:${i.port}/__popmelt/planes/**`,headers:{"x-popmelt-project-id":i.projectId}}}},...i.bootstrap&&{"/__popmelt/host":{proxy:`http://127.0.0.1:${i.port}/__popmelt/host?projectId=${encodeURIComponent(i.projectId)}`}},"/popmelt/phone":{proxy:`http://127.0.0.1:${i.port}/phone-host`}})}),p.hook("vite:extend",({config:e})=>{e.server??={},e.server.fs??={},e.server.fs.strict=!0,e.server.fs.deny=[...e.server.fs.deny??[".env",".env.*","*.{crt,pem}","**/.git/**"],"**/.popmelt","**/.popmelt/**"],e.server.watch??={};let t=e.server.watch.ignored;e.server.watch.ignored=[...Array.isArray(t)?t:t?[t]:[],"**/.popmelt/**"],e.optimizeDeps??={},e.optimizeDeps.include=[...new Set([...e.optimizeDeps.include??[],"react","react/jsx-runtime","react/jsx-dev-runtime","react-dom","react-dom/client"])]});let d=await t(i,s),a=d?o(d):void 0;p.hook("close",async()=>{a?.(),await(d?.release())}),n({filename:"popmelt.client.mjs",mode:"client",getContents:()=>`import { defineNuxtPlugin } from '#app';\nexport default defineNuxtPlugin((nuxtApp) => {\n let disposed = false;\n let mounting;\n const bridgeUrl = ${JSON.stringify(`http://localhost:${i.port}`)};\n const projectId = ${JSON.stringify(i.projectId)};\n ${i.bootstrap?`window.__POPMELT_PARTICIPANTS__=${JSON.stringify(i.bootstrap)};`:""}\n const dispose = () => {\n if (disposed) return;\n disposed = true;\n void mounting?.then(handle => handle?.unmount());\n };\n nuxtApp.hook('app:mounted', () => {\n if (disposed || mounting) return;\n mounting = import('@popmelt.com/core/browser').then(({ mountPopmelt }) => {\n if (disposed) return;\n return mountPopmelt({\n enabled: true,\n bridgeUrl,\n projectId,\n navigate: (url) => nuxtApp.$router.push(url),\n });\n }).then(handle => {\n if (disposed) handle?.unmount();\n return handle;\n }).catch(error => { console.warn('[popmelt] startup failed:', error); });\n });\n nuxtApp.vueApp.onUnmount(dispose);\n import.meta.hot?.dispose(dispose);\n});`})}});export{p as default};
|
package/dist/plugin-vite.d.mts
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
|
-
import { P as PopmeltPluginOptions, D as DevServerLike } from './dev-server-
|
|
1
|
+
import { P as PopmeltPluginOptions, D as DevServerLike } from './dev-server-BRrhkH5t.mjs';
|
|
2
|
+
import * as vite from 'vite';
|
|
3
|
+
import { createServer, ViteDevServer, Plugin as Plugin$1 } from 'vite';
|
|
4
|
+
import { s as startParticipantLan, P as PopmeltHandle, c as createParticipantPlaneApps } from './page-planes-2ZepTpen.mjs';
|
|
2
5
|
import 'node:http';
|
|
6
|
+
import './participantBootstrap-BuTrTQbo.mjs';
|
|
7
|
+
|
|
8
|
+
type Room = {
|
|
9
|
+
tunnel?: Awaited<ReturnType<typeof startParticipantLan>>;
|
|
10
|
+
lan?: Awaited<ReturnType<typeof startParticipantLan>>;
|
|
11
|
+
bridge: PopmeltHandle;
|
|
12
|
+
planeApps: Awaited<ReturnType<typeof createParticipantPlaneApps>>;
|
|
13
|
+
};
|
|
14
|
+
/** Explicit local dev integration. Use the application's installed Vite and
|
|
15
|
+
* config for each checkout. Instantiating a plugin during build starts nothing. */
|
|
16
|
+
type PlaneOptions = {
|
|
17
|
+
createServer: typeof createServer;
|
|
18
|
+
origin: string;
|
|
19
|
+
directory?: string;
|
|
20
|
+
bridgePort?: number;
|
|
21
|
+
/** Start an invitation-only HTTPS guest listener on a private LAN interface. */
|
|
22
|
+
lan?: {
|
|
23
|
+
build: typeof vite.build;
|
|
24
|
+
address?: string;
|
|
25
|
+
};
|
|
26
|
+
/** Serve the guest app through a host-owned ephemeral Cloudflare Quick Tunnel. */
|
|
27
|
+
tunnel?: {
|
|
28
|
+
build: typeof vite.build;
|
|
29
|
+
};
|
|
30
|
+
/** Replace automatic dependency sharing and installation for this project. */
|
|
31
|
+
prepare?: (directory: string) => Promise<void>;
|
|
32
|
+
};
|
|
33
|
+
type SessionOptions = Omit<PlaneOptions, 'origin'> & {
|
|
34
|
+
origin?: string;
|
|
35
|
+
experimentalEventTransport?: 'sse' | 'websocket';
|
|
36
|
+
};
|
|
37
|
+
declare function createVitePlaneSession(options: SessionOptions): {
|
|
38
|
+
room: () => Room;
|
|
39
|
+
close: () => Promise<void>;
|
|
40
|
+
read: () => Promise<{
|
|
41
|
+
lanInviteOrigin: string | undefined;
|
|
42
|
+
version?: 1;
|
|
43
|
+
planeApps?: boolean;
|
|
44
|
+
guestInvites?: "lan" | "tunnel";
|
|
45
|
+
tunnelAvailable?: boolean;
|
|
46
|
+
appVersion?: string;
|
|
47
|
+
url: string;
|
|
48
|
+
projectId: string;
|
|
49
|
+
revision: string;
|
|
50
|
+
}>;
|
|
51
|
+
configureServer(host: ViteDevServer): Promise<void>;
|
|
52
|
+
};
|
|
53
|
+
declare function participantPlanes(options: PlaneOptions): Plugin$1<{
|
|
54
|
+
room: () => Room;
|
|
55
|
+
}>;
|
|
3
56
|
|
|
4
57
|
type ViteConfig = {
|
|
5
58
|
optimizeDeps: {
|
|
@@ -13,6 +66,13 @@ type ViteConfig = {
|
|
|
13
66
|
scan: true;
|
|
14
67
|
}) => (id: string) => Promise<string | undefined>;
|
|
15
68
|
};
|
|
69
|
+
type PlaneSession = ReturnType<typeof createVitePlaneSession>;
|
|
70
|
+
type HtmlTags = {
|
|
71
|
+
tag: string;
|
|
72
|
+
attrs: Record<string, string>;
|
|
73
|
+
children: string;
|
|
74
|
+
injectTo: 'head-prepend';
|
|
75
|
+
}[];
|
|
16
76
|
type Plugin = {
|
|
17
77
|
name: string;
|
|
18
78
|
config: (config: unknown, env: {
|
|
@@ -22,14 +82,14 @@ type Plugin = {
|
|
|
22
82
|
configResolved: (config: ViteConfig) => Promise<void>;
|
|
23
83
|
resolveId: (id: string) => string | undefined;
|
|
24
84
|
load: (id: string) => string | undefined;
|
|
85
|
+
closeBundle: () => Promise<void>;
|
|
25
86
|
configureServer: (server: DevServerLike) => Promise<void>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}[] | undefined;
|
|
87
|
+
api: {
|
|
88
|
+
ownsDevBridge: boolean;
|
|
89
|
+
room: PlaneSession['room'];
|
|
90
|
+
};
|
|
91
|
+
transformIndexHtml: () => HtmlTags | Promise<HtmlTags> | undefined;
|
|
32
92
|
};
|
|
33
|
-
declare function popmelt(options?: PopmeltPluginOptions): Plugin;
|
|
93
|
+
declare function popmelt(options?: PopmeltPluginOptions, framework?: 'astro'): Plugin;
|
|
34
94
|
|
|
35
|
-
export { popmelt };
|
|
95
|
+
export { participantPlanes, popmelt };
|
package/dist/plugin-vite.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
1
|
+
import{a as m,b as p}from"./chunk-UX3DTCHL.mjs";import"./chunk-F3VZQGPM.mjs";import"./chunk-JJK4LAN6.mjs";import"./chunk-IW7V7WNL.mjs";import"./chunk-HKHZBKAN.mjs";import"./chunk-CIKFUS7J.mjs";import"./chunk-UTP56NCY.mjs";import"./chunk-GLF7Z5IR.mjs";import"./chunk-YMWXWXPV.mjs";import"./chunk-KF73S7MG.mjs";import"./chunk-TIAPJGX2.mjs";import"./chunk-NOHXTT24.mjs";export{m as participantPlanes,p as popmelt};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var v=function(w,x){let s=w,l=j[x],e=null,t=0,u=null,p=[],y={},h=function(r,c){t=s*4+17,e=(function(n){let f=new Array(n);for(let i=0;i<n;i+=1){f[i]=new Array(n);for(let g=0;g<n;g+=1)f[i][g]=null}return f})(t),a(0,0),a(t-7,0),a(0,t-7),D(),P(),I(r,c),s>=7&&E(r),u==null&&(u=Z(s,l,p)),m(u,c)},a=function(r,c){for(let n=-1;n<=7;n+=1)if(!(r+n<=-1||t<=r+n))for(let f=-1;f<=7;f+=1)c+f<=-1||t<=c+f||(0<=n&&n<=6&&(f==0||f==6)||0<=f&&f<=6&&(n==0||n==6)||2<=n&&n<=4&&2<=f&&f<=4?e[r+n][c+f]=!0:e[r+n][c+f]=!1)},_=function(){let r=0,c=0;for(let n=0;n<8;n+=1){h(!0,n);let f=O.getLostPoint(y);(n==0||r>f)&&(r=f,c=n)}return c},P=function(){for(let r=8;r<t-8;r+=1)e[r][6]==null&&(e[r][6]=r%2==0);for(let r=8;r<t-8;r+=1)e[6][r]==null&&(e[6][r]=r%2==0)},D=function(){let r=O.getPatternPosition(s);for(let c=0;c<r.length;c+=1)for(let n=0;n<r.length;n+=1){let f=r[c],i=r[n];if(e[f][i]==null)for(let g=-2;g<=2;g+=1)for(let A=-2;A<=2;A+=1)g==-2||g==2||A==-2||A==2||g==0&&A==0?e[f+g][i+A]=!0:e[f+g][i+A]=!1}},E=function(r){let c=O.getBCHTypeNumber(s);for(let n=0;n<18;n+=1){let f=!r&&(c>>n&1)==1;e[Math.floor(n/3)][n%3+t-8-3]=f}for(let n=0;n<18;n+=1){let f=!r&&(c>>n&1)==1;e[n%3+t-8-3][Math.floor(n/3)]=f}},I=function(r,c){let n=l<<3|c,f=O.getBCHTypeInfo(n);for(let i=0;i<15;i+=1){let g=!r&&(f>>i&1)==1;i<6?e[i][8]=g:i<8?e[i+1][8]=g:e[t-15+i][8]=g}for(let i=0;i<15;i+=1){let g=!r&&(f>>i&1)==1;i<8?e[8][t-i-1]=g:i<9?e[8][15-i-1+1]=g:e[8][15-i-1]=g}e[t-8][8]=!r},m=function(r,c){let n=-1,f=t-1,i=7,g=0,A=O.getMaskFunction(c);for(let B=t-1;B>0;B-=2)for(B==6&&(B-=1);;){for(let M=0;M<2;M+=1)if(e[f][B-M]==null){let T=!1;g<r.length&&(T=(r[g]>>>i&1)==1),A(f,B-M)&&(T=!T),e[f][B-M]=T,i-=1,i==-1&&(g+=1,i=7)}if(f+=n,f<0||t<=f){f-=n,n=-n;break}}},X=function(r,c){let n=0,f=0,i=0,g=new Array(c.length),A=new Array(c.length);for(let b=0;b<c.length;b+=1){let C=c[b].dataCount,L=c[b].totalCount-C;f=Math.max(f,C),i=Math.max(i,L),g[b]=new Array(C);for(let R=0;R<g[b].length;R+=1)g[b][R]=255&r.getBuffer()[R+n];n+=C;let Q=O.getErrorCorrectPolynomial(L),F=K(g[b],Q.getLength()-1).mod(Q);A[b]=new Array(Q.getLength()-1);for(let R=0;R<A[b].length;R+=1){let S=R+F.getLength()-A[b].length;A[b][R]=S>=0?F.getAt(S):0}}let B=0;for(let b=0;b<c.length;b+=1)B+=c[b].totalCount;let M=new Array(B),T=0;for(let b=0;b<f;b+=1)for(let C=0;C<c.length;C+=1)b<g[C].length&&(M[T]=g[C][b],T+=1);for(let b=0;b<i;b+=1)for(let C=0;C<c.length;C+=1)b<A[C].length&&(M[T]=A[C][b],T+=1);return M},Z=function(r,c,n){let f=Y.getRSBlocks(r,c),i=G();for(let A=0;A<n.length;A+=1){let B=n[A];i.put(B.getMode(),4),i.put(B.getLength(),O.getLengthInBits(B.getMode(),r)),B.write(i)}let g=0;for(let A=0;A<f.length;A+=1)g+=f[A].dataCount;if(i.getLengthInBits()>g*8)throw"code length overflow. ("+i.getLengthInBits()+">"+g*8+")";for(i.getLengthInBits()+4<=g*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=g*8||(i.put(236,8),i.getLengthInBits()>=g*8));)i.put(17,8);return X(i,f)};y.addData=function(r,c){c=c||"Byte";let n=null;switch(c){case"Numeric":n=W(r);break;case"Alphanumeric":n=V(r);break;case"Byte":n=q(r);break;case"Kanji":n=z(r);break;default:throw"mode:"+c}p.push(n),u=null},y.isDark=function(r,c){if(r<0||t<=r||c<0||t<=c)throw r+","+c;return e[r][c]},y.getModuleCount=function(){return t},y.make=function(){if(s<1){let r=1;for(;r<40;r++){let c=Y.getRSBlocks(r,l),n=G();for(let i=0;i<p.length;i++){let g=p[i];n.put(g.getMode(),4),n.put(g.getLength(),O.getLengthInBits(g.getMode(),r)),g.write(n)}let f=0;for(let i=0;i<c.length;i++)f+=c[i].dataCount;if(n.getLengthInBits()<=f*8)break}s=r}h(!1,_())},y.createTableTag=function(r,c){r=r||2,c=typeof c>"u"?r*4:c;let n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+c+"px;",n+='">',n+="<tbody>";for(let f=0;f<y.getModuleCount();f+=1){n+="<tr>";for(let i=0;i<y.getModuleCount();i+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+r+"px;",n+=" height: "+r+"px;",n+=" background-color: ",n+=y.isDark(f,i)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>",n},y.createSvgTag=function(r,c,n,f){let i={};typeof arguments[0]=="object"&&(i=arguments[0],r=i.cellSize,c=i.margin,n=i.alt,f=i.title),r=r||2,c=typeof c>"u"?r*4:c,n=typeof n=="string"?{text:n}:n||{},n.text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,f=typeof f=="string"?{text:f}:f||{},f.text=f.text||null,f.id=f.text?f.id||"qrcode-title":null;let g=y.getModuleCount()*r+c*2,A,B,M,T,b="",C;for(C="l"+r+",0 0,"+r+" -"+r+",0 0,-"+r+"z ",b+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',b+=i.scalable?"":' width="'+g+'px" height="'+g+'px"',b+=' viewBox="0 0 '+g+" "+g+'" ',b+=' preserveAspectRatio="xMinYMin meet"',b+=f.text||n.text?' role="img" aria-labelledby="'+U([f.id,n.id].join(" ").trim())+'"':"",b+=">",b+=f.text?'<title id="'+U(f.id)+'">'+U(f.text)+"</title>":"",b+=n.text?'<description id="'+U(n.id)+'">'+U(n.text)+"</description>":"",b+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',b+='<path d="',M=0;M<y.getModuleCount();M+=1)for(T=M*r+c,A=0;A<y.getModuleCount();A+=1)y.isDark(M,A)&&(B=A*r+c,b+="M"+B+","+T+C);return b+='" stroke="transparent" fill="black"/>',b+="</svg>",b},y.createDataURL=function(r,c){r=r||2,c=typeof c>"u"?r*4:c;let n=y.getModuleCount()*r+c*2,f=c,i=n-c;return rt(n,n,function(g,A){if(f<=g&&g<i&&f<=A&&A<i){let B=Math.floor((g-f)/r),M=Math.floor((A-f)/r);return y.isDark(M,B)?0:1}else return 1})},y.createImgTag=function(r,c,n){r=r||2,c=typeof c>"u"?r*4:c;let f=y.getModuleCount()*r+c*2,i="";return i+="<img",i+=' src="',i+=y.createDataURL(r,c),i+='"',i+=' width="',i+=f,i+='"',i+=' height="',i+=f,i+='"',n&&(i+=' alt="',i+=U(n),i+='"'),i+="/>",i};let U=function(r){let c="";for(let n=0;n<r.length;n+=1){let f=r.charAt(n);switch(f){case"<":c+="<";break;case">":c+=">";break;case"&":c+="&";break;case'"':c+=""";break;default:c+=f;break}}return c},$=function(r){r=typeof r>"u"?2:r;let n=y.getModuleCount()*1+r*2,f=r,i=n-r,g,A,B,M,T,b={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},C={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},L="";for(g=0;g<n;g+=2){for(B=Math.floor((g-f)/1),M=Math.floor((g+1-f)/1),A=0;A<n;A+=1)T="\u2588",f<=A&&A<i&&f<=g&&g<i&&y.isDark(B,Math.floor((A-f)/1))&&(T=" "),f<=A&&A<i&&f<=g+1&&g+1<i&&y.isDark(M,Math.floor((A-f)/1))?T+=" ":T+="\u2588",L+=r<1&&g+1>=i?C[T]:b[T];L+=`
|
|
2
|
+
`}return n%2&&r>0?L.substring(0,L.length-n-1)+Array(n+1).join("\u2580"):L.substring(0,L.length-1)};return y.createASCII=function(r,c){if(r=r||1,r<2)return $(c);r-=1,c=typeof c>"u"?r*2:c;let n=y.getModuleCount()*r+c*2,f=c,i=n-c,g,A,B,M,T=Array(r+1).join("\u2588\u2588"),b=Array(r+1).join(" "),C="",L="";for(g=0;g<n;g+=1){for(B=Math.floor((g-f)/r),L="",A=0;A<n;A+=1)M=1,f<=A&&A<i&&f<=g&&g<i&&y.isDark(B,Math.floor((A-f)/r))&&(M=0),L+=M?T:b;for(B=0;B<r;B+=1)C+=L+`
|
|
3
|
+
`}return C.substring(0,C.length-1)},y.renderTo2dContext=function(r,c){c=c||2;let n=y.getModuleCount();for(let f=0;f<n;f++)for(let i=0;i<n;i++)r.fillStyle=y.isDark(f,i)?"black":"white",r.fillRect(i*c,f*c,c,c)},y};v.stringToBytes=function(w){let x=[];for(let d=0;d<w.length;d+=1){let o=w.charCodeAt(d);x.push(o&255)}return x};v.createStringToBytes=function(w,x){let d=(function(){let s=et(w),l=function(){let u=s.read();if(u==-1)throw"eof";return u},e=0,t={};for(;;){let u=s.read();if(u==-1)break;let p=l(),y=l(),h=l(),a=String.fromCharCode(u<<8|p),_=y<<8|h;t[a]=_,e+=1}if(e!=x)throw e+" != "+x;return t})(),o=63;return function(s){let l=[];for(let e=0;e<s.length;e+=1){let t=s.charCodeAt(e);if(t<128)l.push(t);else{let u=d[s.charAt(e)];typeof u=="number"?(u&255)==u?l.push(u):(l.push(u>>>8),l.push(u&255)):l.push(o)}}return l}};var k={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},j={L:1,M:0,Q:3,H:2},N={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},O=(function(){let w=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],x=1335,d=7973,o=21522,s={},l=function(e){let t=0;for(;e!=0;)t+=1,e>>>=1;return t};return s.getBCHTypeInfo=function(e){let t=e<<10;for(;l(t)-l(x)>=0;)t^=x<<l(t)-l(x);return(e<<10|t)^o},s.getBCHTypeNumber=function(e){let t=e<<12;for(;l(t)-l(d)>=0;)t^=d<<l(t)-l(d);return e<<12|t},s.getPatternPosition=function(e){return w[e-1]},s.getMaskFunction=function(e){switch(e){case N.PATTERN000:return function(t,u){return(t+u)%2==0};case N.PATTERN001:return function(t,u){return t%2==0};case N.PATTERN010:return function(t,u){return u%3==0};case N.PATTERN011:return function(t,u){return(t+u)%3==0};case N.PATTERN100:return function(t,u){return(Math.floor(t/2)+Math.floor(u/3))%2==0};case N.PATTERN101:return function(t,u){return t*u%2+t*u%3==0};case N.PATTERN110:return function(t,u){return(t*u%2+t*u%3)%2==0};case N.PATTERN111:return function(t,u){return(t*u%3+(t+u)%2)%2==0};default:throw"bad maskPattern:"+e}},s.getErrorCorrectPolynomial=function(e){let t=K([1],0);for(let u=0;u<e;u+=1)t=t.multiply(K([1,H.gexp(u)],0));return t},s.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case k.MODE_NUMBER:return 10;case k.MODE_ALPHA_NUM:return 9;case k.MODE_8BIT_BYTE:return 8;case k.MODE_KANJI:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case k.MODE_NUMBER:return 12;case k.MODE_ALPHA_NUM:return 11;case k.MODE_8BIT_BYTE:return 16;case k.MODE_KANJI:return 10;default:throw"mode:"+e}else if(t<41)switch(e){case k.MODE_NUMBER:return 14;case k.MODE_ALPHA_NUM:return 13;case k.MODE_8BIT_BYTE:return 16;case k.MODE_KANJI:return 12;default:throw"mode:"+e}else throw"type:"+t},s.getLostPoint=function(e){let t=e.getModuleCount(),u=0;for(let h=0;h<t;h+=1)for(let a=0;a<t;a+=1){let _=0,P=e.isDark(h,a);for(let D=-1;D<=1;D+=1)if(!(h+D<0||t<=h+D))for(let E=-1;E<=1;E+=1)a+E<0||t<=a+E||D==0&&E==0||P==e.isDark(h+D,a+E)&&(_+=1);_>5&&(u+=3+_-5)}for(let h=0;h<t-1;h+=1)for(let a=0;a<t-1;a+=1){let _=0;e.isDark(h,a)&&(_+=1),e.isDark(h+1,a)&&(_+=1),e.isDark(h,a+1)&&(_+=1),e.isDark(h+1,a+1)&&(_+=1),(_==0||_==4)&&(u+=3)}for(let h=0;h<t;h+=1)for(let a=0;a<t-6;a+=1)e.isDark(h,a)&&!e.isDark(h,a+1)&&e.isDark(h,a+2)&&e.isDark(h,a+3)&&e.isDark(h,a+4)&&!e.isDark(h,a+5)&&e.isDark(h,a+6)&&(u+=40);for(let h=0;h<t;h+=1)for(let a=0;a<t-6;a+=1)e.isDark(a,h)&&!e.isDark(a+1,h)&&e.isDark(a+2,h)&&e.isDark(a+3,h)&&e.isDark(a+4,h)&&!e.isDark(a+5,h)&&e.isDark(a+6,h)&&(u+=40);let p=0;for(let h=0;h<t;h+=1)for(let a=0;a<t;a+=1)e.isDark(a,h)&&(p+=1);let y=Math.abs(100*p/t/t-50)/5;return u+=y*10,u},s})(),H=(function(){let w=new Array(256),x=new Array(256);for(let o=0;o<8;o+=1)w[o]=1<<o;for(let o=8;o<256;o+=1)w[o]=w[o-4]^w[o-5]^w[o-6]^w[o-8];for(let o=0;o<255;o+=1)x[w[o]]=o;let d={};return d.glog=function(o){if(o<1)throw"glog("+o+")";return x[o]},d.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return w[o]},d})(),K=function(w,x){if(typeof w.length>"u")throw w.length+"/"+x;let d=(function(){let s=0;for(;s<w.length&&w[s]==0;)s+=1;let l=new Array(w.length-s+x);for(let e=0;e<w.length-s;e+=1)l[e]=w[e+s];return l})(),o={};return o.getAt=function(s){return d[s]},o.getLength=function(){return d.length},o.multiply=function(s){let l=new Array(o.getLength()+s.getLength()-1);for(let e=0;e<o.getLength();e+=1)for(let t=0;t<s.getLength();t+=1)l[e+t]^=H.gexp(H.glog(o.getAt(e))+H.glog(s.getAt(t)));return K(l,0)},o.mod=function(s){if(o.getLength()-s.getLength()<0)return o;let l=H.glog(o.getAt(0))-H.glog(s.getAt(0)),e=new Array(o.getLength());for(let t=0;t<o.getLength();t+=1)e[t]=o.getAt(t);for(let t=0;t<s.getLength();t+=1)e[t]^=H.gexp(H.glog(s.getAt(t))+l);return K(e,0).mod(s)},o},Y=(function(){let w=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],x=function(s,l){let e={};return e.totalCount=s,e.dataCount=l,e},d={},o=function(s,l){switch(l){case j.L:return w[(s-1)*4+0];case j.M:return w[(s-1)*4+1];case j.Q:return w[(s-1)*4+2];case j.H:return w[(s-1)*4+3];default:return}};return d.getRSBlocks=function(s,l){let e=o(s,l);if(typeof e>"u")throw"bad rs block @ typeNumber:"+s+"/errorCorrectionLevel:"+l;let t=e.length/3,u=[];for(let p=0;p<t;p+=1){let y=e[p*3+0],h=e[p*3+1],a=e[p*3+2];for(let _=0;_<y;_+=1)u.push(x(h,a))}return u},d})(),G=function(){let w=[],x=0,d={};return d.getBuffer=function(){return w},d.getAt=function(o){let s=Math.floor(o/8);return(w[s]>>>7-o%8&1)==1},d.put=function(o,s){for(let l=0;l<s;l+=1)d.putBit((o>>>s-l-1&1)==1)},d.getLengthInBits=function(){return x},d.putBit=function(o){let s=Math.floor(x/8);w.length<=s&&w.push(0),o&&(w[s]|=128>>>x%8),x+=1},d},W=function(w){let x=k.MODE_NUMBER,d=w,o={};o.getMode=function(){return x},o.getLength=function(e){return d.length},o.write=function(e){let t=d,u=0;for(;u+2<t.length;)e.put(s(t.substring(u,u+3)),10),u+=3;u<t.length&&(t.length-u==1?e.put(s(t.substring(u,u+1)),4):t.length-u==2&&e.put(s(t.substring(u,u+2)),7))};let s=function(e){let t=0;for(let u=0;u<e.length;u+=1)t=t*10+l(e.charAt(u));return t},l=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-48;throw"illegal char :"+e};return o},V=function(w){let x=k.MODE_ALPHA_NUM,d=w,o={};o.getMode=function(){return x},o.getLength=function(l){return d.length},o.write=function(l){let e=d,t=0;for(;t+1<e.length;)l.put(s(e.charAt(t))*45+s(e.charAt(t+1)),11),t+=2;t<e.length&&l.put(s(e.charAt(t)),6)};let s=function(l){if("0"<=l&&l<="9")return l.charCodeAt(0)-48;if("A"<=l&&l<="Z")return l.charCodeAt(0)-65+10;switch(l){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+l}};return o},q=function(w){let x=k.MODE_8BIT_BYTE,d=w,o=v.stringToBytes(w),s={};return s.getMode=function(){return x},s.getLength=function(l){return o.length},s.write=function(l){for(let e=0;e<o.length;e+=1)l.put(o[e],8)},s},z=function(w){let x=k.MODE_KANJI,d=w,o=v.stringToBytes;(function(e,t){let u=o(e);if(u.length!=2||(u[0]<<8|u[1])!=t)throw"sjis not supported."})("\u53CB",38726);let s=o(w),l={};return l.getMode=function(){return x},l.getLength=function(e){return~~(s.length/2)},l.write=function(e){let t=s,u=0;for(;u+1<t.length;){let p=(255&t[u])<<8|255&t[u+1];if(33088<=p&&p<=40956)p-=33088;else if(57408<=p&&p<=60351)p-=49472;else throw"illegal char at "+(u+1)+"/"+p;p=(p>>>8&255)*192+(p&255),e.put(p,13),u+=2}if(u<t.length)throw"illegal char at "+(u+1)},l},J=function(){let w=[],x={};return x.writeByte=function(d){w.push(d&255)},x.writeShort=function(d){x.writeByte(d),x.writeByte(d>>>8)},x.writeBytes=function(d,o,s){o=o||0,s=s||d.length;for(let l=0;l<s;l+=1)x.writeByte(d[l+o])},x.writeString=function(d){for(let o=0;o<d.length;o+=1)x.writeByte(d.charCodeAt(o))},x.toByteArray=function(){return w},x.toString=function(){let d="";d+="[";for(let o=0;o<w.length;o+=1)o>0&&(d+=","),d+=w[o];return d+="]",d},x},tt=function(){let w=0,x=0,d=0,o="",s={},l=function(t){o+=String.fromCharCode(e(t&63))},e=function(t){if(t<0)throw"n:"+t;if(t<26)return 65+t;if(t<52)return 97+(t-26);if(t<62)return 48+(t-52);if(t==62)return 43;if(t==63)return 47;throw"n:"+t};return s.writeByte=function(t){for(w=w<<8|t&255,x+=8,d+=1;x>=6;)l(w>>>x-6),x-=6},s.flush=function(){if(x>0&&(l(w<<6-x),w=0,x=0),d%3!=0){let t=3-d%3;for(let u=0;u<t;u+=1)o+="="}},s.toString=function(){return o},s},et=function(w){let x=w,d=0,o=0,s=0,l={};l.read=function(){for(;s<8;){if(d>=x.length){if(s==0)return-1;throw"unexpected end of file./"+s}let u=x.charAt(d);if(d+=1,u=="=")return s=0,-1;if(u.match(/^\s$/))continue;o=o<<6|e(u.charCodeAt(0)),s+=6}let t=o>>>s-8&255;return s-=8,t};let e=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(t==43)return 62;if(t==47)return 63;throw"c:"+t};return l},nt=function(w,x){let d=w,o=x,s=new Array(w*x),l={};l.setPixel=function(p,y,h){s[y*d+p]=h},l.write=function(p){p.writeString("GIF87a"),p.writeShort(d),p.writeShort(o),p.writeByte(128),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(0),p.writeByte(255),p.writeByte(255),p.writeByte(255),p.writeString(","),p.writeShort(0),p.writeShort(0),p.writeShort(d),p.writeShort(o),p.writeByte(0);let y=2,h=t(y);p.writeByte(y);let a=0;for(;h.length-a>255;)p.writeByte(255),p.writeBytes(h,a,255),a+=255;p.writeByte(h.length-a),p.writeBytes(h,a,h.length-a),p.writeByte(0),p.writeString(";")};let e=function(p){let y=p,h=0,a=0,_={};return _.write=function(P,D){if(P>>>D)throw"length over";for(;h+D>=8;)y.writeByte(255&(P<<h|a)),D-=8-h,P>>>=8-h,a=0,h=0;a=P<<h|a,h=h+D},_.flush=function(){h>0&&y.writeByte(a)},_},t=function(p){let y=1<<p,h=(1<<p)+1,a=p+1,_=u();for(let m=0;m<y;m+=1)_.add(String.fromCharCode(m));_.add(String.fromCharCode(y)),_.add(String.fromCharCode(h));let P=J(),D=e(P);D.write(y,a);let E=0,I=String.fromCharCode(s[E]);for(E+=1;E<s.length;){let m=String.fromCharCode(s[E]);E+=1,_.contains(I+m)?I=I+m:(D.write(_.indexOf(I),a),_.size()<4095&&(_.size()==1<<a&&(a+=1),_.add(I+m)),I=m)}return D.write(_.indexOf(I),a),D.write(h,a),D.flush(),P.toByteArray()},u=function(){let p={},y=0,h={};return h.add=function(a){if(h.contains(a))throw"dup key:"+a;p[a]=y,y+=1},h.size=function(){return y},h.indexOf=function(a){return p[a]},h.contains=function(a){return typeof p[a]<"u"},h};return l},rt=function(w,x,d){let o=nt(w,x);for(let t=0;t<x;t+=1)for(let u=0;u<w;u+=1)o.setPixel(u,t,d(u,t));let s=J();o.write(s);let l=tt(),e=s.toByteArray();for(let t=0;t<e.length;t+=1)l.writeByte(e[t]);return l.flush(),"data:image/gif;base64,"+l},it=v,st=v.stringToBytes;export{it as default,v as qrcode,st as stringToBytes};
|
package/dist/server.d.mts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { a as ParticipantAgentAdapter, b as ParticipantCredential, P as PopmeltHandle, d as ParticipantPlaneApps, e as PopmeltOptions, f as PageFramework, N as NextBundlerFlag, G as GuestAppRequest, g as PeerShape } from './page-planes-2ZepTpen.mjs';
|
|
2
|
+
export { h as ParticipantAgentView, i as createParticipantGuestAccess, c as createParticipantPlaneApps } from './page-planes-2ZepTpen.mjs';
|
|
3
|
+
import { P as ParticipantBootstrapConfig } from './participantBootstrap-BuTrTQbo.mjs';
|
|
3
4
|
import * as node_http from 'node:http';
|
|
4
5
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
6
|
+
import { I as ImprintGraph, a as ImprintTransaction, b as ImprintMutation, c as ImprintContext, d as ImprintSummaryKind, e as ImprintExplanationKind, f as ImprintScope, g as ImprintTopologyRelationType, h as ImprintExplanationRef, i as ImprintThreadSummary, j as ImprintGroundingAction, k as ImprintRelation, Q as QualifiedImprintRelation } from './types-CggBG-H6.mjs';
|
|
7
|
+
export { l as ImprintConcrete, m as ImprintEvidence, n as ImprintExplanation, o as ImprintExplanationState, p as ImprintRelationType } from './types-CggBG-H6.mjs';
|
|
8
|
+
import 'vite';
|
|
5
9
|
|
|
6
10
|
/** One disposable, local Chrome profile per agent. Never attaches to a user's browser. */
|
|
7
11
|
declare function managedParticipantBrowser(url: string): ParticipantAgentAdapter;
|
|
@@ -15,24 +19,13 @@ declare function createParticipantHostEntry(options: {
|
|
|
15
19
|
host: () => Promise<ParticipantCredential>;
|
|
16
20
|
}): Promise<{
|
|
17
21
|
handler: (req: IncomingMessage, res: ServerResponse) => Promise<void>;
|
|
18
|
-
|
|
22
|
+
dispose(): void;
|
|
23
|
+
instanceId: string;
|
|
24
|
+
browserLaunch: AbortController;
|
|
25
|
+
launchUrl: string;
|
|
26
|
+
readonly claimUrl: string;
|
|
19
27
|
}>;
|
|
20
28
|
|
|
21
|
-
/** Public, credential-free description stamped by the application's dev server.
|
|
22
|
-
* The revision is context metadata (or `unversioned`), never sync/Send authority.
|
|
23
|
-
*/
|
|
24
|
-
type ParticipantBootstrapConfig = {
|
|
25
|
-
version?: 1;
|
|
26
|
-
url: string;
|
|
27
|
-
projectId: string;
|
|
28
|
-
revision: string;
|
|
29
|
-
};
|
|
30
|
-
declare global {
|
|
31
|
-
interface Window {
|
|
32
|
-
__POPMELT_PARTICIPANTS__?: ParticipantBootstrapConfig;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
29
|
/** Dev-server boundary: identify the project and optional source context, and
|
|
37
30
|
* keep host proof in a private local file, never in public bootstrap metadata.
|
|
38
31
|
* The framework owns the bridge lifecycle. No source hashing is required.
|
|
@@ -41,10 +34,15 @@ declare function createParticipantDevBootstrap(options: {
|
|
|
41
34
|
projectRoot: string;
|
|
42
35
|
origin: string;
|
|
43
36
|
bridge: PopmeltHandle;
|
|
37
|
+
guestInvites?: 'lan' | 'tunnel';
|
|
44
38
|
sourceRevision?: () => Promise<string>;
|
|
39
|
+
planeApps?: ParticipantPlaneApps;
|
|
45
40
|
}): Promise<{
|
|
41
|
+
dispose: () => void;
|
|
42
|
+
cancelBrowserLaunch: () => void;
|
|
46
43
|
hostEntry: (req: node_http.IncomingMessage, res: node_http.ServerResponse) => Promise<void>;
|
|
47
|
-
read()
|
|
44
|
+
read: (pathname?: string) => Promise<ParticipantBootstrapConfig>;
|
|
45
|
+
planeMiddleware: ((req: node_http.IncomingMessage, res: node_http.ServerResponse, next: () => void) => Promise<void>) | undefined;
|
|
48
46
|
}>;
|
|
49
47
|
|
|
50
48
|
type ImprintManifest = {
|
|
@@ -256,5 +254,32 @@ type StartPopmeltOptions = PopmeltOptions & {
|
|
|
256
254
|
manageLease?: boolean;
|
|
257
255
|
};
|
|
258
256
|
declare function startPopmelt(options?: StartPopmeltOptions): Promise<PopmeltHandle>;
|
|
257
|
+
/** The development server owns the session and its private host-entry link. */
|
|
258
|
+
declare function startDevelopmentSession(options: {
|
|
259
|
+
projectRoot?: string;
|
|
260
|
+
port?: number;
|
|
261
|
+
devOrigin: string;
|
|
262
|
+
framework?: PageFramework;
|
|
263
|
+
nextBundler?: NextBundlerFlag;
|
|
264
|
+
readGuestApp?: (request: GuestAppRequest) => Promise<Response | undefined>;
|
|
265
|
+
experimentalEventTransport?: 'sse' | 'websocket';
|
|
266
|
+
}): Promise<{
|
|
267
|
+
bootstrap: ParticipantBootstrapConfig;
|
|
268
|
+
readBootstrap: (path: string) => Promise<ParticipantBootstrapConfig>;
|
|
269
|
+
close: () => Promise<void>;
|
|
270
|
+
updateOrigin(next: string): Promise<void>;
|
|
271
|
+
port: number;
|
|
272
|
+
projectId: string;
|
|
273
|
+
storeId?: string;
|
|
274
|
+
guestInviteAppearance?: (invitation: string) => Promise<{
|
|
275
|
+
color: string;
|
|
276
|
+
shape: PeerShape;
|
|
277
|
+
}>;
|
|
278
|
+
planeAppBasis?: (credential: ParticipantCredential, id: string) => Promise<{
|
|
279
|
+
id: string;
|
|
280
|
+
revision?: string;
|
|
281
|
+
}>;
|
|
282
|
+
participantHost?: () => Promise<ParticipantCredential>;
|
|
283
|
+
}>;
|
|
259
284
|
|
|
260
|
-
export { ImprintContext, ImprintExplanationKind, ImprintExplanationRef, ImprintGraph, ImprintGroundingAction, ImprintMutation, ImprintRelation, ImprintScope, ImprintService, ImprintStore, ImprintThreadSummary, ImprintTransaction, ParticipantAgentAdapter, PopmeltHandle, PopmeltOptions, QualifiedImprintRelation, type StartPopmeltOptions, createParticipantDevBootstrap, createParticipantHostEntry, formatImprintPrompt, imprintExplanationRef, managedParticipantBrowser, parseImprintDraft, qualifyImprintRelation, startPopmelt };
|
|
285
|
+
export { ImprintContext, ImprintExplanationKind, ImprintExplanationRef, ImprintGraph, ImprintGroundingAction, ImprintMutation, ImprintRelation, ImprintScope, ImprintService, ImprintStore, ImprintThreadSummary, ImprintTransaction, ParticipantAgentAdapter, ParticipantPlaneApps, PopmeltHandle, PopmeltOptions, QualifiedImprintRelation, type StartPopmeltOptions, createParticipantDevBootstrap, createParticipantHostEntry, formatImprintPrompt, imprintExplanationRef, managedParticipantBrowser, parseImprintDraft, qualifyImprintRelation, startDevelopmentSession, startPopmelt };
|
package/dist/server.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b as t,c as
|
|
1
|
+
import{a as s,b as t,c as a}from"./chunk-CVVD2OMQ.mjs";import"./chunk-TCGXG7UA.mjs";import"./chunk-MPEVFQ43.mjs";import"./chunk-AYZUOBFI.mjs";import{i as m,j as r,k as i,l as p}from"./chunk-QE5XGXIA.mjs";import"./chunk-PYGRFSUU.mjs";import"./chunk-6EO73WJN.mjs";import{b as n,c as o}from"./chunk-RUJC32MA.mjs";import"./chunk-QXVMGZFP.mjs";import{b as c,d as e,e as u}from"./chunk-JJK4LAN6.mjs";import{d as j}from"./chunk-IW7V7WNL.mjs";import"./chunk-HKHZBKAN.mjs";import"./chunk-CIKFUS7J.mjs";import"./chunk-UTP56NCY.mjs";import"./chunk-GLF7Z5IR.mjs";import"./chunk-YMWXWXPV.mjs";import"./chunk-KF73S7MG.mjs";import"./chunk-NOHXTT24.mjs";export{p as ImprintService,m as ImprintStore,u as createParticipantDevBootstrap,c as createParticipantGuestAccess,e as createParticipantHostEntry,j as createParticipantPlaneApps,i as formatImprintPrompt,n as imprintExplanationRef,s as managedParticipantBrowser,r as parseImprintDraft,o as qualifyImprintRelation,a as startDevelopmentSession,t as startPopmelt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a,d as r}from"./chunk-AYZUOBFI.mjs";import"./chunk-HKHZBKAN.mjs";import"./chunk-CIKFUS7J.mjs";import"./chunk-KF73S7MG.mjs";export{r as createSharedPageReader,a as sharedPagePath};
|
|
@@ -1,3 +1,72 @@
|
|
|
1
|
+
/** A renderer's portable scene state. The matching local app supplies all executable behavior. */
|
|
2
|
+
type CanvasSampleCodec = {
|
|
3
|
+
format: string;
|
|
4
|
+
/** The renderer replays placed instances of local assets, without transferring its authored scene. */
|
|
5
|
+
placementOnly?: true;
|
|
6
|
+
read(): string;
|
|
7
|
+
accepts(value: string): boolean;
|
|
8
|
+
write(value: string): void;
|
|
9
|
+
/** Read or replace one durable subject in a serialized scene without mutating the renderer. */
|
|
10
|
+
objects?: {
|
|
11
|
+
read(scene: string, key: string): string | null;
|
|
12
|
+
replace(scene: string, key: string, value: string): string | null;
|
|
13
|
+
placement?: {
|
|
14
|
+
/** Whether this receiver can reconstruct the incoming object. */
|
|
15
|
+
canPlace?(value: string): boolean;
|
|
16
|
+
/** Convert a click in this renderer's viewport to portable object state at that location. */
|
|
17
|
+
at(value: string, point: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}): string | null;
|
|
21
|
+
/** Show a transient ghost in the receiving renderer. Null clears it. Never include it in read() or picking. */
|
|
22
|
+
preview?(value: string | null): void;
|
|
23
|
+
/** Insert under a fresh key without replacing another object. Must be replayable. */
|
|
24
|
+
insert(scene: string, key: string, value: string): string | null;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type ComponentSample = {
|
|
30
|
+
version: string;
|
|
31
|
+
variant: string;
|
|
32
|
+
dark: boolean;
|
|
33
|
+
props?: string;
|
|
34
|
+
label?: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
type Frame = {
|
|
38
|
+
offset: number;
|
|
39
|
+
easing: string;
|
|
40
|
+
[key: string]: string | number;
|
|
41
|
+
};
|
|
42
|
+
type SampledMotion = {
|
|
43
|
+
frames: Frame[];
|
|
44
|
+
timing: {
|
|
45
|
+
duration: number;
|
|
46
|
+
delay: number;
|
|
47
|
+
endDelay: number;
|
|
48
|
+
iterations: number | 'infinite';
|
|
49
|
+
direction: PlaybackDirection;
|
|
50
|
+
fill: FillMode;
|
|
51
|
+
easing: string;
|
|
52
|
+
};
|
|
53
|
+
paused: boolean;
|
|
54
|
+
currentTime?: number;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
type SampledElement = {
|
|
58
|
+
tag: string;
|
|
59
|
+
imageSourceHash?: string;
|
|
60
|
+
motion?: SampledMotion[];
|
|
61
|
+
backgroundStill?: string;
|
|
62
|
+
component?: ComponentSample;
|
|
63
|
+
attributes?: Record<string, string>;
|
|
64
|
+
previewWidth?: number;
|
|
65
|
+
previewHeight?: number;
|
|
66
|
+
style: Record<string, string>;
|
|
67
|
+
children: (SampledElement | string)[];
|
|
68
|
+
};
|
|
69
|
+
|
|
1
70
|
/** Each path names a text node in the authored paragraph. A boundary between
|
|
2
71
|
* two entries in parts starts a sibling paragraph with the same inline markup. */
|
|
3
72
|
type ParagraphLayout = {
|
|
@@ -180,6 +249,8 @@ type StyleModification = {
|
|
|
180
249
|
pathname?: string;
|
|
181
250
|
};
|
|
182
251
|
type TextModification = {
|
|
252
|
+
/** Whole-field preview for an edit stored as individual inline text runs. */
|
|
253
|
+
canvasLabel?: string;
|
|
183
254
|
paragraphs?: ParagraphChange;
|
|
184
255
|
selector: string;
|
|
185
256
|
durableSelector?: string;
|
|
@@ -196,6 +267,12 @@ type DomInsertionPlacement = 'before' | 'after';
|
|
|
196
267
|
type DomModification = {
|
|
197
268
|
id: string;
|
|
198
269
|
operation: 'move' | 'copy';
|
|
270
|
+
sampledTree?: SampledElement;
|
|
271
|
+
sourceSlot?: {
|
|
272
|
+
index: number;
|
|
273
|
+
count: number;
|
|
274
|
+
siblings: string;
|
|
275
|
+
};
|
|
199
276
|
selector: string;
|
|
200
277
|
durableSelector?: string;
|
|
201
278
|
element: ElementInfo;
|
|
@@ -433,6 +510,10 @@ type PopmeltSubjectCreationSession = {
|
|
|
433
510
|
*/
|
|
434
511
|
type PopmeltSubjectAdapter = {
|
|
435
512
|
id: string;
|
|
513
|
+
/** Whole-surface state supported by this app's renderer on both planes. */
|
|
514
|
+
sampleCanvas?: CanvasSampleCodec & {
|
|
515
|
+
element: HTMLCanvasElement;
|
|
516
|
+
};
|
|
436
517
|
/** Surface ownership; an explicit image adapter replaces Core's default. */
|
|
437
518
|
surfaceKind?: 'image' | 'video';
|
|
438
519
|
/** Resolve once the adapter's persisted subject index is available. */
|
|
@@ -451,6 +532,8 @@ type PopmeltSubjectAdapter = {
|
|
|
451
532
|
resolve(key: string): PopmeltSubject | null;
|
|
452
533
|
/** Recreate a missing durable subject from annotation-captured context. */
|
|
453
534
|
restoreSubject?(key: string, elementInfo: ElementInfo): PopmeltSubject | null;
|
|
535
|
+
/** Paint a live hover accent on this subject. Release it when hover ends. */
|
|
536
|
+
highlightHover?(key: string, color: string): (() => void) | undefined;
|
|
454
537
|
/** Optional clean subject crop, without Popmelt's overlay. */
|
|
455
538
|
captureSubject?(key: string): Blob | null | Promise<Blob | null>;
|
|
456
539
|
/** Optional bitmap capture for renderer surfaces that DOM cloning cannot read. */
|
|
@@ -472,4 +555,4 @@ type PopmeltSubjectAdapter = {
|
|
|
472
555
|
removeSubject?(key: string): void;
|
|
473
556
|
};
|
|
474
557
|
|
|
475
|
-
export type { Annotation as A, BridgeStatus as B,
|
|
558
|
+
export type { Annotation as A, BridgeStatus as B, CanvasSampleCodec as C, DomModification as D, ElementInfo as E, ImageObjectContext as I, OpaqueTargetReference as O, PopmeltSubjectAdapter as P, ReactSourceLocation as R, SubjectFeedbackAttachment as S, TextModification as T, VideoObjectContext as V, PopmeltSubjectBounds as a, PopmeltSubject as b, PopmeltSubjectCreationSession as c, PopmeltSubjectOutlinePoint as d, PopmeltSubjectTrackingAnchor as e, AnnotationAttachment as f, StyleModification as g, SpacingTokenChange as h, AnnotationRegion as i, AnnotationType as j, ClaudeResponse as k, Point as l, PopmeltSurfaceSnapshot as m, StyleChange as n, ToolType as o };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";export{E as createProposalSession,F as tasteProposalSession}from"./chunk-ROKRMYFR.mjs";import"./chunk-XTOCFTVW.mjs";
|