@plaidev/karte-action-sdk 1.1.270-29228770.05dce6ca → 1.1.270-29270413.6a2b1dc5c

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 (96) hide show
  1. package/dist/action.d.ts +0 -1
  2. package/dist/actionEvent.d.ts +0 -1
  3. package/dist/components/index.d.ts +0 -1
  4. package/dist/components-flex/avatar/types.d.ts +0 -1
  5. package/dist/components-flex/button/types.d.ts +0 -3
  6. package/dist/components-flex/button-outlined/types.d.ts +0 -3
  7. package/dist/components-flex/button-text/types.d.ts +0 -3
  8. package/dist/components-flex/form/types.d.ts +35 -20
  9. package/dist/components-flex/form.d.ts +40 -3
  10. package/dist/components-flex/icon/types.d.ts +0 -1
  11. package/dist/components-flex/text/types.d.ts +0 -3
  12. package/dist/components-flex/text-link/types.d.ts +0 -3
  13. package/dist/components-flex/variants.d.ts +0 -15
  14. package/dist/components-flex/youtube/types.d.ts +0 -1
  15. package/dist/constants.d.ts +0 -1
  16. package/dist/hooks/useInjectCustomizeCss.d.ts +1 -1
  17. package/dist/hooks/useText.d.ts +1 -1
  18. package/dist/hydrate/action.d.ts +0 -1
  19. package/dist/hydrate/actionEvent.d.ts +0 -1
  20. package/dist/hydrate/components/index.d.ts +0 -1
  21. package/dist/hydrate/components-flex/avatar/types.d.ts +0 -1
  22. package/dist/hydrate/components-flex/button/types.d.ts +0 -3
  23. package/dist/hydrate/components-flex/button-outlined/types.d.ts +0 -3
  24. package/dist/hydrate/components-flex/button-text/types.d.ts +0 -3
  25. package/dist/hydrate/components-flex/form/types.d.ts +35 -20
  26. package/dist/hydrate/components-flex/form.d.ts +40 -3
  27. package/dist/hydrate/components-flex/icon/types.d.ts +0 -1
  28. package/dist/hydrate/components-flex/text/types.d.ts +0 -3
  29. package/dist/hydrate/components-flex/text-link/types.d.ts +0 -3
  30. package/dist/hydrate/components-flex/variants.d.ts +0 -15
  31. package/dist/hydrate/components-flex/youtube/types.d.ts +0 -1
  32. package/dist/hydrate/constants.d.ts +0 -1
  33. package/dist/hydrate/hooks/useInjectCustomizeCss.d.ts +1 -1
  34. package/dist/hydrate/hooks/useText.d.ts +1 -1
  35. package/dist/hydrate/index.d.ts +0 -2
  36. package/dist/hydrate/index.es.js +903 -572
  37. package/dist/hydrate/index.svelte5.d.ts +2 -1
  38. package/dist/hydrate/modal.d.ts +0 -2
  39. package/dist/hydrate/modal.svelte5.d.ts +0 -2
  40. package/dist/hydrate/types.d.ts +0 -1
  41. package/dist/icons.d.ts +0 -3
  42. package/dist/index.es.d.ts +0 -2
  43. package/dist/index.es.js +891 -510
  44. package/dist/modal.d.ts +0 -2
  45. package/dist/modal.svelte5.d.ts +0 -2
  46. package/dist/svelte5/action.d.ts +0 -1
  47. package/dist/svelte5/actionEvent.d.ts +0 -1
  48. package/dist/svelte5/components/index.d.ts +0 -1
  49. package/dist/svelte5/components-flex/avatar/types.d.ts +0 -1
  50. package/dist/svelte5/components-flex/button/types.d.ts +0 -3
  51. package/dist/svelte5/components-flex/button-outlined/types.d.ts +0 -3
  52. package/dist/svelte5/components-flex/button-text/types.d.ts +0 -3
  53. package/dist/svelte5/components-flex/form/types.d.ts +35 -20
  54. package/dist/svelte5/components-flex/form.d.ts +40 -3
  55. package/dist/svelte5/components-flex/icon/types.d.ts +0 -1
  56. package/dist/svelte5/components-flex/text/types.d.ts +0 -3
  57. package/dist/svelte5/components-flex/text-link/types.d.ts +0 -3
  58. package/dist/svelte5/components-flex/variants.d.ts +0 -15
  59. package/dist/svelte5/components-flex/youtube/types.d.ts +0 -1
  60. package/dist/svelte5/constants.d.ts +0 -1
  61. package/dist/svelte5/hooks/useInjectCustomizeCss.d.ts +1 -1
  62. package/dist/svelte5/hooks/useText.d.ts +1 -1
  63. package/dist/svelte5/hydrate/action.d.ts +0 -1
  64. package/dist/svelte5/hydrate/actionEvent.d.ts +0 -1
  65. package/dist/svelte5/hydrate/components/index.d.ts +0 -1
  66. package/dist/svelte5/hydrate/components-flex/avatar/types.d.ts +0 -1
  67. package/dist/svelte5/hydrate/components-flex/button/types.d.ts +0 -3
  68. package/dist/svelte5/hydrate/components-flex/button-outlined/types.d.ts +0 -3
  69. package/dist/svelte5/hydrate/components-flex/button-text/types.d.ts +0 -3
  70. package/dist/svelte5/hydrate/components-flex/form/types.d.ts +35 -20
  71. package/dist/svelte5/hydrate/components-flex/form.d.ts +40 -3
  72. package/dist/svelte5/hydrate/components-flex/icon/types.d.ts +0 -1
  73. package/dist/svelte5/hydrate/components-flex/text/types.d.ts +0 -3
  74. package/dist/svelte5/hydrate/components-flex/text-link/types.d.ts +0 -3
  75. package/dist/svelte5/hydrate/components-flex/variants.d.ts +0 -15
  76. package/dist/svelte5/hydrate/components-flex/youtube/types.d.ts +0 -1
  77. package/dist/svelte5/hydrate/constants.d.ts +0 -1
  78. package/dist/svelte5/hydrate/hooks/useInjectCustomizeCss.d.ts +1 -1
  79. package/dist/svelte5/hydrate/hooks/useText.d.ts +1 -1
  80. package/dist/svelte5/hydrate/index.es.d.ts +2 -1
  81. package/dist/svelte5/hydrate/index.es.js +595 -378
  82. package/dist/svelte5/hydrate/modal.d.ts +0 -2
  83. package/dist/svelte5/hydrate/modal.svelte5.d.ts +0 -2
  84. package/dist/svelte5/hydrate/types.d.ts +0 -1
  85. package/dist/svelte5/index.es.d.ts +2 -1
  86. package/dist/svelte5/index.es.js +595 -378
  87. package/dist/svelte5/index.front2.es.js +637 -417
  88. package/dist/svelte5/index.svelte5.d.ts +2 -1
  89. package/dist/svelte5/modal.d.ts +0 -2
  90. package/dist/svelte5/modal.svelte5.d.ts +0 -2
  91. package/dist/svelte5/types.d.ts +0 -1
  92. package/dist/templates.cjs.js +4 -2
  93. package/dist/templates.d.ts +0 -2
  94. package/dist/templates.js +4 -2
  95. package/dist/types.d.ts +0 -1
  96. package/package.json +3 -3
@@ -1,21 +1,54 @@
1
1
  import { Writable } from "svelte/store";
2
2
  import { FormFieldType } from "./form/types.js";
3
- export type FormStoreValue = string | string[];
3
+ export type FormStoreValue = string | string[] | boolean | undefined;
4
4
  export type FormStoreState = {
5
5
  isDirty: boolean;
6
6
  isTouched: boolean;
7
7
  isValid: boolean;
8
8
  errorMessage: string | null;
9
+ type: FormFieldType;
9
10
  value: FormStoreValue;
10
11
  };
11
12
  export type FormStoreValues = Record<string, FormStoreValue>;
13
+ export type FormSubmittedValues = Record<string, {
14
+ value: FormStoreValue;
15
+ type: FormFieldType;
16
+ }>;
12
17
  export type FormStoreErrorMessages = Record<string, FormStoreState["errorMessage"]>;
13
18
  export type FormStoreStates = Record<string, FormStoreState>;
19
+ export declare const FORM_VALIDATION_TYPE: {
20
+ readonly required: "必須";
21
+ readonly email: "メールアドレス";
22
+ readonly tel: "電話番号";
23
+ readonly url: "URL";
24
+ readonly minLength: "最小文字数";
25
+ readonly maxLength: "最大文字数";
26
+ readonly minCount: "最小個数";
27
+ readonly maxCount: "最大個数";
28
+ readonly pattern: "正規表現";
29
+ };
30
+ export type FormValidationType = keyof typeof FORM_VALIDATION_TYPE;
31
+ export declare const FORM_VALIDATION_DEFAULT_ERROR_MESSAGES: Record<FormValidationType, string>;
32
+ export declare const FORM_VALIDATION_REGEX: {
33
+ email: string;
34
+ tel: string;
35
+ url: string;
36
+ };
37
+ export type FormStoreValidation = {
38
+ id: string;
39
+ type: FormValidationType;
40
+ number?: number;
41
+ regexp?: string;
42
+ errorMessage?: string;
43
+ locked?: boolean;
44
+ };
14
45
  export type FormStoreSchemaInput = {
15
46
  name: string;
16
47
  type: FormFieldType;
17
48
  defaultValue: string | string[];
18
49
  required: boolean;
50
+ validations?: FormStoreValidation[];
51
+ isIdentify?: boolean;
19
52
  };
20
53
  export type FormStoreSchema = FormStoreSchemaInput & {
21
54
  statePath: string;
@@ -28,7 +61,8 @@ export type FormStore = {
28
61
  * @internal
29
62
  */
30
63
  export declare const formStore: Writable<FormStore>;
31
- export declare const formSubmittedValues: Writable<FormStoreValues>;
64
+ export declare const formSubmittedValues: Writable<FormSubmittedValues>;
65
+ export declare const formSubmittedIdentifyValues: Writable<FormSubmittedValues>;
32
66
  /**
33
67
  * @public
34
68
  */
@@ -69,17 +103,20 @@ export declare const registerFormField: (schemas: FormStoreSchemaInput | FormSto
69
103
  * @public
70
104
  */
71
105
  export declare const unregisterFormField: (fieldNames: string | string[]) => void;
72
- export declare const validateFormField: (schema: FormStoreSchema, value: FormStoreValue) => {
106
+ export type ValidateFormFieldResult = {
73
107
  isValid: true;
74
108
  error: undefined;
75
109
  } | {
76
110
  isValid: false;
77
111
  error: string;
78
112
  };
113
+ export declare const validateFormField: (schema: FormStoreSchema, value: FormStoreValue) => ValidateFormFieldResult;
79
114
  /**
80
115
  * @public
81
116
  */
82
117
  export declare function onSubmitForm(fn: (data: {
83
118
  currentStateValues: any;
84
119
  allValues: any;
120
+ currentStateIdentifyValues: any;
121
+ allIdentifyValues: any;
85
122
  }) => void): void;
@@ -1,5 +1,4 @@
1
1
  import type { ClickableProps, CommonProps } from "../props.js";
2
- // @ts-ignore -- NOTE(kazupon): error TS2307: Cannot find module 'preact/src/jsx-csstype' or its corresponding type declarations
3
2
  import type { Properties } from "preact/src/jsx-csstype";
4
3
  export declare const ICON_SIZE: {
5
4
  [key: string]: {
@@ -1,12 +1,9 @@
1
1
  import type { Properties } from "csstype";
2
2
  import type { BackgroundColorProps, BorderProps, ClickableProps, CommonProps, CustomizeCssProps, LinkProps, PaddingProps, RadiusProps, WithIconProps, FontFamilyProps } from "../props.js";
3
3
  export declare const LAYER_TEXT_SIZE: {
4
- // extra_small: 'ExtraSmall',
5
4
  readonly small: "本文 / スモール";
6
5
  readonly medium: "本文 / ミディアム";
7
6
  readonly large: "本文 / ラージ";
8
- // extra_large: 'ExtraLarge'
9
- // MEMO(curtis): 後から調整した関係で見出しは命名と実体を一つずらしている
10
7
  readonly heading_extra_small: "見出し / スモール";
11
8
  readonly heading_small: "見出し / ミディアム";
12
9
  readonly heading_medium: "見出し / ラージ";
@@ -21,14 +21,11 @@ export declare const TEXT_LINK_UNDERLINE: {
21
21
  };
22
22
  export type TextLinkProps = CommonProps & ClickableProps & LinkProps & FontFamilyProps & WithIconProps & {
23
23
  label: string;
24
- // size
25
24
  size?: keyof typeof TEXT_LINK_SIZE;
26
25
  lineHeight?: number;
27
26
  fontSize?: Properties["fontSize"];
28
- // theme
29
27
  theme?: keyof typeof TEXT_LINK_THEME;
30
28
  color?: Properties["color"];
31
- // others
32
29
  underline?: keyof typeof TEXT_LINK_UNDERLINE;
33
30
  fontWeight?: Properties["fontWeight"];
34
31
  };
@@ -21,15 +21,9 @@ type ToVariantArrayReturn<T> = T[keyof T] & {
21
21
  code: keyof T;
22
22
  };
23
23
  declare const toVariantArray: <T extends VariantDefinitionGroup>(group: T) => ToVariantArrayReturn<T>[];
24
- // ================================
25
- // Aspect
26
- // ================================
27
24
  export declare const ASPECT_VARIANT: VariantDefinitionGroup<Omit<AspectProps, "aspectVariant">>;
28
25
  export type AspectVariantCode = keyof typeof ASPECT_VARIANT;
29
26
  export declare const ASPECT_VARIANTS: ReturnType<typeof toVariantArray>;
30
- // ================================
31
- // FontFamily
32
- // ================================
33
27
  export type FontVariantMeta = {
34
28
  lang: "ja" | "en";
35
29
  type: "kaku" | "maru" | "min";
@@ -42,21 +36,12 @@ type FontFamilyVariantGroup = {
42
36
  variants: ReturnType<typeof toVariantArray>;
43
37
  };
44
38
  export declare const FONT_FAMILY_VARIANT_GROUPS: FontFamilyVariantGroup[];
45
- // ================================
46
- // Shadow
47
- // ================================
48
39
  export declare const SHADOW_VARIANT: VariantDefinitionGroup<Omit<ShadowProps, "shadowVariant">>;
49
40
  export type ShadowVariantCode = keyof typeof SHADOW_VARIANT;
50
41
  export declare const SHADOW_VARIANTS: ToVariantArrayReturn<VariantDefinitionGroup<Omit<ShadowProps, "shadowVariant">, object>>[];
51
- // ================================
52
- // Background
53
- // ================================
54
42
  export declare const BACKGROUND_COLOR_VARIANT: VariantDefinitionGroup<Omit<BackgroundColorProps, "backgroundColorVariant">>;
55
43
  export type BackgroundColorVariantCode = keyof typeof BACKGROUND_COLOR_VARIANT;
56
44
  export declare const BACKGROUND_COLOR_VARIANTS: ToVariantArrayReturn<VariantDefinitionGroup<Omit<BackgroundColorProps, "backgroundColorVariant">, object>>[];
57
- // ================================
58
- // Border
59
- // ================================
60
45
  export declare const BORDER_COLOR_VARIANT: VariantDefinitionGroup<Omit<BorderColorProps, "borderColorVariant">>;
61
46
  export type BorderColorVariantCode = keyof typeof BORDER_COLOR_VARIANT;
62
47
  export declare const BORDER_COLOR_VARIANTS: ToVariantArrayReturn<VariantDefinitionGroup<Omit<BorderColorProps, "borderColorVariant">, object>>[];
@@ -11,7 +11,6 @@ export type YoutubeProps = CommonProps & BorderProps & {
11
11
  showSubtitle?: boolean;
12
12
  showFullScreen?: boolean;
13
13
  showRelatedMovies?: boolean;
14
- // styles
15
14
  shape?: keyof typeof IMAGE_ROUND_SHAPE;
16
15
  width?: Properties["width"];
17
16
  };
@@ -17,7 +17,6 @@ export declare const DEVICE_QUERIES: {
17
17
  readonly PC: "screen and (min-width: 641px)";
18
18
  readonly SP: "screen and (max-width: 640px)";
19
19
  };
20
- // -------- The following codes are deprecated --------
21
20
  /**
22
21
  * 非推奨
23
22
  *
@@ -1,2 +1,2 @@
1
1
  import type { CustomizeCssProps } from "../components-flex/props.js";
2
- export declare const useInjectCustomizeCss: (props: CustomizeCssProps) => void;
2
+ export declare const useInjectCustomizeCss: (props: CustomizeCssProps, layerId: string) => void;
@@ -1,5 +1,5 @@
1
1
  import type { LayerTextProps } from "../components-flex/text/types.js";
2
- export declare const useText: (props: LayerTextProps) => {
2
+ export declare const useText: (props: LayerTextProps, layerId: string) => {
3
3
  escapedHTML: string;
4
4
  style: string;
5
5
  };
@@ -8,7 +8,6 @@ export { onScroll, onTime } from "./utils.js";
8
8
  export type { OnScrollContext, OnScrollFunction, ScrollDirection } from "./utils.js";
9
9
  export { getLogs, getEvents, logger, listenLogger } from "./logger.js";
10
10
  export type { LogLevel, Log, Event } from "./logger.js";
11
- // 以下は互換性のため
12
11
  export { hideOnScroll, hideOnTime, showOnScroll, showOnTime } from "./display-logic.js";
13
12
  export * from "./prop.js";
14
13
  export { showAction, closeAction, loadStyle, applyCss, onShow, onClose, onChangeState, getActionRoot, getCssVariables, show, close, ensureModalRoot, createApp, createFog } from "./modal.svelte5.js";
@@ -81,6 +80,8 @@ export { default as FlexFormTextarea } from "./components-flex/form/FormTextarea
81
80
  export { default as FlexFormSelect } from "./components-flex/form/FormSelect.svelte.js";
82
81
  export { default as FlexFormCheckboxes } from "./components-flex/form/FormCheckboxes.svelte.js";
83
82
  export { default as FlexFormRadios } from "./components-flex/form/FormRadios.svelte.js";
83
+ export { default as FlexFormBoolean } from "./components-flex/form/FormBoolean.svelte.js";
84
+ export { default as FlexFormIdentifyField } from "./components-flex/form/FormIdentifyField.svelte.js";
84
85
  export * from "./components-flex/form/types.js";
85
86
  export * from "./components-flex/code/types.js";
86
87
  export * from "./components-flex/brand-kit.js";