houdini-svelte 2.1.6 → 2.1.8

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.
@@ -1,5 +1,5 @@
1
1
  import type { Config } from 'houdini';
2
- import type { HoudiniSvelteConfig } from '../../';
2
+ import { type HoudiniSvelteConfig } from '../../config';
3
3
  export declare function store_import(cfg: Config, which: keyof Required<HoudiniSvelteConfig>['customStores']): {
4
4
  statement: string;
5
5
  store_class: string;
@@ -0,0 +1,53 @@
1
+ import type { Config } from 'houdini';
2
+ export type HoudiniSvelteConfig = {
3
+ /**
4
+ * A relative path from your houdini.config.js to the file that exports your client as its default value
5
+ * @default `./src/client.ts`
6
+ */
7
+ client?: string;
8
+ /**
9
+ * Specifies whether the client side routing is blocking or not. (default: `false`)
10
+ */
11
+ defaultRouteBlocking?: boolean;
12
+ /**
13
+ * The name of the file used to define page queries.
14
+ * @default +page.gql
15
+ */
16
+ pageQueryFilename?: string;
17
+ /**
18
+ * The name of the file used to define layout queries.
19
+ * @default +layout.gql
20
+ */
21
+ layoutQueryFilename?: string;
22
+ /**
23
+ * A flag to treat every component as a non-route. This is useful for projects built with the static-adapter
24
+ * @default false
25
+ */
26
+ static?: boolean;
27
+ /**
28
+ * set the framework to use. It should be automatically detected but you can override it here.
29
+ * @default undefined
30
+ */
31
+ framework: 'kit' | 'svelte' | undefined;
32
+ /**
33
+ * Force Houdini to always use Runes under the hood. Set this to true if you are enabling Runes mode globally for your app.
34
+ * When disabled, Houdini will try to detect Runes and go into Runes mode if required.
35
+ * @default false
36
+ */
37
+ forceRunesMode?: boolean;
38
+ /**
39
+ * Override the classes used when building stores for documents. Values should take the form package.export
40
+ * For example, if you have a store exported from $lib/stores you should set the value to "$lib/stores.CustomStore".
41
+ */
42
+ customStores?: {
43
+ query?: string;
44
+ mutation?: string;
45
+ subscription?: string;
46
+ fragment?: string;
47
+ queryCursor?: string;
48
+ queryOffset?: string;
49
+ fragmentCursor?: string;
50
+ fragmentOffset?: string;
51
+ };
52
+ };
53
+ export declare function plugin_config(config: Config): Required<HoudiniSvelteConfig>;
@@ -1,5 +1,9 @@
1
+ import * as graphql from 'graphql';
1
2
  import type { Config } from 'houdini';
2
- import type { HoudiniRouteScript } from './kit';
3
+ export type HoudiniRouteScript = {
4
+ houdini_load?: graphql.OperationDefinitionNode[];
5
+ exports: string[];
6
+ };
3
7
  export declare function extract_load_function(config: Config, filepath: string, mockArtifacts?: Record<string, {
4
8
  raw: string;
5
9
  }>): Promise<HoudiniRouteScript>;
@@ -1,5 +1,5 @@
1
- import type { Config, PluginHooks } from 'houdini';
2
- export declare let _config: Config;
1
+ import type { PluginHooks } from 'houdini';
2
+ import { type HoudiniSvelteConfig } from './config';
3
3
  export declare const pluginHooks: () => Promise<PluginHooks>;
4
4
  declare const _default: import("houdini").PluginInit;
5
5
  export default _default;
@@ -8,54 +8,3 @@ declare module 'houdini' {
8
8
  'houdini-svelte': HoudiniSvelteConfig;
9
9
  }
10
10
  }
11
- export type HoudiniSvelteConfig = {
12
- /**
13
- * A relative path from your houdini.config.js to the file that exports your client as its default value
14
- * @default `./src/client.ts`
15
- */
16
- client?: string;
17
- /**
18
- * Specifies whether the client side routing is blocking or not. (default: `false`)
19
- */
20
- defaultRouteBlocking?: boolean;
21
- /**
22
- * The name of the file used to define page queries.
23
- * @default +page.gql
24
- */
25
- pageQueryFilename?: string;
26
- /**
27
- * The name of the file used to define layout queries.
28
- * @default +layout.gql
29
- */
30
- layoutQueryFilename?: string;
31
- /**
32
- * A flag to treat every component as a non-route. This is useful for projects built with the static-adapter
33
- * @default false
34
- */
35
- static?: boolean;
36
- /**
37
- * set the framework to use. It should be automatically detected but you can override it here.
38
- * @default undefined
39
- */
40
- framework: 'kit' | 'svelte' | undefined;
41
- /**
42
- * Force Houdini to always use Runes under the hood. Set this to true if you are enabling Runes mode globally for your app.
43
- * When disabled, Houdini will try to detect Runes and go into Runes mode if required.
44
- * @default false
45
- */
46
- forceRunesMode?: boolean;
47
- /**
48
- * Override the classes used when building stores for documents. Values should take the form package.export
49
- * For example, if you have a store exported from $lib/stores you should set the value to "$lib/stores.CustomStore".
50
- */
51
- customStores?: {
52
- query?: string;
53
- mutation?: string;
54
- subscription?: string;
55
- fragment?: string;
56
- queryCursor?: string;
57
- queryOffset?: string;
58
- fragmentCursor?: string;
59
- fragmentOffset?: string;
60
- };
61
- };
@@ -1,7 +1,6 @@
1
1
  import * as graphql from 'graphql';
2
2
  import type { Config } from 'houdini';
3
3
  import type * as recast from 'recast';
4
- import type { HoudiniSvelteConfig } from '.';
5
4
  import type { SvelteTransformPage } from './transforms/types';
6
5
  type Identifier = recast.types.namedTypes.Identifier;
7
6
  export declare function is_route(config: Config, framework: Framework, filepath: string): boolean;
@@ -45,24 +44,7 @@ export type RouteVisitor = {
45
44
  }>;
46
45
  };
47
46
  type RouteVisitorHandler<_Payload> = (value: _Payload, filepath: string) => Promise<void> | void;
48
- export type HoudiniRouteScript = {
49
- houdini_load?: graphql.OperationDefinitionNode[];
50
- exports: string[];
51
- };
52
47
  export declare function route_page_path(config: Config, filename: string): string;
53
- export declare function stores_directory_name(): string;
54
- export declare function stores_directory(pluginRoot: string): string;
55
- export declare function type_route_dir(config: Config): string;
56
- export declare function store_import_path({ config, name }: {
57
- config: Config;
58
- name: string;
59
- }): string;
60
- export declare function store_suffix(config: Config): string;
61
- export declare function store_name({ config, name }: {
62
- config: Config;
63
- name: string;
64
- }): string;
65
- export declare function plugin_config(config: Config): Required<HoudiniSvelteConfig>;
66
48
  export declare function store_import({ page, artifact, local, }: {
67
49
  page: SvelteTransformPage;
68
50
  artifact: {
@@ -0,0 +1,3 @@
1
+ import type { Config } from 'houdini';
2
+ export declare let _config: Config;
3
+ export declare function setConfig(config: Config): void;
@@ -0,0 +1,13 @@
1
+ import type { Config } from 'houdini';
2
+ export declare function stores_directory_name(): string;
3
+ export declare function stores_directory(pluginRoot: string): string;
4
+ export declare function type_route_dir(config: Config): string;
5
+ export declare function store_import_path({ config, name }: {
6
+ config: Config;
7
+ name: string;
8
+ }): string;
9
+ export declare function store_suffix(config: Config): string;
10
+ export declare function store_name({ config, name }: {
11
+ config: Config;
12
+ name: string;
13
+ }): string;