@wix/origami-runtime 0.0.0-stage → 0.19.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 +8 -2
- package/dist/bindings.d.ts +44 -0
- package/dist/bindings.js +90 -0
- package/dist/bindings.js.map +1 -0
- package/dist/classNames.d.ts +4 -0
- package/dist/classNames.js +23 -0
- package/dist/classNames.js.map +1 -0
- package/dist/components.d.ts +9 -0
- package/dist/components.js +10 -0
- package/dist/components.js.map +1 -0
- package/dist/define.d.ts +92 -0
- package/dist/define.js +22 -0
- package/dist/define.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/withInteractions.d.ts +2 -0
- package/dist/withInteractions.js +14 -0
- package/dist/withInteractions.js.map +1 -0
- package/dist/withOrigami.d.ts +2 -0
- package/dist/withOrigami.js +17 -0
- package/dist/withOrigami.js.map +1 -0
- package/package.json +62 -3
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Origami runtime
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Before local builds or tests, run `pnpm -r run build` from the repository root to build workspace dependencies in order.
|
|
4
|
+
|
|
5
|
+
The root entry exports binding, provider, and component authoring helpers.
|
|
6
|
+
|
|
7
|
+
Layout components and the shared DOM/CSS contract belong to
|
|
8
|
+
[`@wix/origami-system-components`](../origami-system-components/README.md).
|
|
9
|
+
This package has no layout subpaths or system-components dependency.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const D: unique symbol;
|
|
2
|
+
export type ContextHook<T> = () => T;
|
|
3
|
+
type CtxData = {
|
|
4
|
+
[D]: 'ctx';
|
|
5
|
+
from: ContextHook<unknown>;
|
|
6
|
+
path: string;
|
|
7
|
+
placeholder?: unknown;
|
|
8
|
+
};
|
|
9
|
+
type RecordCall = (...args: unknown[]) => CallD;
|
|
10
|
+
type CtxD = RecordCall & CtxData;
|
|
11
|
+
type CallD = {
|
|
12
|
+
[D]: 'call';
|
|
13
|
+
target: CtxData;
|
|
14
|
+
args: unknown[];
|
|
15
|
+
};
|
|
16
|
+
type FnD = {
|
|
17
|
+
[D]: 'fn';
|
|
18
|
+
ref: (...a: unknown[]) => unknown;
|
|
19
|
+
args: unknown[];
|
|
20
|
+
};
|
|
21
|
+
type IsD = {
|
|
22
|
+
[D]: 'is';
|
|
23
|
+
binding: unknown;
|
|
24
|
+
value: unknown;
|
|
25
|
+
};
|
|
26
|
+
type AllD = {
|
|
27
|
+
[D]: 'all';
|
|
28
|
+
entries: unknown[];
|
|
29
|
+
};
|
|
30
|
+
export type Binding = CtxD | CallD | FnD | IsD | AllD;
|
|
31
|
+
export declare const isBinding: (v: unknown) => v is Binding;
|
|
32
|
+
type PathValue<M, P extends string> = M extends object ? P extends `${infer K}.${infer Rest}` ? K extends keyof M ? PathValue<M[K], Rest> : unknown : P extends keyof M ? M[P] : unknown : unknown;
|
|
33
|
+
export declare const ctx: <M, P extends string>(path: P, opts: {
|
|
34
|
+
from: ContextHook<M>;
|
|
35
|
+
placeholder?: PathValue<NonNullable<M>, P>;
|
|
36
|
+
}) => PathValue<NonNullable<M>, P>;
|
|
37
|
+
export declare const fn: <T>(ref: (...a: never[]) => T, ...args: unknown[]) => T;
|
|
38
|
+
export declare const is: <T>(binding: T, value: T) => boolean;
|
|
39
|
+
export declare const all: (first: boolean, second: boolean, ...rest: boolean[]) => boolean;
|
|
40
|
+
export declare const raw: <T>(value: T) => T;
|
|
41
|
+
type Hooks = Map<ContextHook<unknown>, unknown>;
|
|
42
|
+
export declare const resolve: (v: unknown, hooks?: Hooks, seen?: WeakSet<object>) => unknown;
|
|
43
|
+
export declare const holds: (v: unknown, hooks?: Hooks, seen?: WeakSet<object>) => boolean;
|
|
44
|
+
export {};
|
package/dist/bindings.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { isValidElement } from 'react';
|
|
2
|
+
const D = Symbol('origami.binding');
|
|
3
|
+
const RAW = Symbol('origami.raw');
|
|
4
|
+
export const isBinding = (v) => (typeof v === 'object' || typeof v === 'function') && v !== null && D in v;
|
|
5
|
+
const isRaw = (v) => typeof v === 'object' && v !== null && RAW in v;
|
|
6
|
+
const unwrap = (v) => v !== null && typeof v === 'object' && typeof v.get === 'function'
|
|
7
|
+
? v.get()
|
|
8
|
+
: v;
|
|
9
|
+
const pick = (o, path) => path
|
|
10
|
+
.split('.')
|
|
11
|
+
.reduce((v, k) => (v == null ? undefined : unwrap(unwrap(v)[k])), o);
|
|
12
|
+
// document/bindings — each call returns a branded descriptor at authoring time, resolved lazily at
|
|
13
|
+
// render time by resolve(). ctx()'s return type is derived from what the `from` hook returns (via
|
|
14
|
+
// PathValue; NonNullable, since a hook used outside its provider may return undefined), so a call
|
|
15
|
+
// site gets the real manifest-declared type back, not the descriptor's runtime shape: a binding is
|
|
16
|
+
// a promise that the slot it's assigned to will eventually hold that value, exactly like a literal
|
|
17
|
+
// of that type would. The descriptor is also a function, so `ctx(path, { from })(args)` works when
|
|
18
|
+
// the path names a method: calling it runs nothing, it records the call for resolve().
|
|
19
|
+
export const ctx = (path, opts) => {
|
|
20
|
+
// 1. What the binding holds: the hook to read and the path to walk.
|
|
21
|
+
const data = { [D]: 'ctx', from: opts.from, path, placeholder: opts.placeholder };
|
|
22
|
+
// 2. What calling it does: record the args, next to the data. Nothing runs until resolve().
|
|
23
|
+
const recordCall = (...args) => ({ [D]: 'call', target: data, args });
|
|
24
|
+
// 3. One value that is both: the function, with the data attached.
|
|
25
|
+
const binding = Object.assign(recordCall, data);
|
|
26
|
+
// 4. Typed as the value it will resolve to, so call sites type-check against the real value.
|
|
27
|
+
return binding;
|
|
28
|
+
};
|
|
29
|
+
export const fn = (ref, ...args) => ({ [D]: 'fn', ref: ref, args });
|
|
30
|
+
// `value`'s type is tied to `binding`'s (T), not a fixed union — a binding derived from a boolean
|
|
31
|
+
// field must be compared to a boolean, one derived from an enum field to a member of that enum,
|
|
32
|
+
// with nothing hardcoded here to any one of those shapes.
|
|
33
|
+
export const is = (binding, value) => ({ [D]: 'is', binding, value });
|
|
34
|
+
// AND of two or more conditions: every entry must hold (see holds()).
|
|
35
|
+
export const all = (first, second, ...rest) => ({ [D]: 'all', entries: [first, second, ...rest] });
|
|
36
|
+
export const raw = (value) => ({ [RAW]: value });
|
|
37
|
+
const isPlain = (v) => typeof v === 'object' && v !== null && Object.getPrototypeOf(v) === Object.prototype;
|
|
38
|
+
// Each hook runs once per resolve(), on first use.
|
|
39
|
+
const read = (hook, hooks) => {
|
|
40
|
+
if (!hooks.has(hook))
|
|
41
|
+
hooks.set(hook, hook());
|
|
42
|
+
return hooks.get(hook);
|
|
43
|
+
};
|
|
44
|
+
// Calls the hooks that ctx() bindings name, so it must run during render. Bindings are authored
|
|
45
|
+
// statically per call site, so the same hooks run in the same order every render. A failing
|
|
46
|
+
// binding resolves to undefined rather than throwing.
|
|
47
|
+
export const resolve = (v, hooks = new Map(), seen = new WeakSet()) => {
|
|
48
|
+
if (isRaw(v))
|
|
49
|
+
return v[RAW];
|
|
50
|
+
if (isBinding(v)) {
|
|
51
|
+
try {
|
|
52
|
+
if (v[D] === 'ctx') {
|
|
53
|
+
const out = v.path ? pick(read(v.from, hooks), v.path) : unwrap(read(v.from, hooks));
|
|
54
|
+
return out === undefined ? v.placeholder : out;
|
|
55
|
+
}
|
|
56
|
+
// The method is read like any ctx() value, then called without a `this`.
|
|
57
|
+
if (v[D] === 'call') {
|
|
58
|
+
const method = resolve(v.target, hooks, seen);
|
|
59
|
+
const args = v.args.map(arg => resolve(arg, hooks, seen));
|
|
60
|
+
return method(...args);
|
|
61
|
+
}
|
|
62
|
+
if (v[D] === 'fn')
|
|
63
|
+
return v.ref(...v.args.map(a => resolve(a, hooks, seen)));
|
|
64
|
+
// Every entry is read, not just up to the first false one, so the hooks they name run in
|
|
65
|
+
// the same order every render.
|
|
66
|
+
if (v[D] === 'all')
|
|
67
|
+
return v.entries.map(e => holds(e, hooks, seen)).every(Boolean);
|
|
68
|
+
return resolve(v.binding, hooks, seen) === v.value;
|
|
69
|
+
}
|
|
70
|
+
catch (e) {
|
|
71
|
+
console.error('binding failed, left unresolved', e);
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (Array.isArray(v))
|
|
76
|
+
return v.map(x => resolve(x, hooks, seen));
|
|
77
|
+
if (isValidElement(v))
|
|
78
|
+
return v;
|
|
79
|
+
if (isPlain(v)) {
|
|
80
|
+
if (seen.has(v))
|
|
81
|
+
return v;
|
|
82
|
+
seen.add(v);
|
|
83
|
+
return Object.fromEntries(Object.entries(v).map(([k, x]) => [k, resolve(x, hooks, seen)]));
|
|
84
|
+
}
|
|
85
|
+
return v;
|
|
86
|
+
};
|
|
87
|
+
// A condition holds only when it resolves to a strict `true`, as thunderbolt reads it. False,
|
|
88
|
+
// undefined, a merely truthy value, a failed binding and a raw() entry (opaque, never a match) don't.
|
|
89
|
+
export const holds = (v, hooks, seen) => !isRaw(v) && resolve(v, hooks, seen) === true;
|
|
90
|
+
//# sourceMappingURL=bindings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bindings.js","sourceRoot":"","sources":["../src/bindings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,CAAC,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAA;AACnC,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;AAoBjC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAU,EAAgB,EAAE,CAClD,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;AAC9E,MAAM,KAAK,GAAG,CAAC,CAAU,EAAa,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAA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D,OAAO,CAAC,CAAA;AACZ,CAAC,CAAA;AAED,8FAA8F;AAC9F,sGAAsG;AACtG,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAU,EAAE,KAAa,EAAE,IAAsB,EAAW,EAAE,CAChF,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type Cond = unknown;
|
|
2
|
+
export type ClassNames = string | Record<string, Cond | readonly Cond[]> | readonly ClassNames[] | undefined;
|
|
3
|
+
export declare const cx: (block: string, value: ClassNames) => string;
|
|
4
|
+
export declare const rootClass: (id: string, value: ClassNames) => string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const on = (c) => Array.isArray(c) ? c.length > 0 && c.every(x => x === true) : c === true;
|
|
2
|
+
const term = (block, name) => (name.startsWith('wix-visibility-') ? name : `${block}--${name}`);
|
|
3
|
+
export const cx = (block, value) => {
|
|
4
|
+
const out = [];
|
|
5
|
+
const walk = (v) => {
|
|
6
|
+
if (v === undefined)
|
|
7
|
+
return;
|
|
8
|
+
if (typeof v === 'string')
|
|
9
|
+
return void v
|
|
10
|
+
.split(/\s+/)
|
|
11
|
+
.filter(Boolean)
|
|
12
|
+
.forEach(n => out.push(term(block, n)));
|
|
13
|
+
if (Array.isArray(v))
|
|
14
|
+
return void v.forEach(walk);
|
|
15
|
+
for (const [k, c] of Object.entries(v))
|
|
16
|
+
if (on(c))
|
|
17
|
+
out.push(term(block, k));
|
|
18
|
+
};
|
|
19
|
+
walk(value);
|
|
20
|
+
return out.join(' ');
|
|
21
|
+
};
|
|
22
|
+
export const rootClass = (id, value) => [id, cx(id, value)].filter(Boolean).join(' ');
|
|
23
|
+
//# sourceMappingURL=classNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.js","sourceRoot":"","sources":["../src/classNames.ts"],"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;IACvG,CAAC,CAAA;IACD,IAAI,CAAC,KAAK,CAAC,CAAA;IACX,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACxB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAU,EAAE,KAAiB,EAAU,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
export declare const Show: ({ when, children }: {
|
|
3
|
+
when: boolean;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}) => ReactElement | null;
|
|
6
|
+
export declare const Remove: ({ when, children }: {
|
|
7
|
+
when: boolean;
|
|
8
|
+
children: ReactElement;
|
|
9
|
+
}) => ReactElement | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { holds, resolve } from './bindings';
|
|
3
|
+
// Removing a component is the one visibility mode that changes the tree rather than the node.
|
|
4
|
+
// Only a strict `false` removes — hence `when: boolean`, matching what
|
|
5
|
+
// is()/ctx()-to-a-boolean-field/a literal all actually produce.
|
|
6
|
+
export const Show = ({ when, children }) => resolve(when) === false ? null : _jsx(_Fragment, { children: children });
|
|
7
|
+
// DM JSX 0.61's removed component: the outermost wrapper around exactly one component, no DOM node.
|
|
8
|
+
// `when` is one condition or all(...); the child is removed only when it holds, else kept.
|
|
9
|
+
export const Remove = ({ when, children }) => holds(when) ? null : children;
|
|
10
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3C,8FAA8F;AAC9F,uEAAuE;AACvE,gEAAgE;AAChE,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAA0C,EAAuB,EAAE,CACpG,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,4BAAG,QAAQ,GAAI,CAAA;AAEpD,oGAAoG;AACpG,2FAA2F;AAC3F,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAA6C,EAAuB,EAAE,CACzG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAA"}
|
package/dist/define.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export interface WixProps {
|
|
2
|
+
wixPath?: string;
|
|
3
|
+
presetsWrapperProps?: {
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export interface WixElementProps {
|
|
8
|
+
wix?: WixProps;
|
|
9
|
+
}
|
|
10
|
+
export interface PropBuilder<T> {
|
|
11
|
+
readonly _type: T;
|
|
12
|
+
readonly kind: string;
|
|
13
|
+
readonly meta: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
/** `Image` from `@wix/editor-react-types`: the value of a manifest `image` prop. Wrappers name it wherever an image sits. */
|
|
16
|
+
export type Image = {
|
|
17
|
+
uri?: string;
|
|
18
|
+
url: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
height?: number;
|
|
21
|
+
width?: number;
|
|
22
|
+
animated?: boolean;
|
|
23
|
+
crop?: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
};
|
|
29
|
+
quality?: number;
|
|
30
|
+
alt?: string;
|
|
31
|
+
};
|
|
32
|
+
/** `Video` from `@wix/editor-react-types`: the value of a manifest `video` prop. */
|
|
33
|
+
export type Video = {
|
|
34
|
+
uri: string;
|
|
35
|
+
name?: string;
|
|
36
|
+
sources: Array<{
|
|
37
|
+
quality: '1080p' | '720p' | '480p' | '360p';
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
types: Array<{
|
|
41
|
+
format: 'mp4' | 'mp4-luminance';
|
|
42
|
+
uri: string;
|
|
43
|
+
url: string;
|
|
44
|
+
}>;
|
|
45
|
+
}>;
|
|
46
|
+
adaptiveSources: Array<{
|
|
47
|
+
format: 'hls' | 'dash';
|
|
48
|
+
uri: string;
|
|
49
|
+
url: string;
|
|
50
|
+
}>;
|
|
51
|
+
hasAudio: boolean;
|
|
52
|
+
fps: number;
|
|
53
|
+
poster?: Image;
|
|
54
|
+
};
|
|
55
|
+
export declare const prop: {
|
|
56
|
+
text: (opts?: {
|
|
57
|
+
maxLength?: number;
|
|
58
|
+
}) => PropBuilder<string>;
|
|
59
|
+
richText: () => PropBuilder<string>;
|
|
60
|
+
boolean: () => PropBuilder<boolean>;
|
|
61
|
+
number: (opts?: {
|
|
62
|
+
min?: number;
|
|
63
|
+
max?: number;
|
|
64
|
+
}) => PropBuilder<number>;
|
|
65
|
+
event: <T = Event>(domEvent: string) => PropBuilder<(value: T) => void>;
|
|
66
|
+
enum: <T extends string>(...options: T[]) => PropBuilder<T>;
|
|
67
|
+
link: () => PropBuilder<{
|
|
68
|
+
href: string;
|
|
69
|
+
target?: string;
|
|
70
|
+
}>;
|
|
71
|
+
direction: () => PropBuilder<"ltr" | "rtl">;
|
|
72
|
+
vectorArt: () => PropBuilder<string>;
|
|
73
|
+
element: <T>() => PropBuilder<T>;
|
|
74
|
+
object: <T>() => PropBuilder<T>;
|
|
75
|
+
image: <T>() => PropBuilder<T>;
|
|
76
|
+
video: <T>() => PropBuilder<T>;
|
|
77
|
+
};
|
|
78
|
+
export interface ComponentDefinition<TProps extends Record<string, PropBuilder<any>>, TElements extends Record<string, PropBuilder<any>> = Record<string, never>> {
|
|
79
|
+
componentId: string;
|
|
80
|
+
compName: string;
|
|
81
|
+
props: TProps;
|
|
82
|
+
elements?: TElements;
|
|
83
|
+
presets?: string[];
|
|
84
|
+
}
|
|
85
|
+
export declare const defineComponent: <TProps extends Record<string, PropBuilder<any>>, TElements extends Record<string, PropBuilder<any>> = Record<string, never>>(def: ComponentDefinition<TProps, TElements>) => ComponentDefinition<TProps, TElements>;
|
|
86
|
+
export type InferProps<D extends ComponentDefinition<any, any>> = {
|
|
87
|
+
[K in keyof D['props']]?: D['props'][K]['_type'];
|
|
88
|
+
} & (keyof D['elements'] extends never ? unknown : {
|
|
89
|
+
elementProps?: {
|
|
90
|
+
[K in keyof D['elements']]?: D['elements'][K]['_type'];
|
|
91
|
+
};
|
|
92
|
+
});
|
package/dist/define.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const makeProp = (kind, meta = {}) => ({ _type: undefined, kind, meta });
|
|
2
|
+
export const prop = {
|
|
3
|
+
text: (opts) => makeProp('text', opts ?? {}),
|
|
4
|
+
richText: () => makeProp('richText'),
|
|
5
|
+
boolean: () => makeProp('boolean'),
|
|
6
|
+
number: (opts) => makeProp('number', opts ?? {}),
|
|
7
|
+
event: (domEvent) => makeProp('function', { domEvent }),
|
|
8
|
+
enum: (...options) => makeProp('textEnum', { options }),
|
|
9
|
+
link: () => makeProp('link'),
|
|
10
|
+
direction: () => makeProp('direction'),
|
|
11
|
+
vectorArt: () => makeProp('vectorArt'),
|
|
12
|
+
// A refElement slot — T is the child component's own generated Props type, imported by the generator.
|
|
13
|
+
element: () => makeProp('element'),
|
|
14
|
+
// Any other value — an object, an array, or one with no known shape (T = unknown); T comes from the generator.
|
|
15
|
+
object: () => makeProp('object'),
|
|
16
|
+
// An image or a video (the manifest's `image` and `video` types): typed like `object`, but marked so tools
|
|
17
|
+
// can find image and video props.
|
|
18
|
+
image: () => makeProp('image'),
|
|
19
|
+
video: () => makeProp('video'),
|
|
20
|
+
};
|
|
21
|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kCAAkC;IAClC,KAAK,EAAE,GAAM,EAAE,CAAC,QAAQ,CAAI,OAAO,CAAC;IACpC,KAAK,EAAE,GAAM,EAAE,CAAC,QAAQ,CAAI,OAAO,CAAC;CACvC,CAAA;AAkBD,MAAM,CAAC,MAAM,eAAe,GAAG,CAM3B,GAA2C,EACL,EAAE,CAAC,GAAG,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { all, ctx, fn, is, raw, resolve, isBinding } from './bindings';
|
|
2
|
+
export type { Binding, ContextHook } from './bindings';
|
|
3
|
+
export { Remove, Show } from './components';
|
|
4
|
+
export { withOrigami } from './withOrigami';
|
|
5
|
+
export { withInteractions } from './withInteractions';
|
|
6
|
+
export { cx, rootClass } from './classNames';
|
|
7
|
+
export type { ClassNames, Cond } from './classNames';
|
|
8
|
+
export { prop, defineComponent } from './define';
|
|
9
|
+
export type { WixProps, WixElementProps, PropBuilder, ComponentDefinition, InferProps, Image, Video } from './define';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { all, ctx, fn, is, raw, resolve, isBinding } from './bindings';
|
|
2
|
+
export { Remove, Show } from './components';
|
|
3
|
+
export { withOrigami } from './withOrigami';
|
|
4
|
+
export { withInteractions } from './withInteractions';
|
|
5
|
+
export { cx, rootClass } from './classNames';
|
|
6
|
+
export { prop, defineComponent } from './define';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEtE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE5C,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InteractionsDefinition } from '@wix/site-service-interactions/definition';
|
|
3
|
+
import { useService } from '@wix/services-manager-react';
|
|
4
|
+
// Copied from wix-next's @wix/builder-interactions, not imported from it: a component with
|
|
5
|
+
// interactions renders inside an <interact-element> keyed by its comp path, else its id.
|
|
6
|
+
export const withInteractions = Component => props => {
|
|
7
|
+
const { hasInteractions } = useService(InteractionsDefinition);
|
|
8
|
+
const key = props.wix?.compPath ?? props.id;
|
|
9
|
+
if (hasInteractions(key)) {
|
|
10
|
+
return (_jsx("interact-element", { "data-interact-key": key, children: _jsx(Component, { ...props }) }));
|
|
11
|
+
}
|
|
12
|
+
return _jsx(Component, { ...props });
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=withInteractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withInteractions.js","sourceRoot":"","sources":["../src/withInteractions.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAA;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,2FAA2F;AAC3F,yFAAyF;AACzF,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;IACjD,MAAM,EAAE,eAAe,EAAE,GAAG,UAAU,CAAC,sBAAsB,CAAC,CAAA;IAE9D,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,EAAE,QAAQ,IAAI,KAAK,CAAC,EAAE,CAAA;IAE3C,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,CACH,gDAAqC,GAAG,YACpC,KAAC,SAAS,OAAK,KAAK,GAAI,GACT,CACtB,CAAA;IACL,CAAC;IACD,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACnC,CAAC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { isBinding, resolve } from './bindings';
|
|
3
|
+
// Resolve the authored props (reading the hooks they bind to), render the real component.
|
|
4
|
+
export const withOrigami = (Component) => {
|
|
5
|
+
const W = (props) => {
|
|
6
|
+
for (const [k, v] of Object.entries(props)) {
|
|
7
|
+
if (/^on[A-Z]/.test(k) && isBinding(v)) {
|
|
8
|
+
throw new Error(`${k}: a callback has no spelling (ADR-0015); fn() would run at render`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const resolved = resolve(props);
|
|
12
|
+
return _jsx(Component, { ...resolved });
|
|
13
|
+
};
|
|
14
|
+
W.displayName = `Origami(${Component.displayName ?? Component.name})`;
|
|
15
|
+
return W;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=withOrigami.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withOrigami.js","sourceRoot":"","sources":["../src/withOrigami.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAE/C,0FAA0F;AAC1F,MAAM,CAAC,MAAM,WAAW,GAAG,CAAmB,SAA2B,EAAwB,EAAE;IAC/F,MAAM,CAAC,GAAyB,CAAC,KAAQ,EAAE,EAAE;QACzC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;YACpE,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACrC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,mEAAmE,CAAC,CAAA;YAC5F,CAAC;QACL,CAAC;QACD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAM,CAAA;QACpC,OAAO,KAAC,SAAS,OAAK,QAAQ,GAAI,CAAA;IACtC,CAAC,CAAA;IACD,CAAC,CAAC,WAAW,GAAG,WAAW,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,GAAG,CAAA;IACrE,OAAO,CAAC,CAAA;AACZ,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/origami-runtime",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.19.1",
|
|
4
|
+
"description": "React runtime for Origami-generated component wrappers: context bindings, providers, and className resolution",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"!**/*.tsbuildinfo"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc -b .",
|
|
13
|
+
"lint": "oxlint .",
|
|
14
|
+
"test-type-check": "tsc --project tsconfig.test.json",
|
|
15
|
+
"test": "pnpm run test-type-check && vitest --run",
|
|
16
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@testing-library/react": "^16.3.0",
|
|
20
|
+
"@types/react": "^18.3.1",
|
|
21
|
+
"@wix/services-manager": "^1.0.7",
|
|
22
|
+
"@wix/services-manager-react": "^1.0.8",
|
|
23
|
+
"@wix/site-service-interactions": "^1.0.28",
|
|
24
|
+
"jsdom": "^23.0.1",
|
|
25
|
+
"react": "^18.3.1",
|
|
26
|
+
"typescript": "^6.0.3",
|
|
27
|
+
"vitest": "^4.1.11"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@wix/services-manager": "^1.0.7",
|
|
31
|
+
"@wix/services-manager-react": "^1.0.8",
|
|
32
|
+
"@wix/site-service-interactions": "^1.0.28",
|
|
33
|
+
"react": "^18.3.1"
|
|
34
|
+
},
|
|
35
|
+
"publishUnscoped": false,
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"registry": "https://registry.npmjs.org/",
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"wix": {
|
|
41
|
+
"artifact": {
|
|
42
|
+
"groupId": "com.wixpress.npm",
|
|
43
|
+
"artifactId": "origami-runtime",
|
|
44
|
+
"targets": {
|
|
45
|
+
"docker": false
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"validations": {
|
|
49
|
+
"source": [
|
|
50
|
+
"lint"
|
|
51
|
+
],
|
|
52
|
+
"postBuild": [
|
|
53
|
+
"test"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"exports": {
|
|
58
|
+
".": {
|
|
59
|
+
"types": "./dist/index.d.ts",
|
|
60
|
+
"default": "./dist/index.js"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"type": "module",
|
|
64
|
+
"falconPackageHash": "9832fc171b32f1c1c561fe7a7697e74d239d6147aa28d124085769b9"
|
|
6
65
|
}
|