@popmelt.com/core 0.23.0 → 0.24.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 +30 -0
- package/claude-plugin/.claude-plugin/plugin.json +1 -1
- package/claude-plugin/skills/popmelt-core/SKILL.md +1 -0
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/codex-plugin/skills/popmelt-core/SKILL.md +1 -0
- package/dist/ParticipantRuntime-SS2IDRLA.mjs +139 -0
- package/dist/PreviewRuntime-NGTLOEX3.mjs +2 -0
- package/dist/adapter-react-three-fiber.d.mts +1 -1
- package/dist/adapter-react-three-fiber.mjs +1 -1
- package/dist/bridge-entry.mjs +88 -86
- package/dist/browser-runtime-HYKTQV6Q.mjs +2 -0
- package/dist/browser.d.mts +4 -3
- package/dist/browser.mjs +1 -1
- package/dist/{chunk-4IUZX7YN.mjs → chunk-3MO7Z4DV.mjs} +1 -1
- package/dist/chunk-3XSTOVWX.mjs +2 -0
- package/dist/{chunk-EXYZQ76K.mjs → chunk-4WAFUF5Y.mjs} +1 -1
- package/dist/chunk-7W3RBRFM.mjs +301 -0
- package/dist/chunk-B5KUI32Q.mjs +413 -0
- package/dist/chunk-ENERPQJN.mjs +2 -0
- package/dist/chunk-EX63NVDN.mjs +2 -0
- package/dist/chunk-J3UIBBU2.mjs +1 -1
- package/dist/chunk-N2ZEZCHO.mjs +1 -1
- package/dist/cli.mjs +101 -97
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +1 -1
- package/dist/media.d.mts +3 -3
- package/dist/media.mjs +1 -1
- package/dist/{options-5yRxW1AX.d.mts → participantBootstrap-BQHbHI4r.d.mts} +24 -3
- package/dist/plugin-astro.d.mts +2 -0
- package/dist/plugin-astro.mjs +3 -3
- package/dist/plugin-nuxt.d.mts +3 -1
- package/dist/plugin-nuxt.mjs +2 -1
- package/dist/plugin-vite.mjs +1 -1
- package/dist/server-OPX7SKA7.mjs +228 -0
- package/dist/server.d.mts +121 -1
- package/dist/server.mjs +98 -87
- package/dist/{subjects-DzjWdlAk.d.mts → subjects-BM3Smdow.d.mts} +6 -1
- package/dist/{video-adapter-CCLbp86L.d.mts → video-adapter-Gm5gmoiz.d.mts} +1 -1
- package/package.json +25 -23
- package/dist/browser-runtime-FWYFRPVT.mjs +0 -2
- package/dist/chunk-VHUJQWVP.mjs +0 -453
- package/dist/server-7AUQAYVY.mjs +0 -217
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
import { P as PopmeltOptions, C as CommentMeta } from './
|
|
4
|
-
export { a as CommentMetaContext, b as CommentMetaValue, G as GetCommentMeta, c as PopmeltExtension, d as PopmeltExtensionRuntime } from './
|
|
5
|
-
import { I as ImageSubjectAdapterOptions, V as VideoSubjectAdapterOptions } from './video-adapter-
|
|
6
|
-
import { P as PopmeltSubjectAdapter, A as Annotation, E as ElementInfo, a as AnnotationAttachment, S as SubjectFeedbackAttachment, b as StyleModification, T as TextModification, D as DomModification, c as SpacingTokenChange } from './subjects-
|
|
7
|
-
export { d as AnnotationType, B as BridgeStatus, C as ClaudeResponse, I as ImageObjectContext, O as OpaqueTargetReference, e as Point, f as PopmeltSubject, g as PopmeltSubjectBounds, h as PopmeltSubjectCreationSession, i as PopmeltSubjectOutlinePoint, j as PopmeltSubjectTrackingAnchor, k as PopmeltSurfaceSnapshot, R as ReactSourceLocation, l as StyleChange, m as ToolType, V as VideoObjectContext } from './subjects-
|
|
3
|
+
import { P as PopmeltOptions, C as CommentMeta } from './participantBootstrap-BQHbHI4r.mjs';
|
|
4
|
+
export { a as CommentMetaContext, b as CommentMetaValue, G as GetCommentMeta, c as PopmeltExtension, d as PopmeltExtensionRuntime, i as isPopmeltPreview } from './participantBootstrap-BQHbHI4r.mjs';
|
|
5
|
+
import { I as ImageSubjectAdapterOptions, V as VideoSubjectAdapterOptions } from './video-adapter-Gm5gmoiz.mjs';
|
|
6
|
+
import { P as PopmeltSubjectAdapter, A as Annotation, E as ElementInfo, a as AnnotationAttachment, S as SubjectFeedbackAttachment, b as StyleModification, T as TextModification, D as DomModification, c as SpacingTokenChange } from './subjects-BM3Smdow.mjs';
|
|
7
|
+
export { d as AnnotationType, B as BridgeStatus, C as ClaudeResponse, I as ImageObjectContext, O as OpaqueTargetReference, e as Point, f as PopmeltSubject, g as PopmeltSubjectBounds, h as PopmeltSubjectCreationSession, i as PopmeltSubjectOutlinePoint, j as PopmeltSubjectTrackingAnchor, k as PopmeltSurfaceSnapshot, R as ReactSourceLocation, l as StyleChange, m as ToolType, V as VideoObjectContext } from './subjects-BM3Smdow.mjs';
|
|
8
8
|
|
|
9
9
|
/** Client-side envelope used for persisted and streaming bridge events. */
|
|
10
10
|
type BridgeEvent = {
|
|
@@ -27,7 +27,7 @@ declare global {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
type PopmeltProviderProps = PropsWithChildren<PopmeltOptions>;
|
|
30
|
-
declare function PopmeltProvider({ children, enabled, ...props }: PopmeltProviderProps): react.JSX.Element;
|
|
30
|
+
declare function PopmeltProvider({ children, enabled, multiplayer, ...props }: PopmeltProviderProps): react.JSX.Element;
|
|
31
31
|
|
|
32
32
|
type ImageAnnotationOptions = Omit<ImageSubjectAdapterOptions, 'id'>;
|
|
33
33
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
export{b as PopmeltProvider}from"./chunk-7W3RBRFM.mjs";export{a as isPopmeltPreview}from"./chunk-EX63NVDN.mjs";import"./chunk-N2ZEZCHO.mjs";export{b as usePopmelt}from"./chunk-J3UIBBU2.mjs";import"./chunk-B5KUI32Q.mjs";import"./chunk-ENERPQJN.mjs";
|
package/dist/media.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as ImageObjectBox, e as VideoSubjectStore, f as VideoObjectBox } from './video-adapter-
|
|
2
|
-
export { B as BrowserImageSubjectStoreOptions, g as ImageContentHasher, h as ImageObjectObservation, a as ImageRecognitionProvider, i as ImageSubjectAdapter, I as ImageSubjectAdapterOptions, j as ImageSubjectStore, P as PersistedImageAnalysis, k as PersistedImageSubject, l as PersistedImageSuppression, m as PersistedVideoAnalysis, n as PersistedVideoTrack, o as VideoBackwardAnalysisOptions, p as VideoBackwardAnalysisResult, q as VideoMotionAttempt, r as VideoMotionPolicy, s as VideoMotionPresenceDecision, t as VideoMotionState, u as VideoSegmentationObservation, v as VideoSegmentationPoint, c as VideoSegmentationProvider, w as VideoSubjectAdapter, V as VideoSubjectAdapterOptions, x as VideoTrackKeyframe, y as VideoTrackObservation, z as VideoTrackSegment, A as VideoTrackSmoother, C as VideoTrackingAnchor, D as VideoTrackingAttempt, b as VideoTrackingProvider, E as VideoTrackingSeed, F as VideoTrackingSession, G as createBrowserImageSubjectStore, H as createImageSubjectAdapter, J as createMemoryImageSubjectStore, K as createVideoSubjectAdapter } from './video-adapter-
|
|
3
|
-
import { g as PopmeltSubjectBounds } from './subjects-
|
|
1
|
+
import { d as ImageObjectBox, e as VideoSubjectStore, f as VideoObjectBox } from './video-adapter-Gm5gmoiz.mjs';
|
|
2
|
+
export { B as BrowserImageSubjectStoreOptions, g as ImageContentHasher, h as ImageObjectObservation, a as ImageRecognitionProvider, i as ImageSubjectAdapter, I as ImageSubjectAdapterOptions, j as ImageSubjectStore, P as PersistedImageAnalysis, k as PersistedImageSubject, l as PersistedImageSuppression, m as PersistedVideoAnalysis, n as PersistedVideoTrack, o as VideoBackwardAnalysisOptions, p as VideoBackwardAnalysisResult, q as VideoMotionAttempt, r as VideoMotionPolicy, s as VideoMotionPresenceDecision, t as VideoMotionState, u as VideoSegmentationObservation, v as VideoSegmentationPoint, c as VideoSegmentationProvider, w as VideoSubjectAdapter, V as VideoSubjectAdapterOptions, x as VideoTrackKeyframe, y as VideoTrackObservation, z as VideoTrackSegment, A as VideoTrackSmoother, C as VideoTrackingAnchor, D as VideoTrackingAttempt, b as VideoTrackingProvider, E as VideoTrackingSeed, F as VideoTrackingSession, G as createBrowserImageSubjectStore, H as createImageSubjectAdapter, J as createMemoryImageSubjectStore, K as createVideoSubjectAdapter } from './video-adapter-Gm5gmoiz.mjs';
|
|
3
|
+
import { g as PopmeltSubjectBounds } from './subjects-BM3Smdow.mjs';
|
|
4
4
|
|
|
5
5
|
declare function unprojectImagePoint(image: HTMLImageElement, clientPoint: {
|
|
6
6
|
x: number;
|
package/dist/media.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
export{f as ImageSubjectAdapter,k as VideoSubjectAdapter,d as createBrowserImageSubjectStore,m as createBrowserVideoSubjectStore,g as createImageSubjectAdapter,e as createMemoryImageSubjectStore,n as createMemoryVideoSubjectStore,l as createVideoSubjectAdapter,c as projectImageObjectBox,i as projectVideoObjectBox,b as unprojectImageObjectBounds,a as unprojectImagePoint,j as unprojectVideoObjectBounds,h as unprojectVideoPoint}from"./chunk-N2ZEZCHO.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Annotation, P as PopmeltSubjectAdapter } from './subjects-
|
|
2
|
-
import { a as ImageRecognitionProvider, b as VideoTrackingProvider, c as VideoSegmentationProvider, I as ImageSubjectAdapterOptions, V as VideoSubjectAdapterOptions } from './video-adapter-
|
|
1
|
+
import { A as Annotation, P as PopmeltSubjectAdapter } from './subjects-BM3Smdow.mjs';
|
|
2
|
+
import { a as ImageRecognitionProvider, b as VideoTrackingProvider, c as VideoSegmentationProvider, I as ImageSubjectAdapterOptions, V as VideoSubjectAdapterOptions } from './video-adapter-Gm5gmoiz.mjs';
|
|
3
3
|
|
|
4
4
|
type CommentMetaValue = null | boolean | number | string | CommentMetaValue[] | {
|
|
5
5
|
[key: string]: CommentMetaValue;
|
|
@@ -49,6 +49,8 @@ type PopmeltExtension = {
|
|
|
49
49
|
/** Host integration options, independent of the UI renderer. */
|
|
50
50
|
type PopmeltOptions = {
|
|
51
51
|
enabled?: boolean;
|
|
52
|
+
/** Experimental peer canvases, invitations and multiplayer UI. Default: false. */
|
|
53
|
+
multiplayer?: boolean;
|
|
52
54
|
bridgeUrl?: string;
|
|
53
55
|
/** Stable project id generated by the framework plugin/bridge startup. */
|
|
54
56
|
projectId?: string | null;
|
|
@@ -63,4 +65,23 @@ type PopmeltOptions = {
|
|
|
63
65
|
getCommentMeta?: GetCommentMeta;
|
|
64
66
|
};
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
/** Public, credential-free description stamped by the application's dev server.
|
|
69
|
+
* The revision is context metadata (or `unversioned`), never sync/Send authority.
|
|
70
|
+
*/
|
|
71
|
+
type ParticipantBootstrapConfig = {
|
|
72
|
+
version?: 1;
|
|
73
|
+
url: string;
|
|
74
|
+
projectId: string;
|
|
75
|
+
revision: string;
|
|
76
|
+
};
|
|
77
|
+
declare global {
|
|
78
|
+
interface Window {
|
|
79
|
+
__POPMELT_PARTICIPANTS__?: ParticipantBootstrapConfig;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** Available before mounting Popmelt so trusted apps can suppress startup effects.
|
|
83
|
+
* This is a rendering hint, never a credential or an authorization decision.
|
|
84
|
+
*/
|
|
85
|
+
declare function isPopmeltPreview(url?: string): boolean;
|
|
86
|
+
|
|
87
|
+
export { type CommentMeta as C, type GetCommentMeta as G, type PopmeltOptions as P, type CommentMetaContext as a, type CommentMetaValue as b, type PopmeltExtension as c, type PopmeltExtensionRuntime as d, isPopmeltPreview as i };
|
package/dist/plugin-astro.d.mts
CHANGED
|
@@ -5,6 +5,8 @@ import 'node:http';
|
|
|
5
5
|
type PopmeltAstroOptions = PopmeltPluginOptions & {
|
|
6
6
|
/** Set false when an existing provider mounts the UI. */
|
|
7
7
|
client?: boolean;
|
|
8
|
+
/** Experimental multiplayer UI. Default: false. */
|
|
9
|
+
multiplayer?: boolean;
|
|
8
10
|
};
|
|
9
11
|
type AstroSetup = {
|
|
10
12
|
command: 'dev' | 'build' | 'preview' | 'sync';
|
package/dist/plugin-astro.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-3MO7Z4DV.mjs";import"./chunk-4WAFUF5Y.mjs";import"./chunk-NOHXTT24.mjs";import{fileURLToPath as d}from"url";function c(t={}){return{name:"popmelt",hooks:{"astro:config:setup"({command:r,config:i,updateConfig:n,injectScript:p}){if(r!=="dev")return;let{client:e=!0,multiplayer:a=!1,...s}=t;n({vite:{plugins:[o({...s,projectRoot:t.projectRoot??d(i.root)})],optimizeDeps:{include:e?["react","react/jsx-runtime","react/jsx-dev-runtime","react-dom","react-dom/client","lucide-react"]:[]}}}),p("page",e?l(a):`
|
|
2
2
|
import { bridgeUrl, projectId } from 'virtual:popmelt/bridge';
|
|
3
3
|
if (bridgeUrl) window.__POPMELT_BRIDGE_URL__ = bridgeUrl;
|
|
4
4
|
if (projectId) window.__POPMELT_PROJECT_ID__ = projectId;
|
|
5
|
-
`)}}}}var
|
|
5
|
+
`)}}}}var l=t=>`
|
|
6
6
|
import { bridgeUrl, projectId } from 'virtual:popmelt/bridge';
|
|
7
7
|
import { navigate } from 'astro:transitions/client';
|
|
8
8
|
let disposed = false;
|
|
@@ -13,7 +13,7 @@ const start = () => {
|
|
|
13
13
|
if (disposed) return;
|
|
14
14
|
const { mountPopmelt } = await import('@popmelt.com/core/browser');
|
|
15
15
|
if (disposed) return;
|
|
16
|
-
const handle = await mountPopmelt({ enabled: true, bridgeUrl, projectId, navigate });
|
|
16
|
+
const handle = await mountPopmelt({ enabled: true, multiplayer: ${t===!0}, bridgeUrl, projectId, navigate });
|
|
17
17
|
return handle;
|
|
18
18
|
}).catch(error => { console.warn('[popmelt] startup failed:', error); });
|
|
19
19
|
};
|
package/dist/plugin-nuxt.d.mts
CHANGED
|
@@ -2,7 +2,9 @@ import { NuxtModule } from 'nuxt/schema';
|
|
|
2
2
|
import { P as PopmeltPluginOptions } from './dev-server-rQIWJcSX.mjs';
|
|
3
3
|
import 'node:http';
|
|
4
4
|
|
|
5
|
-
type PopmeltNuxtOptions = Pick<PopmeltPluginOptions, 'port' | 'projectRoot' | 'bridge'
|
|
5
|
+
type PopmeltNuxtOptions = Pick<PopmeltPluginOptions, 'port' | 'projectRoot' | 'bridge'> & {
|
|
6
|
+
/** Experimental multiplayer UI. Default: false. */ multiplayer?: boolean;
|
|
7
|
+
};
|
|
6
8
|
declare const popmeltNuxt: NuxtModule<PopmeltNuxtOptions>;
|
|
7
9
|
|
|
8
10
|
export { type PopmeltNuxtOptions, popmeltNuxt as default };
|
package/dist/plugin-nuxt.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as s,b as
|
|
1
|
+
import{a as s,b as l}from"./chunk-4WAFUF5Y.mjs";import{b as i}from"./chunk-NOHXTT24.mjs";import{addPluginTemplate as d,defineNuxtModule as m}from"nuxt/kit";var a=m({meta:{name:"@popmelt.com/core/nuxt",configKey:"popmelt"},async setup(o,e){if(!e.options.dev)return;let n={config:{server:e.options.devServer},middlewares:{use(){}}},t=await s({...o,projectRoot:o.projectRoot??e.options.rootDir},n,3e3);if(t.port===null)return;e.hook("vite:extend",({config:p})=>{p.optimizeDeps??={},p.optimizeDeps.include=[...new Set([...p.optimizeDeps.include??[],"react","react/jsx-runtime","react/jsx-dev-runtime","react-dom","react-dom/client","lucide-react"])]});let r=await l(t,n),u=r?i(r):void 0;e.hook("close",async()=>{u?.(),await r?.release()}),d({filename:"popmelt.client.mjs",mode:"client",getContents:()=>`import { defineNuxtPlugin } from '#app';
|
|
2
2
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
3
3
|
let disposed = false;
|
|
4
4
|
let mounting;
|
|
@@ -15,6 +15,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
15
15
|
if (disposed) return;
|
|
16
16
|
return mountPopmelt({
|
|
17
17
|
enabled: true,
|
|
18
|
+
multiplayer: ${o.multiplayer===!0},
|
|
18
19
|
bridgeUrl,
|
|
19
20
|
projectId,
|
|
20
21
|
navigate: (url) => nuxtApp.$router.push(url),
|
package/dist/plugin-vite.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-3MO7Z4DV.mjs";import"./chunk-4WAFUF5Y.mjs";import"./chunk-NOHXTT24.mjs";export{a as popmelt};
|