houdini-svelte 0.19.4 → 0.20.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/build/plugin/routing.d.ts +33 -0
- package/build/plugin/transforms/{query.d.ts → componentQuery.d.ts} +2 -4
- package/build/plugin-cjs/index.js +514 -285
- package/build/plugin-esm/index.js +514 -285
- package/build/preprocess-cjs/index.js +525 -320
- package/build/preprocess-esm/index.js +525 -320
- package/build/runtime/session.d.ts +0 -9
- package/build/runtime/stores/mutation.d.ts +2 -2
- package/build/runtime/stores/pagination/fragment.d.ts +10 -10
- package/build/runtime/stores/query.d.ts +1 -1
- package/build/runtime-cjs/session.d.ts +0 -9
- package/build/runtime-cjs/session.js +0 -14
- package/build/runtime-cjs/stores/mutation.d.ts +2 -2
- package/build/runtime-cjs/stores/mutation.js +7 -7
- package/build/runtime-cjs/stores/pagination/cursor.js +1 -1
- package/build/runtime-cjs/stores/pagination/fragment.d.ts +10 -10
- package/build/runtime-cjs/stores/pagination/fragment.js +4 -4
- package/build/runtime-cjs/stores/pagination/offset.js +1 -1
- package/build/runtime-cjs/stores/query.d.ts +1 -1
- package/build/runtime-cjs/stores/query.js +6 -6
- package/build/runtime-esm/session.d.ts +0 -9
- package/build/runtime-esm/session.js +0 -14
- package/build/runtime-esm/stores/mutation.d.ts +2 -2
- package/build/runtime-esm/stores/mutation.js +7 -7
- package/build/runtime-esm/stores/pagination/cursor.js +1 -1
- package/build/runtime-esm/stores/pagination/fragment.d.ts +10 -10
- package/build/runtime-esm/stores/pagination/fragment.js +4 -4
- package/build/runtime-esm/stores/pagination/offset.js +1 -1
- package/build/runtime-esm/stores/query.d.ts +1 -1
- package/build/runtime-esm/stores/query.js +6 -6
- package/build/test/index.d.ts +2 -1
- package/build/test-cjs/index.js +932 -671
- package/build/test-esm/index.js +932 -671
- package/package.json +2 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type RouteParam = {
|
|
2
|
+
name: string;
|
|
3
|
+
matcher: string;
|
|
4
|
+
optional: boolean;
|
|
5
|
+
rest: boolean;
|
|
6
|
+
chained: boolean;
|
|
7
|
+
};
|
|
8
|
+
export interface ParamMatcher {
|
|
9
|
+
(param: string): boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Creates the regex pattern, extracts parameter names, and generates types for a route
|
|
13
|
+
*/
|
|
14
|
+
export declare function route_params(id: string): {
|
|
15
|
+
pattern: RegExp;
|
|
16
|
+
params: RouteParam[];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Splits a route id into its segments, removing segments that
|
|
20
|
+
* don't affect the path (i.e. groups). The root route is represented by `/`
|
|
21
|
+
* and will be returned as `['']`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function get_route_segments(route: string): string[];
|
|
24
|
+
export declare function exec(match: RegExpMatchArray, params: RouteParam[], matchers: Record<string, ParamMatcher>): Record<string, string> | undefined;
|
|
25
|
+
/**
|
|
26
|
+
Copyright (c) 2020 [these people](https://github.com/sveltejs/kit/graphs/contributors)
|
|
27
|
+
|
|
28
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
29
|
+
|
|
30
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
31
|
+
|
|
32
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
33
|
+
*/
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ExpressionKind } from 'ast-types/lib/gen/kinds';
|
|
2
|
+
import * as graphql from 'graphql';
|
|
2
3
|
import { Config, Script } from 'houdini';
|
|
3
4
|
import { TransformPage } from 'houdini/vite';
|
|
4
5
|
import { SvelteTransformPage } from './types';
|
|
5
6
|
export default function QueryProcessor(config: Config, page: SvelteTransformPage): Promise<void>;
|
|
6
7
|
export declare function find_inline_queries(page: TransformPage, parsed: Script | null, store_id: (name: string) => ExpressionKind): Promise<LoadTarget[]>;
|
|
7
|
-
export type LoadTarget =
|
|
8
|
-
name: string;
|
|
9
|
-
variables: boolean;
|
|
10
|
-
};
|
|
8
|
+
export type LoadTarget = graphql.OperationDefinitionNode;
|