@fragmentsx/render-react 1.1.0 → 1.1.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/dist/components/Area/index.d.ts +3 -0
- package/dist/components/Area/index.d.ts.map +1 -0
- package/dist/components/Collection/index.d.ts +7 -0
- package/dist/components/Collection/index.d.ts.map +1 -0
- package/dist/components/Fragment/index.d.ts +2 -0
- package/dist/components/Fragment/index.d.ts.map +1 -0
- package/dist/components/Frame/index.d.ts +15 -0
- package/dist/components/Frame/index.d.ts.map +1 -0
- package/dist/components/GlobalManager/index.d.ts +2 -0
- package/dist/components/GlobalManager/index.d.ts.map +1 -0
- package/dist/components/Instance/index.d.ts +18 -0
- package/dist/components/Instance/index.d.ts.map +1 -0
- package/dist/components/Text/index.d.ts +10 -0
- package/dist/components/Text/index.d.ts.map +1 -0
- package/dist/helpers/collectStyles.d.ts +3 -0
- package/dist/helpers/collectStyles.d.ts.map +1 -0
- package/dist/helpers/hydration.d.ts +3 -0
- package/dist/helpers/hydration.d.ts.map +1 -0
- package/dist/helpers/isBrowser.d.ts +2 -0
- package/dist/helpers/isBrowser.d.ts.map +1 -0
- package/dist/helpers/loadFragmentManager.d.ts +3 -0
- package/dist/helpers/loadFragmentManager.d.ts.map +1 -0
- package/dist/hocs/reactCSRAdapter.d.ts +2 -0
- package/dist/hocs/reactCSRAdapter.d.ts.map +1 -0
- package/dist/hocs/reactSSRAdapter.d.ts +3 -0
- package/dist/hocs/reactSSRAdapter.d.ts.map +1 -0
- package/dist/index.cjs.js +8 -3
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +8 -3
- package/dist/providers/Scope.d.ts +10 -0
- package/dist/providers/Scope.d.ts.map +1 -0
- package/dist/reactAdapter.d.ts +2 -0
- package/dist/reactAdapter.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Area/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAIV,MAAM,yBAAyB,CAAC;AA6BjC,eAAO,MAAM,IAAI,UAAW,SAAS,4CAYpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Collection/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAS,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAe,EAAE,EAAE,MAAM,OAAO,CAAC;AAGxC,UAAU,eAAgB,SAAQ,UAAU;CAAG;AAE/C,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA+D1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Fragment/index.tsx"],"names":[],"mappings":"AAgFA,eAAO,MAAM,QAAQ,yDAuBpB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ElementType, FC } from 'react';
|
|
2
|
+
import { LinkKey } from '@graph-state/core';
|
|
3
|
+
import { UseFrameOptions } from '@fragmentsx/render-core/dist/components/Frame/hooks/useFrame';
|
|
4
|
+
export interface FrameProps extends UseFrameOptions {
|
|
5
|
+
TextElement?: ElementType;
|
|
6
|
+
InstanceElement?: ElementType;
|
|
7
|
+
FrameElement?: ElementType;
|
|
8
|
+
CollectionElement?: ElementType;
|
|
9
|
+
styles?: boolean;
|
|
10
|
+
hidden?: boolean;
|
|
11
|
+
interactive?: boolean;
|
|
12
|
+
layerKey: LinkKey;
|
|
13
|
+
}
|
|
14
|
+
export declare const Frame: FC<FrameProps>;
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Frame/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,EAAE,EAAyB,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAK5C,OAAO,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAC;AAG/F,MAAM,WAAW,UAAW,SAAQ,eAAe;IACjD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAwDhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GlobalManager/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ElementType } from 'react';
|
|
2
|
+
import { LinkKey } from '@graph-state/core';
|
|
3
|
+
interface InstanceOptions {
|
|
4
|
+
ssr?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface InstanceProps extends ComponentPropsWithoutRef<"div"> {
|
|
7
|
+
FrameElement?: ElementType;
|
|
8
|
+
layerKey?: LinkKey;
|
|
9
|
+
fragmentId?: string;
|
|
10
|
+
interactive?: boolean;
|
|
11
|
+
props?: Record<string, unknown>;
|
|
12
|
+
options?: InstanceOptions;
|
|
13
|
+
globalManager?: unknown;
|
|
14
|
+
Tag?: string | ElementType;
|
|
15
|
+
}
|
|
16
|
+
export declare const Instance: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Instance/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAgB,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAW5C,UAAU,eAAe;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,aAAc,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACpE,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B;AAoFD,eAAO,MAAM,QAAQ,yDAYpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LinkKey } from '@graph-state/core';
|
|
2
|
+
import { ComponentPropsWithoutRef, ElementType, FC } from 'react';
|
|
3
|
+
import { UseTextAttributes } from '@fragmentsx/render-core/dist/components/Text/hooks/useTextAttributes';
|
|
4
|
+
interface TextProps extends ComponentPropsWithoutRef<"div">, UseTextAttributes {
|
|
5
|
+
Tag?: string | ElementType;
|
|
6
|
+
layerKey: LinkKey;
|
|
7
|
+
}
|
|
8
|
+
export declare const Text: FC<TextProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sEAAsE,CAAC;AAEzG,UAAU,SAAU,SAAQ,wBAAwB,CAAC,KAAK,CAAC,EAAE,iBAAiB;IAC5E,GAAG,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAgB9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collectStyles.d.ts","sourceRoot":"","sources":["../../src/helpers/collectStyles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,eAAO,MAAM,aAAa,kBAAmB,UAAU,qDA4CtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hydration.d.ts","sourceRoot":"","sources":["../../src/helpers/hydration.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,UAGtC;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,OAYzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isBrowser.d.ts","sourceRoot":"","sources":["../../src/helpers/isBrowser.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,SAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadFragmentManager.d.ts","sourceRoot":"","sources":["../../src/helpers/loadFragmentManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,eAAO,MAAM,mBAAmB,kBACf,UAAU,cACb,MAAM,iBAmBnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactCSRAdapter.d.ts","sourceRoot":"","sources":["../../src/hocs/reactCSRAdapter.tsx"],"names":[],"mappings":"AAMA,wBAAgB,eAAe,CAAC,eAAe,EAAE,GAAG,WACX,GAAG,6CAgD3C"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function createResource(resourceCache: any, key: string, fetcher: () => Promise<any>): any;
|
|
2
|
+
export declare function reactSSRAdapter(PreactComponent: any): (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=reactSSRAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactSSRAdapter.d.ts","sourceRoot":"","sources":["../../src/hocs/reactSSRAdapter.tsx"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAC5B,aAAa,KAAA,EACb,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,OA2B5B;AAED,wBAAgB,eAAe,CAAC,eAAe,EAAE,GAAG,WACF,GAAG,6CA4BpD"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -2670,12 +2670,17 @@ const useReadVariable = (variableKey) => {
|
|
|
2670
2670
|
layer: null
|
|
2671
2671
|
};
|
|
2672
2672
|
}
|
|
2673
|
-
|
|
2673
|
+
let instanceScope = scopes.findLast(
|
|
2674
2674
|
(scope) => {
|
|
2675
2675
|
var _a2;
|
|
2676
2676
|
return (scope == null ? void 0 : scope.type) === index.scopeTypes.InstanceScope && !!((_a2 = scope.documentManager) == null ? void 0 : _a2.resolve(variableKey2));
|
|
2677
2677
|
}
|
|
2678
2678
|
);
|
|
2679
|
+
if (!instanceScope) {
|
|
2680
|
+
instanceScope = scopes.find(
|
|
2681
|
+
(scope) => (scope == null ? void 0 : scope.type) === index.scopeTypes.InstanceScope
|
|
2682
|
+
);
|
|
2683
|
+
}
|
|
2679
2684
|
const variableLayer = resolveVariableLayer(
|
|
2680
2685
|
instanceScope == null ? void 0 : instanceScope.documentManager,
|
|
2681
2686
|
variableKey2
|
|
@@ -3099,8 +3104,8 @@ const useLayerStyles = (layerKey) => {
|
|
|
3099
3104
|
...layout,
|
|
3100
3105
|
...layerSize,
|
|
3101
3106
|
...textStyles,
|
|
3102
|
-
display
|
|
3103
|
-
"user-select": "none"
|
|
3107
|
+
display
|
|
3108
|
+
// "user-select": "none",
|
|
3104
3109
|
// ...cssOverride,
|
|
3105
3110
|
};
|
|
3106
3111
|
} catch (e2) {
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { collectStyles } from './helpers/collectStyles';
|
|
2
|
+
export { Instance } from './components/Instance';
|
|
3
|
+
export { Area } from './components/Area';
|
|
4
|
+
export { Text } from './components/Text';
|
|
5
|
+
export { Frame } from './components/Frame';
|
|
6
|
+
export { Fragment } from './components/Fragment';
|
|
7
|
+
export { Collection } from './components/Collection';
|
|
8
|
+
export { Scope } from './providers/Scope';
|
|
9
|
+
export * from '@fragmentsx/render-core';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,cAAc,yBAAyB,CAAC"}
|
package/dist/index.es.js
CHANGED
|
@@ -2668,12 +2668,17 @@ const useReadVariable = (variableKey) => {
|
|
|
2668
2668
|
layer: null
|
|
2669
2669
|
};
|
|
2670
2670
|
}
|
|
2671
|
-
|
|
2671
|
+
let instanceScope = scopes.findLast(
|
|
2672
2672
|
(scope) => {
|
|
2673
2673
|
var _a2;
|
|
2674
2674
|
return (scope == null ? void 0 : scope.type) === index.scopeTypes.InstanceScope && !!((_a2 = scope.documentManager) == null ? void 0 : _a2.resolve(variableKey2));
|
|
2675
2675
|
}
|
|
2676
2676
|
);
|
|
2677
|
+
if (!instanceScope) {
|
|
2678
|
+
instanceScope = scopes.find(
|
|
2679
|
+
(scope) => (scope == null ? void 0 : scope.type) === index.scopeTypes.InstanceScope
|
|
2680
|
+
);
|
|
2681
|
+
}
|
|
2677
2682
|
const variableLayer = resolveVariableLayer(
|
|
2678
2683
|
instanceScope == null ? void 0 : instanceScope.documentManager,
|
|
2679
2684
|
variableKey2
|
|
@@ -3097,8 +3102,8 @@ const useLayerStyles = (layerKey) => {
|
|
|
3097
3102
|
...layout,
|
|
3098
3103
|
...layerSize,
|
|
3099
3104
|
...textStyles,
|
|
3100
|
-
display
|
|
3101
|
-
"user-select": "none"
|
|
3105
|
+
display
|
|
3106
|
+
// "user-select": "none",
|
|
3102
3107
|
// ...cssOverride,
|
|
3103
3108
|
};
|
|
3104
3109
|
} catch (e2) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import { GraphState, LinkKey } from '@graph-state/core';
|
|
3
|
+
interface ScopeProps extends PropsWithChildren {
|
|
4
|
+
fragmentManager: GraphState;
|
|
5
|
+
layerKey: LinkKey;
|
|
6
|
+
value: unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare const Scope: FC<ScopeProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=Scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Scope.d.ts","sourceRoot":"","sources":["../../src/providers/Scope.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAc,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAExD,UAAU,UAAW,SAAQ,iBAAiB;IAC5C,eAAe,EAAE,UAAU,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAchC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactAdapter.d.ts","sourceRoot":"","sources":["../src/reactAdapter.ts"],"names":[],"mappings":"AAKA,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,GAAG,2DAMxD"}
|