@cratis/scene.model 4.3.0 → 4.5.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/common/index.ts +0 -1
- package/dist/cjs/editing/DiagnosticCode.js +7 -0
- package/dist/cjs/editing/DiagnosticCode.js.map +1 -1
- package/dist/cjs/icons/IconEntry.js +22 -0
- package/dist/cjs/icons/IconEntry.js.map +1 -0
- package/dist/cjs/icons/IconLibrary.js +22 -0
- package/dist/cjs/icons/IconLibrary.js.map +1 -0
- package/dist/cjs/icons/IconReference.js +23 -0
- package/dist/cjs/icons/IconReference.js.map +1 -0
- package/dist/cjs/icons/iconReferences.js +61 -0
- package/dist/cjs/icons/iconReferences.js.map +1 -0
- package/dist/cjs/index.js +11 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/packages/PackageKind.js +12 -1
- package/dist/cjs/packages/PackageKind.js.map +1 -1
- package/dist/cjs/packages/ScenePackage.js +2 -1
- package/dist/cjs/packages/ScenePackage.js.map +1 -1
- package/dist/esm/common/index.d.ts +0 -1
- package/dist/esm/common/index.d.ts.map +1 -1
- package/dist/esm/common/index.js +0 -1
- package/dist/esm/common/index.js.map +1 -1
- package/dist/esm/editing/DiagnosticCode.d.ts +7 -1
- package/dist/esm/editing/DiagnosticCode.d.ts.map +1 -1
- package/dist/esm/editing/DiagnosticCode.js +7 -0
- package/dist/esm/editing/DiagnosticCode.js.map +1 -1
- package/dist/esm/icons/IconEntry.d.ts +10 -0
- package/dist/esm/icons/IconEntry.d.ts.map +1 -0
- package/dist/esm/icons/IconEntry.js +20 -0
- package/dist/esm/icons/IconEntry.js.map +1 -0
- package/dist/esm/icons/IconLibrary.d.ts +9 -0
- package/dist/esm/icons/IconLibrary.d.ts.map +1 -0
- package/dist/esm/icons/IconLibrary.js +20 -0
- package/dist/esm/icons/IconLibrary.js.map +1 -0
- package/dist/esm/icons/IconReference.d.ts.map +1 -0
- package/dist/esm/icons/IconReference.js +21 -0
- package/dist/esm/icons/IconReference.js.map +1 -0
- package/dist/esm/icons/iconReferences.d.ts +6 -0
- package/dist/esm/icons/iconReferences.d.ts.map +1 -0
- package/dist/esm/icons/iconReferences.js +56 -0
- package/dist/esm/icons/iconReferences.js.map +1 -0
- package/dist/esm/icons/index.d.ts +5 -0
- package/dist/esm/icons/index.d.ts.map +1 -0
- package/dist/esm/icons/index.js +5 -0
- package/dist/esm/icons/index.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/packages/PackageKind.d.ts +2 -1
- package/dist/esm/packages/PackageKind.d.ts.map +1 -1
- package/dist/esm/packages/PackageKind.js +12 -1
- package/dist/esm/packages/PackageKind.js.map +1 -1
- package/dist/esm/packages/ScenePackage.d.ts +2 -0
- package/dist/esm/packages/ScenePackage.d.ts.map +1 -1
- package/dist/esm/packages/ScenePackage.js +2 -1
- package/dist/esm/packages/ScenePackage.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/editing/DiagnosticCode.ts +8 -0
- package/icons/IconEntry.ts +45 -0
- package/icons/IconLibrary.ts +42 -0
- package/icons/IconReference.ts +35 -0
- package/icons/iconReferences.ts +62 -0
- package/icons/index.ts +7 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/packages/PackageKind.ts +14 -1
- package/packages/ScenePackage.ts +7 -0
- package/common/IconReference.ts +0 -22
- package/dist/cjs/common/IconReference.js +0 -18
- package/dist/cjs/common/IconReference.js.map +0 -1
- package/dist/esm/common/IconReference.d.ts.map +0 -1
- package/dist/esm/common/IconReference.js +0 -16
- package/dist/esm/common/IconReference.js.map +0 -1
- /package/dist/esm/{common → icons}/IconReference.d.ts +0 -0
|
@@ -55,4 +55,12 @@ export enum DiagnosticCode {
|
|
|
55
55
|
CollectionItemNotFound = 'collectionItemNotFound',
|
|
56
56
|
DuplicateCollectionItem = 'duplicateCollectionItem',
|
|
57
57
|
UnknownInstance = 'unknownInstance',
|
|
58
|
+
|
|
59
|
+
// Icons
|
|
60
|
+
MissingIconLibrary = 'missingIconLibrary',
|
|
61
|
+
MissingIcon = 'missingIcon',
|
|
62
|
+
MissingIconVariant = 'missingIconVariant',
|
|
63
|
+
IncompatibleIconLibrary = 'incompatibleIconLibrary',
|
|
64
|
+
IconCatalogUnavailable = 'iconCatalogUnavailable',
|
|
65
|
+
IconNotVerified = 'iconNotVerified',
|
|
58
66
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One icon in an icon library's catalog: what a picker needs to find it and a reference needs to name it.
|
|
6
|
+
*
|
|
7
|
+
* An entry is metadata only. It holds no SVG, class name or component - that is the renderer's concern,
|
|
8
|
+
* resolved lazily per icon by the adapter - so a catalog is cheap to load and identical for every
|
|
9
|
+
* renderer. The {@link IconReference} that names the icon is the entry's `key` (and one of its
|
|
10
|
+
* `variants`) together with the library the catalog belongs to.
|
|
11
|
+
*/
|
|
12
|
+
export interface IconEntry {
|
|
13
|
+
/**
|
|
14
|
+
* The stable key within the library; what an {@link IconReference} persists.
|
|
15
|
+
*/
|
|
16
|
+
key: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The display name a picker shows. Never identity - two libraries may share a name.
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The categories the icon is filed under, for browsing.
|
|
25
|
+
*/
|
|
26
|
+
categories: string[];
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Alternative names to find the icon by (`bin` for `trash`).
|
|
30
|
+
*/
|
|
31
|
+
aliases?: string[];
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Free-form search terms.
|
|
35
|
+
*/
|
|
36
|
+
tags?: string[];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The variants this icon exists in. Absent or empty when the icon has no variants, in which case
|
|
40
|
+
* references to it carry none.
|
|
41
|
+
*/
|
|
42
|
+
variants?: string[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const IconEntryPropertyNames: (keyof IconEntry)[] = ['key', 'name', 'categories', 'aliases', 'tags', 'variants'];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What a {@link ScenePackage} of kind {@link PackageKind.IconLibrary} declares about its icons, beyond
|
|
6
|
+
* what every package declares (name, version, license, dependencies, module).
|
|
7
|
+
*
|
|
8
|
+
* It is deliberately small. The icons themselves are not listed here: a library can ship thousands, and a
|
|
9
|
+
* profile resolution that read every key of every library would defeat the point of resolving without
|
|
10
|
+
* loading anything. The icon *catalog* - an {@link IconEntry} per icon - is loaded on demand from the
|
|
11
|
+
* library's module, and each icon's artwork is loaded per icon by the renderer's adapter.
|
|
12
|
+
*/
|
|
13
|
+
export interface IconLibrary {
|
|
14
|
+
/**
|
|
15
|
+
* The style variants the library offers (`outline`, `solid` ...), empty when it has a single style.
|
|
16
|
+
* Declared here so a picker can offer variant filters before it has loaded the catalog.
|
|
17
|
+
*/
|
|
18
|
+
variants: string[];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The renderers the library ships an adapter for (`react` ...), so tooling can say whether the
|
|
22
|
+
* library can render for the target a profile selects without loading it.
|
|
23
|
+
*/
|
|
24
|
+
renderers: string[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The credit line the library's license asks to be shown, for example "Icons by Lucide contributors".
|
|
28
|
+
*/
|
|
29
|
+
attribution?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Where the attribution points - the library's home or license page.
|
|
33
|
+
*/
|
|
34
|
+
attributionUrl?: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* How many icons the catalog holds, for a picker's "1,500 icons" before the catalog is loaded.
|
|
38
|
+
*/
|
|
39
|
+
iconCount?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const IconLibraryPropertyNames: (keyof IconLibrary)[] = ['variants', 'renderers', 'attribution', 'attributionUrl', 'iconCount'];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The persisted, renderer-neutral identity of one icon: which icon library it comes from, which icon
|
|
6
|
+
* inside that library, and optionally which style variant of it.
|
|
7
|
+
*
|
|
8
|
+
* This is the only form in which a screen, template, blueprint or profile refers to an icon. It carries
|
|
9
|
+
* no CSS class, no SVG and no component - those belong to a renderer's adapter for the library - so the
|
|
10
|
+
* same reference renders on the web, on a phone, or anywhere else a library has an adapter.
|
|
11
|
+
*
|
|
12
|
+
* Identity is all three fields. A display name, a catalog position or a CSS class is never identity:
|
|
13
|
+
* two libraries can each ship an icon called `home`, and `{ library: 'a', key: 'home' }` and
|
|
14
|
+
* `{ library: 'b', key: 'home' }` are different icons that are never silently swapped for one another.
|
|
15
|
+
*/
|
|
16
|
+
export interface IconReference {
|
|
17
|
+
/**
|
|
18
|
+
* The identity of the icon library - the `name` of the {@link ScenePackage} of kind
|
|
19
|
+
* {@link PackageKind.IconLibrary} that provides the icon.
|
|
20
|
+
*/
|
|
21
|
+
library: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The stable key of the icon inside its library. Stable means a library keeps the key across
|
|
25
|
+
* versions for as long as it ships the icon; it is not the icon's display name.
|
|
26
|
+
*/
|
|
27
|
+
key: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The style variant (`outline`, `solid`, `filled` ...), or absent for a library or icon that has none.
|
|
31
|
+
*/
|
|
32
|
+
variant?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const IconReferencePropertyNames: (keyof IconReference)[] = ['library', 'key', 'variant'];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { IconReference } from './IconReference';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The character that separates the parts of an icon reference's text form. A reference's parts therefore
|
|
8
|
+
* cannot contain it - an npm package name, an icon key and a variant name never do.
|
|
9
|
+
*/
|
|
10
|
+
const separator = '#';
|
|
11
|
+
|
|
12
|
+
function isPart(value: unknown): value is string {
|
|
13
|
+
return typeof value === 'string' && value.length > 0 && !value.includes(separator);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Whether a value is a well-formed {@link IconReference}: a library and a key that are non-empty, an
|
|
18
|
+
* optional non-empty variant, none of them containing the text-form separator. Extra properties are
|
|
19
|
+
* tolerated, because a reference read from a persisted document may carry editor-added metadata.
|
|
20
|
+
*/
|
|
21
|
+
export function isIconReference(value: unknown): value is IconReference {
|
|
22
|
+
if (typeof value !== 'object' || value === null) return false;
|
|
23
|
+
const candidate = value as Record<string, unknown>;
|
|
24
|
+
return isPart(candidate.library) && isPart(candidate.key) && (candidate.variant === undefined || isPart(candidate.variant));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Whether two references name the same icon. Equality is all three fields - library, key and variant -
|
|
29
|
+
* and nothing else; an absent variant equals only another absent variant.
|
|
30
|
+
*/
|
|
31
|
+
export function iconReferencesEqual(left: IconReference, right: IconReference): boolean {
|
|
32
|
+
return left.library === right.library && left.key === right.key && (left.variant ?? undefined) === (right.variant ?? undefined);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The canonical single-string form of a reference, for keys, logs and diagnostics:
|
|
37
|
+
* `library#key`, or `library#key#variant`. Two references are equal exactly when their text forms are equal.
|
|
38
|
+
* It is a convenience for people and tools, not the persisted shape - persist the {@link IconReference}.
|
|
39
|
+
*
|
|
40
|
+
* @throws Error when a part is empty or contains `#`.
|
|
41
|
+
*/
|
|
42
|
+
export function formatIconReference(reference: IconReference): string {
|
|
43
|
+
if (!isIconReference(reference)) {
|
|
44
|
+
throw new Error(`'${JSON.stringify(reference)}' is not a valid icon reference: library and key are required, and no part may be empty or contain '${separator}'`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return reference.variant === undefined
|
|
48
|
+
? `${reference.library}${separator}${reference.key}`
|
|
49
|
+
: `${reference.library}${separator}${reference.key}${separator}${reference.variant}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Reads the text form produced by {@link formatIconReference}. Returns `undefined` for anything that is
|
|
54
|
+
* not one - including a bare legacy icon name such as `pi pi-home`, which has no library and so cannot be
|
|
55
|
+
* made into a reference without choosing one.
|
|
56
|
+
*/
|
|
57
|
+
export function parseIconReference(text: string): IconReference | undefined {
|
|
58
|
+
const parts = text.split(separator);
|
|
59
|
+
if (parts.length < 2 || parts.length > 3 || !parts.every(isPart)) return undefined;
|
|
60
|
+
const [library, key, variant] = parts;
|
|
61
|
+
return variant === undefined ? { library, key } : { library, key, variant };
|
|
62
|
+
}
|
package/icons/index.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
export * from './IconReference';
|
|
5
|
+
export * from './iconReferences';
|
|
6
|
+
export * from './IconLibrary';
|
|
7
|
+
export * from './IconEntry';
|
package/index.ts
CHANGED
package/package.json
CHANGED
package/packages/PackageKind.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* What a {@link ScenePackage} contributes to a {@link UiProfile}. A profile's package list mixes all
|
|
6
|
-
*
|
|
6
|
+
* four kinds freely - the kind says what a package is for, never where it sits in the override-priority
|
|
7
7
|
* order.
|
|
8
8
|
*/
|
|
9
9
|
export enum PackageKind {
|
|
@@ -32,4 +32,17 @@ export enum PackageKind {
|
|
|
32
32
|
* use" answerable from the packages a profile already has.
|
|
33
33
|
*/
|
|
34
34
|
Blueprint = 'Blueprint',
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Provides icons - a named, versioned library of them, such as Lucide or PrimeIcons - that screens,
|
|
38
|
+
* templates and blueprints refer to by {@link IconReference} rather than by CSS class or markup.
|
|
39
|
+
* A library declares its variants, renderer adapters and attribution through
|
|
40
|
+
* {@link ScenePackage.iconLibrary}; its icon catalog is loaded on demand, never listed in the package.
|
|
41
|
+
*
|
|
42
|
+
* It is a package kind rather than a contribution on another kind because everything an author asks
|
|
43
|
+
* of a library - select it in a profile, see its license and version, have it pulled in by the
|
|
44
|
+
* components that need it - is already what a package is. Several libraries coexist in one profile,
|
|
45
|
+
* and the library is part of every icon's identity, so same-named icons never shadow one another.
|
|
46
|
+
*/
|
|
47
|
+
IconLibrary = 'IconLibrary',
|
|
35
48
|
}
|
package/packages/ScenePackage.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
|
+
import { IconLibrary } from '../icons';
|
|
4
5
|
import { PackageDependency } from './PackageDependency';
|
|
5
6
|
import { PackageKind } from './PackageKind';
|
|
6
7
|
|
|
@@ -86,6 +87,11 @@ export interface ScenePackage {
|
|
|
86
87
|
* tells an author nothing about eligibility or obligations.
|
|
87
88
|
*/
|
|
88
89
|
licenseUrl?: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* What the package declares about its icons. Present exactly for a {@link PackageKind.IconLibrary}.
|
|
93
|
+
*/
|
|
94
|
+
iconLibrary?: IconLibrary;
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
export const ScenePackagePropertyNames: (keyof ScenePackage)[] = [
|
|
@@ -103,4 +109,5 @@ export const ScenePackagePropertyNames: (keyof ScenePackage)[] = [
|
|
|
103
109
|
'module',
|
|
104
110
|
'license',
|
|
105
111
|
'licenseUrl',
|
|
112
|
+
'iconLibrary',
|
|
106
113
|
];
|
package/common/IconReference.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A qualified reference to one icon: the library it comes from, its key within that library and an optional
|
|
6
|
-
* style variant. This is the renderer-neutral, persisted form of an icon choice.
|
|
7
|
-
*
|
|
8
|
-
* Identity is all three fields. A label, a display name, a CSS class, an SVG or a position in a catalog is
|
|
9
|
-
* never identity - none of them survive a library upgrade, and a persisted choice has to.
|
|
10
|
-
*/
|
|
11
|
-
export interface IconReference {
|
|
12
|
-
/** The stable identity of the icon library package the icon belongs to. */
|
|
13
|
-
library: string;
|
|
14
|
-
|
|
15
|
-
/** The stable key of the icon within `library`. */
|
|
16
|
-
key: string;
|
|
17
|
-
|
|
18
|
-
/** The style variant (outlined, filled, ...), when the library has them. */
|
|
19
|
-
variant?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const IconReferencePropertyNames: (keyof IconReference)[] = ['library', 'key', 'variant'];
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
-
/**
|
|
6
|
-
* A qualified reference to one icon: the library it comes from, its key within that library and an optional
|
|
7
|
-
* style variant. This is the renderer-neutral, persisted form of an icon choice.
|
|
8
|
-
*
|
|
9
|
-
* Identity is all three fields. A label, a display name, a CSS class, an SVG or a position in a catalog is
|
|
10
|
-
* never identity - none of them survive a library upgrade, and a persisted choice has to.
|
|
11
|
-
*/ const IconReferencePropertyNames = [
|
|
12
|
-
'library',
|
|
13
|
-
'key',
|
|
14
|
-
'variant'
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
exports.IconReferencePropertyNames = IconReferencePropertyNames;
|
|
18
|
-
//# sourceMappingURL=IconReference.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconReference.js","sources":["../../../common/IconReference.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * A qualified reference to one icon: the library it comes from, its key within that library and an optional\n * style variant. This is the renderer-neutral, persisted form of an icon choice.\n *\n * Identity is all three fields. A label, a display name, a CSS class, an SVG or a position in a catalog is\n * never identity - none of them survive a library upgrade, and a persisted choice has to.\n */\nexport interface IconReference {\n /** The stable identity of the icon library package the icon belongs to. */\n library: string;\n\n /** The stable key of the icon within `library`. */\n key: string;\n\n /** The style variant (outlined, filled, ...), when the library has them. */\n variant?: string;\n}\n\nexport const IconReferencePropertyNames: (keyof IconReference)[] = ['library', 'key', 'variant'];\n"],"names":["IconReferencePropertyNames"],"mappings":";;AAAA;AACA;AAEA;;;;;;UAkBaA,0BAAAA,GAAsD;AAAC,IAAA,SAAA;AAAW,IAAA,KAAA;AAAO,IAAA;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconReference.d.ts","sourceRoot":"","sources":["../../../common/IconReference.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,aAAa;IAE1B,OAAO,EAAE,MAAM,CAAC;IAGhB,GAAG,EAAE,MAAM,CAAC;IAGZ,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,0BAA0B,EAAE,CAAC,MAAM,aAAa,CAAC,EAAkC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
-
/**
|
|
4
|
-
* A qualified reference to one icon: the library it comes from, its key within that library and an optional
|
|
5
|
-
* style variant. This is the renderer-neutral, persisted form of an icon choice.
|
|
6
|
-
*
|
|
7
|
-
* Identity is all three fields. A label, a display name, a CSS class, an SVG or a position in a catalog is
|
|
8
|
-
* never identity - none of them survive a library upgrade, and a persisted choice has to.
|
|
9
|
-
*/ const IconReferencePropertyNames = [
|
|
10
|
-
'library',
|
|
11
|
-
'key',
|
|
12
|
-
'variant'
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
export { IconReferencePropertyNames };
|
|
16
|
-
//# sourceMappingURL=IconReference.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconReference.js","sources":["../../../common/IconReference.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * A qualified reference to one icon: the library it comes from, its key within that library and an optional\n * style variant. This is the renderer-neutral, persisted form of an icon choice.\n *\n * Identity is all three fields. A label, a display name, a CSS class, an SVG or a position in a catalog is\n * never identity - none of them survive a library upgrade, and a persisted choice has to.\n */\nexport interface IconReference {\n /** The stable identity of the icon library package the icon belongs to. */\n library: string;\n\n /** The stable key of the icon within `library`. */\n key: string;\n\n /** The style variant (outlined, filled, ...), when the library has them. */\n variant?: string;\n}\n\nexport const IconReferencePropertyNames: (keyof IconReference)[] = ['library', 'key', 'variant'];\n"],"names":["IconReferencePropertyNames"],"mappings":"AAAA;AACA;AAEA;;;;;;UAkBaA,0BAAAA,GAAsD;AAAC,IAAA,SAAA;AAAW,IAAA,KAAA;AAAO,IAAA;;;"}
|
|
File without changes
|