@plaidev/karte-action-sdk 1.1.136 → 1.1.137-27963515.80456e9a
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hydrate/index.es.d.ts +13 -37
- package/dist/hydrate/index.es.js +236 -161
- package/dist/index.es.d.ts +13 -37
- package/dist/index.es.js +235 -160
- package/dist/templates.cjs.d.ts +4 -1
- package/dist/templates.cjs.js +5 -3
- package/dist/templates.d.ts +4 -1
- package/dist/templates.js +5 -3
- package/package.json +1 -1
package/dist/templates.cjs.d.ts
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
declare function createAppScript(script?: string): string;
|
2
|
-
declare function createIndexTsx(script?:
|
2
|
+
declare function createIndexTsx({ script, polyfill, }?: {
|
3
|
+
script?: string;
|
4
|
+
polyfill?: boolean;
|
5
|
+
}): string;
|
3
6
|
declare function createCustomScript(script?: string): string;
|
4
7
|
export { createAppScript, createIndexTsx, createCustomScript };
|
package/dist/templates.cjs.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
function createAppScript(script = '') {
|
4
|
+
// TODO: `script` should be validated!
|
4
5
|
return `<script lang="ts">
|
5
6
|
// SDK generated imports: DON'T TOUCH THIS
|
6
7
|
// @ts-ignore
|
@@ -60,10 +61,10 @@ $: {
|
|
60
61
|
}
|
61
62
|
</script>`;
|
62
63
|
}
|
63
|
-
function createIndexTsx(script = '') {
|
64
|
+
function createIndexTsx({ script = '', polyfill = false, } = {}) {
|
65
|
+
// TODO: `script` should be validated!
|
64
66
|
return `import type { KarteAction, Send, Props, Variables } from "./gen";
|
65
|
-
|
66
|
-
import "https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver";
|
67
|
+
${polyfill ? `import "https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver";` : ''}
|
67
68
|
import { create } from "@plaidev/karte-action-sdk";
|
68
69
|
|
69
70
|
import { props, localVariablesQuery } from "./gen";
|
@@ -83,6 +84,7 @@ const action = (options: { send: Send; props: Props; variables: Variables }): Ka
|
|
83
84
|
export default action;`;
|
84
85
|
}
|
85
86
|
function createCustomScript(script = '') {
|
87
|
+
// TODO: `script` should be validated!
|
86
88
|
return `
|
87
89
|
//import {
|
88
90
|
// onShow,
|
package/dist/templates.d.ts
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
declare function createAppScript(script?: string): string;
|
2
|
-
declare function createIndexTsx(script?:
|
2
|
+
declare function createIndexTsx({ script, polyfill, }?: {
|
3
|
+
script?: string;
|
4
|
+
polyfill?: boolean;
|
5
|
+
}): string;
|
3
6
|
declare function createCustomScript(script?: string): string;
|
4
7
|
export { createAppScript, createIndexTsx, createCustomScript };
|
package/dist/templates.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
function createAppScript(script = '') {
|
2
|
+
// TODO: `script` should be validated!
|
2
3
|
return `<script lang="ts">
|
3
4
|
// SDK generated imports: DON'T TOUCH THIS
|
4
5
|
// @ts-ignore
|
@@ -58,10 +59,10 @@ $: {
|
|
58
59
|
}
|
59
60
|
</script>`;
|
60
61
|
}
|
61
|
-
function createIndexTsx(script = '') {
|
62
|
+
function createIndexTsx({ script = '', polyfill = false, } = {}) {
|
63
|
+
// TODO: `script` should be validated!
|
62
64
|
return `import type { KarteAction, Send, Props, Variables } from "./gen";
|
63
|
-
|
64
|
-
import "https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver";
|
65
|
+
${polyfill ? `import "https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver";` : ''}
|
65
66
|
import { create } from "@plaidev/karte-action-sdk";
|
66
67
|
|
67
68
|
import { props, localVariablesQuery } from "./gen";
|
@@ -81,6 +82,7 @@ const action = (options: { send: Send; props: Props; variables: Variables }): Ka
|
|
81
82
|
export default action;`;
|
82
83
|
}
|
83
84
|
function createCustomScript(script = '') {
|
85
|
+
// TODO: `script` should be validated!
|
84
86
|
return `
|
85
87
|
//import {
|
86
88
|
// onShow,
|