@fragmentsx/client-core 0.1.0 → 0.1.2
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/fragmentsClient.d.ts +26 -0
- package/dist/fragmentsClient.d.ts.map +1 -0
- package/dist/index.cjs.js +24 -9
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +24 -9
- package/dist/plugins/fetch/beacon.d.ts +4 -0
- package/dist/plugins/fetch/beacon.d.ts.map +1 -0
- package/dist/plugins/fetch/emptyFragment.d.ts +50 -0
- package/dist/plugins/fetch/emptyFragment.d.ts.map +1 -0
- package/dist/plugins/fetch/fetcher.d.ts +8 -0
- package/dist/plugins/fetch/fetcher.d.ts.map +1 -0
- package/dist/plugins/fetch/index.d.ts +28 -0
- package/dist/plugins/fetch/index.d.ts.map +1 -0
- package/dist/plugins/fetch/queries/AreaListQuery.d.ts +26 -0
- package/dist/plugins/fetch/queries/AreaListQuery.d.ts.map +1 -0
- package/dist/plugins/fetch/queries/AreaQuery.d.ts +24 -0
- package/dist/plugins/fetch/queries/AreaQuery.d.ts.map +1 -0
- package/dist/plugins/fetch/queries/FragmentQuery.d.ts +28 -0
- package/dist/plugins/fetch/queries/FragmentQuery.d.ts.map +1 -0
- package/dist/plugins/fragments/index.d.ts +17 -0
- package/dist/plugins/fragments/index.d.ts.map +1 -0
- package/dist/plugins/lifecycle/globalManagerLifeCycle.d.ts +16 -0
- package/dist/plugins/lifecycle/globalManagerLifeCycle.d.ts.map +1 -0
- package/dist/plugins/load/index.d.ts +18 -0
- package/dist/plugins/load/index.d.ts.map +1 -0
- package/dist/plugins/metrics/globalMetrics.d.ts +11 -0
- package/dist/plugins/metrics/globalMetrics.d.ts.map +1 -0
- package/dist/plugins/metrics/index.d.ts +3 -0
- package/dist/plugins/metrics/index.d.ts.map +1 -0
- package/dist/plugins/metrics/queries/addClientMetric.d.ts +2 -0
- package/dist/plugins/metrics/queries/addClientMetric.d.ts.map +1 -0
- package/dist/plugins/metrics/trackAdPixel.d.ts +4 -0
- package/dist/plugins/metrics/trackAdPixel.d.ts.map +1 -0
- package/dist/plugins/scopes/index.d.ts +11 -0
- package/dist/plugins/scopes/index.d.ts.map +1 -0
- package/dist/plugins/ssr/index.d.ts +11 -0
- package/dist/plugins/ssr/index.d.ts.map +1 -0
- package/dist/plugins/styleSheet/fragment/index.d.ts +9 -0
- package/dist/plugins/styleSheet/fragment/index.d.ts.map +1 -0
- package/dist/plugins/styleSheet/global/index.d.ts +3 -0
- package/dist/plugins/styleSheet/global/index.d.ts.map +1 -0
- package/dist/plugins/styleSheet/index.d.ts +3 -0
- package/dist/plugins/styleSheet/index.d.ts.map +1 -0
- package/dist/plugins/styleSheet/utils/autoInjector.d.ts +7 -0
- package/dist/plugins/styleSheet/utils/autoInjector.d.ts.map +1 -0
- package/dist/plugins/styleSheet/utils/buildCssBlock.d.ts +6 -0
- package/dist/plugins/styleSheet/utils/buildCssBlock.d.ts.map +1 -0
- package/dist/plugins/styleSheet/utils/compareRules.d.ts +3 -0
- package/dist/plugins/styleSheet/utils/compareRules.d.ts.map +1 -0
- package/dist/plugins/styleSheet/utils/findGroups.d.ts +11 -0
- package/dist/plugins/styleSheet/utils/findGroups.d.ts.map +1 -0
- package/dist/plugins/styleSheet/utils/getAllChildren.d.ts +4 -0
- package/dist/plugins/styleSheet/utils/getAllChildren.d.ts.map +1 -0
- package/dist/plugins/styleSheet/utils/makeCss.d.ts +5 -0
- package/dist/plugins/styleSheet/utils/makeCss.d.ts.map +1 -0
- package/dist/plugins/styleSheet/utils/toCSS.d.ts +3 -0
- package/dist/plugins/styleSheet/utils/toCSS.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Plugin } from '@graph-state/core';
|
|
2
|
+
declare module "@graph-state/core" {
|
|
3
|
+
interface GraphState {
|
|
4
|
+
env: {
|
|
5
|
+
isSelf: boolean;
|
|
6
|
+
apiToken: string;
|
|
7
|
+
backendEndpoint: string;
|
|
8
|
+
referer?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
interface Options {
|
|
13
|
+
apiToken: string;
|
|
14
|
+
referer?: string;
|
|
15
|
+
backendEndpoint?: string;
|
|
16
|
+
isSelf?: boolean;
|
|
17
|
+
fragmentPlugins?: Plugin[];
|
|
18
|
+
}
|
|
19
|
+
export declare const PLUGIN_TYPES: {
|
|
20
|
+
FragmentsPlugin: "FragmentsPlugin";
|
|
21
|
+
GlobalStylesheet: "GlobalStylesheet";
|
|
22
|
+
FragmentStylesheet: "FragmentStylesheet";
|
|
23
|
+
};
|
|
24
|
+
export declare const createFragmentsClient: (options: Options) => import('@graph-state/core').GraphState<import('@graph-state/core').SystemFields, "GlobalManager">;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=fragmentsClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fragmentsClient.d.ts","sourceRoot":"","sources":["../src/fragmentsClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAUxD,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,UAAU;QAClB,GAAG,EAAE;YACH,MAAM,EAAE,OAAO,CAAC;YAChB,QAAQ,EAAE,MAAM,CAAC;YACjB,eAAe,EAAE,MAAM,CAAC;YACxB,OAAO,CAAC,EAAE,MAAM,CAAC;SAClB,CAAC;KACH;CACF;AAED,UAAU,OAAO;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF,eAAO,MAAM,qBAAqB,YAAa,OAAO,sGAgCrD,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -2087,6 +2087,8 @@ const getAreaListQuery = (areaCodes) => {
|
|
|
2087
2087
|
return {
|
|
2088
2088
|
query: `query($areaCodes: [String!]!) {
|
|
2089
2089
|
clientAreas(areaCodes: $areaCodes) {
|
|
2090
|
+
areaProperties
|
|
2091
|
+
projectProperties
|
|
2090
2092
|
variant {
|
|
2091
2093
|
fragment {
|
|
2092
2094
|
props
|
|
@@ -2108,13 +2110,18 @@ const getAreaListQuery = (areaCodes) => {
|
|
|
2108
2110
|
};
|
|
2109
2111
|
};
|
|
2110
2112
|
const fetchPlugin = (state) => {
|
|
2111
|
-
var _a, _b, _c;
|
|
2113
|
+
var _a, _b, _c, _d;
|
|
2112
2114
|
const isSelf = ((_a = state == null ? void 0 : state.env) == null ? void 0 : _a.isSelf) ?? false;
|
|
2113
2115
|
const url = (_b = state == null ? void 0 : state.env) == null ? void 0 : _b.backendEndpoint;
|
|
2114
2116
|
const apiToken = (_c = state == null ? void 0 : state.env) == null ? void 0 : _c.apiToken;
|
|
2115
|
-
const
|
|
2117
|
+
const referer = (_d = state == null ? void 0 : state.env) == null ? void 0 : _d.referer;
|
|
2118
|
+
let headers = {
|
|
2116
2119
|
Authorization: `Bearer ${apiToken}`
|
|
2117
|
-
}
|
|
2120
|
+
};
|
|
2121
|
+
if (referer) {
|
|
2122
|
+
headers.Referer = referer;
|
|
2123
|
+
}
|
|
2124
|
+
const fetcher = createFetcher(url, headers);
|
|
2118
2125
|
const beaconFetcher = fetchBeacon();
|
|
2119
2126
|
const queryFragment = async (fragmentId) => {
|
|
2120
2127
|
var _a2;
|
|
@@ -2188,9 +2195,16 @@ const fetchPlugin = (state) => {
|
|
|
2188
2195
|
)
|
|
2189
2196
|
);
|
|
2190
2197
|
}
|
|
2198
|
+
const resultProps = [
|
|
2199
|
+
...area.projectProperties ?? [],
|
|
2200
|
+
...area.areaProperties ?? []
|
|
2201
|
+
].reduce((acc, prop) => {
|
|
2202
|
+
acc[prop._id] = prop.defaultValue;
|
|
2203
|
+
return acc;
|
|
2204
|
+
}, area.variant.fragment.props);
|
|
2191
2205
|
const entity = {
|
|
2192
2206
|
fragmentId: area.variant.fragment.fragment.id,
|
|
2193
|
-
props:
|
|
2207
|
+
props: resultProps
|
|
2194
2208
|
};
|
|
2195
2209
|
state.$fetch.cacheAreaDocuments.set(areaCode, entity);
|
|
2196
2210
|
});
|
|
@@ -2340,7 +2354,8 @@ function generateSmallerCssBlocks(layerResolver, group, cssMaker) {
|
|
|
2340
2354
|
(smallerLayer, index2, arr) => {
|
|
2341
2355
|
const smallerChildren = getAllChildren(layerResolver, smallerLayer);
|
|
2342
2356
|
const smallerCssBlocks = smallerChildren.map(cssMaker);
|
|
2343
|
-
const
|
|
2357
|
+
const primaryLayer = layerResolver(group.primary);
|
|
2358
|
+
const max = index2 === 0 ? (primaryLayer == null ? void 0 : primaryLayer.width) - 1 : arr[index2 - 1].width;
|
|
2344
2359
|
return `@container (max-width: ${max}px) {${smallerCssBlocks.map(buildCssBlock).join("")}}`;
|
|
2345
2360
|
}
|
|
2346
2361
|
);
|
|
@@ -2423,7 +2438,7 @@ const fragmentStylesheetPlugin = (state) => {
|
|
|
2423
2438
|
};
|
|
2424
2439
|
return state;
|
|
2425
2440
|
};
|
|
2426
|
-
const globalCss = '[data-key^="Fragment"] {\n [data-key^="Text"] {\n p {\n margin: 0;\n font-size: 14px;\n color: #000;\n font-weight: 400;\n }\n }\n\n /* 1. Use a more-intuitive box-sizing model */\n\n *, *::before, *::after {\n box-sizing: border-box;\n }\n\n /* 2. Remove default margin */\n\n * {\n margin: 0;\n }\n\n /* 3. Enable keyword animations */\n @media (prefers-reduced-motion: no-preference) {\n html {\n interpolate-size: allow-keywords;\n }\n }\n\n body {\n /* 4. Add accessible line-height */\n line-height: 1.5;\n /* 5. Improve text rendering */\n -webkit-font-smoothing: antialiased;\n }\n\n /* 6. Improve media defaults */\n\n img, picture, video, canvas, svg {\n display: block;\n max-width: 100%;\n }\n\n /* 7. Inherit fonts for form controls */\n\n input, button, textarea, select {\n font: inherit;\n }\n\n /* 8. Avoid text overflows */\n\n p, h1, h2, h3, h4, h5, h6 {\n overflow-wrap: break-word;\n }\n\n /*\n 10. Create a root stacking context\n */\n\n #root, #__next {\n isolation: isolate;\n }\n\n a {\n text-decoration: none;\n }\n}\n';
|
|
2441
|
+
const globalCss = '[data-key^="Fragment"] {\n [data-key^="Text"] {\n p {\n margin: 0;\n font-size: 14px;\n color: #000;\n font-weight: 400;\n }\n }\n\n ul, ol {\n padding: 0;\n }\n\n /* 1. Use a more-intuitive box-sizing model */\n\n *, *::before, *::after {\n box-sizing: border-box;\n }\n\n /* 2. Remove default margin */\n\n * {\n margin: 0;\n }\n\n /* 3. Enable keyword animations */\n @media (prefers-reduced-motion: no-preference) {\n html {\n interpolate-size: allow-keywords;\n }\n }\n\n body {\n /* 4. Add accessible line-height */\n line-height: 1.5;\n /* 5. Improve text rendering */\n -webkit-font-smoothing: antialiased;\n }\n\n /* 6. Improve media defaults */\n\n img, picture, video, canvas, svg {\n display: block;\n max-width: 100%;\n }\n\n /* 7. Inherit fonts for form controls */\n\n input, button, textarea, select {\n font: inherit;\n }\n\n /* 8. Avoid text overflows */\n\n p, h1, h2, h3, h4, h5, h6 {\n overflow-wrap: break-word;\n }\n\n /*\n 10. Create a root stacking context\n */\n\n #root, #__next {\n isolation: isolate;\n }\n\n a {\n text-decoration: none;\n }\n}\n';
|
|
2427
2442
|
const globalStylesheetPlugin = (state) => {
|
|
2428
2443
|
if (!("$fragments" in state)) {
|
|
2429
2444
|
throw new Error("GlobalStylesheetPlugin need $fragments plugin");
|
|
@@ -2699,7 +2714,6 @@ const loadPlugin = (state) => {
|
|
|
2699
2714
|
const loader = async () => {
|
|
2700
2715
|
var _a2;
|
|
2701
2716
|
const areaEntity = await ((_a2 = state == null ? void 0 : state.$fetch) == null ? void 0 : _a2.queryArea(areaCode));
|
|
2702
|
-
console.log(areaEntity);
|
|
2703
2717
|
await loadFragment(areaEntity == null ? void 0 : areaEntity.fragmentId, {
|
|
2704
2718
|
suspense: false
|
|
2705
2719
|
});
|
|
@@ -2740,8 +2754,9 @@ const createFragmentsClient = (options) => {
|
|
|
2740
2754
|
(state) => {
|
|
2741
2755
|
state.env = {
|
|
2742
2756
|
isSelf: (options == null ? void 0 : options.isSelf) ?? false,
|
|
2743
|
-
backendEndpoint: BACKEND_TARGET,
|
|
2744
|
-
apiToken: options == null ? void 0 : options.apiToken
|
|
2757
|
+
backendEndpoint: (options == null ? void 0 : options.backendEndpoint) ?? BACKEND_TARGET,
|
|
2758
|
+
apiToken: options == null ? void 0 : options.apiToken,
|
|
2759
|
+
referer: options == null ? void 0 : options.referer
|
|
2745
2760
|
};
|
|
2746
2761
|
},
|
|
2747
2762
|
fetchPlugin,
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.es.js
CHANGED
|
@@ -2085,6 +2085,8 @@ const getAreaListQuery = (areaCodes) => {
|
|
|
2085
2085
|
return {
|
|
2086
2086
|
query: `query($areaCodes: [String!]!) {
|
|
2087
2087
|
clientAreas(areaCodes: $areaCodes) {
|
|
2088
|
+
areaProperties
|
|
2089
|
+
projectProperties
|
|
2088
2090
|
variant {
|
|
2089
2091
|
fragment {
|
|
2090
2092
|
props
|
|
@@ -2106,13 +2108,18 @@ const getAreaListQuery = (areaCodes) => {
|
|
|
2106
2108
|
};
|
|
2107
2109
|
};
|
|
2108
2110
|
const fetchPlugin = (state) => {
|
|
2109
|
-
var _a, _b, _c;
|
|
2111
|
+
var _a, _b, _c, _d;
|
|
2110
2112
|
const isSelf = ((_a = state == null ? void 0 : state.env) == null ? void 0 : _a.isSelf) ?? false;
|
|
2111
2113
|
const url = (_b = state == null ? void 0 : state.env) == null ? void 0 : _b.backendEndpoint;
|
|
2112
2114
|
const apiToken = (_c = state == null ? void 0 : state.env) == null ? void 0 : _c.apiToken;
|
|
2113
|
-
const
|
|
2115
|
+
const referer = (_d = state == null ? void 0 : state.env) == null ? void 0 : _d.referer;
|
|
2116
|
+
let headers = {
|
|
2114
2117
|
Authorization: `Bearer ${apiToken}`
|
|
2115
|
-
}
|
|
2118
|
+
};
|
|
2119
|
+
if (referer) {
|
|
2120
|
+
headers.Referer = referer;
|
|
2121
|
+
}
|
|
2122
|
+
const fetcher = createFetcher(url, headers);
|
|
2116
2123
|
const beaconFetcher = fetchBeacon();
|
|
2117
2124
|
const queryFragment = async (fragmentId) => {
|
|
2118
2125
|
var _a2;
|
|
@@ -2186,9 +2193,16 @@ const fetchPlugin = (state) => {
|
|
|
2186
2193
|
)
|
|
2187
2194
|
);
|
|
2188
2195
|
}
|
|
2196
|
+
const resultProps = [
|
|
2197
|
+
...area.projectProperties ?? [],
|
|
2198
|
+
...area.areaProperties ?? []
|
|
2199
|
+
].reduce((acc, prop) => {
|
|
2200
|
+
acc[prop._id] = prop.defaultValue;
|
|
2201
|
+
return acc;
|
|
2202
|
+
}, area.variant.fragment.props);
|
|
2189
2203
|
const entity = {
|
|
2190
2204
|
fragmentId: area.variant.fragment.fragment.id,
|
|
2191
|
-
props:
|
|
2205
|
+
props: resultProps
|
|
2192
2206
|
};
|
|
2193
2207
|
state.$fetch.cacheAreaDocuments.set(areaCode, entity);
|
|
2194
2208
|
});
|
|
@@ -2338,7 +2352,8 @@ function generateSmallerCssBlocks(layerResolver, group, cssMaker) {
|
|
|
2338
2352
|
(smallerLayer, index2, arr) => {
|
|
2339
2353
|
const smallerChildren = getAllChildren(layerResolver, smallerLayer);
|
|
2340
2354
|
const smallerCssBlocks = smallerChildren.map(cssMaker);
|
|
2341
|
-
const
|
|
2355
|
+
const primaryLayer = layerResolver(group.primary);
|
|
2356
|
+
const max = index2 === 0 ? (primaryLayer == null ? void 0 : primaryLayer.width) - 1 : arr[index2 - 1].width;
|
|
2342
2357
|
return `@container (max-width: ${max}px) {${smallerCssBlocks.map(buildCssBlock).join("")}}`;
|
|
2343
2358
|
}
|
|
2344
2359
|
);
|
|
@@ -2421,7 +2436,7 @@ const fragmentStylesheetPlugin = (state) => {
|
|
|
2421
2436
|
};
|
|
2422
2437
|
return state;
|
|
2423
2438
|
};
|
|
2424
|
-
const globalCss = '[data-key^="Fragment"] {\n [data-key^="Text"] {\n p {\n margin: 0;\n font-size: 14px;\n color: #000;\n font-weight: 400;\n }\n }\n\n /* 1. Use a more-intuitive box-sizing model */\n\n *, *::before, *::after {\n box-sizing: border-box;\n }\n\n /* 2. Remove default margin */\n\n * {\n margin: 0;\n }\n\n /* 3. Enable keyword animations */\n @media (prefers-reduced-motion: no-preference) {\n html {\n interpolate-size: allow-keywords;\n }\n }\n\n body {\n /* 4. Add accessible line-height */\n line-height: 1.5;\n /* 5. Improve text rendering */\n -webkit-font-smoothing: antialiased;\n }\n\n /* 6. Improve media defaults */\n\n img, picture, video, canvas, svg {\n display: block;\n max-width: 100%;\n }\n\n /* 7. Inherit fonts for form controls */\n\n input, button, textarea, select {\n font: inherit;\n }\n\n /* 8. Avoid text overflows */\n\n p, h1, h2, h3, h4, h5, h6 {\n overflow-wrap: break-word;\n }\n\n /*\n 10. Create a root stacking context\n */\n\n #root, #__next {\n isolation: isolate;\n }\n\n a {\n text-decoration: none;\n }\n}\n';
|
|
2439
|
+
const globalCss = '[data-key^="Fragment"] {\n [data-key^="Text"] {\n p {\n margin: 0;\n font-size: 14px;\n color: #000;\n font-weight: 400;\n }\n }\n\n ul, ol {\n padding: 0;\n }\n\n /* 1. Use a more-intuitive box-sizing model */\n\n *, *::before, *::after {\n box-sizing: border-box;\n }\n\n /* 2. Remove default margin */\n\n * {\n margin: 0;\n }\n\n /* 3. Enable keyword animations */\n @media (prefers-reduced-motion: no-preference) {\n html {\n interpolate-size: allow-keywords;\n }\n }\n\n body {\n /* 4. Add accessible line-height */\n line-height: 1.5;\n /* 5. Improve text rendering */\n -webkit-font-smoothing: antialiased;\n }\n\n /* 6. Improve media defaults */\n\n img, picture, video, canvas, svg {\n display: block;\n max-width: 100%;\n }\n\n /* 7. Inherit fonts for form controls */\n\n input, button, textarea, select {\n font: inherit;\n }\n\n /* 8. Avoid text overflows */\n\n p, h1, h2, h3, h4, h5, h6 {\n overflow-wrap: break-word;\n }\n\n /*\n 10. Create a root stacking context\n */\n\n #root, #__next {\n isolation: isolate;\n }\n\n a {\n text-decoration: none;\n }\n}\n';
|
|
2425
2440
|
const globalStylesheetPlugin = (state) => {
|
|
2426
2441
|
if (!("$fragments" in state)) {
|
|
2427
2442
|
throw new Error("GlobalStylesheetPlugin need $fragments plugin");
|
|
@@ -2697,7 +2712,6 @@ const loadPlugin = (state) => {
|
|
|
2697
2712
|
const loader = async () => {
|
|
2698
2713
|
var _a2;
|
|
2699
2714
|
const areaEntity = await ((_a2 = state == null ? void 0 : state.$fetch) == null ? void 0 : _a2.queryArea(areaCode));
|
|
2700
|
-
console.log(areaEntity);
|
|
2701
2715
|
await loadFragment(areaEntity == null ? void 0 : areaEntity.fragmentId, {
|
|
2702
2716
|
suspense: false
|
|
2703
2717
|
});
|
|
@@ -2738,8 +2752,9 @@ const createFragmentsClient = (options) => {
|
|
|
2738
2752
|
(state) => {
|
|
2739
2753
|
state.env = {
|
|
2740
2754
|
isSelf: (options == null ? void 0 : options.isSelf) ?? false,
|
|
2741
|
-
backendEndpoint: BACKEND_TARGET,
|
|
2742
|
-
apiToken: options == null ? void 0 : options.apiToken
|
|
2755
|
+
backendEndpoint: (options == null ? void 0 : options.backendEndpoint) ?? BACKEND_TARGET,
|
|
2756
|
+
apiToken: options == null ? void 0 : options.apiToken,
|
|
2757
|
+
referer: options == null ? void 0 : options.referer
|
|
2743
2758
|
};
|
|
2744
2759
|
},
|
|
2745
2760
|
fetchPlugin,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beacon.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/beacon.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,YAAa,MAAM;wBAMd,OAAO;CAWnC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const getEmptyFragment: (fragmentId: string) => {
|
|
2
|
+
[x: string]: {
|
|
3
|
+
_type: string;
|
|
4
|
+
_id: string;
|
|
5
|
+
children: string[];
|
|
6
|
+
layoutSizingHorizontal: string;
|
|
7
|
+
layoutSizingVertical: string;
|
|
8
|
+
horizontalGrow: string;
|
|
9
|
+
verticalGrow: string;
|
|
10
|
+
renderMode: string;
|
|
11
|
+
opacity: number;
|
|
12
|
+
visible: boolean;
|
|
13
|
+
overflow: string;
|
|
14
|
+
overrides: never[];
|
|
15
|
+
properties: string[];
|
|
16
|
+
parent?: undefined;
|
|
17
|
+
width?: undefined;
|
|
18
|
+
height?: undefined;
|
|
19
|
+
fillType?: undefined;
|
|
20
|
+
positionType?: undefined;
|
|
21
|
+
solidFill?: undefined;
|
|
22
|
+
name?: undefined;
|
|
23
|
+
isPrimary?: undefined;
|
|
24
|
+
threshold?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
_type: string;
|
|
27
|
+
_id: string;
|
|
28
|
+
opacity: number;
|
|
29
|
+
parent: string;
|
|
30
|
+
visible: boolean;
|
|
31
|
+
overflow: string;
|
|
32
|
+
children: never[];
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
layoutSizingHorizontal: string;
|
|
36
|
+
layoutSizingVertical: string;
|
|
37
|
+
fillType: string;
|
|
38
|
+
positionType: string;
|
|
39
|
+
solidFill: string;
|
|
40
|
+
name: string;
|
|
41
|
+
isPrimary: boolean;
|
|
42
|
+
threshold: number;
|
|
43
|
+
horizontalGrow?: undefined;
|
|
44
|
+
verticalGrow?: undefined;
|
|
45
|
+
renderMode?: undefined;
|
|
46
|
+
overrides?: undefined;
|
|
47
|
+
properties?: undefined;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=emptyFragment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emptyFragment.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/emptyFragment.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,eAAgB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuClD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const createFetcher: (baseUrl: string, defaultHeaders?: HeadersInit) => {
|
|
2
|
+
query: <T>(query: string, variables?: Record<string, unknown>, options?: RequestInit) => Promise<{
|
|
3
|
+
data: T;
|
|
4
|
+
}>;
|
|
5
|
+
invalidate: (endpoint: string, options?: RequestInit) => void;
|
|
6
|
+
clearCache: () => void;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=fetcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetcher.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/fetcher.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,aAAa,YACf,MAAM,mBACC,WAAW;YAWN,CAAC,SACb,MAAM,cACF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YACzB,WAAW,KACnB,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC;2BAwCO,MAAM,YAAY,WAAW;;CAO5D,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Plugin } from '@graph-state/core';
|
|
2
|
+
import { createFetcher } from './fetcher';
|
|
3
|
+
import { fetchBeacon } from './beacon';
|
|
4
|
+
interface AreaCacheEntity {
|
|
5
|
+
fragmentId: number;
|
|
6
|
+
props: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
declare module "@graph-state/core" {
|
|
9
|
+
interface GraphState {
|
|
10
|
+
$fetch: {
|
|
11
|
+
/**
|
|
12
|
+
* Хранятся документы от фрагментов
|
|
13
|
+
*/
|
|
14
|
+
cacheDocuments: Map<number, string>;
|
|
15
|
+
cacheAreaDocuments: Map<string, AreaCacheEntity>;
|
|
16
|
+
readFragment: (fragmentId: number) => string | null;
|
|
17
|
+
readArea: (areaCode: string) => AreaCacheEntity | null;
|
|
18
|
+
queryFragment: (fragmentId: number) => unknown;
|
|
19
|
+
queryArea: (areaCode: string) => AreaCacheEntity;
|
|
20
|
+
queryAreaList: (areaCodes: string[]) => AreaCacheEntity[];
|
|
21
|
+
query: ReturnType<typeof createFetcher>["query"];
|
|
22
|
+
sendBeacon: ReturnType<typeof fetchBeacon>["sendBeacon"];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export declare const fetchPlugin: Plugin;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAgBrD,UAAU,eAAe;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,UAAU;QAClB,MAAM,EAAE;YACN;;eAEG;YACH,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACpC,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;YACjD,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;YACpD,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,eAAe,GAAG,IAAI,CAAC;YACvD,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;YAC/C,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,eAAe,CAAC;YACjD,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,eAAe,EAAE,CAAC;YAC1D,KAAK,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC;YACjD,UAAU,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,YAAY,CAAC,CAAC;SAC1D,CAAC;KACH;CACF;AAED,eAAO,MAAM,WAAW,EAAE,MA8IzB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface AreaListQueryReturn {
|
|
2
|
+
clientAreas: {
|
|
3
|
+
areaProperties: unknown[];
|
|
4
|
+
projectProperties: unknown[];
|
|
5
|
+
variant: {
|
|
6
|
+
fragment: {
|
|
7
|
+
props: Record<string, unknown>;
|
|
8
|
+
fragment: {
|
|
9
|
+
id: number;
|
|
10
|
+
document: string;
|
|
11
|
+
linkedFragments: {
|
|
12
|
+
id: number;
|
|
13
|
+
document: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
export declare const getAreaListQuery: (areaCodes: string) => {
|
|
21
|
+
query: string;
|
|
22
|
+
variables: {
|
|
23
|
+
areaCodes: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=AreaListQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaListQuery.d.ts","sourceRoot":"","sources":["../../../../src/plugins/fetch/queries/AreaListQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE;QACX,cAAc,EAAE,OAAO,EAAE,CAAC;QAC1B,iBAAiB,EAAE,OAAO,EAAE,CAAC;QAC7B,OAAO,EAAE;YACP,QAAQ,EAAE;gBACR,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAC/B,QAAQ,EAAE;oBACR,EAAE,EAAE,MAAM,CAAC;oBACX,QAAQ,EAAE,MAAM,CAAC;oBACjB,eAAe,EAAE;wBACf,EAAE,EAAE,MAAM,CAAC;wBACX,QAAQ,EAAE,MAAM,CAAC;qBAClB,CAAC;iBACH,CAAC;aACH,CAAC;SACH,CAAC;KACH,EAAE,CAAC;CACL;AAED,eAAO,MAAM,gBAAgB,cAAe,MAAM;;;;;CAyBjD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface AreaQueryReturn {
|
|
2
|
+
clientArea: {
|
|
3
|
+
variant: {
|
|
4
|
+
fragment: {
|
|
5
|
+
props: Record<string, unknown>;
|
|
6
|
+
fragment: {
|
|
7
|
+
id: number;
|
|
8
|
+
document: string;
|
|
9
|
+
linkedFragments: {
|
|
10
|
+
id: number;
|
|
11
|
+
document: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export declare const getAreaQuery: (areaCode: string) => {
|
|
19
|
+
query: string;
|
|
20
|
+
variables: {
|
|
21
|
+
areaCode: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=AreaQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaQuery.d.ts","sourceRoot":"","sources":["../../../../src/plugins/fetch/queries/AreaQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE;QACV,OAAO,EAAE;YACP,QAAQ,EAAE;gBACR,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAC/B,QAAQ,EAAE;oBACR,EAAE,EAAE,MAAM,CAAC;oBACX,QAAQ,EAAE,MAAM,CAAC;oBACjB,eAAe,EAAE;wBACf,EAAE,EAAE,MAAM,CAAC;wBACX,QAAQ,EAAE,MAAM,CAAC;qBAClB,CAAC;iBACH,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,YAAY,aAAc,MAAM;;;;;CAuB5C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface QueryReturnSelf {
|
|
2
|
+
fragment: {
|
|
3
|
+
id: number;
|
|
4
|
+
document: string;
|
|
5
|
+
linkedFragments: {
|
|
6
|
+
id: number;
|
|
7
|
+
document: string;
|
|
8
|
+
};
|
|
9
|
+
}[];
|
|
10
|
+
}
|
|
11
|
+
export interface QueryReturnNotSelf {
|
|
12
|
+
clientFragment: {
|
|
13
|
+
id: number;
|
|
14
|
+
document: string;
|
|
15
|
+
linkedFragments: {
|
|
16
|
+
id: number;
|
|
17
|
+
document: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare const getFragmentQuery: <TIsSelf extends boolean>(fragmentId: number, isSelf?: TIsSelf) => {
|
|
22
|
+
query: string;
|
|
23
|
+
variables: {
|
|
24
|
+
fragmentId: number;
|
|
25
|
+
};
|
|
26
|
+
_type: TIsSelf extends true ? QueryReturnSelf : QueryReturnNotSelf;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=FragmentQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FragmentQuery.d.ts","sourceRoot":"","sources":["../../../../src/plugins/fetch/queries/FragmentQuery.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE;QACR,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,eAAe,EAAE;YACf,EAAE,EAAE,MAAM,CAAC;YACX,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,EAAE,CAAC;CACL;AAED,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE;QACd,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,eAAe,EAAE;YACf,EAAE,EAAE,MAAM,CAAC;YACX,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,SAAS,OAAO,cAC1C,MAAM,WACT,OAAO;;;;;WA8BQ,OAAO,SAAS,IAAI,GACtC,eAAe,GACf,kBAAkB;CAEzB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LinkKey, Plugin } from '@graph-state/core';
|
|
2
|
+
declare module "@graph-state/core" {
|
|
3
|
+
interface GraphState {
|
|
4
|
+
$fragments: {
|
|
5
|
+
key: LinkKey;
|
|
6
|
+
createFragmentManager: (fragmentId: number, initialDocument?: unknown) => void;
|
|
7
|
+
getManager: (fragmentId: number) => GraphState;
|
|
8
|
+
getManagers: () => Record<number, GraphState>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
interface FragmentsPluginOptions {
|
|
13
|
+
plugins?: Plugin[];
|
|
14
|
+
}
|
|
15
|
+
export declare const fragmentsPlugin: (options: FragmentsPluginOptions) => Plugin;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/fragments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAejE,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,UAAU;QAClB,UAAU,EAAE;YACV,GAAG,EAAE,OAAO,CAAC;YACb,qBAAqB,EAAE,CACrB,UAAU,EAAE,MAAM,EAClB,eAAe,CAAC,EAAE,OAAO,KACtB,IAAI,CAAC;YACV,UAAU,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,UAAU,CAAC;YAC/C,WAAW,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;SAC/C,CAAC;KACH;CACF;AAED,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,YAChB,sBAAsB,KAAG,MAmGlC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LinkKey, Plugin } from '@graph-state/core';
|
|
2
|
+
interface LifeCycleGraph {
|
|
3
|
+
_type: "LifeCycle";
|
|
4
|
+
status: "init" | "release" | null;
|
|
5
|
+
}
|
|
6
|
+
declare module "@graph-state/core" {
|
|
7
|
+
interface GraphState {
|
|
8
|
+
$lifeCycle: {
|
|
9
|
+
key: LinkKey;
|
|
10
|
+
on: (callback: (graph: LifeCycleGraph) => void) => ReturnType<GraphState["subscribe"]>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export declare const globalManagerLifeCyclePlugin: Plugin;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=globalManagerLifeCycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalManagerLifeCycle.d.ts","sourceRoot":"","sources":["../../../src/plugins/lifecycle/globalManagerLifeCycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEpD,UAAU,cAAc;IACtB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACnC;AAED,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,UAAU;QAClB,UAAU,EAAE;YACV,GAAG,EAAE,OAAO,CAAC;YACb,EAAE,EAAE,CACF,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,KACtC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;SAC1C,CAAC;KACH;CACF;AAED,eAAO,MAAM,4BAA4B,EAAE,MAe1C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Plugin } from '@graph-state/core';
|
|
2
|
+
declare module "@graph-state/core" {
|
|
3
|
+
interface GraphState {
|
|
4
|
+
$load: {
|
|
5
|
+
loadFragment: (fragmentID: number, options?: LoadPluginOptions) => GraphState;
|
|
6
|
+
loadArea: (areaCode: string, options?: LoadPluginOptions) => {
|
|
7
|
+
fragmentId: number;
|
|
8
|
+
props: unknown;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
interface LoadPluginOptions {
|
|
14
|
+
suspense?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const loadPlugin: Plugin;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/load/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,UAAU;QAClB,KAAK,EAAE;YACL,YAAY,EAAE,CACZ,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,iBAAiB,KACxB,UAAU,CAAC;YAChB,QAAQ,EAAE,CACR,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,iBAAiB,KACxB;gBACH,UAAU,EAAE,MAAM,CAAC;gBACnB,KAAK,EAAE,OAAO,CAAC;aAChB,CAAC;SACH,CAAC;KACH;CACF;AAED,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,EAAE,MAkGxB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Plugin } from '@graph-state/core';
|
|
2
|
+
declare module "@graph-state/core" {
|
|
3
|
+
interface GraphState {
|
|
4
|
+
$metrics: {
|
|
5
|
+
reachGoal: (goal: string) => void;
|
|
6
|
+
trackAdPixel: (pixelUrl: string) => void;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare const globalMetricsPlugin: Plugin;
|
|
11
|
+
//# sourceMappingURL=globalMetrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalMetrics.d.ts","sourceRoot":"","sources":["../../../src/plugins/metrics/globalMetrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAK3C,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,UAAU;QAClB,QAAQ,EAAE;YACR,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;YAClC,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;SAC1C,CAAC;KACH;CACF;AAQD,eAAO,MAAM,mBAAmB,EAAE,MAkBjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/metrics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAW3C,eAAO,MAAM,aAAa,EAAE,MA4B3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addClientMetric.d.ts","sourceRoot":"","sources":["../../../../src/plugins/metrics/queries/addClientMetric.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,iJAE1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackAdPixel.d.ts","sourceRoot":"","sources":["../../../src/plugins/metrics/trackAdPixel.ts"],"names":[],"mappings":"AAEA,KAAK,YAAY,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC;AAyDpD,eAAO,MAAM,YAAY,aACb,MAAM,iBACD,YAAY,SAgC5B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Plugin } from '@graph-state/core';
|
|
2
|
+
declare module "@graph-state/core" {
|
|
3
|
+
interface GraphState {
|
|
4
|
+
$ssr: {
|
|
5
|
+
extractData: () => unknown;
|
|
6
|
+
restoreData: (input: unknown) => void;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare const scopesPlugin: Plugin;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/scopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,UAAU;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,MAAM,OAAO,CAAC;YAC3B,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;SACvC,CAAC;KACH;CACF;AAED,eAAO,MAAM,YAAY,EAAE,MAa1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Plugin } from '@graph-state/core';
|
|
2
|
+
declare module "@graph-state/core" {
|
|
3
|
+
interface GraphState {
|
|
4
|
+
$ssr: {
|
|
5
|
+
extractData: () => unknown;
|
|
6
|
+
restoreData: (input: unknown) => void;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare const ssrPlugin: Plugin;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/ssr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,QAAQ,mBAAmB,CAAC;IACjC,UAAU,UAAU;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,MAAM,OAAO,CAAC;YAC3B,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;SACvC,CAAC;KACH;CACF;AAED,eAAO,MAAM,SAAS,EAAE,MAmDvB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GraphState, Plugin } from '@graph-state/core';
|
|
2
|
+
import { CSSRules } from '../utils/compareRules';
|
|
3
|
+
/**
|
|
4
|
+
* Тип для кэша стилей слоя
|
|
5
|
+
*/
|
|
6
|
+
export type LayerStyles = Record<string, CSSRules>;
|
|
7
|
+
export type LayerResolver = GraphState["resolve"];
|
|
8
|
+
export declare const fragmentStylesheetPlugin: Plugin;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/styleSheet/fragment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAQ/E,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAmHlD,eAAO,MAAM,wBAAwB,EAAE,MA2DtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/styleSheet/global/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAmChE,eAAO,MAAM,sBAAsB,EAAE,MAgDpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/styleSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Graph, GraphState, LinkKey } from '@graph-state/core';
|
|
2
|
+
export interface AutoInjectorControls {
|
|
3
|
+
mount: () => void;
|
|
4
|
+
unmount: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const autoInjector: (key: string, state: GraphState, graphKey: LinkKey, transformStyles?: (graph: Graph) => string[]) => AutoInjectorControls;
|
|
7
|
+
//# sourceMappingURL=autoInjector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoInjector.d.ts","sourceRoot":"","sources":["../../../../src/plugins/styleSheet/utils/autoInjector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG/D,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,QAClB,MAAM,SACJ,UAAU,YACP,OAAO,oBACC,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,EAAE,KAC3C,oBA+DF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildCssBlock.d.ts","sourceRoot":"","sources":["../../../../src/plugins/styleSheet/utils/buildCssBlock.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAErD,eAAO,MAAM,aAAa,UAAW,QAAQ,GAAG,SAAS,KAAG,MAI3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareRules.d.ts","sourceRoot":"","sources":["../../../../src/plugins/styleSheet/utils/compareRules.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAEvD,wBAAgB,YAAY,CAC1B,IAAI,GAAE,QAAa,EACnB,IAAI,GAAE,QAAa,GAClB,QAAQ,CAWV"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LinkKey } from '@graph-state/core';
|
|
2
|
+
import { LayerResolver, LayerStyles } from '../fragment';
|
|
3
|
+
export interface FragmentGroup {
|
|
4
|
+
fragmentLayerKey: LinkKey;
|
|
5
|
+
fragment: any;
|
|
6
|
+
primary: any;
|
|
7
|
+
smaller: any[];
|
|
8
|
+
larger: any[];
|
|
9
|
+
}
|
|
10
|
+
export declare const findGroups: (styles: LayerStyles, layerResolver: LayerResolver) => FragmentGroup[];
|
|
11
|
+
//# sourceMappingURL=findGroups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findGroups.d.ts","sourceRoot":"","sources":["../../../../src/plugins/styleSheet/utils/findGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,WAAW,aAAa;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,GAAG,CAAC;IACd,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAED,eAAO,MAAM,UAAU,WACb,WAAW,iBACJ,aAAa,KAC3B,aAAa,EAmCf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAllChildren.d.ts","sourceRoot":"","sources":["../../../../src/plugins/styleSheet/utils/getAllChildren.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,OAAO,EAAe,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AAEzD,eAAO,MAAM,cAAc,kBACV,aAAa,YAClB,OAAO,QACZ,MAAM,EAAE,KACZ,MAAM,EAeR,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LinkKey } from '@graph-state/core';
|
|
2
|
+
import { CSSBlock } from './buildCssBlock';
|
|
3
|
+
import { LayerResolver, LayerStyles } from '../fragment';
|
|
4
|
+
export declare const makeCss: (styles: LayerStyles, layerResolver: LayerResolver) => (layerKey: LinkKey) => CSSBlock;
|
|
5
|
+
//# sourceMappingURL=makeCss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeCss.d.ts","sourceRoot":"","sources":["../../../../src/plugins/styleSheet/utils/makeCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEzD,eAAO,MAAM,OAAO,WACT,WAAW,iBAAiB,aAAa,gBACvC,OAAO,KAAG,QAoBpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toCSS.d.ts","sourceRoot":"","sources":["../../../../src/plugins/styleSheet/utils/toCSS.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAO,MAAM,KAAK,WAAY,QAAQ,KAAG,MAU1B,CAAC"}
|