@croquiscom/pds 16.26.1 → 16.27.0-next.0
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/CHANGELOG.md +6 -0
- package/assets/icons/ArrowIndent.svg +2 -2
- package/assets/icons/Below.svg +2 -2
- package/dist/components/category-selector/CategorySelector.test.stories.d.ts +2 -127
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin/hook/useGithubClient.d.ts +16 -0
- package/dist/plugin/plugin.d.ts +1 -0
- package/dist/plugin/types.d.ts +40 -0
- package/dist/plugin/ui/index.d.ts +1 -0
- package/dist/plugin/utils.d.ts +9 -0
- package/locales/en.d.ts +89 -0
- package/locales/en.esm.d.ts +89 -0
- package/locales/ja.d.ts +89 -0
- package/locales/ja.esm.d.ts +89 -0
- package/locales/ko.d.ts +93 -0
- package/locales/ko.esm.d.ts +93 -0
- package/package.json +1 -1
- package/plugin/plugin.js +1 -0
- package/plugin/ui.html +102 -0
- package/plugin/ui.js +89 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface GithubClientOptions {
|
|
2
|
+
repoOwner: string;
|
|
3
|
+
repoName: string;
|
|
4
|
+
accessToken: string;
|
|
5
|
+
}
|
|
6
|
+
interface CreateSettingPRResponse {
|
|
7
|
+
success: boolean;
|
|
8
|
+
message: string;
|
|
9
|
+
prUrl?: string;
|
|
10
|
+
status?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function useGithubClient({ repoOwner, repoName, accessToken }: GithubClientOptions): (title: 'icons' | 'images', svgFiles: {
|
|
13
|
+
name: string;
|
|
14
|
+
content: string;
|
|
15
|
+
}[]) => Promise<CreateSettingPRResponse>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type PluginActionType = 'EXTRACT_SVG' | 'GET_FIGMA_ACCESS_TOKEN' | 'GET_GITHUB_ACCESS_TOKEN' | 'SET_FIGMA_ACCESS_TOKEN' | 'SET_GITHUB_ACCESS_TOKEN' | 'SYNC_COMPLETE_ACCESS_TOKEN';
|
|
2
|
+
export interface node {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ExtractSvgPlugin {
|
|
7
|
+
type: 'EXTRACT_SVG';
|
|
8
|
+
payload: {
|
|
9
|
+
fileKey: string;
|
|
10
|
+
nodes: node[];
|
|
11
|
+
ids: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface GetFigmaAccessTokenPlugin {
|
|
15
|
+
type: 'GET_FIGMA_ACCESS_TOKEN';
|
|
16
|
+
payload: string;
|
|
17
|
+
}
|
|
18
|
+
export interface GetGithubAccessTokenPlugin {
|
|
19
|
+
type: 'GET_GITHUB_ACCESS_TOKEN';
|
|
20
|
+
payload: string;
|
|
21
|
+
}
|
|
22
|
+
export interface SetFigmaAccessTokenPlugin {
|
|
23
|
+
type: 'SET_FIGMA_ACCESS_TOKEN';
|
|
24
|
+
payload: string;
|
|
25
|
+
}
|
|
26
|
+
export interface SetGithubAccessTokenPlugin {
|
|
27
|
+
type: 'SET_GITHUB_ACCESS_TOKEN';
|
|
28
|
+
payload: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SyncCompleteAccessTokenPlugin {
|
|
31
|
+
type: 'SYNC_COMPLETE_ACCESS_TOKEN';
|
|
32
|
+
payload: {
|
|
33
|
+
token: string;
|
|
34
|
+
type: 'SET_FIGMA_ACCESS_TOKEN' | 'SET_GITHUB_ACCESS_TOKEN';
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export type FigmaMessagePlugin = ExtractSvgPlugin | GetFigmaAccessTokenPlugin | GetGithubAccessTokenPlugin | SetFigmaAccessTokenPlugin | SetGithubAccessTokenPlugin | SyncCompleteAccessTokenPlugin;
|
|
38
|
+
export interface FigmaMessageEvent {
|
|
39
|
+
pluginMessage: FigmaMessagePlugin;
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="@figma/plugin-typings/plugin-api" />
|
|
2
|
+
export declare const pascalCaseRegex: RegExp;
|
|
3
|
+
export declare const svgRegex: RegExp;
|
|
4
|
+
export declare const removeGetPrefix: (str: string) => string;
|
|
5
|
+
export declare const removeSetPrefix: (str: string) => string;
|
|
6
|
+
export declare const isComponentNode: (node: SceneNode) => node is ComponentNode;
|
|
7
|
+
export declare const findAllTargetNode: (rootNode: SceneNode) => ComponentNode[];
|
|
8
|
+
export declare const isInValidateSvgTag: (content: string[]) => boolean;
|
|
9
|
+
export declare const isInValidateSvgName: (nodeNames: string[]) => boolean;
|
package/locales/en.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export declare const en: {
|
|
2
|
+
lang: string;
|
|
3
|
+
accessibility: {
|
|
4
|
+
info: string;
|
|
5
|
+
success: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
error: string;
|
|
8
|
+
close: string;
|
|
9
|
+
page: string;
|
|
10
|
+
prev: string;
|
|
11
|
+
next: string;
|
|
12
|
+
back: string;
|
|
13
|
+
};
|
|
14
|
+
ConfirmModal: {
|
|
15
|
+
title: string;
|
|
16
|
+
confirmText: string;
|
|
17
|
+
cancelText: string;
|
|
18
|
+
};
|
|
19
|
+
AlertModal: {
|
|
20
|
+
title: string;
|
|
21
|
+
confirmText: string;
|
|
22
|
+
};
|
|
23
|
+
NoticeModal: {
|
|
24
|
+
closeText: string;
|
|
25
|
+
checkReplayText: string;
|
|
26
|
+
};
|
|
27
|
+
Dropdown: {
|
|
28
|
+
placeholder: string;
|
|
29
|
+
filterPlaceholder: string;
|
|
30
|
+
};
|
|
31
|
+
DropdownFilter: {
|
|
32
|
+
reset: string;
|
|
33
|
+
confirm: string;
|
|
34
|
+
all: string;
|
|
35
|
+
};
|
|
36
|
+
DatePicker: {
|
|
37
|
+
placeholder: string;
|
|
38
|
+
footer: {
|
|
39
|
+
now: string;
|
|
40
|
+
today: string;
|
|
41
|
+
ok: string;
|
|
42
|
+
clear: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
DatePickerRange: {
|
|
46
|
+
placeholder: string[];
|
|
47
|
+
dataPreset: {
|
|
48
|
+
today: string;
|
|
49
|
+
'1-week': string;
|
|
50
|
+
'1-month': string;
|
|
51
|
+
'3-month': string;
|
|
52
|
+
'6-month': string;
|
|
53
|
+
'1-year': string;
|
|
54
|
+
all: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
TimePicker: {
|
|
58
|
+
placeholder: string;
|
|
59
|
+
footer: {
|
|
60
|
+
ok: string;
|
|
61
|
+
clear: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
TimeRangePicker: {
|
|
65
|
+
placeholder: string[];
|
|
66
|
+
};
|
|
67
|
+
FileUpload: {
|
|
68
|
+
label: string;
|
|
69
|
+
};
|
|
70
|
+
ImageUpload: {
|
|
71
|
+
label: string;
|
|
72
|
+
fail: string;
|
|
73
|
+
};
|
|
74
|
+
Table: {
|
|
75
|
+
noDataText: string;
|
|
76
|
+
};
|
|
77
|
+
ColumnViewController: {
|
|
78
|
+
noFixedItemsText: string;
|
|
79
|
+
fixedSectionTitle: string;
|
|
80
|
+
listSectionTitle: string;
|
|
81
|
+
max: string;
|
|
82
|
+
items: string;
|
|
83
|
+
};
|
|
84
|
+
CategorySelector: {
|
|
85
|
+
levelCategory: string;
|
|
86
|
+
selectParentCategoryLine1: string;
|
|
87
|
+
selectParentCategoryLine2: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export declare const en: {
|
|
2
|
+
lang: string;
|
|
3
|
+
accessibility: {
|
|
4
|
+
info: string;
|
|
5
|
+
success: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
error: string;
|
|
8
|
+
close: string;
|
|
9
|
+
page: string;
|
|
10
|
+
prev: string;
|
|
11
|
+
next: string;
|
|
12
|
+
back: string;
|
|
13
|
+
};
|
|
14
|
+
ConfirmModal: {
|
|
15
|
+
title: string;
|
|
16
|
+
confirmText: string;
|
|
17
|
+
cancelText: string;
|
|
18
|
+
};
|
|
19
|
+
AlertModal: {
|
|
20
|
+
title: string;
|
|
21
|
+
confirmText: string;
|
|
22
|
+
};
|
|
23
|
+
NoticeModal: {
|
|
24
|
+
closeText: string;
|
|
25
|
+
checkReplayText: string;
|
|
26
|
+
};
|
|
27
|
+
Dropdown: {
|
|
28
|
+
placeholder: string;
|
|
29
|
+
filterPlaceholder: string;
|
|
30
|
+
};
|
|
31
|
+
DropdownFilter: {
|
|
32
|
+
reset: string;
|
|
33
|
+
confirm: string;
|
|
34
|
+
all: string;
|
|
35
|
+
};
|
|
36
|
+
DatePicker: {
|
|
37
|
+
placeholder: string;
|
|
38
|
+
footer: {
|
|
39
|
+
now: string;
|
|
40
|
+
today: string;
|
|
41
|
+
ok: string;
|
|
42
|
+
clear: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
DatePickerRange: {
|
|
46
|
+
placeholder: string[];
|
|
47
|
+
dataPreset: {
|
|
48
|
+
today: string;
|
|
49
|
+
'1-week': string;
|
|
50
|
+
'1-month': string;
|
|
51
|
+
'3-month': string;
|
|
52
|
+
'6-month': string;
|
|
53
|
+
'1-year': string;
|
|
54
|
+
all: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
TimePicker: {
|
|
58
|
+
placeholder: string;
|
|
59
|
+
footer: {
|
|
60
|
+
ok: string;
|
|
61
|
+
clear: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
TimeRangePicker: {
|
|
65
|
+
placeholder: string[];
|
|
66
|
+
};
|
|
67
|
+
FileUpload: {
|
|
68
|
+
label: string;
|
|
69
|
+
};
|
|
70
|
+
ImageUpload: {
|
|
71
|
+
label: string;
|
|
72
|
+
fail: string;
|
|
73
|
+
};
|
|
74
|
+
Table: {
|
|
75
|
+
noDataText: string;
|
|
76
|
+
};
|
|
77
|
+
ColumnViewController: {
|
|
78
|
+
noFixedItemsText: string;
|
|
79
|
+
fixedSectionTitle: string;
|
|
80
|
+
listSectionTitle: string;
|
|
81
|
+
max: string;
|
|
82
|
+
items: string;
|
|
83
|
+
};
|
|
84
|
+
CategorySelector: {
|
|
85
|
+
levelCategory: string;
|
|
86
|
+
selectParentCategoryLine1: string;
|
|
87
|
+
selectParentCategoryLine2: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
package/locales/ja.d.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export declare const ja: {
|
|
2
|
+
lang: string;
|
|
3
|
+
accessibility: {
|
|
4
|
+
info: string;
|
|
5
|
+
success: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
error: string;
|
|
8
|
+
close: string;
|
|
9
|
+
page: string;
|
|
10
|
+
prev: string;
|
|
11
|
+
next: string;
|
|
12
|
+
back: string;
|
|
13
|
+
};
|
|
14
|
+
ConfirmModal: {
|
|
15
|
+
title: string;
|
|
16
|
+
confirmText: string;
|
|
17
|
+
cancelText: string;
|
|
18
|
+
};
|
|
19
|
+
AlertModal: {
|
|
20
|
+
title: string;
|
|
21
|
+
confirmText: string;
|
|
22
|
+
};
|
|
23
|
+
NoticeModal: {
|
|
24
|
+
closeText: string;
|
|
25
|
+
checkReplayText: string;
|
|
26
|
+
};
|
|
27
|
+
Dropdown: {
|
|
28
|
+
placeholder: string;
|
|
29
|
+
filterPlaceholder: string;
|
|
30
|
+
};
|
|
31
|
+
DropdownFilter: {
|
|
32
|
+
reset: string;
|
|
33
|
+
confirm: string;
|
|
34
|
+
all: string;
|
|
35
|
+
};
|
|
36
|
+
DatePicker: {
|
|
37
|
+
placeholder: string;
|
|
38
|
+
footer: {
|
|
39
|
+
now: string;
|
|
40
|
+
today: string;
|
|
41
|
+
ok: string;
|
|
42
|
+
clear: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
DatePickerRange: {
|
|
46
|
+
placeholder: string[];
|
|
47
|
+
dataPreset: {
|
|
48
|
+
today: string;
|
|
49
|
+
'1-week': string;
|
|
50
|
+
'1-month': string;
|
|
51
|
+
'3-month': string;
|
|
52
|
+
'6-month': string;
|
|
53
|
+
'1-year': string;
|
|
54
|
+
all: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
TimePicker: {
|
|
58
|
+
placeholder: string;
|
|
59
|
+
footer: {
|
|
60
|
+
ok: string;
|
|
61
|
+
clear: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
TimeRangePicker: {
|
|
65
|
+
placeholder: string[];
|
|
66
|
+
};
|
|
67
|
+
FileUpload: {
|
|
68
|
+
label: string;
|
|
69
|
+
};
|
|
70
|
+
ImageUpload: {
|
|
71
|
+
label: string;
|
|
72
|
+
fail: string;
|
|
73
|
+
};
|
|
74
|
+
Table: {
|
|
75
|
+
noDataText: string;
|
|
76
|
+
};
|
|
77
|
+
ColumnViewController: {
|
|
78
|
+
noFixedItemsText: string;
|
|
79
|
+
fixedSectionTitle: string;
|
|
80
|
+
listSectionTitle: string;
|
|
81
|
+
max: string;
|
|
82
|
+
items: string;
|
|
83
|
+
};
|
|
84
|
+
CategorySelector: {
|
|
85
|
+
levelCategory: string;
|
|
86
|
+
selectParentCategoryLine1: string;
|
|
87
|
+
selectParentCategoryLine2: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export declare const ja: {
|
|
2
|
+
lang: string;
|
|
3
|
+
accessibility: {
|
|
4
|
+
info: string;
|
|
5
|
+
success: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
error: string;
|
|
8
|
+
close: string;
|
|
9
|
+
page: string;
|
|
10
|
+
prev: string;
|
|
11
|
+
next: string;
|
|
12
|
+
back: string;
|
|
13
|
+
};
|
|
14
|
+
ConfirmModal: {
|
|
15
|
+
title: string;
|
|
16
|
+
confirmText: string;
|
|
17
|
+
cancelText: string;
|
|
18
|
+
};
|
|
19
|
+
AlertModal: {
|
|
20
|
+
title: string;
|
|
21
|
+
confirmText: string;
|
|
22
|
+
};
|
|
23
|
+
NoticeModal: {
|
|
24
|
+
closeText: string;
|
|
25
|
+
checkReplayText: string;
|
|
26
|
+
};
|
|
27
|
+
Dropdown: {
|
|
28
|
+
placeholder: string;
|
|
29
|
+
filterPlaceholder: string;
|
|
30
|
+
};
|
|
31
|
+
DropdownFilter: {
|
|
32
|
+
reset: string;
|
|
33
|
+
confirm: string;
|
|
34
|
+
all: string;
|
|
35
|
+
};
|
|
36
|
+
DatePicker: {
|
|
37
|
+
placeholder: string;
|
|
38
|
+
footer: {
|
|
39
|
+
now: string;
|
|
40
|
+
today: string;
|
|
41
|
+
ok: string;
|
|
42
|
+
clear: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
DatePickerRange: {
|
|
46
|
+
placeholder: string[];
|
|
47
|
+
dataPreset: {
|
|
48
|
+
today: string;
|
|
49
|
+
'1-week': string;
|
|
50
|
+
'1-month': string;
|
|
51
|
+
'3-month': string;
|
|
52
|
+
'6-month': string;
|
|
53
|
+
'1-year': string;
|
|
54
|
+
all: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
TimePicker: {
|
|
58
|
+
placeholder: string;
|
|
59
|
+
footer: {
|
|
60
|
+
ok: string;
|
|
61
|
+
clear: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
TimeRangePicker: {
|
|
65
|
+
placeholder: string[];
|
|
66
|
+
};
|
|
67
|
+
FileUpload: {
|
|
68
|
+
label: string;
|
|
69
|
+
};
|
|
70
|
+
ImageUpload: {
|
|
71
|
+
label: string;
|
|
72
|
+
fail: string;
|
|
73
|
+
};
|
|
74
|
+
Table: {
|
|
75
|
+
noDataText: string;
|
|
76
|
+
};
|
|
77
|
+
ColumnViewController: {
|
|
78
|
+
noFixedItemsText: string;
|
|
79
|
+
fixedSectionTitle: string;
|
|
80
|
+
listSectionTitle: string;
|
|
81
|
+
max: string;
|
|
82
|
+
items: string;
|
|
83
|
+
};
|
|
84
|
+
CategorySelector: {
|
|
85
|
+
levelCategory: string;
|
|
86
|
+
selectParentCategoryLine1: string;
|
|
87
|
+
selectParentCategoryLine2: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
package/locales/ko.d.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export declare const ko: {
|
|
2
|
+
lang: string;
|
|
3
|
+
accessibility: {
|
|
4
|
+
info: string;
|
|
5
|
+
success: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
error: string;
|
|
8
|
+
close: string;
|
|
9
|
+
page: string;
|
|
10
|
+
prev: string;
|
|
11
|
+
next: string;
|
|
12
|
+
back: string;
|
|
13
|
+
};
|
|
14
|
+
ConfirmModal: {
|
|
15
|
+
title: string;
|
|
16
|
+
confirmText: string;
|
|
17
|
+
cancelText: string;
|
|
18
|
+
};
|
|
19
|
+
AlertModal: {
|
|
20
|
+
title: string;
|
|
21
|
+
confirmText: string;
|
|
22
|
+
};
|
|
23
|
+
NoticeModal: {
|
|
24
|
+
closeText: string;
|
|
25
|
+
checkReplayText: string;
|
|
26
|
+
};
|
|
27
|
+
CheckboxGroup: {
|
|
28
|
+
all: string;
|
|
29
|
+
};
|
|
30
|
+
Dropdown: {
|
|
31
|
+
placeholder: string;
|
|
32
|
+
filterPlaceholder: string;
|
|
33
|
+
};
|
|
34
|
+
DropdownFilter: {
|
|
35
|
+
reset: string;
|
|
36
|
+
confirm: string;
|
|
37
|
+
all: string;
|
|
38
|
+
};
|
|
39
|
+
DatePicker: {
|
|
40
|
+
placeholder: string;
|
|
41
|
+
footer: {
|
|
42
|
+
now: string;
|
|
43
|
+
today: string;
|
|
44
|
+
ok: string;
|
|
45
|
+
clear: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
DatePickerRange: {
|
|
49
|
+
placeholder: string[];
|
|
50
|
+
dataPreset: {
|
|
51
|
+
today: string;
|
|
52
|
+
'1-week': string;
|
|
53
|
+
'1-month': string;
|
|
54
|
+
'3-month': string;
|
|
55
|
+
'6-month': string;
|
|
56
|
+
'1-year': string;
|
|
57
|
+
all: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
TimePicker: {
|
|
61
|
+
placeholder: string;
|
|
62
|
+
footer: {
|
|
63
|
+
ok: string;
|
|
64
|
+
clear: string;
|
|
65
|
+
};
|
|
66
|
+
disabledTooltipText: string;
|
|
67
|
+
};
|
|
68
|
+
TimeRangePicker: {
|
|
69
|
+
placeholder: string[];
|
|
70
|
+
};
|
|
71
|
+
FileUpload: {
|
|
72
|
+
label: string;
|
|
73
|
+
};
|
|
74
|
+
ImageUpload: {
|
|
75
|
+
label: string;
|
|
76
|
+
fail: string;
|
|
77
|
+
};
|
|
78
|
+
Table: {
|
|
79
|
+
noDataText: string;
|
|
80
|
+
};
|
|
81
|
+
ColumnViewController: {
|
|
82
|
+
noFixedItemsText: string;
|
|
83
|
+
fixedSectionTitle: string;
|
|
84
|
+
listSectionTitle: string;
|
|
85
|
+
max: string;
|
|
86
|
+
items: string;
|
|
87
|
+
};
|
|
88
|
+
CategorySelector: {
|
|
89
|
+
levelCategory: string;
|
|
90
|
+
selectParentCategoryLine1: string;
|
|
91
|
+
selectParentCategoryLine2: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export declare const ko: {
|
|
2
|
+
lang: string;
|
|
3
|
+
accessibility: {
|
|
4
|
+
info: string;
|
|
5
|
+
success: string;
|
|
6
|
+
warning: string;
|
|
7
|
+
error: string;
|
|
8
|
+
close: string;
|
|
9
|
+
page: string;
|
|
10
|
+
prev: string;
|
|
11
|
+
next: string;
|
|
12
|
+
back: string;
|
|
13
|
+
};
|
|
14
|
+
ConfirmModal: {
|
|
15
|
+
title: string;
|
|
16
|
+
confirmText: string;
|
|
17
|
+
cancelText: string;
|
|
18
|
+
};
|
|
19
|
+
AlertModal: {
|
|
20
|
+
title: string;
|
|
21
|
+
confirmText: string;
|
|
22
|
+
};
|
|
23
|
+
NoticeModal: {
|
|
24
|
+
closeText: string;
|
|
25
|
+
checkReplayText: string;
|
|
26
|
+
};
|
|
27
|
+
CheckboxGroup: {
|
|
28
|
+
all: string;
|
|
29
|
+
};
|
|
30
|
+
Dropdown: {
|
|
31
|
+
placeholder: string;
|
|
32
|
+
filterPlaceholder: string;
|
|
33
|
+
};
|
|
34
|
+
DropdownFilter: {
|
|
35
|
+
reset: string;
|
|
36
|
+
confirm: string;
|
|
37
|
+
all: string;
|
|
38
|
+
};
|
|
39
|
+
DatePicker: {
|
|
40
|
+
placeholder: string;
|
|
41
|
+
footer: {
|
|
42
|
+
now: string;
|
|
43
|
+
today: string;
|
|
44
|
+
ok: string;
|
|
45
|
+
clear: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
DatePickerRange: {
|
|
49
|
+
placeholder: string[];
|
|
50
|
+
dataPreset: {
|
|
51
|
+
today: string;
|
|
52
|
+
'1-week': string;
|
|
53
|
+
'1-month': string;
|
|
54
|
+
'3-month': string;
|
|
55
|
+
'6-month': string;
|
|
56
|
+
'1-year': string;
|
|
57
|
+
all: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
TimePicker: {
|
|
61
|
+
placeholder: string;
|
|
62
|
+
footer: {
|
|
63
|
+
ok: string;
|
|
64
|
+
clear: string;
|
|
65
|
+
};
|
|
66
|
+
disabledTooltipText: string;
|
|
67
|
+
};
|
|
68
|
+
TimeRangePicker: {
|
|
69
|
+
placeholder: string[];
|
|
70
|
+
};
|
|
71
|
+
FileUpload: {
|
|
72
|
+
label: string;
|
|
73
|
+
};
|
|
74
|
+
ImageUpload: {
|
|
75
|
+
label: string;
|
|
76
|
+
fail: string;
|
|
77
|
+
};
|
|
78
|
+
Table: {
|
|
79
|
+
noDataText: string;
|
|
80
|
+
};
|
|
81
|
+
ColumnViewController: {
|
|
82
|
+
noFixedItemsText: string;
|
|
83
|
+
fixedSectionTitle: string;
|
|
84
|
+
listSectionTitle: string;
|
|
85
|
+
max: string;
|
|
86
|
+
items: string;
|
|
87
|
+
};
|
|
88
|
+
CategorySelector: {
|
|
89
|
+
levelCategory: string;
|
|
90
|
+
selectParentCategoryLine1: string;
|
|
91
|
+
selectParentCategoryLine2: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
package/package.json
CHANGED
package/plugin/plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var a=e&&e.prototype instanceof Generator?e:Generator,i=Object.create(a.prototype),c=new Context(n||[]);return o(i,"_invoke",{value:makeInvokeMethod(t,r,c)}),i}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var s="suspendedStart",f="suspendedYield",l="executing",h="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,i,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,i)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,a,i){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){invoke("next",t,a,i)}),(function(t){invoke("throw",t,a,i)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return invoke("throw",t,a,i)}))}i(c.arg)}var r;o(this,"_invoke",{value:function(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=s;return function(a,i){if(o===l)throw Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===s)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=l;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?h:f,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=h,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=tryCatch(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,(function(){return this})),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new AsyncIterator(wrap(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},defineIteratorMethods(g),define(g,u,"Generator"),define(g,i,(function(){return this})),define(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next}return next.done=!0,next}},e.values=values,Context.prototype={constructor:Context,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function handle(n,o){return i.type="throw",i.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return handle("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return handle(a.catchLoc,!0);if(this.prev<a.finallyLoc)return handle(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return handle(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return handle(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var t=function findAllTargetNode(t){return function findComponentNode(t){return function isComponentNode(t){return"COMPONENT"===t.type}(t)?[t]:"children"in t?t.children.flatMap(findComponentNode):[]}(t)};figma.showUI(__html__,{width:460,height:265}),figma.ui.onmessage=function(){var e=function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function _next(t){asyncGeneratorStep(a,n,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(a,n,o,_next,_throw,"throw",t)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(e){var r,n,o,a;return _regeneratorRuntime().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:i.t0=e.type,i.next="EXTRACT_SVG"===i.t0?3:"GET_FIGMA_ACCESS_TOKEN"===i.t0?7:"GET_GITHUB_ACCESS_TOKEN"===i.t0?12:"SET_FIGMA_ACCESS_TOKEN"===i.t0?17:"SET_GITHUB_ACCESS_TOKEN"===i.t0?21:24;break;case 3:return r=figma.currentPage.selection.flatMap(t).map((function(t){return{id:t.id,name:t.name}})),n=r.map((function(t){return t.id})).join(","),figma.ui.postMessage({type:"EXTRACT_SVG",payload:{fileKey:figma.fileKey,ids:n,nodes:r}}),i.abrupt("break",24);case 7:return i.next=9,figma.clientStorage.getAsync("figmaAccessToken");case 9:return o=i.sent,figma.ui.postMessage({type:"GET_FIGMA_ACCESS_TOKEN",payload:o}),i.abrupt("break",24);case 12:return i.next=14,figma.clientStorage.getAsync("githubAccessToken");case 14:return a=i.sent,figma.ui.postMessage({type:"GET_GITHUB_ACCESS_TOKEN",payload:a}),i.abrupt("break",24);case 17:return i.next=19,figma.clientStorage.setAsync("figmaAccessToken",e.payload);case 19:return figma.ui.postMessage({type:"SYNC_COMPLETE_ACCESS_TOKEN",payload:{token:e.payload,type:"SET_FIGMA_ACCESS_TOKEN"}}),i.abrupt("break",24);case 21:return i.next=23,figma.clientStorage.setAsync("githubAccessToken",e.payload);case 23:figma.ui.postMessage({type:"SYNC_COMPLETE_ACCESS_TOKEN",payload:{token:e.payload,type:"SET_GITHUB_ACCESS_TOKEN"}});case 24:case"end":return i.stop()}}),_callee)})));return function(t){return e.apply(this,arguments)}}();
|