houdini-svelte 1.0.0-next.2 → 1.0.0-next.20

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.
Files changed (84) hide show
  1. package/README.md +4 -1
  2. package/build/plugin/artifactData.d.ts +5 -2
  3. package/build/plugin/codegen/stores/fragment.d.ts +2 -2
  4. package/build/plugin/codegen/stores/mutation.d.ts +2 -2
  5. package/build/plugin/codegen/stores/query.d.ts +2 -2
  6. package/build/plugin/codegen/stores/subscription.d.ts +2 -2
  7. package/build/plugin/extract.d.ts +5 -3
  8. package/build/plugin/index.d.ts +6 -8
  9. package/build/plugin/kit.d.ts +1 -1
  10. package/build/plugin/naming.d.ts +1 -1
  11. package/build/plugin/transforms/index.d.ts +2 -0
  12. package/build/plugin/validate.d.ts +2 -2
  13. package/build/plugin-cjs/index.js +7748 -3435
  14. package/build/plugin-esm/index.js +7682 -3370
  15. package/build/preprocess/index.d.ts +1 -0
  16. package/build/preprocess-cjs/index.js +7795 -3469
  17. package/build/preprocess-esm/index.js +7741 -3415
  18. package/build/runtime/client.d.ts +3 -1
  19. package/build/runtime/fragments.d.ts +3 -1
  20. package/build/runtime/stores/base.d.ts +8 -0
  21. package/build/runtime/stores/fragment.d.ts +2 -2
  22. package/build/runtime/stores/mutation.d.ts +7 -10
  23. package/build/runtime/stores/pagination/cursor.d.ts +2 -1
  24. package/build/runtime/stores/pagination/fragment.d.ts +6 -34
  25. package/build/runtime/stores/pagination/index.d.ts +2 -2
  26. package/build/runtime/stores/pagination/offset.d.ts +2 -1
  27. package/build/runtime/stores/pagination/query.d.ts +6 -15
  28. package/build/runtime/stores/query.d.ts +9 -11
  29. package/build/runtime/stores/subscription.d.ts +3 -4
  30. package/build/runtime-cjs/client.d.ts +3 -1
  31. package/build/runtime-cjs/client.js +16 -4
  32. package/build/runtime-cjs/fragments.d.ts +3 -1
  33. package/build/runtime-cjs/fragments.js +1 -0
  34. package/build/runtime-cjs/stores/base.d.ts +8 -0
  35. package/build/runtime-cjs/{imports/client.js → stores/base.js} +25 -7
  36. package/build/runtime-cjs/stores/fragment.d.ts +2 -2
  37. package/build/runtime-cjs/stores/mutation.d.ts +7 -10
  38. package/build/runtime-cjs/stores/mutation.js +15 -13
  39. package/build/runtime-cjs/stores/pagination/cursor.d.ts +2 -1
  40. package/build/runtime-cjs/stores/pagination/cursor.js +60 -27
  41. package/build/runtime-cjs/stores/pagination/fragment.d.ts +6 -34
  42. package/build/runtime-cjs/stores/pagination/fragment.js +18 -40
  43. package/build/runtime-cjs/stores/pagination/index.d.ts +2 -2
  44. package/build/runtime-cjs/stores/pagination/index.js +4 -8
  45. package/build/runtime-cjs/stores/pagination/offset.d.ts +2 -1
  46. package/build/runtime-cjs/stores/pagination/offset.js +3 -1
  47. package/build/runtime-cjs/stores/pagination/query.d.ts +6 -15
  48. package/build/runtime-cjs/stores/pagination/query.js +39 -40
  49. package/build/runtime-cjs/stores/query.d.ts +9 -11
  50. package/build/runtime-cjs/stores/query.js +45 -15
  51. package/build/runtime-cjs/stores/subscription.d.ts +3 -4
  52. package/build/runtime-cjs/stores/subscription.js +6 -7
  53. package/build/runtime-esm/client.d.ts +3 -1
  54. package/build/runtime-esm/client.js +13 -2
  55. package/build/runtime-esm/fragments.d.ts +3 -1
  56. package/build/runtime-esm/fragments.js +1 -0
  57. package/build/runtime-esm/stores/base.d.ts +8 -0
  58. package/build/runtime-esm/stores/base.js +21 -0
  59. package/build/runtime-esm/stores/fragment.d.ts +2 -2
  60. package/build/runtime-esm/stores/mutation.d.ts +7 -10
  61. package/build/runtime-esm/stores/mutation.js +16 -14
  62. package/build/runtime-esm/stores/pagination/cursor.d.ts +2 -1
  63. package/build/runtime-esm/stores/pagination/cursor.js +60 -27
  64. package/build/runtime-esm/stores/pagination/fragment.d.ts +6 -34
  65. package/build/runtime-esm/stores/pagination/fragment.js +18 -39
  66. package/build/runtime-esm/stores/pagination/index.d.ts +2 -2
  67. package/build/runtime-esm/stores/pagination/index.js +4 -10
  68. package/build/runtime-esm/stores/pagination/offset.d.ts +2 -1
  69. package/build/runtime-esm/stores/pagination/offset.js +3 -1
  70. package/build/runtime-esm/stores/pagination/query.d.ts +6 -15
  71. package/build/runtime-esm/stores/pagination/query.js +40 -40
  72. package/build/runtime-esm/stores/query.d.ts +9 -11
  73. package/build/runtime-esm/stores/query.js +46 -16
  74. package/build/runtime-esm/stores/subscription.d.ts +3 -4
  75. package/build/runtime-esm/stores/subscription.js +7 -8
  76. package/build/test/index.d.ts +3 -3
  77. package/build/test-cjs/index.js +15299 -6267
  78. package/build/test-esm/index.js +15211 -6179
  79. package/package.json +7 -9
  80. package/build/plugin/transforms/reactive.d.ts +0 -3
  81. package/build/runtime/imports/client.d.ts +0 -3
  82. package/build/runtime-cjs/imports/client.d.ts +0 -3
  83. package/build/runtime-esm/imports/client.d.ts +0 -3
  84. package/build/runtime-esm/imports/client.js +0 -5
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  <div align="center">
2
- <img alt="houdini" height="200" src="https://raw.githubusercontent.com/HoudiniGraphql/houdini/main/.github/assets/houdini-v5.png" />
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>
3
6
  <br />
4
7
  <br />
5
8
  <strong>
@@ -1,5 +1,8 @@
1
- import type { CollectedGraphQLDocument, Config } from 'houdini';
1
+ import type { Document, Config } from 'houdini';
2
2
  export type PluginArtifactData = {
3
3
  isManualLoad?: boolean;
4
4
  };
5
- export declare function artifactData(config: Config, doc: CollectedGraphQLDocument): PluginArtifactData;
5
+ export declare function artifactData({ config, document, }: {
6
+ config: Config;
7
+ document: Document;
8
+ }): PluginArtifactData;
@@ -1,2 +1,2 @@
1
- import type { CollectedGraphQLDocument, GenerateHookInput } from 'houdini';
2
- export declare function fragmentStore({ config, plugin_root }: GenerateHookInput, doc: CollectedGraphQLDocument): Promise<string>;
1
+ import type { Document, GenerateHookInput } from 'houdini';
2
+ export declare function fragmentStore({ config, pluginRoot }: GenerateHookInput, doc: Document): Promise<string>;
@@ -1,2 +1,2 @@
1
- import type { CollectedGraphQLDocument, GenerateHookInput } from 'houdini';
2
- export declare function mutationStore({ config, plugin_root }: GenerateHookInput, doc: CollectedGraphQLDocument): Promise<string>;
1
+ import type { Document, GenerateHookInput } from 'houdini';
2
+ export declare function mutationStore({ config, pluginRoot }: GenerateHookInput, doc: Document): Promise<string>;
@@ -1,2 +1,2 @@
1
- import type { CollectedGraphQLDocument, GenerateHookInput } from 'houdini';
2
- export declare function queryStore({ config, plugin_root }: GenerateHookInput, doc: CollectedGraphQLDocument): Promise<string>;
1
+ import type { Document, GenerateHookInput } from 'houdini';
2
+ export declare function queryStore({ config, pluginRoot }: GenerateHookInput, doc: Document): Promise<string>;
@@ -1,2 +1,2 @@
1
- import type { CollectedGraphQLDocument, GenerateHookInput } from 'houdini';
2
- export declare function subscriptionStore({ config, plugin_root }: GenerateHookInput, doc: CollectedGraphQLDocument): Promise<string>;
1
+ import type { Document, GenerateHookInput } from 'houdini';
2
+ export declare function subscriptionStore({ config, pluginRoot }: GenerateHookInput, doc: Document): Promise<string>;
@@ -1,6 +1,8 @@
1
- import type { Config } from 'houdini';
2
- import { type Maybe, type Script } from 'houdini';
3
- export default function (config: Config, filepath: string, contents: string): Promise<string[]>;
1
+ import type { Config, Maybe, Script } from 'houdini';
2
+ export default function ({ config, content, }: {
3
+ config: Config;
4
+ content: string;
5
+ }): Promise<string[]>;
4
6
  export declare function parseSvelte(str: string): Promise<ParsedFile>;
5
7
  export type ParsedFile = Maybe<{
6
8
  script: Script;
@@ -1,8 +1,8 @@
1
- import type { PluginFactory } from 'houdini';
2
- import { type Config } from 'houdini';
1
+ import type { PluginHooks, Config } from 'houdini';
3
2
  export declare let _config: Config;
4
- declare const HoudiniSveltePlugin: PluginFactory;
5
- export default HoudiniSveltePlugin;
3
+ export declare const pluginHooks: () => Promise<PluginHooks>;
4
+ declare const _default: import("houdini").PluginInit;
5
+ export default _default;
6
6
  declare module 'houdini' {
7
7
  interface HoudiniPluginConfig {
8
8
  'houdini-svelte': HoudiniSvelteConfig;
@@ -38,11 +38,9 @@ export type HoudiniSvelteConfig = {
38
38
  mutation?: string;
39
39
  subscription?: string;
40
40
  fragment?: string;
41
- queryForwardsCursor?: string;
42
- queryBackwardsCursor?: string;
41
+ queryCursor?: string;
43
42
  queryOffset?: string;
44
- fragmentForwardsCursor?: string;
45
- fragmentBackwardsCursor?: string;
43
+ fragmentCursor?: string;
46
44
  fragmentOffset?: string;
47
45
  };
48
46
  };
@@ -45,7 +45,7 @@ export type HoudiniRouteScript = {
45
45
  };
46
46
  export declare function route_page_path(config: Config, filename: string): string;
47
47
  export declare function stores_directory_name(): string;
48
- export declare function stores_directory(plugin_root: string): string;
48
+ export declare function stores_directory(pluginRoot: string): string;
49
49
  export declare function type_route_dir(config: Config): string;
50
50
  export declare function store_import_path({ config, name }: {
51
51
  config: Config;
@@ -1,5 +1,5 @@
1
1
  export declare const query_variable_fn: (name: string) => string;
2
2
  export declare const houdini_load_fn = "_houdini_load";
3
3
  export declare const houdini_before_load_fn = "_houdini_beforeLoad";
4
- export declare const houdini_after_load_fn = "_houdini_afterLoad";
4
+ export declare const houdini_afterLoad_fn = "_houdini_afterLoad";
5
5
  export declare const houdini_on_error_fn = "_houdini_onError";
@@ -1,5 +1,7 @@
1
1
  import type { TransformPage } from 'houdini/vite';
2
+ import type { SourceMapInput } from 'rollup';
2
3
  import type { Framework } from '../kit';
3
4
  export default function apply_transforms(framework: Framework, page: TransformPage): Promise<{
4
5
  code: string;
6
+ map?: SourceMapInput;
5
7
  }>;
@@ -1,5 +1,5 @@
1
- import type { Config, CollectedGraphQLDocument } from 'houdini';
1
+ import type { Config, Document } from 'houdini';
2
2
  export default function validateDocuments({ config, documents, }: {
3
3
  config: Config;
4
- documents: CollectedGraphQLDocument[];
4
+ documents: Document[];
5
5
  }): Promise<void>;