@fragmentsx/client-core 0.0.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/fragmentsClient.d.ts +7 -0
- package/dist/fragmentsClient.d.ts.map +1 -0
- package/dist/index.cjs.js +1862 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +1862 -0
- 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 +6 -0
- package/dist/plugins/fetch/fetcher.d.ts.map +1 -0
- package/dist/plugins/fetch/index.d.ts +3 -0
- package/dist/plugins/fetch/index.d.ts.map +1 -0
- package/dist/plugins/fetch/queries/FragmentQuery.d.ts +2 -0
- package/dist/plugins/fetch/queries/FragmentQuery.d.ts.map +1 -0
- package/dist/plugins/fetch/queries/LandingQuery.d.ts +2 -0
- package/dist/plugins/fetch/queries/LandingQuery.d.ts.map +1 -0
- package/dist/plugins/fragments/index.d.ts +3 -0
- package/dist/plugins/fragments/index.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/styleSheet/buildCssBlock.d.ts +2 -0
- package/dist/plugins/styleSheet/buildCssBlock.d.ts.map +1 -0
- package/dist/plugins/styleSheet/compareRules.d.ts +4 -0
- package/dist/plugins/styleSheet/compareRules.d.ts.map +1 -0
- package/dist/plugins/styleSheet/findGroups.d.ts +8 -0
- package/dist/plugins/styleSheet/findGroups.d.ts.map +1 -0
- package/dist/plugins/styleSheet/getAllChildren.d.ts +3 -0
- package/dist/plugins/styleSheet/getAllChildren.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/makeCss.d.ts +6 -0
- package/dist/plugins/styleSheet/makeCss.d.ts.map +1 -0
- package/dist/plugins/styleSheet/toCSS.d.ts +2 -0
- package/dist/plugins/styleSheet/toCSS.d.ts.map +1 -0
- package/package.json +38 -0
|
@@ -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,6 @@
|
|
|
1
|
+
export declare const createFetcher: (baseUrl: string, defaultHeaders?: HeadersInit) => {
|
|
2
|
+
query: <T>(query: string, variables?: Record<string, unknown>, options?: RequestInit) => Promise<T>;
|
|
3
|
+
invalidate: (endpoint: string, options?: RequestInit) => void;
|
|
4
|
+
clearCache: () => void;
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=fetcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetcher.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch/fetcher.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,YACf,MAAM,mBACC,WAAW;YAWN,CAAC,SACb,MAAM,cACF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YACzB,WAAW,KACnB,OAAO,CAAC,CAAC,CAAC;2BAuCiB,MAAM,YAAY,WAAW;;CAO5D,CAAC"}
|
|
@@ -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;AAW3C,eAAO,MAAM,WAAW,EAAE,MAqEzB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const getFragmentQuery: (isSelf?: boolean) => "\nquery FragmentDocument($fragmentSlug: Int!) {\n fragment(fragmentIds: [$fragmentSlug]) {\n id\n document\n linkedFragments {\n id\n document\n }\n }\n}\n" | "\nquery FragmentDocument($fragmentSlug: Int!) {\n clientFragment(fragmentId: $fragmentSlug) {\n id\n document\n linkedFragments {\n id\n document\n }\n }\n}\n";
|
|
2
|
+
//# 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,eAAO,MAAM,gBAAgB,YAAa,OAAO,qbAyBhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LandingQuery.d.ts","sourceRoot":"","sources":["../../../../src/plugins/fetch/queries/LandingQuery.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cAkB3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/fragments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAMxD,eAAO,MAAM,eAAe,EAAE,MAuE7B,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;AAU3C,eAAO,MAAM,aAAa,EAAE,MAkC3B,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":"buildCssBlock.d.ts","sourceRoot":"","sources":["../../../src/plugins/styleSheet/buildCssBlock.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,wBAIzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareRules.d.ts","sourceRoot":"","sources":["../../../src/plugins/styleSheet/compareRules.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAEhD,wBAAgB,YAAY,CAC1B,IAAI,GAAE,QAAa,EACnB,IAAI,GAAE,QAAa,GAClB,QAAQ,CAWV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findGroups.d.ts","sourceRoot":"","sources":["../../../src/plugins/styleSheet/findGroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAW,MAAM,mBAAmB,CAAC;AAGxD,eAAO,MAAM,UAAU,UAAW,UAAU;;;;;GAoC3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAllChildren.d.ts","sourceRoot":"","sources":["../../../src/plugins/styleSheet/getAllChildren.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,eAAO,MAAM,cAAc,sBAAkB,MAAM,QAAO,MAAM,EAAE,aAejE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/styleSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAMpD,eAAO,MAAM,gBAAgB,EAAE,MAkE9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeCss.d.ts","sourceRoot":"","sources":["../../../src/plugins/styleSheet/makeCss.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKvD,eAAO,MAAM,OAAO,UAAW,UAAU,cAAc,MAAM;;;CAmB5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toCSS.d.ts","sourceRoot":"","sources":["../../../src/plugins/styleSheet/toCSS.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,WAAY,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,WAOrC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fragmentsx/client-core",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.es.js",
|
|
14
|
+
"require": "./dist/index.cjs.js",
|
|
15
|
+
"source": "./src/index.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@graph-state/checkers": "^0.1.2",
|
|
20
|
+
"@graph-state/core": "^0.11.4",
|
|
21
|
+
"@fragmentsx/definition": "0.0.3",
|
|
22
|
+
"@fragmentsx/utils": "0.0.11"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@graph-state/plugin-logger": "^0.3.0",
|
|
26
|
+
"typescript": "^5.5.4",
|
|
27
|
+
"vite": "^6.1.0",
|
|
28
|
+
"vite-plugin-dts": "^4.5.0",
|
|
29
|
+
"vitest": "^3.1.1"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"clear": "rm -r -f ./dist",
|
|
33
|
+
"build": "vite build",
|
|
34
|
+
"dev": "vite build -w",
|
|
35
|
+
"test": "vitest --run --config ./vitest.config.ts",
|
|
36
|
+
"lint": "eslint . --ext .ts,.tsx --fix"
|
|
37
|
+
}
|
|
38
|
+
}
|