@popmelt.com/core 0.16.0 → 0.18.0
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 +17 -9
- package/codex-plugin/.codex-plugin/plugin.json +1 -1
- package/dist/adapter-three.d.mts +71 -1
- package/dist/adapter-three.mjs +1 -1
- package/dist/bridge-entry.mjs +51 -51
- package/dist/{chunk-RYUNKCXK.mjs → chunk-GQOEG3E5.mjs} +1 -1
- package/dist/chunk-RS3XXK26.mjs +2 -0
- package/dist/cli.mjs +70 -70
- package/dist/index.d.mts +11 -4
- package/dist/index.mjs +40 -40
- package/dist/media.d.mts +20 -3
- package/dist/media.mjs +1 -1
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-vite.mjs +1 -1
- package/dist/{server-F4EKHTYF.mjs → server-MUVH7FWR.mjs} +53 -53
- package/dist/server.mjs +53 -53
- package/dist/{image-adapter-D8L8QumX.d.mts → video-adapter-DzNtG67g.d.mts} +324 -2
- package/package.json +1 -1
- package/dist/chunk-HS4EVUFK.mjs +0 -2
package/dist/media.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { q as ImageObjectBox, j as PopmeltSubjectBounds, r as VideoSubjectStore, s as VideoObjectBox } from './video-adapter-DzNtG67g.mjs';
|
|
2
|
+
export { t as BrowserImageSubjectStoreOptions, u as ImageContentHasher, v as ImageObjectObservation, I as ImageRecognitionProvider, w as ImageSubjectAdapter, a as ImageSubjectAdapterOptions, x as ImageSubjectStore, y as PersistedImageAnalysis, z as PersistedImageSubject, F as PersistedImageSuppression, G as PersistedVideoAnalysis, H as PersistedVideoTrack, J as VideoBackwardAnalysisOptions, K as VideoBackwardAnalysisResult, L as VideoMotionAttempt, M as VideoMotionPolicy, N as VideoMotionPresenceDecision, Q as VideoMotionState, U as VideoSubjectAdapter, b as VideoSubjectAdapterOptions, W as VideoTrackKeyframe, X as VideoTrackObservation, Y as VideoTrackSegment, Z as VideoTrackSmoother, _ as VideoTrackingAnchor, $ as VideoTrackingAttempt, V as VideoTrackingProvider, a0 as VideoTrackingSeed, a1 as VideoTrackingSession, a2 as createBrowserImageSubjectStore, a3 as createImageSubjectAdapter, a4 as createMemoryImageSubjectStore, a5 as createVideoSubjectAdapter } from './video-adapter-DzNtG67g.mjs';
|
|
3
3
|
|
|
4
4
|
declare function unprojectImagePoint(image: HTMLImageElement, clientPoint: {
|
|
5
5
|
x: number;
|
|
@@ -11,4 +11,21 @@ declare function unprojectImagePoint(image: HTMLImageElement, clientPoint: {
|
|
|
11
11
|
declare function unprojectImageObjectBounds(image: HTMLImageElement, bounds: PopmeltSubjectBounds): ImageObjectBox | null;
|
|
12
12
|
declare function projectImageObjectBox(image: HTMLImageElement, box: ImageObjectBox): PopmeltSubjectBounds | null;
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
type BrowserVideoSubjectStoreOptions = {
|
|
15
|
+
namespace?: string;
|
|
16
|
+
storage?: Storage;
|
|
17
|
+
};
|
|
18
|
+
declare function createBrowserVideoSubjectStore(options?: BrowserVideoSubjectStoreOptions): VideoSubjectStore;
|
|
19
|
+
declare function createMemoryVideoSubjectStore(): VideoSubjectStore;
|
|
20
|
+
|
|
21
|
+
declare function unprojectVideoPoint(video: HTMLVideoElement, point: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
}): {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
} | null;
|
|
28
|
+
declare function projectVideoObjectBox(video: HTMLVideoElement, box: VideoObjectBox): PopmeltSubjectBounds | null;
|
|
29
|
+
declare function unprojectVideoObjectBounds(video: HTMLVideoElement, bounds: PopmeltSubjectBounds): VideoObjectBox | null;
|
|
30
|
+
|
|
31
|
+
export { type BrowserVideoSubjectStoreOptions, ImageObjectBox, VideoObjectBox, VideoSubjectStore, createBrowserVideoSubjectStore, createMemoryVideoSubjectStore, projectImageObjectBox, projectVideoObjectBox, unprojectImageObjectBounds, unprojectImagePoint, unprojectVideoObjectBounds, unprojectVideoPoint };
|
package/dist/media.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as e,b as
|
|
2
|
+
import{a as e,b as o,c as t,d as r,e as i,f as a,g as c,h as d,i as p,j as s,k as n,l as m,m as S,n as j}from"./chunk-RS3XXK26.mjs";export{a as ImageSubjectAdapter,n as VideoSubjectAdapter,r as createBrowserImageSubjectStore,S as createBrowserVideoSubjectStore,c as createImageSubjectAdapter,i as createMemoryImageSubjectStore,j as createMemoryVideoSubjectStore,m as createVideoSubjectAdapter,t as projectImageObjectBox,p as projectVideoObjectBox,o as unprojectImageObjectBounds,e as unprojectImagePoint,s as unprojectVideoObjectBounds,d as unprojectVideoPoint};
|
package/dist/plugin-astro.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,b as d,c as l,d as g}from"./chunk-
|
|
1
|
+
import{a as p,b as d,c as l,d as g}from"./chunk-GQOEG3E5.mjs";import"./chunk-NOHXTT24.mjs";import{Buffer as c}from"buffer";function u(e){return typeof e=="string"?e:e instanceof Uint8Array?c.from(e).toString("utf8"):String(e??"")}function m(e,t,r){let o=e.url||"";if(r.port===null||!(e.headers.accept?.includes("text/html")||o==="/"||o.endsWith(".html")))return;let a=t.write.bind(t),s=t.end.bind(t),n="";t.write=(i=>(n+=u(i),!0)),t.end=(i=>(i!==void 0&&(n+=u(i)),n=n.replace("<head>",`<head><script type="text/javascript">${g(r)}</script>`),t.getHeader("content-length")&&t.setHeader("content-length",c.byteLength(n)),a(n,"utf8"),s()))}function y(e){let t=e?.basePath??"/popmelt",r={port:null,projectId:null};return{name:"popmelt",hooks:{async"astro:server:setup"({server:o}){r=await p(e,o,4321),await d(r,o);let a=l(t,()=>r);o.middlewares.use((s,n,i)=>{if((s.url||"").startsWith(t))return a(s,n,i);m(s,n,r),i()})}}}}export{y as popmelt};
|
package/dist/plugin-vite.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,b as i,c as o,d as a}from"./chunk-
|
|
1
|
+
import{a as n,b as i,c as o,d as a}from"./chunk-GQOEG3E5.mjs";import"./chunk-NOHXTT24.mjs";function s(r){let d=r?.basePath??"/popmelt",e={port:null,projectId:null};return{name:"popmelt",async configureServer(t){e=await n(r,t,5173),await i(e,t),t.middlewares.use(o(d,()=>e))},transformIndexHtml(){if(e.port!==null)return[{tag:"script",attrs:{type:"text/javascript"},children:a(e),injectTo:"head-prepend"}]}}}export{s as popmelt};
|