@plaidev/karte-action-sdk 1.1.232-28694144.4e108779 → 1.1.232

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,8 +12,9 @@ declare function createAppScript(script?: string, icons?: string[], customCompon
12
12
  *
13
13
  * @internal
14
14
  */
15
- declare function createIndexTsx({ script }?: {
15
+ declare function createIndexTsx({ script, polyfill, }?: {
16
16
  script?: string;
17
+ polyfill?: boolean;
17
18
  }): string;
18
19
  /**
19
20
  * 後方互換のためのカスタムスクリプトの初期値の生成
@@ -48,13 +48,12 @@ import {
48
48
  Box,
49
49
  IconElement,
50
50
  CodeElement,
51
- FlexButton,
52
- FlexIcon,
53
- FlexLayout,
54
- FlexText,
55
- FlexAvatar,
56
- FlexImage,
57
- FlexModal,
51
+ V2Button,
52
+ V2Icon,
53
+ V2Layout,
54
+ V2Text,
55
+ V2Avatar,
56
+ V2Image,
58
57
  } from '@plaidev/karte-action-sdk';
59
58
 
60
59
  ${icons.length > 0
@@ -99,9 +98,10 @@ $: cssVariables = getCssVariables({ ...$data, ...$actionVariables });
99
98
  *
100
99
  * @internal
101
100
  */
102
- function createIndexTsx({ script = '' } = {}) {
101
+ function createIndexTsx({ script = '', polyfill = false, } = {}) {
103
102
  // TODO: `script` should be validated!
104
103
  return `import type { KarteAction, Send, Publish, Props, Variables } from './gen';
104
+ ${polyfill ? `import 'https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver';` : ''}
105
105
  import { create } from '@plaidev/karte-action-sdk';
106
106
 
107
107
  import { props, localVariablesQuery, karteTemplate } from './gen';
@@ -12,8 +12,9 @@ declare function createAppScript(script?: string, icons?: string[], customCompon
12
12
  *
13
13
  * @internal
14
14
  */
15
- declare function createIndexTsx({ script }?: {
15
+ declare function createIndexTsx({ script, polyfill, }?: {
16
16
  script?: string;
17
+ polyfill?: boolean;
17
18
  }): string;
18
19
  /**
19
20
  * 後方互換のためのカスタムスクリプトの初期値の生成
package/dist/templates.js CHANGED
@@ -46,13 +46,12 @@ import {
46
46
  Box,
47
47
  IconElement,
48
48
  CodeElement,
49
- FlexButton,
50
- FlexIcon,
51
- FlexLayout,
52
- FlexText,
53
- FlexAvatar,
54
- FlexImage,
55
- FlexModal,
49
+ V2Button,
50
+ V2Icon,
51
+ V2Layout,
52
+ V2Text,
53
+ V2Avatar,
54
+ V2Image,
56
55
  } from '@plaidev/karte-action-sdk';
57
56
 
58
57
  ${icons.length > 0
@@ -97,9 +96,10 @@ $: cssVariables = getCssVariables({ ...$data, ...$actionVariables });
97
96
  *
98
97
  * @internal
99
98
  */
100
- function createIndexTsx({ script = '' } = {}) {
99
+ function createIndexTsx({ script = '', polyfill = false, } = {}) {
101
100
  // TODO: `script` should be validated!
102
101
  return `import type { KarteAction, Send, Publish, Props, Variables } from './gen';
102
+ ${polyfill ? `import 'https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver';` : ''}
103
103
  import { create } from '@plaidev/karte-action-sdk';
104
104
 
105
105
  import { props, localVariablesQuery, karteTemplate } from './gen';