@fragno-dev/github-app-fragment 0.0.1 → 0.0.3
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/browser/client/react.d.ts +1 -1
- package/dist/browser/client/react.d.ts.map +1 -1
- package/dist/browser/client/react.js +32 -22
- package/dist/browser/client/react.js.map +1 -1
- package/dist/browser/client/solid.d.ts +1 -1
- package/dist/browser/client/solid.d.ts.map +1 -1
- package/dist/browser/client/solid.js +2 -2
- package/dist/browser/client/solid.js.map +1 -1
- package/dist/browser/client/svelte.d.ts +1 -1
- package/dist/browser/client/svelte.d.ts.map +1 -1
- package/dist/browser/client/svelte.js +1 -1
- package/dist/browser/client/vanilla.d.ts +1 -1
- package/dist/browser/client/vanilla.js +1 -1
- package/dist/browser/client/vue.d.ts +1 -1
- package/dist/browser/client/vue.d.ts.map +1 -1
- package/dist/browser/client/vue.js +1 -1
- package/dist/browser/{factory-BIj4C6PD.js → factory-DRMq0TUa.js} +29 -12
- package/dist/browser/factory-DRMq0TUa.js.map +1 -0
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/{types-BzeSSOQU.d.ts → types-B3_U7vnu.d.ts} +54 -50
- package/dist/browser/types-B3_U7vnu.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -9
- package/dist/browser/factory-BIj4C6PD.js.map +0 -1
- package/dist/browser/types-BzeSSOQU.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as ReadableAtom, d as InferOr, f as ExtractPathParamsOrWiden, h as QueryParamsHint, l as FragnoClientError, n as GitHubAppFragmentPublicClientConfig, o as NonGetHTTPMethod, p as HasPathParams } from "../types-B3_U7vnu.js";
|
|
2
2
|
import * as zod from "zod";
|
|
3
3
|
import "react";
|
|
4
4
|
import * as _standard_schema_spec0 from "@standard-schema/spec";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","names":["ExtractPathParamsOrWiden","HasPathParams","MaybeExtractPathParamsOrWiden","QueryParamsHint","InferOr","
|
|
1
|
+
{"version":3,"file":"react.d.ts","names":["ExtractPathParamsOrWiden","HasPathParams","MaybeExtractPathParamsOrWiden","QueryParamsHint","InferOr","FragnoClientError","FragnoClientHookData","FragnoClientMutatorData","FragnoStoreFactoryData","FragnoStoreObjectData","NonGetHTTPMethod","ReadableAtom","Store","StoreValue","FetcherValue","react0","DependencyList","StandardSchemaV1","FragnoReactHook","_TMethod","TPath$1","TOutputSchema$1","TErrorCode$1","TQueryParameters$1","InferOutput","NonNullable","path","query","args","FragnoReactMutator","TInputSchema","body","Promise","mutate","loading","error","data","FragnoReactStoreValue","T","TStore","K","FragnoReactStore","TArgs","useFragno","Record","TPath","TOutputSchema","TErrorCode","TQueryParameters","TMethod","TInput","TOutput","TError","TStoreObj","TStoreArgs","clientObj","StoreKeys","setKey","k","v","UseStoreOptions","SomeStore","deps","keys","useStore","store","options","FragnoHydrator","children","React","ReactNode"],"sources":["../../../../fragno/dist/client/react.d.ts","../../../src/client/react.ts"],"mappings":";;;;;;;;KAgBK6B,kBAAAA,kBAAoCnB,gBAAAA,+CAA+DO,gBAAAA,sCAAsDA,gBAAAA;EAC5JgB,MAAAA;IACEF,IAAAA;IACAL,IAAAA;IACAC;EAAAA;IAEAI,IAAAA,GAAO3B,OAAAA,CAAQ0B,YAAAA;IACfJ,IAAAA,GAAOzB,aAAAA,CAAcmB,OAAAA,iBAAwBpB,wBAAAA,CAAyBoB,OAAAA,WAAkBT,YAAAA;IACxFgB,KAAAA,GAAQxB,eAAAA,CAAgBoB,kBAAAA,WAA6BZ,YAAAA;EAAAA,MACjDqB,OAAAA,CAAQ5B,OAAAA,CAAQiB,eAAAA;EACtBa,OAAAA;EACAC,KAAAA,GAAQ9B,iBAAAA,CAAkBoB,WAAAA,CAAYH,YAAAA;EACtCc,IAAAA,GAAOhC,OAAAA,CAAQiB,eAAAA;AAAAA;;;;;;iBCvBD,6BAAA,CAA8B,MAAA,GAAQ,mCAAA;0CAAwC,gBAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c as isMutatorHook, d as isReadableAtom, i as createGitHubAppFragmentClients, l as isStore, s as isGetHook } from "../factory-
|
|
1
|
+
import { c as isMutatorHook, d as isReadableAtom, i as createGitHubAppFragmentClients, l as isStore, s as isGetHook } from "../factory-DRMq0TUa.js";
|
|
2
2
|
import "../index.js";
|
|
3
3
|
import { useCallback, useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
5
|
+
//#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/listen-keys/index.js
|
|
6
6
|
function listenKeys($store, keys, listener) {
|
|
7
7
|
let keysSet = new Set(keys).add(void 0);
|
|
8
8
|
return $store.listen((value, oldValue, changed) => {
|
|
@@ -52,21 +52,33 @@ const getStoreDisposer = (value) => {
|
|
|
52
52
|
const disposer = value[Symbol.dispose];
|
|
53
53
|
return typeof disposer === "function" ? disposer.bind(value) : void 0;
|
|
54
54
|
};
|
|
55
|
+
const createReactStoreObjectView = (value, getAtomValue) => {
|
|
56
|
+
const atomValues = /* @__PURE__ */ new Map();
|
|
57
|
+
const boundMethods = /* @__PURE__ */ new Map();
|
|
58
|
+
return new Proxy(value, { get(target, property, _receiver) {
|
|
59
|
+
const propertyValue = Reflect.get(target, property, target);
|
|
60
|
+
if (isReadableAtom(propertyValue)) {
|
|
61
|
+
if (atomValues.has(propertyValue)) return atomValues.get(propertyValue);
|
|
62
|
+
const atomValue = getAtomValue(propertyValue);
|
|
63
|
+
atomValues.set(propertyValue, atomValue);
|
|
64
|
+
return atomValue;
|
|
65
|
+
}
|
|
66
|
+
if (typeof propertyValue === "function") {
|
|
67
|
+
if (boundMethods.has(property)) return boundMethods.get(property);
|
|
68
|
+
const boundMethod = propertyValue.bind(target);
|
|
69
|
+
boundMethods.set(property, boundMethod);
|
|
70
|
+
return boundMethod;
|
|
71
|
+
}
|
|
72
|
+
return propertyValue;
|
|
73
|
+
} });
|
|
74
|
+
};
|
|
55
75
|
function unwrapReactStoreValueOnServer(value) {
|
|
56
76
|
if (isReadableAtom(value)) return value.get();
|
|
57
|
-
|
|
58
|
-
for (const key in value) {
|
|
59
|
-
if (!Object.prototype.hasOwnProperty.call(value, key)) continue;
|
|
60
|
-
const fieldValue = value[key];
|
|
61
|
-
if (isReadableAtom(fieldValue)) result[key] = fieldValue.get();
|
|
62
|
-
else result[key] = fieldValue;
|
|
63
|
-
}
|
|
64
|
-
return result;
|
|
77
|
+
return createReactStoreObjectView(value, (store) => store.get());
|
|
65
78
|
}
|
|
66
79
|
function unwrapReactStoreValue(value) {
|
|
67
80
|
if (isReadableAtom(value)) return useStore(value);
|
|
68
|
-
const
|
|
69
|
-
const atomEntries = keys.flatMap((key) => {
|
|
81
|
+
const atomEntries = Object.keys(value).flatMap((key) => {
|
|
70
82
|
const fieldValue = value[key];
|
|
71
83
|
return isReadableAtom(fieldValue) ? [[key, fieldValue]] : [];
|
|
72
84
|
});
|
|
@@ -84,16 +96,14 @@ function unwrapReactStoreValue(value) {
|
|
|
84
96
|
for (const unsubscribe of unsubscribes) unsubscribe();
|
|
85
97
|
};
|
|
86
98
|
}, getSnapshot, getSnapshot);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
return result;
|
|
99
|
+
return useMemo(() => createReactStoreObjectView(value, (store) => {
|
|
100
|
+
const atomIndex = atomEntries.findIndex(([, entryStore]) => entryStore === store);
|
|
101
|
+
return atomIndex === -1 ? store.get() : atomValues[atomIndex];
|
|
102
|
+
}), [
|
|
103
|
+
value,
|
|
104
|
+
atomEntries,
|
|
105
|
+
atomValues
|
|
106
|
+
]);
|
|
97
107
|
}
|
|
98
108
|
function createReactStore(hook) {
|
|
99
109
|
return (...args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","names":["listenKeys","$store","keys","listener","keysSet","Set","add","undefined","listen","value","oldValue","changed","has","subscribeKeys","unbind","isReadableAtom","hydrateFromWindow","isGetHook","isMutatorHook","isStore","listenKeys","useCallback","useEffect","useMemo","useRef","useSyncExternalStore","createReactHook","hook","path","query","pathParamValues","Object","values","queryParamValues","store","window","get","useStore","createReactMutator","mutatorStore","isPlainObject","value","prototype","getPrototypeOf","areStoreFactoryValuesEqual","left","right","is","Array","isArray","length","every","index","Date","getTime","leftKeys","keys","sort","rightKeys","key","areStoreFactoryArgsEqual","getStoreDisposer","disposer","Symbol","dispose","bind","unwrapReactStoreValueOnServer","result","hasOwnProperty","call","fieldValue","unwrapReactStoreValue","atomEntries","flatMap","snapshotRef","map","getSnapshot","nextSnapshot","previousSnapshot","current","entry","atomValues","onStoreChange","unsubscribes","listen","unsubscribe","atomIndex","createReactStore","args","stableArgsRef","pendingDisposalsRef","Map","factory","obj","pendingTimeout","clearTimeout","delete","timeoutId","setTimeout","set","useFragno","clientObj","options","deps","subscribe","onChange","emitChange","FragnoHydrator","children","useFragno","createGitHubAppFragmentClients","GitHubAppFragmentPublicClientConfig","createGitHubAppFragmentClient","config"],"sources":["../../../../../node_modules/.pnpm/nanostores@1.1.0/node_modules/nanostores/listen-keys/index.js","../../../../fragno/dist/client/react.js","../../../src/client/react.ts"],"sourcesContent":["export function listenKeys($store, keys, listener) {\n let keysSet = new Set(keys).add(undefined)\n return $store.listen((value, oldValue, changed) => {\n if (keysSet.has(changed)) {\n listener(value, oldValue, changed)\n }\n })\n}\n\nexport function subscribeKeys($store, keys, listener) {\n let unbind = listenKeys($store, keys, listener)\n listener($store.value)\n return unbind\n}\n","import { isReadableAtom } from \"../util/nanostores.js\";\nimport { hydrateFromWindow } from \"../util/ssr.js\";\nimport { isGetHook, isMutatorHook, isStore } from \"./client.js\";\nimport { listenKeys } from \"nanostores\";\nimport { useCallback, useEffect, useMemo, useRef, useSyncExternalStore } from \"react\";\n\n//#region src/client/react.ts\nfunction createReactHook(hook) {\n\treturn ({ path, query } = {}) => {\n\t\tconst pathParamValues = path ? Object.values(path) : [];\n\t\tconst queryParamValues = query ? Object.values(query) : [];\n\t\tconst store = useMemo(() => hook.store({\n\t\t\tpath,\n\t\t\tquery\n\t\t}), [hook, ...[...pathParamValues, ...queryParamValues]]);\n\t\tif (typeof window === \"undefined\") return store.get();\n\t\treturn useStore(store);\n\t};\n}\nfunction createReactMutator(hook) {\n\treturn () => {\n\t\treturn useStore(useMemo(() => hook.mutatorStore, [hook]));\n\t};\n}\nconst isPlainObject = (value) => {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n};\nconst areStoreFactoryValuesEqual = (left, right) => {\n\tif (Object.is(left, right)) return true;\n\tif (Array.isArray(left) && Array.isArray(right)) return left.length === right.length && left.every((value, index) => areStoreFactoryValuesEqual(value, right[index]));\n\tif (left instanceof Date && right instanceof Date) return left.getTime() === right.getTime();\n\tif (isReadableAtom(left) || isReadableAtom(right)) return left === right;\n\tif (typeof left === \"function\" || typeof right === \"function\") return left === right;\n\tif (isPlainObject(left) && isPlainObject(right)) {\n\t\tconst leftKeys = Object.keys(left).sort();\n\t\tconst rightKeys = Object.keys(right).sort();\n\t\treturn leftKeys.length === rightKeys.length && leftKeys.every((key, index) => key === rightKeys[index] && areStoreFactoryValuesEqual(left[key], right[key]));\n\t}\n\treturn false;\n};\nconst areStoreFactoryArgsEqual = (left, right) => left.length === right.length && left.every((value, index) => areStoreFactoryValuesEqual(value, right[index]));\nconst getStoreDisposer = (value) => {\n\tconst disposer = value[Symbol.dispose];\n\treturn typeof disposer === \"function\" ? disposer.bind(value) : void 0;\n};\nfunction unwrapReactStoreValueOnServer(value) {\n\tif (isReadableAtom(value)) return value.get();\n\tconst result = {};\n\tfor (const key in value) {\n\t\tif (!Object.prototype.hasOwnProperty.call(value, key)) continue;\n\t\tconst fieldValue = value[key];\n\t\tif (isReadableAtom(fieldValue)) result[key] = fieldValue.get();\n\t\telse result[key] = fieldValue;\n\t}\n\treturn result;\n}\nfunction unwrapReactStoreValue(value) {\n\tif (isReadableAtom(value)) return useStore(value);\n\tconst keys = Object.keys(value);\n\tconst atomEntries = keys.flatMap((key) => {\n\t\tconst fieldValue = value[key];\n\t\treturn isReadableAtom(fieldValue) ? [[key, fieldValue]] : [];\n\t});\n\tconst snapshotRef = useRef(atomEntries.map(([, store]) => store.get()));\n\tconst getSnapshot = () => {\n\t\tconst nextSnapshot = atomEntries.map(([, store]) => store.get());\n\t\tconst previousSnapshot = snapshotRef.current;\n\t\tif (previousSnapshot.length === nextSnapshot.length && previousSnapshot.every((entry, index) => Object.is(entry, nextSnapshot[index]))) return previousSnapshot;\n\t\tsnapshotRef.current = nextSnapshot;\n\t\treturn nextSnapshot;\n\t};\n\tconst atomValues = useSyncExternalStore((onStoreChange) => {\n\t\tconst unsubscribes = atomEntries.map(([, store]) => store.listen(onStoreChange));\n\t\treturn () => {\n\t\t\tfor (const unsubscribe of unsubscribes) unsubscribe();\n\t\t};\n\t}, getSnapshot, getSnapshot);\n\tconst result = {};\n\tlet atomIndex = 0;\n\tfor (const key of keys) {\n\t\tconst fieldValue = value[key];\n\t\tif (isReadableAtom(fieldValue)) {\n\t\t\tresult[key] = atomValues[atomIndex];\n\t\t\tatomIndex += 1;\n\t\t} else result[key] = fieldValue;\n\t}\n\treturn result;\n}\nfunction createReactStore(hook) {\n\treturn ((...args) => {\n\t\tconst stableArgsRef = useRef(args);\n\t\tconst pendingDisposalsRef = useRef(/* @__PURE__ */ new Map());\n\t\tif (!areStoreFactoryArgsEqual(stableArgsRef.current, args)) stableArgsRef.current = args;\n\t\tconst value = useMemo(() => {\n\t\t\tif (\"factory\" in hook) return hook.factory(...stableArgsRef.current);\n\t\t\treturn hook.obj;\n\t\t}, [hook, stableArgsRef.current]);\n\t\tuseEffect(() => {\n\t\t\tconst disposer = getStoreDisposer(value);\n\t\t\tconst pendingTimeout = pendingDisposalsRef.current.get(value);\n\t\t\tif (pendingTimeout !== void 0) {\n\t\t\t\tclearTimeout(pendingTimeout);\n\t\t\t\tpendingDisposalsRef.current.delete(value);\n\t\t\t}\n\t\t\treturn () => {\n\t\t\t\tif (!disposer) return;\n\t\t\t\tconst timeoutId = setTimeout(() => {\n\t\t\t\t\tpendingDisposalsRef.current.delete(value);\n\t\t\t\t\tdisposer();\n\t\t\t\t}, 0);\n\t\t\t\tpendingDisposalsRef.current.set(value, timeoutId);\n\t\t\t};\n\t\t}, [value]);\n\t\tif (typeof window === \"undefined\") return unwrapReactStoreValueOnServer(value);\n\t\treturn unwrapReactStoreValue(value);\n\t});\n}\nfunction useFragno(clientObj) {\n\tconst result = {};\n\tfor (const key in clientObj) {\n\t\tif (!Object.prototype.hasOwnProperty.call(clientObj, key)) continue;\n\t\tconst hook = clientObj[key];\n\t\tif (isGetHook(hook)) result[key] = createReactHook(hook);\n\t\telse if (isMutatorHook(hook)) result[key] = createReactMutator(hook);\n\t\telse if (isStore(hook)) result[key] = createReactStore(hook);\n\t\telse result[key] = hook;\n\t}\n\treturn result;\n}\nfunction useStore(store, options = {}) {\n\tconst snapshotRef = useRef(store.get());\n\tconst { keys, deps = [store, keys] } = options;\n\tconst subscribe = useCallback((onChange) => {\n\t\tconst emitChange = (value) => {\n\t\t\tif (snapshotRef.current === value) return;\n\t\t\tsnapshotRef.current = value;\n\t\t\tonChange();\n\t\t};\n\t\temitChange(store.value);\n\t\tif (keys?.length) return listenKeys(store, keys, emitChange);\n\t\treturn store.listen(emitChange);\n\t}, deps);\n\tconst get = () => snapshotRef.current;\n\treturn useSyncExternalStore(subscribe, get, () => {\n\t\treturn get();\n\t});\n}\nfunction FragnoHydrator({ children }) {\n\tuseMemo(() => {\n\t\thydrateFromWindow();\n\t}, []);\n\treturn children;\n}\n\n//#endregion\nexport { FragnoHydrator, useFragno, useStore };\n//# sourceMappingURL=react.js.map","import { useFragno } from \"@fragno-dev/core/react\";\n\nimport { createGitHubAppFragmentClients } from \"..\";\nimport type { GitHubAppFragmentPublicClientConfig } from \"../github/types\";\n\nexport function createGitHubAppFragmentClient(config: GitHubAppFragmentPublicClientConfig = {}) {\n return useFragno(createGitHubAppFragmentClients(config));\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAAA,SAAgBA,WAAWC,QAAQC,MAAMC,UAAU;CACjD,IAAIC,UAAU,IAAIC,IAAIH,KAAK,CAACI,IAAIC,OAAU;AAC1C,QAAON,OAAOO,QAAQC,OAAOC,UAAUC,YAAY;AACjD,MAAIP,QAAQQ,IAAID,QAAQ,CACtBR,UAASM,OAAOC,UAAUC,QAAQ;GAEpC;;;;;ACCJ,SAASe,gBAAgBC,MAAM;AAC9B,SAAQ,EAAEC,MAAMC,UAAU,EAAE,KAAK;EAChC,MAAMC,kBAAkBF,OAAOG,OAAOC,OAAOJ,KAAK,GAAG,EAAE;EACvD,MAAMK,mBAAmBJ,QAAQE,OAAOC,OAAOH,MAAM,GAAG,EAAE;EAC1D,MAAMK,QAAQX,cAAcI,KAAKO,MAAM;GACtCN;GACAC;GACA,CAAC,EAAE,CAACF,MAAM,GAAG,CAAC,GAAGG,iBAAiB,GAAGG,iBAAiB,CAAC,CAAC;AACzD,MAAI,OAAOE,WAAW,YAAa,QAAOD,MAAME,KAAK;AACrD,SAAOC,SAASH,MAAM;;;AAGxB,SAASI,mBAAmBX,MAAM;AACjC,cAAa;AACZ,SAAOU,SAASd,cAAcI,KAAKY,cAAc,CAACZ,KAAK,CAAC,CAAC;;;AAG3D,MAAMa,iBAAiBC,UAAU;AAChC,KAAI,CAACA,SAAS,OAAOA,UAAU,SAAU,QAAO;CAChD,MAAMC,YAAYX,OAAOY,eAAeF,MAAM;AAC9C,QAAOC,cAAcX,OAAOW,aAAaA,cAAc;;AAExD,MAAME,8BAA8BC,MAAMC,UAAU;AACnD,KAAI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QAAQQ,KAAK,CAAEwC,QAAOR,OAAO4B,iBAAiB5D,KAAK;MACvDwC,QAAOR,OAAOhC;;AAEpB,QAAOwC;;AAER,SAAS9B,SAASH,OAAOoE,UAAU,EAAE,EAAE;CACtC,MAAM5B,cAAclD,OAAOU,MAAME,KAAK,CAAC;CACvC,MAAM,EAAEoB,MAAM+C,OAAO,CAACrE,OAAOsB,KAAI,KAAM8C;CACvC,MAAME,YAAYnF,aAAaoF,aAAa;EAC3C,MAAMC,cAAcjE,UAAU;AAC7B,OAAIiC,YAAYK,YAAYtC,MAAO;AACnCiC,eAAYK,UAAUtC;AACtBgE,aAAU;;AAEXC,aAAWxE,MAAMO,MAAM;AACvB,MAAIe,MAAMN,OAAQ,QAAO9B,WAAWc,OAAOsB,MAAMkD,WAAW;AAC5D,SAAOxE,MAAMkD,OAAOsB,WAAW;IAC7BH,KAAK;CACR,MAAMnE,YAAYsC,YAAYK;AAC9B,QAAOtD,qBAAqB+E,WAAWpE,WAAW;AACjD,SAAOA,KAAK;GACX;;;;;AC9IH,SAAgB4E,8BAA8BC,SAA8C,EAAE,EAAE;AAC9F,QAAOJ,UAAUC,+BAA+BG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"react.js","names":["listenKeys","$store","keys","listener","keysSet","Set","add","undefined","listen","value","oldValue","changed","has","subscribeKeys","unbind","isReadableAtom","hydrateFromWindow","isGetHook","isMutatorHook","isStore","listenKeys","useCallback","useEffect","useMemo","useRef","useSyncExternalStore","createReactHook","hook","path","query","pathParamValues","Object","values","queryParamValues","store","window","get","useStore","createReactMutator","mutatorStore","isPlainObject","value","prototype","getPrototypeOf","areStoreFactoryValuesEqual","left","right","is","Array","isArray","length","every","index","Date","getTime","leftKeys","keys","sort","rightKeys","key","areStoreFactoryArgsEqual","getStoreDisposer","disposer","Symbol","dispose","bind","createReactStoreObjectView","getAtomValue","atomValues","Map","boundMethods","Proxy","target","property","_receiver","propertyValue","Reflect","has","atomValue","set","boundMethod","unwrapReactStoreValueOnServer","unwrapReactStoreValue","atomEntries","flatMap","fieldValue","snapshotRef","map","getSnapshot","nextSnapshot","previousSnapshot","current","entry","onStoreChange","unsubscribes","listen","unsubscribe","atomIndex","findIndex","entryStore","createReactStore","args","stableArgsRef","pendingDisposalsRef","factory","obj","pendingTimeout","clearTimeout","delete","timeoutId","setTimeout","useFragno","clientObj","result","hasOwnProperty","call","options","deps","subscribe","onChange","emitChange","FragnoHydrator","children","useFragno","createGitHubAppFragmentClients","GitHubAppFragmentPublicClientConfig","createGitHubAppFragmentClient","config"],"sources":["../../../../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/listen-keys/index.js","../../../../fragno/dist/client/react.js","../../../src/client/react.ts"],"sourcesContent":["export function listenKeys($store, keys, listener) {\n let keysSet = new Set(keys).add(undefined)\n return $store.listen((value, oldValue, changed) => {\n if (keysSet.has(changed)) {\n listener(value, oldValue, changed)\n }\n })\n}\n\nexport function subscribeKeys($store, keys, listener) {\n let unbind = listenKeys($store, keys, listener)\n listener($store.value)\n return unbind\n}\n","import { isReadableAtom } from \"../util/nanostores.js\";\nimport { hydrateFromWindow } from \"../util/ssr.js\";\nimport { isGetHook, isMutatorHook, isStore } from \"./client.js\";\nimport { listenKeys } from \"nanostores\";\nimport { useCallback, useEffect, useMemo, useRef, useSyncExternalStore } from \"react\";\n\n//#region src/client/react.ts\nfunction createReactHook(hook) {\n\treturn ({ path, query } = {}) => {\n\t\tconst pathParamValues = path ? Object.values(path) : [];\n\t\tconst queryParamValues = query ? Object.values(query) : [];\n\t\tconst store = useMemo(() => hook.store({\n\t\t\tpath,\n\t\t\tquery\n\t\t}), [hook, ...[...pathParamValues, ...queryParamValues]]);\n\t\tif (typeof window === \"undefined\") return store.get();\n\t\treturn useStore(store);\n\t};\n}\nfunction createReactMutator(hook) {\n\treturn () => {\n\t\treturn useStore(useMemo(() => hook.mutatorStore, [hook]));\n\t};\n}\nconst isPlainObject = (value) => {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\treturn prototype === Object.prototype || prototype === null;\n};\nconst areStoreFactoryValuesEqual = (left, right) => {\n\tif (Object.is(left, right)) return true;\n\tif (Array.isArray(left) && Array.isArray(right)) return left.length === right.length && left.every((value, index) => areStoreFactoryValuesEqual(value, right[index]));\n\tif (left instanceof Date && right instanceof Date) return left.getTime() === right.getTime();\n\tif (isReadableAtom(left) || isReadableAtom(right)) return left === right;\n\tif (typeof left === \"function\" || typeof right === \"function\") return left === right;\n\tif (isPlainObject(left) && isPlainObject(right)) {\n\t\tconst leftKeys = Object.keys(left).sort();\n\t\tconst rightKeys = Object.keys(right).sort();\n\t\treturn leftKeys.length === rightKeys.length && leftKeys.every((key, index) => key === rightKeys[index] && areStoreFactoryValuesEqual(left[key], right[key]));\n\t}\n\treturn false;\n};\nconst areStoreFactoryArgsEqual = (left, right) => left.length === right.length && left.every((value, index) => areStoreFactoryValuesEqual(value, right[index]));\nconst getStoreDisposer = (value) => {\n\tconst disposer = value[Symbol.dispose];\n\treturn typeof disposer === \"function\" ? disposer.bind(value) : void 0;\n};\nconst createReactStoreObjectView = (value, getAtomValue) => {\n\tconst atomValues = /* @__PURE__ */ new Map();\n\tconst boundMethods = /* @__PURE__ */ new Map();\n\treturn new Proxy(value, { get(target, property, _receiver) {\n\t\tconst propertyValue = Reflect.get(target, property, target);\n\t\tif (isReadableAtom(propertyValue)) {\n\t\t\tif (atomValues.has(propertyValue)) return atomValues.get(propertyValue);\n\t\t\tconst atomValue = getAtomValue(propertyValue);\n\t\t\tatomValues.set(propertyValue, atomValue);\n\t\t\treturn atomValue;\n\t\t}\n\t\tif (typeof propertyValue === \"function\") {\n\t\t\tif (boundMethods.has(property)) return boundMethods.get(property);\n\t\t\tconst boundMethod = propertyValue.bind(target);\n\t\t\tboundMethods.set(property, boundMethod);\n\t\t\treturn boundMethod;\n\t\t}\n\t\treturn propertyValue;\n\t} });\n};\nfunction unwrapReactStoreValueOnServer(value) {\n\tif (isReadableAtom(value)) return value.get();\n\treturn createReactStoreObjectView(value, (store) => store.get());\n}\nfunction unwrapReactStoreValue(value) {\n\tif (isReadableAtom(value)) return useStore(value);\n\tconst atomEntries = Object.keys(value).flatMap((key) => {\n\t\tconst fieldValue = value[key];\n\t\treturn isReadableAtom(fieldValue) ? [[key, fieldValue]] : [];\n\t});\n\tconst snapshotRef = useRef(atomEntries.map(([, store]) => store.get()));\n\tconst getSnapshot = () => {\n\t\tconst nextSnapshot = atomEntries.map(([, store]) => store.get());\n\t\tconst previousSnapshot = snapshotRef.current;\n\t\tif (previousSnapshot.length === nextSnapshot.length && previousSnapshot.every((entry, index) => Object.is(entry, nextSnapshot[index]))) return previousSnapshot;\n\t\tsnapshotRef.current = nextSnapshot;\n\t\treturn nextSnapshot;\n\t};\n\tconst atomValues = useSyncExternalStore((onStoreChange) => {\n\t\tconst unsubscribes = atomEntries.map(([, store]) => store.listen(onStoreChange));\n\t\treturn () => {\n\t\t\tfor (const unsubscribe of unsubscribes) unsubscribe();\n\t\t};\n\t}, getSnapshot, getSnapshot);\n\treturn useMemo(() => createReactStoreObjectView(value, (store) => {\n\t\tconst atomIndex = atomEntries.findIndex(([, entryStore]) => entryStore === store);\n\t\treturn atomIndex === -1 ? store.get() : atomValues[atomIndex];\n\t}), [\n\t\tvalue,\n\t\tatomEntries,\n\t\tatomValues\n\t]);\n}\nfunction createReactStore(hook) {\n\treturn ((...args) => {\n\t\tconst stableArgsRef = useRef(args);\n\t\tconst pendingDisposalsRef = useRef(/* @__PURE__ */ new Map());\n\t\tif (!areStoreFactoryArgsEqual(stableArgsRef.current, args)) stableArgsRef.current = args;\n\t\tconst value = useMemo(() => {\n\t\t\tif (\"factory\" in hook) return hook.factory(...stableArgsRef.current);\n\t\t\treturn hook.obj;\n\t\t}, [hook, stableArgsRef.current]);\n\t\tuseEffect(() => {\n\t\t\tconst disposer = getStoreDisposer(value);\n\t\t\tconst pendingTimeout = pendingDisposalsRef.current.get(value);\n\t\t\tif (pendingTimeout !== void 0) {\n\t\t\t\tclearTimeout(pendingTimeout);\n\t\t\t\tpendingDisposalsRef.current.delete(value);\n\t\t\t}\n\t\t\treturn () => {\n\t\t\t\tif (!disposer) return;\n\t\t\t\tconst timeoutId = setTimeout(() => {\n\t\t\t\t\tpendingDisposalsRef.current.delete(value);\n\t\t\t\t\tdisposer();\n\t\t\t\t}, 0);\n\t\t\t\tpendingDisposalsRef.current.set(value, timeoutId);\n\t\t\t};\n\t\t}, [value]);\n\t\tif (typeof window === \"undefined\") return unwrapReactStoreValueOnServer(value);\n\t\treturn unwrapReactStoreValue(value);\n\t});\n}\nfunction useFragno(clientObj) {\n\tconst result = {};\n\tfor (const key in clientObj) {\n\t\tif (!Object.prototype.hasOwnProperty.call(clientObj, key)) continue;\n\t\tconst hook = clientObj[key];\n\t\tif (isGetHook(hook)) result[key] = createReactHook(hook);\n\t\telse if (isMutatorHook(hook)) result[key] = createReactMutator(hook);\n\t\telse if (isStore(hook)) result[key] = createReactStore(hook);\n\t\telse result[key] = hook;\n\t}\n\treturn result;\n}\nfunction useStore(store, options = {}) {\n\tconst snapshotRef = useRef(store.get());\n\tconst { keys, deps = [store, keys] } = options;\n\tconst subscribe = useCallback((onChange) => {\n\t\tconst emitChange = (value) => {\n\t\t\tif (snapshotRef.current === value) return;\n\t\t\tsnapshotRef.current = value;\n\t\t\tonChange();\n\t\t};\n\t\temitChange(store.value);\n\t\tif (keys?.length) return listenKeys(store, keys, emitChange);\n\t\treturn store.listen(emitChange);\n\t}, deps);\n\tconst get = () => snapshotRef.current;\n\treturn useSyncExternalStore(subscribe, get, () => {\n\t\treturn get();\n\t});\n}\nfunction FragnoHydrator({ children }) {\n\tuseMemo(() => {\n\t\thydrateFromWindow();\n\t}, []);\n\treturn children;\n}\n\n//#endregion\nexport { FragnoHydrator, useFragno, useStore };\n//# sourceMappingURL=react.js.map","import { useFragno } from \"@fragno-dev/core/react\";\n\nimport { createGitHubAppFragmentClients } from \"..\";\nimport type { GitHubAppFragmentPublicClientConfig } from \"../github/types\";\n\nexport function createGitHubAppFragmentClient(config: GitHubAppFragmentPublicClientConfig = {}) {\n return useFragno(createGitHubAppFragmentClients(config));\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAAA,SAAgBA,WAAWC,QAAQC,MAAMC,UAAU;CACjD,IAAIC,UAAU,IAAIC,IAAIH,KAAK,CAACI,IAAIC,OAAU;AAC1C,QAAON,OAAOO,QAAQC,OAAOC,UAAUC,YAAY;AACjD,MAAIP,QAAQQ,IAAID,QAAQ,CACtBR,UAASM,OAAOC,UAAUC,QAAQ;GAEpC;;;;;ACCJ,SAASe,gBAAgBC,MAAM;AAC9B,SAAQ,EAAEC,MAAMC,UAAU,EAAE,KAAK;EAChC,MAAMC,kBAAkBF,OAAOG,OAAOC,OAAOJ,KAAK,GAAG,EAAE;EACvD,MAAMK,mBAAmBJ,QAAQE,OAAOC,OAAOH,MAAM,GAAG,EAAE;EAC1D,MAAMK,QAAQX,cAAcI,KAAKO,MAAM;GACtCN;GACAC;GACA,CAAC,EAAE,CAACF,MAAM,GAAG,CAAC,GAAGG,iBAAiB,GAAGG,iBAAiB,CAAC,CAAC;AACzD,MAAI,OAAOE,WAAW,YAAa,QAAOD,MAAME,KAAK;AACrD,SAAOC,SAASH,MAAM;;;AAGxB,SAASI,mBAAmBX,MAAM;AACjC,cAAa;AACZ,SAAOU,SAASd,cAAcI,KAAKY,cAAc,CAACZ,KAAK,CAAC,CAAC;;;AAG3D,MAAMa,iBAAiBC,UAAU;AAChC,KAAI,CAACA,SAAS,OAAOA,UAAU,SAAU,QAAO;CAChD,MAAMC,YAAYX,OAAOY,eAAeF,MAAM;AAC9C,QAAOC,cAAcX,OAAOW,aAAaA,cAAc;;AAExD,MAAME,8BAA8BC,MAAMC,UAAU;AACnD,KAAIf,OAAOgB,GAAGF,MAAMC,MAAM,CAAE,QAAO;AACnC,KAAIE,MAAMC,QAAQJ,KAAK,IAAIG,MAAMC,QAAQH,MAAM,CAAE,QAAOD,KAA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;CAC7B,MAAMC,SAAS,EAAE;AACjB,MAAK,MAAMtD,OAAOqD,WAAW;AAC5B,MAAI,CAACjF,OAAOW,UAAUwE,eAAeC,KAAKH,WAAWrD,IAAI,CAAE;EAC3D,MAAMhC,OAAOqF,UAAUrD;AACvB,MAAI1C,UAAUU,KAAK,CAAEsF,QAAOtD,OAAOjC,gBAAgBC,KAAK;WAC/CT,cAAcS,KAAK,CAAEsF,QAAOtD,OAAOrB,mBAAmBX,KAAK;WAC3DR,QAAQQ,KAAK,CAAEsF,QAAOtD,OAAOyC,iBAAiBzE,KAAK;MACvDsF,QAAOtD,OAAOhC;;AAEpB,QAAOsF;;AAER,SAAS5E,SAASH,OAAOkF,UAAU,EAAE,EAAE;CACtC,MAAM9B,cAAc9D,OAAOU,MAAME,KAAK,CAAC;CACvC,MAAM,EAAEoB,MAAM6D,OAAO,CAACnF,OAAOsB,KAAI,KAAM4D;CACvC,MAAME,YAAYjG,aAAakG,aAAa;EAC3C,MAAMC,cAAc/E,UAAU;AAC7B,OAAI6C,YAAYK,YAAYlD,MAAO;AACnC6C,eAAYK,UAAUlD;AACtB8E,aAAU;;AAEXC,aAAWtF,MAAMO,MAAM;AACvB,MAAIe,MAAMN,OAAQ,QAAO9B,WAAWc,OAAOsB,MAAMgE,WAAW;AAC5D,SAAOtF,MAAM6D,OAAOyB,WAAW;IAC7BH,KAAK;CACR,MAAMjF,YAAYkD,YAAYK;AAC9B,QAAOlE,qBAAqB6F,WAAWlF,WAAW;AACjD,SAAOA,KAAK;GACX;;;;;ACxJH,SAAgB0F,8BAA8BC,SAA8C,EAAE,EAAE;AAC9F,QAAOJ,UAAUC,+BAA+BG,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as ReadableAtom, d as InferOr, h as QueryParamsHint, l as FragnoClientError, m as MaybeExtractPathParamsOrWiden, n as GitHubAppFragmentPublicClientConfig, o as NonGetHTTPMethod } from "../types-B3_U7vnu.js";
|
|
2
2
|
import * as zod from "zod";
|
|
3
3
|
import { Accessor } from "solid-js";
|
|
4
4
|
import * as _standard_schema_spec0 from "@standard-schema/spec";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solid.d.ts","names":["MaybeExtractPathParamsOrWiden","QueryParamsHint","InferOr","
|
|
1
|
+
{"version":3,"file":"solid.d.ts","names":["MaybeExtractPathParamsOrWiden","QueryParamsHint","InferOr","FragnoClientError","FragnoClientHookData","FragnoClientMutatorData","FragnoStoreData","FragnoStoreFactoryData","FragnoStoreObjectData","NonGetHTTPMethod","ReadableAtom","Store","StoreValue","Accessor","StandardSchemaV1","FragnoSolidHook","_TMethod","TPath$1","TOutputSchema$1","TErrorCode$1","TQueryParameters$1","path","query","args","data","loading","error","FragnoSolidMutator","TInputSchema","Promise","mutate","body","isAccessor","value","accessorToAtom","T$1","accessor","FragnoSolidStoreValue","K","FragnoSolidStaticStore","FragnoSolidStore","TStore","TArgs","T","useFragno","Record","TPath","TOutputSchema","TErrorCode","TQueryParameters","TMethod","TInput","TOutput","TError","clientObj"],"sources":["../../../../fragno/dist/client/solid.d.ts","../../../src/client/solid.ts"],"mappings":";;;;;;;;KAkBK2B,kBAAAA,kBAAoClB,gBAAAA,+CAA+DK,gBAAAA,sCAAsDA,gBAAAA;EAC5JgB,MAAAA,GAASP,IAAAA;IACPQ,IAAAA,GAAO7B,OAAAA,CAAQ0B,YAAAA;IACfP,IAAAA,GAAOrB,6BAAAA,CAA8BiB,OAAAA,WAAkBJ,QAAAA,WAAmBH,YAAAA;IAC1EY,KAAAA,GAAQrB,eAAAA,CAAgBmB,kBAAAA,WAA6BP,QAAAA,WAAmBH,YAAAA;EAAAA,MACpEmB,OAAAA,CAAQ3B,OAAAA,CAAQgB,eAAAA;EACtBO,OAAAA,EAASZ,QAAAA;EACTa,KAAAA,EAAOb,QAAAA,CAASV,iBAAAA,CAAkBgB,YAAAA;EAClCK,IAAAA,EAAMX,QAAAA,CAASX,OAAAA,CAAQgB,eAAAA;AAAAA;;;;;;;;iBCrBT,6BAAA,CAA8B,MAAA,GAAQ,mCAAA;0CAAwC,gBAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as isMutatorHook, d as isReadableAtom, i as createGitHubAppFragmentClients, l as isStore, s as isGetHook, u as atom } from "../factory-
|
|
1
|
+
import { c as isMutatorHook, d as isReadableAtom, i as createGitHubAppFragmentClients, l as isStore, s as isGetHook, u as atom } from "../factory-DRMq0TUa.js";
|
|
2
2
|
import "../index.js";
|
|
3
3
|
import { createEffect, onCleanup } from "solid-js";
|
|
4
4
|
import { createStore, reconcile } from "solid-js/store";
|
|
5
5
|
|
|
6
|
-
//#region ../../node_modules/.pnpm/@nanostores+solid@1.1.1_nanostores@1.
|
|
6
|
+
//#region ../../node_modules/.pnpm/@nanostores+solid@1.1.1_nanostores@1.2.0_solid-js@1.9.10/node_modules/@nanostores/solid/dist/index.js
|
|
7
7
|
function m(e, o = {}) {
|
|
8
8
|
let t = e.listen(() => {}), [r, s] = createStore({ value: e.get() }), n = e.subscribe((i) => {
|
|
9
9
|
s("value", reconcile(i, o));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solid.js","names":["createStore","c","reconcile","u","onCleanup","S","m","e","o","t","listen","r","s","value","get","n","subscribe","i","useStore","isReadableAtom","isGetHook","isMutatorHook","isStore","atom","createEffect","onCleanup","useStore","isAccessor","value","accessorToAtom","accessor","a","set","createSolidHook","hook","path","query","pathParams","queryParams","key","Object","entries","v","storeValue","store","data","loading","error","createSolidMutator","mutatorStore","mutate","args","body","unwrapSolidStoreValue","result","prototype","hasOwnProperty","call","fieldValue","createSolidStore","obj","factory","disposer","Symbol","dispose","useFragno","clientObj","useFragno","createGitHubAppFragmentClients","GitHubAppFragmentPublicClientConfig","createGitHubAppFragmentClient","config"],"sources":["../../../../../node_modules/.pnpm/@nanostores+solid@1.1.1_nanostores@1.
|
|
1
|
+
{"version":3,"file":"solid.js","names":["createStore","c","reconcile","u","onCleanup","S","m","e","o","t","listen","r","s","value","get","n","subscribe","i","useStore","isReadableAtom","isGetHook","isMutatorHook","isStore","atom","createEffect","onCleanup","useStore","isAccessor","value","accessorToAtom","accessor","a","set","createSolidHook","hook","path","query","pathParams","queryParams","key","Object","entries","v","storeValue","store","data","loading","error","createSolidMutator","mutatorStore","mutate","args","body","unwrapSolidStoreValue","result","prototype","hasOwnProperty","call","fieldValue","createSolidStore","obj","factory","disposer","Symbol","dispose","useFragno","clientObj","useFragno","createGitHubAppFragmentClients","GitHubAppFragmentPublicClientConfig","createGitHubAppFragmentClient","config"],"sources":["../../../../../node_modules/.pnpm/@nanostores+solid@1.1.1_nanostores@1.2.0_solid-js@1.9.10/node_modules/@nanostores/solid/dist/index.js","../../../../fragno/dist/client/solid.js","../../../src/client/solid.ts"],"sourcesContent":["import{createStore as c,reconcile as u}from\"solid-js/store\";import{onCleanup as S}from\"solid-js\";function m(e,o={}){let t=e.listen(()=>{}),[r,s]=c({value:e.get()}),n=e.subscribe(i=>{s(\"value\",u(i,o))});return S(()=>n()),t(),()=>r.value}export{m as useStore};\n","import { isReadableAtom } from \"../util/nanostores.js\";\nimport { isGetHook, isMutatorHook, isStore } from \"./client.js\";\nimport { atom } from \"nanostores\";\nimport { createEffect, onCleanup } from \"solid-js\";\nimport { useStore } from \"@nanostores/solid\";\n\n//#region src/client/solid.ts\n/**\n* Type guard to check if a value is a SolidJS Accessor.\n*\n* @private\n*/\nfunction isAccessor(value) {\n\treturn typeof value === \"function\";\n}\n/**\n* Converts a SolidJS Accessor to a NanoStore Atom.\n*\n* This is used to convert SolidJS accessors to atoms, so that we can use them in the store.\n*\n* @private\n*/\nfunction accessorToAtom(accessor) {\n\tconst a = atom(accessor());\n\tcreateEffect(() => {\n\t\ta.set(accessor());\n\t});\n\treturn a;\n}\nfunction createSolidHook(hook) {\n\treturn ({ path, query } = {}) => {\n\t\tconst pathParams = {};\n\t\tconst queryParams = {};\n\t\tfor (const [key, value] of Object.entries(path ?? {})) {\n\t\t\tconst v = value;\n\t\t\tpathParams[key] = isAccessor(v) ? accessorToAtom(v) : v;\n\t\t}\n\t\tfor (const [key, value] of Object.entries(query ?? {})) {\n\t\t\tconst v = value;\n\t\t\tqueryParams[key] = isAccessor(v) ? accessorToAtom(v) : v;\n\t\t}\n\t\tconst storeValue = useStore(hook.store({\n\t\t\tpath: pathParams,\n\t\t\tquery: queryParams\n\t\t}));\n\t\treturn {\n\t\t\tdata: () => storeValue().data,\n\t\t\tloading: () => storeValue().loading,\n\t\t\terror: () => storeValue().error\n\t\t};\n\t};\n}\nfunction createSolidMutator(hook) {\n\treturn () => {\n\t\tconst store = useStore(hook.mutatorStore);\n\t\tconst mutate = async (args) => {\n\t\t\tconst { body, path, query } = args;\n\t\t\tconst pathParams = {};\n\t\t\tconst queryParams = {};\n\t\t\tfor (const [key, value] of Object.entries(path ?? {})) {\n\t\t\t\tconst v = value;\n\t\t\t\tpathParams[key] = isAccessor(v) ? v() : v;\n\t\t\t}\n\t\t\tfor (const [key, value] of Object.entries(query ?? {})) {\n\t\t\t\tconst v = value;\n\t\t\t\tqueryParams[key] = isAccessor(v) ? v() : v;\n\t\t\t}\n\t\t\treturn hook.mutatorStore.mutate({\n\t\t\t\tbody,\n\t\t\t\tpath: pathParams,\n\t\t\t\tquery: queryParams\n\t\t\t});\n\t\t};\n\t\treturn {\n\t\t\tmutate,\n\t\t\tdata: () => store().data,\n\t\t\tloading: () => store().loading,\n\t\t\terror: () => store().error\n\t\t};\n\t};\n}\nfunction unwrapSolidStoreValue(value) {\n\tif (isReadableAtom(value)) return useStore(value);\n\tconst result = {};\n\tfor (const key in value) {\n\t\tif (!Object.prototype.hasOwnProperty.call(value, key)) continue;\n\t\tconst fieldValue = value[key];\n\t\tif (isReadableAtom(fieldValue)) result[key] = useStore(fieldValue);\n\t\telse result[key] = fieldValue;\n\t}\n\treturn result;\n}\nfunction createSolidStore(hook) {\n\tif (\"obj\" in hook) {\n\t\tif (isReadableAtom(hook.obj)) return useStore(hook.obj);\n\t\treturn (() => unwrapSolidStoreValue(hook.obj));\n\t}\n\treturn ((...args) => {\n\t\tconst value = hook.factory(...args);\n\t\tconst disposer = value[Symbol.dispose];\n\t\tif (typeof disposer === \"function\") onCleanup(() => {\n\t\t\tdisposer.call(value);\n\t\t});\n\t\treturn unwrapSolidStoreValue(value);\n\t});\n}\nfunction useFragno(clientObj) {\n\tconst result = {};\n\tfor (const key in clientObj) {\n\t\tif (!Object.prototype.hasOwnProperty.call(clientObj, key)) continue;\n\t\tconst hook = clientObj[key];\n\t\tif (isGetHook(hook)) result[key] = createSolidHook(hook);\n\t\telse if (isMutatorHook(hook)) result[key] = createSolidMutator(hook);\n\t\telse if (isStore(hook)) result[key] = createSolidStore(hook);\n\t\telse result[key] = hook;\n\t}\n\treturn result;\n}\n\n//#endregion\nexport { accessorToAtom, isAccessor, useFragno };\n//# sourceMappingURL=solid.js.map","import { useFragno } from \"@fragno-dev/core/solid\";\n\nimport { createGitHubAppFragmentClients } from \"..\";\nimport type { GitHubAppFragmentPublicClientConfig } from \"../github/types\";\n\nexport function createGitHubAppFragmentClient(config: GitHubAppFragmentPublicClientConfig = {}) {\n return useFragno(createGitHubAppFragmentClients(config));\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;AAAiG,SAASM,EAAEC,GAAEC,IAAE,EAAE,EAAC;CAAC,IAAIC,IAAEF,EAAEG,aAAW,GAAG,EAAC,CAACC,GAAEC,KAAGX,YAAE,EAACY,OAAMN,EAAEO,KAAI,EAAE,CAAC,EAACC,IAAER,EAAES,WAAUC,MAAG;AAACL,IAAE,SAAQT,UAAEc,GAAET,EAAE,CAAC;GAAE;AAAC,QAAOH,gBAAMU,GAAG,CAAC,EAACN,GAAG,QAAKE,EAAEE;;;;;;;;;;ACYtO,SAASc,WAAWC,OAAO;AAC1B,QAAO,OAAOA,UAAU;;;;;;;;;AASzB,SAASC,eAAeC,UAAU;CACjC,MAAMC,IAAIR,qBAAKO,UAA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,QAAQY,KAAK,CAAEoB,QAAOf,OAAOoB,iBAAiBzB,KAAK;MACvDoB,QAAOf,OAAOL;;AAEpB,QAAOoB;;;;;AC/GR,SAAgBgB,8BAA8BC,SAA8C,EAAE,EAAE;AAC9F,QAAOJ,UAAUC,+BAA+BG,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as ReadableAtom, d as InferOr, h as QueryParamsHint, l as FragnoClientError, m as MaybeExtractPathParamsOrWiden, n as GitHubAppFragmentPublicClientConfig, o as NonGetHTTPMethod } from "../types-B3_U7vnu.js";
|
|
2
2
|
import * as zod from "zod";
|
|
3
3
|
import { Readable } from "svelte/store";
|
|
4
4
|
import * as _standard_schema_spec0 from "@standard-schema/spec";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte.d.ts","names":["MaybeExtractPathParamsOrWiden","QueryParamsHint","InferOr","
|
|
1
|
+
{"version":3,"file":"svelte.d.ts","names":["MaybeExtractPathParamsOrWiden","QueryParamsHint","InferOr","FragnoClientError","FragnoClientHookData","FragnoClientMutatorData","FragnoStoreData","FragnoStoreFactoryData","FragnoStoreObjectData","NonGetHTTPMethod","ReadableAtom","Readable","StandardSchemaV1","FragnoSvelteHook","_TMethod","TPath$1","TOutputSchema$1","TErrorCode$1","TQueryParameters$1","path","query","args","data","loading","error","FragnoSvelteMutator","TInputSchema$1","Promise","mutate","body","readableToAtom","T","value","runeToAtom","FragnoSvelteStore","TArgs","createSvelteStore","hook","useFragno","Record","K","TPath","TOutputSchema","TErrorCode","TQueryParameters","M","TInputSchema","TStoreObj","TStoreArgs","clientObj"],"sources":["../../../../fragno/dist/client/client.svelte.d.ts","../../../src/client/svelte.ts"],"mappings":";;;;;;;;KAkBKyB,mBAAAA,kBAAqChB,gBAAAA,iDAAiEG,gBAAAA,sCAAsDA,gBAAAA;EAC/JgB,MAAAA,GAASP,IAAAA;IACPQ,IAAAA,GAAO3B,OAAAA,CAAQwB,cAAAA;IACfP,IAAAA,GAAOnB,6BAAAA,CAA8Be,OAAAA,WAAkBJ,QAAAA,WAAmBD,YAAAA;IAC1EU,KAAAA,GAAQnB,eAAAA,CAAgBiB,kBAAAA,WAA6BP,QAAAA,WAAmBD,YAAAA;EAAAA,MACpEiB,OAAAA,CAAQzB,OAAAA,CAAQc,eAAAA;EACtBO,OAAAA,EAASZ,QAAAA;EACTa,KAAAA,EAAOb,QAAAA,CAASR,iBAAAA,CAAkBc,YAAAA;EAClCK,IAAAA,EAAMX,QAAAA,CAAST,OAAAA,CAAQc,eAAAA;AAAAA;;;iBCrBT,6BAAA,CAA8B,MAAA,GAAQ,mCAAA;2CAAwC,gBAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as isMutatorHook, i as createGitHubAppFragmentClients, l as isStore, s as isGetHook, u as atom } from "../factory-
|
|
1
|
+
import { c as isMutatorHook, i as createGitHubAppFragmentClients, l as isStore, s as isGetHook, u as atom } from "../factory-DRMq0TUa.js";
|
|
2
2
|
import "../index.js";
|
|
3
3
|
import { onDestroy } from "svelte";
|
|
4
4
|
import { get, writable } from "svelte/store";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as GitHubAppFragmentPublicClientConfig, o as NonGetHTTPMethod, s as FragnoClientMutatorData } from "../types-B3_U7vnu.js";
|
|
2
2
|
import * as zod from "zod";
|
|
3
3
|
import * as _standard_schema_spec0 from "@standard-schema/spec";
|
|
4
4
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as ReadableAtom, d as InferOr, h as QueryParamsHint, l as FragnoClientError, m as MaybeExtractPathParamsOrWiden, n as GitHubAppFragmentPublicClientConfig, o as NonGetHTTPMethod } from "../types-B3_U7vnu.js";
|
|
2
2
|
import * as zod from "zod";
|
|
3
3
|
import { Ref } from "vue";
|
|
4
4
|
import * as _standard_schema_spec0 from "@standard-schema/spec";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue.d.ts","names":["MaybeExtractPathParamsOrWiden","QueryParamsHint","InferOr","
|
|
1
|
+
{"version":3,"file":"vue.d.ts","names":["MaybeExtractPathParamsOrWiden","QueryParamsHint","InferOr","FragnoClientError","FragnoClientHookData","FragnoClientMutatorData","FragnoStoreFactoryData","FragnoStoreObjectData","NonGetHTTPMethod","ReadableAtom","Store","StoreValue","DeepReadonly","Ref","ShallowRef","UnwrapNestedRefs","StandardSchemaV1","FragnoVueHook","_TMethod","TPath$1","TOutputSchema$1","TErrorCode$1","TQueryParameters$1","path","query","args","data","loading","error","FragnoVueMutator","TInputSchema$1","Promise","mutate","body","FragnoVueStoreRef","T","FragnoVueStoreValue","K","FragnoVueStore","TArgs","refToAtom","ref","useFragno","Record","TPath","TOutputSchema","TErrorCode","TQueryParameters","M","TInputSchema","TStoreObj","TStoreArgs","clientObj","useStore","SomeStore","Value","store"],"sources":["../../../../fragno/dist/client/vue.d.ts","../../../src/client/vue.ts"],"mappings":";;;;;;;;KAkBK6B,gBAAAA,kBAAkCrB,gBAAAA,iDAAiEQ,gBAAAA,sCAAsDA,gBAAAA;EAC5JgB,MAAAA,GAASP,IAAAA;IACPQ,IAAAA,GAAO/B,OAAAA,CAAQ4B,cAAAA;IACfP,IAAAA,GAAOvB,6BAAAA,CAA8BmB,OAAAA,WAAkBN,GAAAA,WAAcJ,YAAAA;IACrEe,KAAAA,GAAQvB,eAAAA,CAAgBqB,kBAAAA,WAA6BT,GAAAA,WAAcJ,YAAAA;EAAAA,MAC/DsB,OAAAA,CAAQ7B,OAAAA,CAAQkB,eAAAA;EACtBO,OAAAA,EAASd,GAAAA;EACTe,KAAAA,EAAOf,GAAAA,CAAIV,iBAAAA,CAAkBkB,YAAAA;EAC7BK,IAAAA,EAAMb,GAAAA,CAAIX,OAAAA,CAAQkB,eAAAA;AAAAA;;;;;;iBCrBJ,6BAAA,CAA8B,MAAA,GAAQ,mCAAA;wCAAwC,gBAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as isMutatorHook, d as isReadableAtom, i as createGitHubAppFragmentClients, l as isStore, s as isGetHook, u as atom } from "../factory-
|
|
1
|
+
import { c as isMutatorHook, d as isReadableAtom, i as createGitHubAppFragmentClients, l as isStore, s as isGetHook, u as atom } from "../factory-DRMq0TUa.js";
|
|
2
2
|
import "../index.js";
|
|
3
3
|
import { computed, getCurrentScope, isRef, onScopeDispose, ref, shallowRef, watch } from "vue";
|
|
4
4
|
|
|
@@ -596,7 +596,7 @@ function isReadableAtom(value) {
|
|
|
596
596
|
}
|
|
597
597
|
|
|
598
598
|
//#endregion
|
|
599
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
599
|
+
//#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/task/index.js
|
|
600
600
|
let tasks = 0;
|
|
601
601
|
let resolves = [];
|
|
602
602
|
function startTask() {
|
|
@@ -618,11 +618,11 @@ function task(cb) {
|
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
//#endregion
|
|
621
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
621
|
+
//#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/clean-stores/index.js
|
|
622
622
|
let clean = Symbol("clean");
|
|
623
623
|
|
|
624
624
|
//#endregion
|
|
625
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
625
|
+
//#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/atom/index.js
|
|
626
626
|
let listenerQueue = [];
|
|
627
627
|
let lqIndex = 0;
|
|
628
628
|
const QUEUE_ITEMS_PER_LISTENER = 4;
|
|
@@ -634,6 +634,7 @@ const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
634
634
|
if (!$atom.lc) $atom.listen(() => {})();
|
|
635
635
|
return $atom.value;
|
|
636
636
|
},
|
|
637
|
+
init: initialValue,
|
|
637
638
|
lc: 0,
|
|
638
639
|
listen(listener) {
|
|
639
640
|
$atom.lc = listeners.push(listener);
|
|
@@ -680,7 +681,7 @@ const atom = /* @__NO_SIDE_EFFECTS__ */ (initialValue) => {
|
|
|
680
681
|
};
|
|
681
682
|
|
|
682
683
|
//#endregion
|
|
683
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
684
|
+
//#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/lifecycle/index.js
|
|
684
685
|
const START = 0;
|
|
685
686
|
const STOP = 1;
|
|
686
687
|
const MOUNT = 5;
|
|
@@ -775,7 +776,21 @@ let onMount = ($store, initialize) => {
|
|
|
775
776
|
};
|
|
776
777
|
|
|
777
778
|
//#endregion
|
|
778
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
779
|
+
//#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/warn/index.js
|
|
780
|
+
let warned = {};
|
|
781
|
+
function warn(text) {
|
|
782
|
+
if (!warned[text]) {
|
|
783
|
+
warned[text] = true;
|
|
784
|
+
if (typeof console !== "undefined" && console.warn) {
|
|
785
|
+
console.groupCollapsed("Nano Stores: " + text);
|
|
786
|
+
console.trace("Source of deprecated call");
|
|
787
|
+
console.groupEnd();
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
//#endregion
|
|
793
|
+
//#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/computed/index.js
|
|
779
794
|
let computedStore = (stores, cb, batched) => {
|
|
780
795
|
if (!Array.isArray(stores)) stores = [stores];
|
|
781
796
|
let previousArgs;
|
|
@@ -787,10 +802,12 @@ let computedStore = (stores, cb, batched) => {
|
|
|
787
802
|
if (!previousArgs || args.some((arg, i) => arg !== previousArgs[i])) {
|
|
788
803
|
previousArgs = args;
|
|
789
804
|
let value = cb(...args);
|
|
790
|
-
if (value && value.then && value.t)
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
805
|
+
if (value && value.then && value.t) {
|
|
806
|
+
warn("Use @nanostores/async for async computed. We will remove Promise support in computed() in Nano Stores 2.0");
|
|
807
|
+
value.then((asyncValue) => {
|
|
808
|
+
if (previousArgs === args) $computed.set(asyncValue);
|
|
809
|
+
});
|
|
810
|
+
} else {
|
|
794
811
|
$computed.set(value);
|
|
795
812
|
currentEpoch = epoch;
|
|
796
813
|
}
|
|
@@ -820,7 +837,7 @@ const computed = /* @__NO_SIDE_EFFECTS__ */ (stores, fn) => computedStore(stores
|
|
|
820
837
|
const batched = /* @__NO_SIDE_EFFECTS__ */ (stores, fn) => computedStore(stores, fn, true);
|
|
821
838
|
|
|
822
839
|
//#endregion
|
|
823
|
-
//#region ../../node_modules/.pnpm/nanostores@1.
|
|
840
|
+
//#region ../../node_modules/.pnpm/nanostores@1.2.0/node_modules/nanostores/map/index.js
|
|
824
841
|
const map = /* @__NO_SIDE_EFFECTS__ */ (initial = {}) => {
|
|
825
842
|
let $map = /* @__PURE__ */ atom(initial);
|
|
826
843
|
$map.setKey = function(key, value) {
|
|
@@ -1131,7 +1148,7 @@ let createNanoEvents = () => ({
|
|
|
1131
1148
|
});
|
|
1132
1149
|
|
|
1133
1150
|
//#endregion
|
|
1134
|
-
//#region ../../node_modules/.pnpm/@nanostores+query@0.3.4_nanostores@1.
|
|
1151
|
+
//#region ../../node_modules/.pnpm/@nanostores+query@0.3.4_nanostores@1.2.0/node_modules/@nanostores/query/dist/nanoquery.js
|
|
1135
1152
|
function defaultOnErrorRetry({ retryCount }) {
|
|
1136
1153
|
return ~~((Math.random() + .5) * (1 << (retryCount < 8 ? retryCount : 8))) * 2e3;
|
|
1137
1154
|
}
|
|
@@ -2207,4 +2224,4 @@ function getGitHubAppFromFragment(fragment) {
|
|
|
2207
2224
|
|
|
2208
2225
|
//#endregion
|
|
2209
2226
|
export { githubAppRoutesFactory as a, isMutatorHook as c, isReadableAtom as d, createGitHubAppFragmentClients as i, isStore as l, getGitHubApiClientFromFragment as n, githubAppFragmentDefinition as o, getGitHubAppFromFragment as r, isGetHook as s, createGitHubAppFragment as t, atom as u };
|
|
2210
|
-
//# sourceMappingURL=factory-
|
|
2227
|
+
//# sourceMappingURL=factory-DRMq0TUa.js.map
|