houdini-react 1.2.0-react.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/LICENSE +21 -0
- package/README.md +36 -0
- package/build/next/index.d.ts +2 -0
- package/build/next-cjs/index.js +50 -0
- package/build/next-cjs/package.json +1 -0
- package/build/next-esm/index.js +26 -0
- package/build/next-esm/package.json +1 -0
- package/build/plugin/config.d.ts +3 -0
- package/build/plugin/extract.d.ts +6 -0
- package/build/plugin/index.d.ts +3 -0
- package/build/plugin/transform.d.ts +6 -0
- package/build/plugin-cjs/index.js +78313 -0
- package/build/plugin-cjs/package.json +1 -0
- package/build/plugin-esm/index.js +78307 -0
- package/build/plugin-esm/package.json +1 -0
- package/build/runtime/context.d.ts +7 -0
- package/build/runtime/hooks/index.d.ts +8 -0
- package/build/runtime/hooks/useDeepCompareEffect.d.ts +35 -0
- package/build/runtime/hooks/useDocumentHandle.d.ts +34 -0
- package/build/runtime/hooks/useDocumentStore.d.ts +11 -0
- package/build/runtime/hooks/useDocumentSubscription.d.ts +14 -0
- package/build/runtime/hooks/useFragment.d.ts +15 -0
- package/build/runtime/hooks/useFragmentHandle.d.ts +9 -0
- package/build/runtime/hooks/useHoudiniClient.d.ts +2 -0
- package/build/runtime/hooks/useIsMounted.d.ts +3 -0
- package/build/runtime/hooks/useMutation.d.ts +10 -0
- package/build/runtime/hooks/useQuery.d.ts +5 -0
- package/build/runtime/hooks/useQueryHandle.d.ts +10 -0
- package/build/runtime/hooks/useSubscription.d.ts +4 -0
- package/build/runtime/hooks/useSubscriptionHandle.d.ts +25 -0
- package/build/runtime/index.d.ts +2 -0
- package/build/runtime/lib/cache.d.ts +62 -0
- package/build/runtime-cjs/context.d.ts +7 -0
- package/build/runtime-cjs/context.js +41 -0
- package/build/runtime-cjs/hooks/index.d.ts +8 -0
- package/build/runtime-cjs/hooks/index.js +45 -0
- package/build/runtime-cjs/hooks/useDeepCompareEffect.d.ts +35 -0
- package/build/runtime-cjs/hooks/useDeepCompareEffect.js +72 -0
- package/build/runtime-cjs/hooks/useDocumentHandle.d.ts +34 -0
- package/build/runtime-cjs/hooks/useDocumentHandle.js +127 -0
- package/build/runtime-cjs/hooks/useDocumentStore.d.ts +11 -0
- package/build/runtime-cjs/hooks/useDocumentStore.js +63 -0
- package/build/runtime-cjs/hooks/useDocumentSubscription.d.ts +14 -0
- package/build/runtime-cjs/hooks/useDocumentSubscription.js +65 -0
- package/build/runtime-cjs/hooks/useFragment.d.ts +15 -0
- package/build/runtime-cjs/hooks/useFragment.js +93 -0
- package/build/runtime-cjs/hooks/useFragmentHandle.d.ts +9 -0
- package/build/runtime-cjs/hooks/useFragmentHandle.js +47 -0
- package/build/runtime-cjs/hooks/useHoudiniClient.d.ts +2 -0
- package/build/runtime-cjs/hooks/useHoudiniClient.js +42 -0
- package/build/runtime-cjs/hooks/useIsMounted.d.ts +3 -0
- package/build/runtime-cjs/hooks/useIsMounted.js +38 -0
- package/build/runtime-cjs/hooks/useMutation.d.ts +10 -0
- package/build/runtime-cjs/hooks/useMutation.js +48 -0
- package/build/runtime-cjs/hooks/useQuery.d.ts +5 -0
- package/build/runtime-cjs/hooks/useQuery.js +32 -0
- package/build/runtime-cjs/hooks/useQueryHandle.d.ts +10 -0
- package/build/runtime-cjs/hooks/useQueryHandle.js +125 -0
- package/build/runtime-cjs/hooks/useSubscription.d.ts +4 -0
- package/build/runtime-cjs/hooks/useSubscription.js +32 -0
- package/build/runtime-cjs/hooks/useSubscriptionHandle.d.ts +25 -0
- package/build/runtime-cjs/hooks/useSubscriptionHandle.js +42 -0
- package/build/runtime-cjs/index.d.ts +2 -0
- package/build/runtime-cjs/index.js +30 -0
- package/build/runtime-cjs/lib/cache.d.ts +62 -0
- package/build/runtime-cjs/lib/cache.js +71 -0
- package/build/runtime-cjs/package.json +1 -0
- package/build/runtime-esm/context.d.ts +7 -0
- package/build/runtime-esm/context.js +10 -0
- package/build/runtime-esm/hooks/index.d.ts +8 -0
- package/build/runtime-esm/hooks/index.js +16 -0
- package/build/runtime-esm/hooks/useDeepCompareEffect.d.ts +35 -0
- package/build/runtime-esm/hooks/useDeepCompareEffect.js +41 -0
- package/build/runtime-esm/hooks/useDocumentHandle.d.ts +34 -0
- package/build/runtime-esm/hooks/useDocumentHandle.js +99 -0
- package/build/runtime-esm/hooks/useDocumentStore.d.ts +11 -0
- package/build/runtime-esm/hooks/useDocumentStore.js +33 -0
- package/build/runtime-esm/hooks/useDocumentSubscription.d.ts +14 -0
- package/build/runtime-esm/hooks/useDocumentSubscription.js +35 -0
- package/build/runtime-esm/hooks/useFragment.d.ts +15 -0
- package/build/runtime-esm/hooks/useFragment.js +62 -0
- package/build/runtime-esm/hooks/useFragmentHandle.d.ts +9 -0
- package/build/runtime-esm/hooks/useFragmentHandle.js +23 -0
- package/build/runtime-esm/hooks/useHoudiniClient.d.ts +2 -0
- package/build/runtime-esm/hooks/useHoudiniClient.js +12 -0
- package/build/runtime-esm/hooks/useIsMounted.d.ts +3 -0
- package/build/runtime-esm/hooks/useIsMounted.js +14 -0
- package/build/runtime-esm/hooks/useMutation.d.ts +10 -0
- package/build/runtime-esm/hooks/useMutation.js +24 -0
- package/build/runtime-esm/hooks/useQuery.d.ts +5 -0
- package/build/runtime-esm/hooks/useQuery.js +8 -0
- package/build/runtime-esm/hooks/useQueryHandle.d.ts +10 -0
- package/build/runtime-esm/hooks/useQueryHandle.js +95 -0
- package/build/runtime-esm/hooks/useSubscription.d.ts +4 -0
- package/build/runtime-esm/hooks/useSubscription.js +8 -0
- package/build/runtime-esm/hooks/useSubscriptionHandle.d.ts +25 -0
- package/build/runtime-esm/hooks/useSubscriptionHandle.js +18 -0
- package/build/runtime-esm/index.d.ts +2 -0
- package/build/runtime-esm/index.js +5 -0
- package/build/runtime-esm/lib/cache.d.ts +62 -0
- package/build/runtime-esm/lib/cache.js +47 -0
- package/build/runtime-esm/package.json +1 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Alec Aivazis
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/HoudiniGraphql/houdini/main/.github/assetss/logo_l.svg">
|
|
4
|
+
<img height="140" alt="Houdini's logo (dark or light)" src="https://raw.githubusercontent.com/HoudiniGraphql/houdini/main/.github/assets/logo_d.svg">
|
|
5
|
+
</picture>
|
|
6
|
+
<br />
|
|
7
|
+
<br />
|
|
8
|
+
<strong>
|
|
9
|
+
The disappearing GraphQL clients.
|
|
10
|
+
</strong>
|
|
11
|
+
<br />
|
|
12
|
+
<br />
|
|
13
|
+
<a href="https://npmjs.org/package/houdini">
|
|
14
|
+
<img src="https://img.shields.io/npm/v/houdini.svg" alt="version" />
|
|
15
|
+
</a>
|
|
16
|
+
<a href="https://github.com/HoudiniGraphql/houdini/actions">
|
|
17
|
+
<img src="https://github.com/HoudiniGraphql/houdini/actions/workflows/tests.yml/badge.svg" alt="CI Tests" />
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://github.com/HoudiniGraphql/houdini">
|
|
20
|
+
<img src="https://img.shields.io/github/stars/HoudiniGraphql/houdini.svg?label=stars" alt="github stars" />
|
|
21
|
+
</a>
|
|
22
|
+
<a href="https://npmjs.org/package/houdini">
|
|
23
|
+
<img src="https://img.shields.io/npm/dm/houdini.svg" alt="downloads" />
|
|
24
|
+
</a>
|
|
25
|
+
<a href="https://github.com/HoudiniGraphql/houdini/blob/main/LICENSE">
|
|
26
|
+
<img src="https://img.shields.io/github/license/HoudiniGraphql/houdini.svg?maxAge=2592000" alt="license" />
|
|
27
|
+
</a>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
----
|
|
31
|
+
|
|
32
|
+
At its core, houdini seeks to enable a high quality developer experience
|
|
33
|
+
without compromising bundle size. Like Svelte, houdini shifts what is
|
|
34
|
+
traditionally handled by a bloated runtime into a compile step that allows
|
|
35
|
+
for the generation of an incredibly lean GraphQL abstraction for your application.
|
|
36
|
+
See more at <a href="https://www.houdinigraphql.com">HoudiniGraphQL.com</a> 🚀
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const require = conflict_free(import.meta.url);
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/next/index.ts
|
|
22
|
+
var next_exports = {};
|
|
23
|
+
__export(next_exports, {
|
|
24
|
+
withHoudini: () => withHoudini
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(next_exports);
|
|
27
|
+
function withHoudini(nextConfig) {
|
|
28
|
+
return {
|
|
29
|
+
...nextConfig,
|
|
30
|
+
webpack(config, options) {
|
|
31
|
+
config.module.rules.push({
|
|
32
|
+
test: /\.(jsx|tsx)$/,
|
|
33
|
+
use: [
|
|
34
|
+
options.defaultLoaders.babel,
|
|
35
|
+
{
|
|
36
|
+
loader: "houdini/webpack"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
if (nextConfig && typeof nextConfig.webpack === "function") {
|
|
41
|
+
return nextConfig.webpack(config, options);
|
|
42
|
+
}
|
|
43
|
+
return config;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
withHoudini
|
|
50
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const require = conflict_free(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// src/next/index.ts
|
|
4
|
+
function withHoudini(nextConfig) {
|
|
5
|
+
return {
|
|
6
|
+
...nextConfig,
|
|
7
|
+
webpack(config, options) {
|
|
8
|
+
config.module.rules.push({
|
|
9
|
+
test: /\.(jsx|tsx)$/,
|
|
10
|
+
use: [
|
|
11
|
+
options.defaultLoaders.babel,
|
|
12
|
+
{
|
|
13
|
+
loader: "houdini/webpack"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
if (nextConfig && typeof nextConfig.webpack === "function") {
|
|
18
|
+
return nextConfig.webpack(config, options);
|
|
19
|
+
}
|
|
20
|
+
return config;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
withHoudini
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|