@astryxdesign/cli 0.7.12 → 0.7.13-canary.9993f4c
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/api/component/__fixtures__/resolutions/modules.txt +1 -1
- package/api/doctor/_adapter.d.mts +17 -0
- package/api/doctor/_adapter.mjs +40 -0
- package/api/doctor/doctor.d.mts +34 -4
- package/api/doctor/doctor.mjs +108 -21
- package/api/icon/_adapter.d.mts +6 -3
- package/api/icon/_adapter.mjs +11 -3
- package/api/icon/icon.type.d.mts +22 -1
- package/api/icon/icon.type.mjs +12 -4
- package/api/icon/iconUse.doc.mjs +27 -7
- package/api/icon/list/list.mjs +29 -3
- package/api/icon/use/use.d.mts +7 -3
- package/api/icon/use/use.mjs +68 -18
- package/api/integration/validate-integration.d.mts +4 -0
- package/api/integration/validate-integration.mjs +32 -2
- package/api/integration/validate-integration.type.d.mts +15 -0
- package/api/integration/validate-integration.type.mjs +6 -1
- package/api/template/copy/copy.mjs +4 -2
- package/api/template/template.type.d.mts +42 -4
- package/api/template/template.type.mjs +9 -6
- package/assets/discover/official-packages.json +4 -0
- package/assets/docs/tree/icon-sets.doc.mjs +91 -7
- package/assets/icons/definitions/alignBottom.doc.mjs +9 -0
- package/assets/icons/definitions/alignJustify.doc.mjs +9 -0
- package/assets/icons/definitions/alignMiddle.doc.mjs +9 -0
- package/assets/icons/definitions/alignTop.doc.mjs +9 -0
- package/assets/icons/definitions/angle.doc.mjs +9 -0
- package/assets/icons/definitions/cloud.doc.mjs +9 -0
- package/assets/icons/definitions/collection.doc.mjs +9 -0
- package/assets/icons/definitions/contrast.doc.mjs +9 -0
- package/assets/icons/definitions/cornerRadius.doc.mjs +9 -0
- package/assets/icons/definitions/cut.doc.mjs +9 -0
- package/assets/icons/definitions/fingerprint.doc.mjs +9 -0
- package/assets/icons/definitions/fire.doc.mjs +9 -0
- package/assets/icons/definitions/frame.doc.mjs +9 -0
- package/assets/icons/definitions/gift.doc.mjs +9 -0
- package/assets/icons/definitions/group.doc.mjs +9 -0
- package/assets/icons/definitions/integration.doc.mjs +9 -0
- package/assets/icons/definitions/lowercase.doc.mjs +9 -0
- package/assets/icons/definitions/paddingHorizontal.doc.mjs +9 -0
- package/assets/icons/definitions/paddingPerSide.doc.mjs +9 -0
- package/assets/icons/definitions/paddingVertical.doc.mjs +9 -0
- package/assets/icons/definitions/panelBottom.doc.mjs +9 -0
- package/assets/icons/definitions/photoEffect.doc.mjs +9 -0
- package/assets/icons/definitions/radiusPerCorner.doc.mjs +9 -0
- package/assets/icons/definitions/rotateCounterclockwise.doc.mjs +9 -0
- package/assets/icons/definitions/tablet.doc.mjs +9 -0
- package/assets/icons/definitions/text.doc.mjs +9 -0
- package/assets/icons/definitions/textRegular.doc.mjs +9 -0
- package/assets/icons/definitions/transfer.doc.mjs +9 -0
- package/assets/icons/definitions/uppercase.doc.mjs +9 -0
- package/assets/icons/definitions/userRemove.doc.mjs +9 -0
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadMenu.doc.mjs +23 -0
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadMenu.tsx +199 -0
- package/assets/templates/blocks/components/ButtonGroup/ButtonGroupShowcase.doc.mjs +1 -0
- package/assets/templates/blocks/components/ChatSystemMessage/ChatSystemMessageStatusUpdates.doc.mjs +7 -2
- package/assets/templates/blocks/components/InternationalizationProvider/useDirectionHookUsage.doc.mjs +18 -0
- package/assets/templates/blocks/components/InternationalizationProvider/useDirectionHookUsage.tsx +101 -0
- package/assets/templates/pages/canvas-editor/template.doc.mjs +20 -0
- package/assets/templates/pages/editor/template.doc.mjs +1 -0
- package/assets/templates/pages/form-wizard-vertical/template.doc.mjs +1 -0
- package/assets/templates/pages/settings-dialog/template.doc.mjs +4 -0
- package/assets/templates/pages/shell-top-nav/template.doc.mjs +3 -0
- package/assets/templates/pages/table-collapsible/template.doc.mjs +1 -0
- package/assets/templates/pages/table-comparison/template.doc.mjs +1 -0
- package/authoring/config/config.doc.mjs +4 -4
- package/authoring/config/parse.d.mts +1 -1
- package/authoring/config/parse.mjs +3 -1
- package/authoring/config/type.ts +7 -5
- package/authoring/doctypes/template/template.doc.mjs +1 -1
- package/authoring/doctypes/template/type.ts +5 -3
- package/clients/cli/commands/experimental/icon.mjs +38 -9
- package/clients/cli/commands/experimental-icon-use.doc.mjs +9 -4
- package/clients/cli/commands/template.mjs +12 -3
- package/foundation/config/config-writer.d.mts +14 -0
- package/foundation/config/config-writer.mjs +73 -17
- package/foundation/discovery/icon-set-discovery.d.mts +77 -7
- package/foundation/discovery/icon-set-discovery.mjs +128 -42
- package/foundation/discovery/template-icon-notes.d.mts +46 -0
- package/foundation/discovery/template-icon-notes.mjs +94 -16
- package/foundation/discovery/template-icons.d.mts +247 -0
- package/foundation/discovery/template-icons.mjs +591 -37
- package/foundation/integrations/cli-requirement.d.mts +13 -4
- package/foundation/integrations/cli-requirement.mjs +18 -6
- package/package.json +14 -14
package/api/icon/use/use.d.mts
CHANGED
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Make an installed set the project's icon set
|
|
5
|
+
* Make an installed set the project's main icon set, with backup sets in
|
|
6
|
+
* order. A copied template takes each icon from the first set in the list
|
|
7
|
+
* that has its meaning.
|
|
6
8
|
* Experimental (spec:AST-017 FR27): may change or be removed in a patch
|
|
7
9
|
* release.
|
|
8
10
|
* @experimental
|
|
9
11
|
* @param {string} selector a set name, or `<package>/<set>`
|
|
10
|
-
* @param {{cwd?: string}} [options]
|
|
12
|
+
* @param {{cwd?: string, backups?: string[]}} [options] `backups`: the
|
|
13
|
+
* backup sets, in order
|
|
11
14
|
* @returns {Promise<import('../icon.type.mjs').IconUseResponse>}
|
|
12
15
|
*/
|
|
13
|
-
export function iconUse(selector: string, { cwd }?: {
|
|
16
|
+
export function iconUse(selector: string, { cwd, backups }?: {
|
|
14
17
|
cwd?: string;
|
|
18
|
+
backups?: string[];
|
|
15
19
|
}): Promise<import("../icon.type.mjs").IconUseResponse>;
|
package/api/icon/use/use.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @file `icon.use` leaf (AST-084 FR8): choose the project's icon set
|
|
5
|
-
* writing `experimental.iconSet` in
|
|
4
|
+
* @file `icon.use` leaf (AST-084 FR8): choose the project's main icon set,
|
|
5
|
+
* and any backup sets in order, by writing `experimental.iconSet` in
|
|
6
|
+
* astryx.config. With no backup it writes the set name as a string; with
|
|
7
|
+
* backups it writes a list, the main set first.
|
|
6
8
|
*
|
|
7
9
|
* @output the `icon.use` envelope
|
|
8
10
|
* @position api/icon/use — dispatched by the `experimental icon use` command
|
|
@@ -15,21 +17,51 @@ import {
|
|
|
15
17
|
iconSetConfigCliWarning,
|
|
16
18
|
iconSetKey,
|
|
17
19
|
loadIconProject,
|
|
20
|
+
ICON_USE_ORDER_COMMAND,
|
|
18
21
|
refuseOutsideProject,
|
|
19
|
-
|
|
22
|
+
setConfigValue,
|
|
23
|
+
unlistedIconSets,
|
|
20
24
|
} from '../_adapter.mjs';
|
|
21
25
|
import {setsNamed, unusableSet} from '../_records.mjs';
|
|
22
26
|
|
|
23
27
|
/**
|
|
24
|
-
*
|
|
28
|
+
* The one installed set a selector names, or the error that says why not.
|
|
29
|
+
* @param {import('../../../foundation/discovery/icon-set-discovery.mjs').DiscoveredIconSet[]} sets
|
|
30
|
+
* @param {import('../../../foundation/discovery/icon-set-discovery.mjs').WithdrawnIconSet[]} withdrawn
|
|
31
|
+
* @param {string} selector
|
|
32
|
+
*/
|
|
33
|
+
function oneSet(sets, withdrawn, selector) {
|
|
34
|
+
const named = setsNamed(sets, selector);
|
|
35
|
+
if (named.length === 0) throw unusableSet(sets, withdrawn, selector);
|
|
36
|
+
if (named.length > 1) {
|
|
37
|
+
throw new AstryxError(
|
|
38
|
+
`Two installed packages ship an icon set named "${selector}"; name it with its package.`,
|
|
39
|
+
named.map(set => ({
|
|
40
|
+
name: iconSetKey(set),
|
|
41
|
+
reason: `the set in ${set.package}`,
|
|
42
|
+
})),
|
|
43
|
+
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return named[0];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Make an installed set the project's main icon set, with backup sets in
|
|
51
|
+
* order. A copied template takes each icon from the first set in the list
|
|
52
|
+
* that has its meaning.
|
|
25
53
|
* Experimental (spec:AST-017 FR27): may change or be removed in a patch
|
|
26
54
|
* release.
|
|
27
55
|
* @experimental
|
|
28
56
|
* @param {string} selector a set name, or `<package>/<set>`
|
|
29
|
-
* @param {{cwd?: string}} [options]
|
|
57
|
+
* @param {{cwd?: string, backups?: string[]}} [options] `backups`: the
|
|
58
|
+
* backup sets, in order
|
|
30
59
|
* @returns {Promise<import('../icon.type.mjs').IconUseResponse>}
|
|
31
60
|
*/
|
|
32
|
-
export async function iconUse(
|
|
61
|
+
export async function iconUse(
|
|
62
|
+
selector,
|
|
63
|
+
{cwd = process.cwd(), backups = []} = {},
|
|
64
|
+
) {
|
|
33
65
|
if (typeof selector !== 'string' || selector.trim() === '') {
|
|
34
66
|
throw new AstryxError(
|
|
35
67
|
'Name the icon set to use',
|
|
@@ -38,27 +70,31 @@ export async function iconUse(selector, {cwd = process.cwd()} = {}) {
|
|
|
38
70
|
name: 'astryx experimental icon --list',
|
|
39
71
|
reason: 'list the installed sets',
|
|
40
72
|
},
|
|
73
|
+
{
|
|
74
|
+
name: ICON_USE_ORDER_COMMAND,
|
|
75
|
+
reason: 'choose a main set and backup sets, in order',
|
|
76
|
+
},
|
|
41
77
|
],
|
|
42
78
|
ERROR_CODES.ERR_MISSING_ARGUMENT,
|
|
43
79
|
);
|
|
44
80
|
}
|
|
45
81
|
refuseOutsideProject(cwd, 'experimental icon use', 'the app project');
|
|
46
82
|
const {projectDir, sets, withdrawn} = await loadIconProject(cwd);
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
83
|
+
const main = oneSet(sets, withdrawn, selector);
|
|
84
|
+
const backupSets = backups.map(each => oneSet(sets, withdrawn, each));
|
|
85
|
+
const listed = [main, ...backupSets];
|
|
86
|
+
const repeated = listed.find((set, index) => listed.indexOf(set) !== index);
|
|
87
|
+
if (repeated) {
|
|
50
88
|
throw new AstryxError(
|
|
51
|
-
`
|
|
52
|
-
|
|
53
|
-
name: iconSetKey(set),
|
|
54
|
-
reason: `the set in ${set.package}`,
|
|
55
|
-
})),
|
|
89
|
+
`"${iconSetKey(repeated)}" is in the list twice; name each set once, the main set first.`,
|
|
90
|
+
[{name: ICON_USE_ORDER_COMMAND, reason: 'each set once, in order'}],
|
|
56
91
|
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
57
92
|
);
|
|
58
93
|
}
|
|
94
|
+
const value = backups.length > 0 ? [selector, ...backups] : selector;
|
|
59
95
|
let written;
|
|
60
96
|
try {
|
|
61
|
-
written =
|
|
97
|
+
written = setConfigValue(projectDir, 'experimental.iconSet', value);
|
|
62
98
|
} catch (error) {
|
|
63
99
|
// A protected config, or an unreadable protection source, keeps the
|
|
64
100
|
// stable code every consumer-file writer uses (spec:AST-040 FR4, FR6).
|
|
@@ -73,17 +109,31 @@ export async function iconUse(selector, {cwd = process.cwd()} = {}) {
|
|
|
73
109
|
stable ?? ERROR_CODES.ERR_WRITE_FAILED,
|
|
74
110
|
);
|
|
75
111
|
}
|
|
76
|
-
// An older CLI the project may still run refuses the
|
|
77
|
-
const warning = iconSetConfigCliWarning(projectDir
|
|
112
|
+
// An older CLI the project may still run refuses the value just written.
|
|
113
|
+
const warning = iconSetConfigCliWarning(projectDir, {
|
|
114
|
+
list: Array.isArray(value),
|
|
115
|
+
});
|
|
116
|
+
// Doctor fails a project that installs several sets and leaves one out.
|
|
117
|
+
const unlisted = sets.filter(set => !listed.includes(set)).map(iconSetKey);
|
|
118
|
+
const left =
|
|
119
|
+
unlisted.length > 0
|
|
120
|
+
? unlistedIconSets(sets.length, selector, backups, unlisted)
|
|
121
|
+
: null;
|
|
78
122
|
return {
|
|
79
123
|
type: 'icon.use',
|
|
80
124
|
data: {
|
|
81
125
|
iconSet: selector,
|
|
82
|
-
set: iconSetKey(
|
|
126
|
+
set: iconSetKey(main),
|
|
127
|
+
backups: backups.map((each, index) => ({
|
|
128
|
+
iconSet: each,
|
|
129
|
+
set: iconSetKey(backupSets[index]),
|
|
130
|
+
})),
|
|
83
131
|
config: path.relative(projectDir, written.file).split(path.sep).join('/'),
|
|
84
132
|
created: written.created,
|
|
85
133
|
previous: written.previous,
|
|
86
134
|
changed: written.changed,
|
|
135
|
+
unlisted,
|
|
136
|
+
...(left ? {next: `${left.problem}. ${left.fix}`} : {}),
|
|
87
137
|
...(warning ? {warning} : {}),
|
|
88
138
|
},
|
|
89
139
|
};
|
|
@@ -97,6 +97,10 @@ export type ValidateResult = {
|
|
|
97
97
|
* what the public-import check could not judge
|
|
98
98
|
*/
|
|
99
99
|
publicImports?: import("./validate-integration.type.mjs").PublicImportsReport | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* the template icon imports the undeclared-icon check could not judge
|
|
102
|
+
*/
|
|
103
|
+
templateIconsUnchecked?: import("../../foundation/discovery/template-icon-notes.mjs").TemplateIconUnchecked[] | undefined;
|
|
100
104
|
};
|
|
101
105
|
import { validateLoadedIntegration } from '../../foundation/integrations/validate-contributions.mjs';
|
|
102
106
|
import { isListedIssue } from '../../foundation/integrations/validate-contributions.mjs';
|
|
@@ -41,7 +41,10 @@ import {
|
|
|
41
41
|
iconSetIssues,
|
|
42
42
|
} from '../../foundation/discovery/icon-set-checks.mjs';
|
|
43
43
|
import {olderCliNotes} from '../../foundation/discovery/doc-stability.mjs';
|
|
44
|
-
import {
|
|
44
|
+
import {
|
|
45
|
+
templateIconNotes,
|
|
46
|
+
templateIconUndeclaredNotes,
|
|
47
|
+
} from '../../foundation/discovery/template-icon-notes.mjs';
|
|
45
48
|
import {integrationDocConsistency} from '../../foundation/discovery/doc-consistency.mjs';
|
|
46
49
|
import {
|
|
47
50
|
integrationDocCommands,
|
|
@@ -123,6 +126,8 @@ export {validateLoadedIntegration, isListedIssue};
|
|
|
123
126
|
* @property {import('../../foundation/discovery/doc-stability.mjs').OlderCliNote[]} [olderCliNotes]
|
|
124
127
|
* @property {import('./validate-integration.type.mjs').PublicImportsReport} [publicImports]
|
|
125
128
|
* what the public-import check could not judge
|
|
129
|
+
* @property {import('../../foundation/discovery/template-icon-notes.mjs').TemplateIconUnchecked[]} [templateIconsUnchecked]
|
|
130
|
+
* the template icon imports the undeclared-icon check could not judge
|
|
126
131
|
*/
|
|
127
132
|
|
|
128
133
|
/**
|
|
@@ -554,6 +559,16 @@ async function validateAtPackageDir(
|
|
|
554
559
|
// with its fix, never an issue (spec:AST-084 FR10).
|
|
555
560
|
const iconNotes = await templateIconNotes(loaded, packageDir);
|
|
556
561
|
if (iconNotes.length > 0) (result.notes ??= []).push(...iconNotes);
|
|
562
|
+
// An icon a template imports but never declares, in a package whose
|
|
563
|
+
// templates declare `icons`: a note until the next minor makes it a
|
|
564
|
+
// warning.
|
|
565
|
+
const undeclared = await templateIconUndeclaredNotes(loaded, packageDir);
|
|
566
|
+
if (undeclared.notes.length > 0)
|
|
567
|
+
(result.notes ??= []).push(
|
|
568
|
+
...undeclared.notes.map(note => ({...note, next: true})),
|
|
569
|
+
);
|
|
570
|
+
if (undeclared.unchecked.length > 0)
|
|
571
|
+
result.templateIconsUnchecked = undeclared.unchecked;
|
|
557
572
|
}
|
|
558
573
|
|
|
559
574
|
return result;
|
|
@@ -900,7 +915,10 @@ export async function validateIntegration(pkg, options = {}) {
|
|
|
900
915
|
if (integration?.docs) {
|
|
901
916
|
notes.push(...(await docCommandNotes(integration)));
|
|
902
917
|
notes.push(
|
|
903
|
-
...(await docTargetNotes(integration)).map(note => ({
|
|
918
|
+
...(await docTargetNotes(integration)).map(note => ({
|
|
919
|
+
...note,
|
|
920
|
+
next: true,
|
|
921
|
+
})),
|
|
904
922
|
);
|
|
905
923
|
}
|
|
906
924
|
return {
|
|
@@ -942,6 +960,18 @@ export async function validateIntegration(pkg, options = {}) {
|
|
|
942
960
|
},
|
|
943
961
|
}
|
|
944
962
|
: {}),
|
|
963
|
+
// Template icon imports the check cannot judge (a name-only match, a
|
|
964
|
+
// generic renderer, or an import not used as an icon): listed, never
|
|
965
|
+
// failed on.
|
|
966
|
+
...(result.found && result.templateIconsUnchecked
|
|
967
|
+
? {
|
|
968
|
+
templateIcons: {
|
|
969
|
+
status: 'checked',
|
|
970
|
+
findings: [],
|
|
971
|
+
unchecked: result.templateIconsUnchecked,
|
|
972
|
+
},
|
|
973
|
+
}
|
|
974
|
+
: {}),
|
|
945
975
|
// What the public-import check could not judge: listed, never failed on.
|
|
946
976
|
...(result.found && result.publicImports
|
|
947
977
|
? {publicImports: result.publicImports}
|
|
@@ -47,6 +47,11 @@ export type ValidateIntegrationResponse = {
|
|
|
47
47
|
* `showcase_not_standalone` and `template_asset_not_packed`, what a
|
|
48
48
|
* package's examples need (next minor; a block's `alsoShowcaseFor` names
|
|
49
49
|
* count as shown);
|
|
50
|
+
* `template_icon_undeclared`, an icon a template imports but does not
|
|
51
|
+
* declare in `icons`, in a package whose templates declare `icons` (next
|
|
52
|
+
* minor; an import that matches an icon by its name only, a generic
|
|
53
|
+
* renderer, and an import the template does not use as an icon are listed
|
|
54
|
+
* in `templateIcons` as not checked instead);
|
|
50
55
|
* `cli_peer_version`, the running CLI outside the package's
|
|
51
56
|
* `@astryxdesign/cli` peer range; and
|
|
52
57
|
* the package layout findings added after the last minor release, each with
|
|
@@ -87,6 +92,16 @@ export type ValidateIntegrationResponse = {
|
|
|
87
92
|
}>;
|
|
88
93
|
};
|
|
89
94
|
publicImports?: PublicImportsReport;
|
|
95
|
+
templateIcons?: {
|
|
96
|
+
status: "checked";
|
|
97
|
+
findings: [];
|
|
98
|
+
unchecked: Array<{
|
|
99
|
+
file: string;
|
|
100
|
+
icon: string;
|
|
101
|
+
module: string;
|
|
102
|
+
reason: string;
|
|
103
|
+
}>;
|
|
104
|
+
};
|
|
90
105
|
iconSets?: IconSetCoverage[];
|
|
91
106
|
olderCliNotes?: OlderCliNote[];
|
|
92
107
|
};
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* "healthy" — the two are otherwise byte-identical.
|
|
40
40
|
* @typedef {object} ValidateIntegrationResponse
|
|
41
41
|
* @property {'integration.validate'} type
|
|
42
|
-
* @property {{validated: boolean, name: string | null, version: string | null, issues: import('../../foundation/integrations/issue').AstryxIntegrationIssue[], notes?: Array<{code: string, message: string, next?: boolean}>, docTypes?: DocTypesReport, docNames?: DocNamesReport, blockComponents?: BlockComponentsReport, exampleAssets?: {status: 'checked', findings: [], unchecked: Array<{file: string, asset: string, reason: string}>}, publicImports?: PublicImportsReport, iconSets?: IconSetCoverage[], olderCliNotes?: OlderCliNote[]}} data
|
|
42
|
+
* @property {{validated: boolean, name: string | null, version: string | null, issues: import('../../foundation/integrations/issue').AstryxIntegrationIssue[], notes?: Array<{code: string, message: string, next?: boolean}>, docTypes?: DocTypesReport, docNames?: DocNamesReport, blockComponents?: BlockComponentsReport, exampleAssets?: {status: 'checked', findings: [], unchecked: Array<{file: string, asset: string, reason: string}>}, publicImports?: PublicImportsReport, templateIcons?: {status: 'checked', findings: [], unchecked: Array<{file: string, icon: string, module: string, reason: string}>}, iconSets?: IconSetCoverage[], olderCliNotes?: OlderCliNote[]}} data
|
|
43
43
|
* `iconSets` is experimental: it may change or be removed in a patch
|
|
44
44
|
* release.
|
|
45
45
|
* `notes`: information beside the issues. A note fails nothing by default;
|
|
@@ -51,6 +51,11 @@
|
|
|
51
51
|
* `showcase_not_standalone` and `template_asset_not_packed`, what a
|
|
52
52
|
* package's examples need (next minor; a block's `alsoShowcaseFor` names
|
|
53
53
|
* count as shown);
|
|
54
|
+
* `template_icon_undeclared`, an icon a template imports but does not
|
|
55
|
+
* declare in `icons`, in a package whose templates declare `icons` (next
|
|
56
|
+
* minor; an import that matches an icon by its name only, a generic
|
|
57
|
+
* renderer, and an import the template does not use as an icon are listed
|
|
58
|
+
* in `templateIcons` as not checked instead);
|
|
54
59
|
* `cli_peer_version`, the running CLI outside the package's
|
|
55
60
|
* `@astryxdesign/cli` peer range; and
|
|
56
61
|
* the package layout findings added after the last minor release, each with
|
|
@@ -100,8 +100,10 @@ export function templateCopy(
|
|
|
100
100
|
demoContentReplaced,
|
|
101
101
|
demoMediaReplaced,
|
|
102
102
|
} = replaceTemplateDemos(fs.readFileSync(match.filePath, 'utf-8'));
|
|
103
|
-
// Icons follow the project's icon set (AST-084 FR9). An
|
|
104
|
-
//
|
|
103
|
+
// Icons follow the project's icon set and its backups (AST-084 FR9). An
|
|
104
|
+
// icon no set in the list draws a placeholder the file declares, so the
|
|
105
|
+
// library the template imported it from is no longer a needed dependency
|
|
106
|
+
// below.
|
|
105
107
|
const {source: outputSource, icons} = mapTemplateIcons(
|
|
106
108
|
withMedia,
|
|
107
109
|
iconSets,
|
|
@@ -117,7 +117,7 @@ export type TemplateCopyResponse = {
|
|
|
117
117
|
/**
|
|
118
118
|
* How a template's icons follow the project's icon set (AST-084 FR10).
|
|
119
119
|
* Without a project icon set (`status` `none`, `ambiguous`, or `missing`)
|
|
120
|
-
* the source is unchanged and
|
|
120
|
+
* the source is unchanged and every list is empty.
|
|
121
121
|
*/
|
|
122
122
|
export type TemplateIconsReport = {
|
|
123
123
|
/**
|
|
@@ -125,15 +125,19 @@ export type TemplateIconsReport = {
|
|
|
125
125
|
*/
|
|
126
126
|
status: "selected" | "none" | "ambiguous" | "missing" | "withdrawn";
|
|
127
127
|
/**
|
|
128
|
-
* The project's icon set as `<package>/<set>`, when selected.
|
|
128
|
+
* The project's main icon set as `<package>/<set>`, when selected.
|
|
129
129
|
*/
|
|
130
130
|
set: string | null;
|
|
131
|
+
/**
|
|
132
|
+
* The main set and each backup set as `<package>/<set>`, in the order icons are looked up; present when the project lists backups.
|
|
133
|
+
*/
|
|
134
|
+
order?: string[] | undefined;
|
|
131
135
|
/**
|
|
132
136
|
* Why the project has that set, or none.
|
|
133
137
|
*/
|
|
134
138
|
reason: string;
|
|
135
139
|
/**
|
|
136
|
-
* Icons rewritten to the project's
|
|
140
|
+
* Icons rewritten to the first set in the project's list that has them, and the rule that chose each one: a reviewed `exact` or `strong` match, or the icon the set's `map` names for the icon definition the template declares. `target.set` names the set used. `dropped` names the library's sizing props (`size`, `strokeWidth`, `absoluteStrokeWidth`) removed from the icon's elements: an icon set's icons take their size from CSS. `variant` is present when the template's icon draws a look the set's icon does not have: the look asked for and the set's default look used instead.
|
|
137
141
|
*/
|
|
138
142
|
mapped: Array<{
|
|
139
143
|
source: {
|
|
@@ -149,9 +153,35 @@ export type TemplateIconsReport = {
|
|
|
149
153
|
};
|
|
150
154
|
by: "match" | "definition";
|
|
151
155
|
dropped?: string[];
|
|
156
|
+
variant?: {
|
|
157
|
+
asked: string;
|
|
158
|
+
used: string | null;
|
|
159
|
+
};
|
|
152
160
|
}>;
|
|
153
161
|
/**
|
|
154
|
-
* Icons
|
|
162
|
+
* Icons with a meaning that no set in the project's list has. The template's original import is removed. The written code declares a small placeholder component once (`target.local`, `MissingIcon` unless the file already uses that name), and each use of the icon renders it, with a comment that names the meaning. It needs no package. `fixes` are the commands that give it a real icon: map the definition in the main set, or add a backup set that has it.
|
|
163
|
+
*/
|
|
164
|
+
placeholder: Array<{
|
|
165
|
+
source: {
|
|
166
|
+
module: string;
|
|
167
|
+
export: string;
|
|
168
|
+
};
|
|
169
|
+
target: {
|
|
170
|
+
local: string;
|
|
171
|
+
};
|
|
172
|
+
definitions: string[];
|
|
173
|
+
fixes: string[];
|
|
174
|
+
dropped?: string[];
|
|
175
|
+
suggestion?: {
|
|
176
|
+
set: string;
|
|
177
|
+
id: string;
|
|
178
|
+
module: string;
|
|
179
|
+
export: string;
|
|
180
|
+
confidence: "likely";
|
|
181
|
+
};
|
|
182
|
+
}>;
|
|
183
|
+
/**
|
|
184
|
+
* Icons left as the template wrote them, with why, and a `likely` reviewed match as a suggestion when the project set has one. Every declared key is mapped, a placeholder, or kept; `module` is null for a key the template does not import, and `export` is `default` for a default import and `*` for a namespace import.
|
|
155
185
|
*/
|
|
156
186
|
kept: Array<{
|
|
157
187
|
module: string | null;
|
|
@@ -165,6 +195,14 @@ export type TemplateIconsReport = {
|
|
|
165
195
|
confidence: "likely";
|
|
166
196
|
};
|
|
167
197
|
}>;
|
|
198
|
+
/**
|
|
199
|
+
* Each set the mapped icons come from, as `<package>/<set>`, with its license and how many icons it gave.
|
|
200
|
+
*/
|
|
201
|
+
sets: Array<{
|
|
202
|
+
set: string;
|
|
203
|
+
license: string;
|
|
204
|
+
icons: number;
|
|
205
|
+
}>;
|
|
168
206
|
};
|
|
169
207
|
/**
|
|
170
208
|
* astryx --json template --cdn [path]
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* @property {string} data.source
|
|
57
57
|
* @property {number} data.demoMediaReplaced Astryx demo media references (images, posters, videos) replaced in the returned source: images with a neutral placeholder, videos with an empty source. Swap in your own media at those points; no media is installed. 0 when the template carried none.
|
|
58
58
|
* @property {number} data.demoContentReplaced Astryx docs-only demo content elements (such as a playing card's face in a motion example) replaced in the returned source with a `<Text>Card content</Text>` placeholder. Put your own content there. 0 when the template carried none.
|
|
59
|
-
* @property {TemplateIconsReport} [data.icons] Experimental, present only when the project sets `experimental.iconSet`: how the template's icons follow the project's icon set, each icon `mapped` (source and target) or `kept`, and the icon-set state. It may change or be removed in a patch release.
|
|
59
|
+
* @property {TemplateIconsReport} [data.icons] Experimental, present only when the project sets `experimental.iconSet`: how the template's icons follow the project's icon set, each icon `mapped` (source and target), a `placeholder`, or `kept`, the sets used with their licenses, and the icon-set state. It may change or be removed in a patch release.
|
|
60
60
|
*/
|
|
61
61
|
|
|
62
62
|
/**
|
|
@@ -86,20 +86,23 @@
|
|
|
86
86
|
* @property {string[]} data.notes Setup notes: what the template needs that the project lacks (missing packages, missing StyleX compiler). Each note is one actionable line. Empty when the template needs nothing the project lacks.
|
|
87
87
|
* @property {string[]} data.missingPackages External package names the template imports that are not in the project's dependencies. Empty when none are missing.
|
|
88
88
|
* @property {string | null} data.installCommand A ready-to-run install command for the missing packages, using the project's package manager and the CLI workspace's version ranges. Null when no packages are missing, or when several lockfiles leave the package manager undetermined; missingPackages still names the packages.
|
|
89
|
-
* @property {TemplateIconsReport} [data.icons] Experimental, present only when the project sets `experimental.iconSet`: how the written file's icons follow the project's icon set, each icon `mapped` (source and target) or `kept`, and the icon-set state. It may change or be removed in a patch release.
|
|
89
|
+
* @property {TemplateIconsReport} [data.icons] Experimental, present only when the project sets `experimental.iconSet`: how the written file's icons follow the project's icon set, each icon `mapped` (source and target), a `placeholder`, or `kept`, the sets used with their licenses, and the icon-set state. It may change or be removed in a patch release.
|
|
90
90
|
*/
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* How a template's icons follow the project's icon set (AST-084 FR10).
|
|
94
94
|
* Without a project icon set (`status` `none`, `ambiguous`, or `missing`)
|
|
95
|
-
* the source is unchanged and
|
|
95
|
+
* the source is unchanged and every list is empty.
|
|
96
96
|
* @experimental May change or be removed in a patch release.
|
|
97
97
|
* @typedef {object} TemplateIconsReport
|
|
98
98
|
* @property {'selected' | 'none' | 'ambiguous' | 'missing' | 'withdrawn'} status The project's icon-set state.
|
|
99
|
-
* @property {string | null} set The project's icon set as `<package>/<set>`, when selected.
|
|
99
|
+
* @property {string | null} set The project's main icon set as `<package>/<set>`, when selected.
|
|
100
|
+
* @property {string[]} [order] The main set and each backup set as `<package>/<set>`, in the order icons are looked up; present when the project lists backups.
|
|
100
101
|
* @property {string} reason Why the project has that set, or none.
|
|
101
|
-
* @property {Array<{source: {module: string, export: string}, target: {set: string, package: string, id: string, module: string, export: string}, by: 'match' | 'definition', dropped?: string[]}>} mapped Icons rewritten to the project's
|
|
102
|
-
* @property {Array<{module: string
|
|
102
|
+
* @property {Array<{source: {module: string, export: string}, target: {set: string, package: string, id: string, module: string, export: string}, by: 'match' | 'definition', dropped?: string[], variant?: {asked: string, used: string | null}}>} mapped Icons rewritten to the first set in the project's list that has them, and the rule that chose each one: a reviewed `exact` or `strong` match, or the icon the set's `map` names for the icon definition the template declares. `target.set` names the set used. `dropped` names the library's sizing props (`size`, `strokeWidth`, `absoluteStrokeWidth`) removed from the icon's elements: an icon set's icons take their size from CSS. `variant` is present when the template's icon draws a look the set's icon does not have: the look asked for and the set's default look used instead.
|
|
103
|
+
* @property {Array<{source: {module: string, export: string}, target: {local: string}, definitions: string[], fixes: string[], dropped?: string[], suggestion?: {set: string, id: string, module: string, export: string, confidence: 'likely'}}>} placeholder Icons with a meaning that no set in the project's list has. The template's original import is removed. The written code declares a small placeholder component once (`target.local`, `MissingIcon` unless the file already uses that name), and each use of the icon renders it, with a comment that names the meaning. It needs no package. `fixes` are the commands that give it a real icon: map the definition in the main set, or add a backup set that has it.
|
|
104
|
+
* @property {Array<{module: string | null, export: string, reason: string, suggestion?: {set: string, id: string, module: string, export: string, confidence: 'likely'}}>} kept Icons left as the template wrote them, with why, and a `likely` reviewed match as a suggestion when the project set has one. Every declared key is mapped, a placeholder, or kept; `module` is null for a key the template does not import, and `export` is `default` for a default import and `*` for a namespace import.
|
|
105
|
+
* @property {Array<{set: string, license: string, icons: number}>} sets Each set the mapped icons come from, as `<package>/<set>`, with its license and how many icons it gave.
|
|
103
106
|
*/
|
|
104
107
|
|
|
105
108
|
/**
|
|
@@ -356,16 +356,100 @@ export const brand = defineTheme({name: 'brand', icons: themeIcons});`,
|
|
|
356
356
|
lang: 'bash',
|
|
357
357
|
code: `astryx experimental icon delete # ranked matches with import lines
|
|
358
358
|
astryx experimental icon outline/bin # one icon and every variant
|
|
359
|
-
astryx experimental icon --list # installed sets and
|
|
360
|
-
astryx experimental icon use outline # make it the project's icon set
|
|
359
|
+
astryx experimental icon --list # installed sets, their order, and definition coverage
|
|
360
|
+
astryx experimental icon use outline # make it the project's main icon set
|
|
361
|
+
astryx experimental icon use outline --backup brand # a main set, then a backup`,
|
|
361
362
|
},
|
|
362
363
|
{
|
|
363
364
|
type: 'prose',
|
|
364
|
-
text: "A template declares, in its descriptor's `icons`, the definition each imported icon draws (`{TrashIcon: 'delete'}`). Once the project sets `experimental.iconSet` in astryx.config (`experimental icon use` writes it), each declared icon becomes the set's
|
|
365
|
+
text: "A template declares, in its descriptor's `icons`, the definition each imported icon draws (`{TrashIcon: 'delete'}`). Once the project sets `experimental.iconSet` in astryx.config (`experimental icon use` writes it), each declared icon becomes the icon for that definition from the first set in the project's list that maps it. An icon that no set in the list has draws a placeholder instead (see When no set has an icon, below); it never keeps the template's original library import. The copy reports every icon as mapped, a placeholder, or kept. Nothing is guessed from names. A mapped icon loses its library's sizing props (`size`, `strokeWidth`, `absoluteStrokeWidth`), since a set's icons take their size from CSS; the report names them as `dropped`. Comments on a rewritten import line are kept.",
|
|
365
366
|
},
|
|
366
367
|
{
|
|
367
368
|
type: 'prose',
|
|
368
|
-
text: "Each `icons` key is the name the template imports from its module, not a local alias. When a template imports the same name from two modules, such as `TrashIcon` from a library's outline and solid modules, one key covers both: both draw the same definition. Each then becomes the
|
|
369
|
+
text: "Each `icons` key is the name the template imports from its module, not a local alias. When a template imports the same name from two modules, such as `TrashIcon` from a library's outline and solid modules, one key covers both: both draw the same definition. Each then becomes the chosen set's variant of the same name when its module belongs to an installed set that declares the variant (so solid stays solid). When the chosen set's icon has no such variant, it draws the set's default look, and the report names both looks as `variant: {asked, used}`. A missing look never moves an icon to a backup set.",
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
id: 'main-and-backup-sets',
|
|
375
|
+
title: 'Choose a main set and backups',
|
|
376
|
+
content: [
|
|
377
|
+
{
|
|
378
|
+
type: 'prose',
|
|
379
|
+
text: 'A project uses one main icon set. Backup sets fill the meanings the main set does not map, in the order you list them. Each icon comes from exactly one set: the first in the list that maps its meaning. Two sets that both map a meaning never mix; the list order decides.',
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
type: 'code',
|
|
383
|
+
lang: 'bash',
|
|
384
|
+
code: `astryx experimental icon use outline --backup @acme/brand-icons/brand --backup lines`,
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
type: 'prose',
|
|
388
|
+
text: "`use` writes `experimental.iconSet` in astryx.config. With no `--backup`, it writes the set name as a string. With backups, it writes a list, the main set first. Name a set as `<set>`, or as `<package>/<set>` when two packages ship a set with that name. Every set in the list must be installed, and each set appears once. When the project's `@astryxdesign/cli` range also admits an older release that refuses the value written, `use` warns and names the range to require; the CLI you run now reads it either way.",
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
type: 'code',
|
|
392
|
+
lang: 'js',
|
|
393
|
+
label: 'astryx.config.mjs',
|
|
394
|
+
code: `export default {
|
|
395
|
+
experimental: {
|
|
396
|
+
// One main set:
|
|
397
|
+
// iconSet: 'outline',
|
|
398
|
+
// A main set, then backups in order:
|
|
399
|
+
iconSet: ['outline', '@acme/brand-icons/brand', 'lines'],
|
|
400
|
+
},
|
|
401
|
+
};`,
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
type: 'prose',
|
|
405
|
+
text: "`astryx experimental icon --list` shows the order: the project's `order` (each set as `<package>/<set>`), and each set's `role` (`main`, `backup`, or not listed) and `rank`. Its coverage columns count the definitions each set maps: `builtIn` of the built-in names (a valid set maps them all, and `missing` lists any it lacks), and `definitions` of every Astryx definition. When two or more sets are installed and none is the main set, `--list` says so with the command to run, `astryx experimental icon use <main> --backup <set>`. The `use` receipt (`icon.use`) names the main set (`iconSet`, `set`) and each backup (`backups`), and lists installed sets the list leaves out (`unlisted`) with the command that adds them (`next`): `astryx doctor` fails a project that installs more than one set and leaves one out of the list.",
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
type: 'prose',
|
|
409
|
+
text: "Only the main set's theme map feeds `defineTheme({icons})`. Backups never change the theme. The copy report lists each set it used, with its license (`icons.sets`).",
|
|
410
|
+
},
|
|
411
|
+
],
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
id: 'missing-icons',
|
|
415
|
+
title: 'When no set has an icon',
|
|
416
|
+
content: [
|
|
417
|
+
{
|
|
418
|
+
type: 'prose',
|
|
419
|
+
text: "When no set in the list maps an icon's meaning, the copied file removes that icon from the template's library import. It declares a small `MissingIcon` component once (another free name when the file already uses `MissingIcon`), and each place the icon was renders it, so the page still builds and needs no new package. The placeholder is a dashed square, 1em in size, in the current text color. It is hidden from screen readers unless that use gives it an `aria-label`. A comment beside each use records the meaning.",
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
type: 'code',
|
|
423
|
+
lang: 'tsx',
|
|
424
|
+
code: `<Icon icon={MissingIcon /* missing icon: cut */} size="sm" />`,
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
type: 'prose',
|
|
428
|
+
text: '`astryx template` prints a note for each placeholder, and the JSON report lists it in `icons.placeholder` with its `definitions` and `fixes`. Give the meaning a real icon in one of these ways:',
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
type: 'list',
|
|
432
|
+
style: 'ordered',
|
|
433
|
+
items: [
|
|
434
|
+
'Add a backup set that has the meaning: `astryx experimental icon use <main> --backup <set>`. `astryx discover --type icon-set` lists the sets your sources offer, with the definitions each maps; install one first.',
|
|
435
|
+
'If you author your main set (its package is yours, not an installed dependency), map the meaning there: `astryx experimental icon map cut <icon> --set <main>`.',
|
|
436
|
+
'For a built-in meaning (`astryx experimental icon --definitions` marks them), render the theme icon by name instead: `<Icon icon="close" />`. Every set maps the built-in names, so this needs no import.',
|
|
437
|
+
'Otherwise, write your own icon component and pass it where `MissingIcon` was (`astryx docs icons custom-icons`).',
|
|
438
|
+
],
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
type: 'prose',
|
|
442
|
+
text: 'After the first two, copy the template again, or replace each use of `MissingIcon` with the icon `astryx experimental icon <meaning>` prints, which finds the icon once a set in your list maps the meaning, and delete the `MissingIcon` declaration. `astryx doctor` warns while copied code still uses the placeholder (the `icon-placeholders` check), and names each file and meaning.',
|
|
443
|
+
},
|
|
444
|
+
],
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
id: 'label-template-icons',
|
|
448
|
+
title: 'Label every template icon',
|
|
449
|
+
content: [
|
|
450
|
+
{
|
|
451
|
+
type: 'prose',
|
|
452
|
+
text: "A template follows a project's icon sets only for the icons its `icons` declares. In a package whose templates declare `icons`, `astryx integration check` notes each icon a template imports but does not declare (`template_icon_undeclared`). The note fails `--strict --next` now, and `--strict` from the next minor release. It counts an import from another package as an icon when a template in the package declares an icon from the same module, and the template renders it as an element with no children (`<Scissors />`) or passes it as a value (`icon={Scissors}`). Any other import from that module, such as a type, a function the template calls, or a provider with children, is listed as not checked: declaring it would make `astryx template` swap it for an icon. An import whose name ends in `Icon`, from any other module, matches by name only, so the check lists it as not checked. A generic renderer (a bare `Icon`, or a component every use gives an `icon`, `iconNode`, `name` or `src` prop, such as lucide's `DynamicIcon`) draws no one definition, so it is listed as not checked too, whatever its module. Neither fails anything. Add the key with the definition it draws; `astryx experimental icon --definitions` lists the definitions, and `astryx experimental icon new-definition` adds one your set needs.",
|
|
369
453
|
},
|
|
370
454
|
],
|
|
371
455
|
},
|
|
@@ -383,7 +467,7 @@ astryx experimental icon use outline # make it the project's icon set`,
|
|
|
383
467
|
rows: [
|
|
384
468
|
[
|
|
385
469
|
'`experimental.iconSet` in astryx.config',
|
|
386
|
-
"The project's icon set, by set name or as `<package>/<set>`,
|
|
470
|
+
"The project's main icon set, by set name or as `<package>/<set>`, or a list: the main set first, then backup sets in order. It is the opt-in: templates, discover, and doctor read icon sets only when it is set. `astryx experimental icon` ranks the main set's icons first, and without it treats the only installed set as the project's. `astryx experimental icon use <main> --backup <set>` writes it.",
|
|
387
471
|
],
|
|
388
472
|
[
|
|
389
473
|
'`experimental.iconSets` in the integration manifest',
|
|
@@ -391,7 +475,7 @@ astryx experimental icon use outline # make it the project's icon set`,
|
|
|
391
475
|
],
|
|
392
476
|
[
|
|
393
477
|
"A template descriptor's `icons`",
|
|
394
|
-
"The icon definition each imported icon draws (`{TrashIcon: 'delete'}`): a named import by the name it imports, a default import by its local name. `astryx template`, shown or copied, then writes the set
|
|
478
|
+
"The icon definition each imported icon draws (`{TrashIcon: 'delete'}`): a named import by the name it imports, a default import by its local name. `astryx template`, shown or copied, then writes the icons from the first set in the list that has each meaning and reports `icons` (status, set, order, mapped, placeholder, kept, sets): every key is mapped, a placeholder when no set has its meaning, or kept with why (a namespace or type-only import, a re-export, an Astryx import or one from a set in the list, no import at all, or an icon that draws no definition and has no match). `integration check` notes a key the template's source never imports (`template_icon_not_imported`), never failing, and notes an imported icon the package's templates do not declare (`template_icon_undeclared`), which fails `--strict --next`.",
|
|
395
479
|
],
|
|
396
480
|
[
|
|
397
481
|
'`astryx discover`',
|
|
@@ -399,7 +483,7 @@ astryx experimental icon use outline # make it the project's icon set`,
|
|
|
399
483
|
],
|
|
400
484
|
[
|
|
401
485
|
'`astryx doctor`',
|
|
402
|
-
'In an app, the `icon-sets` check: fails when `experimental.iconSet` names a set that is not installed
|
|
486
|
+
'In an app, the `icon-sets` check: fails when `experimental.iconSet` names a set, main or backup, that is not installed, was withdrawn (an invalid set, or one whose module does not resolve), or that two packages ship by that name, saying why; fails when more than one set is installed and the list leaves one out; and warns when another installed set was withdrawn. The `icon-placeholders` check warns while copied code uses the placeholder for a missing icon, naming each file and meaning. In your icon-set package, check with `astryx integration check` instead: plain `doctor` diagnoses an app.',
|
|
403
487
|
],
|
|
404
488
|
[
|
|
405
489
|
'JSON types',
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').IconDefinitionDoc} */
|
|
4
|
+
export default {
|
|
5
|
+
type: 'icon-definition',
|
|
6
|
+
name: 'alignBottom',
|
|
7
|
+
description: 'Align items to the bottom edge.',
|
|
8
|
+
words: ['bottom align', 'align end vertical'],
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').IconDefinitionDoc} */
|
|
4
|
+
export default {
|
|
5
|
+
type: 'icon-definition',
|
|
6
|
+
name: 'alignJustify',
|
|
7
|
+
description: 'Justify text so each line fills the full width.',
|
|
8
|
+
words: ['justify', 'full width text'],
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').IconDefinitionDoc} */
|
|
4
|
+
export default {
|
|
5
|
+
type: 'icon-definition',
|
|
6
|
+
name: 'alignMiddle',
|
|
7
|
+
description: 'Center items between the top and bottom edges.',
|
|
8
|
+
words: ['vertical center', 'middle align'],
|
|
9
|
+
};
|