@things-factory/figure-library 10.1.157 → 10.1.161
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/dist-client/pages/figure-library-page.d.ts +9 -1
- package/dist-client/pages/figure-library-page.js +40 -20
- package/dist-client/pages/figure-library-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/figure-releases-popup.js +1 -1
- package/dist-client/viewparts/figure-releases-popup.js.map +1 -1
- package/dist-client/viewparts/figure-version.d.ts +2 -0
- package/dist-client/viewparts/figure-version.js +3 -0
- package/dist-client/viewparts/figure-version.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist-client/viewparts/figure-card-meta.d.ts +0 -19
- package/dist-client/viewparts/figure-card-meta.js +0 -122
- package/dist-client/viewparts/figure-card-meta.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/figure-library",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.161",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"@operato/shell": "^10.0.0",
|
|
36
36
|
"@operato/styles": "^10.29.23",
|
|
37
37
|
"@operato/utils": "^10.0.0",
|
|
38
|
-
"@things-factory/attachment-base": "^10.1.
|
|
39
|
-
"@things-factory/auth-base": "^10.1.
|
|
40
|
-
"@things-factory/board-service": "^10.1.
|
|
38
|
+
"@things-factory/attachment-base": "^10.1.159",
|
|
39
|
+
"@things-factory/auth-base": "^10.1.159",
|
|
40
|
+
"@things-factory/board-service": "^10.1.159",
|
|
41
41
|
"@things-factory/env": "^10.1.149",
|
|
42
42
|
"@things-factory/figure-viewer": "^10.1.155",
|
|
43
43
|
"@things-factory/shell": "^10.1.157",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"koa-router": "^7.4.0",
|
|
49
49
|
"lit": "^3.1.2"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "d32fe0614ea40572787acd94e307cc18a681ab38"
|
|
52
52
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { LitElement, nothing } from 'lit';
|
|
2
|
-
/** A version as operato-figure shows it: v1. `@` stays inside a full release reference only. */
|
|
3
|
-
export declare const versionText: (version: number) => string;
|
|
4
|
-
/** The place roles a release declares, in figure-viewer's words (파지 · 안착); 없음 for none. */
|
|
5
|
-
export declare const capabilityText: (roles: readonly string[] | null | undefined) => string;
|
|
6
|
-
declare const FigureCardMeta_base: (new (...args: any[]) => LitElement) & typeof LitElement;
|
|
7
|
-
/**
|
|
8
|
-
* What a figure card says under its title, as labelled rows: its full name, then the version in use (with 「최신 아님」
|
|
9
|
-
* when the latest differs) and, on the same row from the middle of the card, the latest version when it differs; then
|
|
10
|
-
* its category and its capabilities. A figure with nothing drawable has 사용 버전 「없음」 and the reason. A card's fields are drawn inside the card, out of the page's
|
|
11
|
-
* styles, so the rows carry their own (page-standard §4: one grid, the label column as wide as its longest label).
|
|
12
|
-
*/
|
|
13
|
-
export declare class FigureCardMeta extends FigureCardMeta_base {
|
|
14
|
-
static styles: import("lit").CSSResult;
|
|
15
|
-
/** A figure as figureLibraryFigures gives it: name, latestVersion, release (null when none is drawable), latest. */
|
|
16
|
-
figure: any;
|
|
17
|
-
render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { css, html, LitElement, nothing } from 'lit';
|
|
3
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
-
import { i18next, localize } from '@operato/i18n';
|
|
5
|
-
/** A version as operato-figure shows it: v1. `@` stays inside a full release reference only. */
|
|
6
|
-
export const versionText = (version) => `v${version}`;
|
|
7
|
-
/** The place roles a release declares, in figure-viewer's words (파지 · 안착); 없음 for none. */
|
|
8
|
-
export const capabilityText = (roles) => roles?.length
|
|
9
|
-
? roles.map(role => i18next.t(`figure.label.role-${role}`, { defaultValue: role })).join(', ')
|
|
10
|
-
: i18next.t('figure-library.text.no-capability');
|
|
11
|
-
/**
|
|
12
|
-
* What a figure card says under its title, as labelled rows: its full name, then the version in use (with 「최신 아님」
|
|
13
|
-
* when the latest differs) and, on the same row from the middle of the card, the latest version when it differs; then
|
|
14
|
-
* its category and its capabilities. A figure with nothing drawable has 사용 버전 「없음」 and the reason. A card's fields are drawn inside the card, out of the page's
|
|
15
|
-
* styles, so the rows carry their own (page-standard §4: one grid, the label column as wide as its longest label).
|
|
16
|
-
*/
|
|
17
|
-
let FigureCardMeta = class FigureCardMeta extends localize(i18next)(LitElement) {
|
|
18
|
-
static { this.styles = css `
|
|
19
|
-
:host {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
width: 100%;
|
|
23
|
-
gap: var(--spacing-small, 4px);
|
|
24
|
-
min-width: 0;
|
|
25
|
-
font-size: var(--ui-t-small, 11.5px);
|
|
26
|
-
line-height: 1.5;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.full-name {
|
|
30
|
-
font-family: var(--ui-mono, ui-monospace, Menlo, monospace);
|
|
31
|
-
color: var(--ui-muted, var(--md-sys-color-on-surface-variant));
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
text-overflow: ellipsis;
|
|
34
|
-
white-space: nowrap;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* label · value · label · value: the version pair shares a row; a single fact's value spans to the end. */
|
|
38
|
-
dl {
|
|
39
|
-
display: grid;
|
|
40
|
-
grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);
|
|
41
|
-
align-items: center;
|
|
42
|
-
gap: 2px var(--spacing-large, 12px);
|
|
43
|
-
margin: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
dt {
|
|
47
|
-
color: var(--ui-muted, var(--md-sys-color-on-surface-variant));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
dd.wide {
|
|
51
|
-
grid-column: 2 / -1;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
dd {
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-wrap: wrap;
|
|
57
|
-
align-items: center;
|
|
58
|
-
gap: var(--spacing-small, 4px) var(--spacing-medium, 8px);
|
|
59
|
-
margin: 0;
|
|
60
|
-
color: var(--ui-ink, var(--md-sys-color-on-surface));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* A chip in a row keeps the row's height: its border sits inside the line. */
|
|
64
|
-
.mark {
|
|
65
|
-
padding: 0 var(--spacing-medium, 8px);
|
|
66
|
-
border: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));
|
|
67
|
-
border-radius: 999px;
|
|
68
|
-
line-height: calc(1.5em - 2px);
|
|
69
|
-
white-space: nowrap;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.mark.warn {
|
|
73
|
-
border-color: color-mix(in srgb, var(--ui-warn, var(--md-sys-color-tertiary)) 50%, transparent);
|
|
74
|
-
color: var(--ui-warn, var(--md-sys-color-tertiary));
|
|
75
|
-
font-weight: 600;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.mark.crit {
|
|
79
|
-
border-color: color-mix(in srgb, var(--ui-crit, var(--md-sys-color-error)) 40%, transparent);
|
|
80
|
-
color: var(--ui-crit, var(--md-sys-color-error));
|
|
81
|
-
}
|
|
82
|
-
`; }
|
|
83
|
-
render() {
|
|
84
|
-
const figure = this.figure;
|
|
85
|
-
if (!figure)
|
|
86
|
-
return nothing;
|
|
87
|
-
const release = figure.release;
|
|
88
|
-
const latest = figure.latest;
|
|
89
|
-
const differs = !release || release.version !== figure.latestVersion;
|
|
90
|
-
const unsupported = html `<span class="mark crit">${i18next.t('figure-library.text.format-unsupported')}</span>`;
|
|
91
|
-
return html `
|
|
92
|
-
<span class="full-name" title=${figure.name}>${figure.name}</span>
|
|
93
|
-
<dl>
|
|
94
|
-
<dt>${i18next.t('figure-library.label.version-in-use')}</dt>
|
|
95
|
-
<dd class=${differs ? '' : 'wide'}>
|
|
96
|
-
${release
|
|
97
|
-
? html `${versionText(release.version)}
|
|
98
|
-
${differs ? html `<span class="mark warn">${i18next.t('figure-library.text.not-latest')}</span>` : nothing}
|
|
99
|
-
${release.deprecated ? html `<span class="mark">${i18next.t('figure-library.text.deprecated')}</span>` : nothing}`
|
|
100
|
-
: html `${i18next.t('figure-library.text.none')} · ${unsupported}`}
|
|
101
|
-
</dd>
|
|
102
|
-
${differs
|
|
103
|
-
? html `<dt>${i18next.t('figure-library.label.latest-version')}</dt>
|
|
104
|
-
<dd>${versionText(figure.latestVersion)} ${latest && !latest.formatSupported && release ? unsupported : nothing}</dd>`
|
|
105
|
-
: nothing}
|
|
106
|
-
<dt>${i18next.t('figure-library.label.category')}</dt>
|
|
107
|
-
<dd class="wide">${release?.category || '—'}</dd>
|
|
108
|
-
<dt>${i18next.t('figure-library.label.capability')}</dt>
|
|
109
|
-
<dd class="wide">${release ? capabilityText(release.capabilities) : '—'}</dd>
|
|
110
|
-
</dl>
|
|
111
|
-
`;
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
__decorate([
|
|
115
|
-
property({ type: Object }),
|
|
116
|
-
__metadata("design:type", Object)
|
|
117
|
-
], FigureCardMeta.prototype, "figure", void 0);
|
|
118
|
-
FigureCardMeta = __decorate([
|
|
119
|
-
customElement('figure-card-meta')
|
|
120
|
-
], FigureCardMeta);
|
|
121
|
-
export { FigureCardMeta };
|
|
122
|
-
//# sourceMappingURL=figure-card-meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"figure-card-meta.js","sourceRoot":"","sources":["../../client/viewparts/figure-card-meta.ts"],"names":[],"mappings":";AAA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I,EAAE,MAAM,EAAE,CAAC;;8CAAY;AApE5B,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAoG1B","sourcesContent":["import { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\n\n/** A version as operato-figure shows it: v1. `@` stays inside a full release reference only. */\nexport const versionText = (version: number) => `v${version}`\n\n/** The place roles a release declares, in figure-viewer's words (파지 · 안착); 없음 for none. */\nexport const capabilityText = (roles: readonly string[] | null | undefined) =>\n roles?.length\n ? roles.map(role => i18next.t(`figure.label.role-${role}`, { defaultValue: role })).join(', ')\n : i18next.t('figure-library.text.no-capability')\n\n/**\n * What a figure card says under its title, as labelled rows: its full name, then the version in use (with 「최신 아님」\n * when the latest differs) and, on the same row from the middle of the card, the latest version when it differs; then\n * its category and its capabilities. A figure with nothing drawable has 사용 버전 「없음」 and the reason. A card's fields are drawn inside the card, out of the page's\n * styles, so the rows carry their own (page-standard §4: one grid, the label column as wide as its longest label).\n */\n@customElement('figure-card-meta')\nexport class FigureCardMeta extends localize(i18next)(LitElement) {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: var(--spacing-small, 4px);\n min-width: 0;\n font-size: var(--ui-t-small, 11.5px);\n line-height: 1.5;\n }\n\n .full-name {\n font-family: var(--ui-mono, ui-monospace, Menlo, monospace);\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* label · value · label · value: the version pair shares a row; a single fact's value spans to the end. */\n dl {\n display: grid;\n grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr);\n align-items: center;\n gap: 2px var(--spacing-large, 12px);\n margin: 0;\n }\n\n dt {\n color: var(--ui-muted, var(--md-sys-color-on-surface-variant));\n }\n\n dd.wide {\n grid-column: 2 / -1;\n }\n\n dd {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-small, 4px) var(--spacing-medium, 8px);\n margin: 0;\n color: var(--ui-ink, var(--md-sys-color-on-surface));\n }\n\n /* A chip in a row keeps the row's height: its border sits inside the line. */\n .mark {\n padding: 0 var(--spacing-medium, 8px);\n border: 1px solid var(--ui-line, var(--md-sys-color-outline-variant));\n border-radius: 999px;\n line-height: calc(1.5em - 2px);\n white-space: nowrap;\n }\n\n .mark.warn {\n border-color: color-mix(in srgb, var(--ui-warn, var(--md-sys-color-tertiary)) 50%, transparent);\n color: var(--ui-warn, var(--md-sys-color-tertiary));\n font-weight: 600;\n }\n\n .mark.crit {\n border-color: color-mix(in srgb, var(--ui-crit, var(--md-sys-color-error)) 40%, transparent);\n color: var(--ui-crit, var(--md-sys-color-error));\n }\n `\n\n /** A figure as figureLibraryFigures gives it: name, latestVersion, release (null when none is drawable), latest. */\n @property({ type: Object }) figure: any\n\n render() {\n const figure = this.figure\n if (!figure) return nothing\n const release = figure.release\n const latest = figure.latest\n const differs = !release || release.version !== figure.latestVersion\n const unsupported = html`<span class=\"mark crit\">${i18next.t('figure-library.text.format-unsupported')}</span>`\n\n return html`\n <span class=\"full-name\" title=${figure.name}>${figure.name}</span>\n <dl>\n <dt>${i18next.t('figure-library.label.version-in-use')}</dt>\n <dd class=${differs ? '' : 'wide'}>\n ${release\n ? html`${versionText(release.version)}\n ${differs ? html`<span class=\"mark warn\">${i18next.t('figure-library.text.not-latest')}</span>` : nothing}\n ${release.deprecated ? html`<span class=\"mark\">${i18next.t('figure-library.text.deprecated')}</span>` : nothing}`\n : html`${i18next.t('figure-library.text.none')} · ${unsupported}`}\n </dd>\n ${differs\n ? html`<dt>${i18next.t('figure-library.label.latest-version')}</dt>\n <dd>${versionText(figure.latestVersion)} ${latest && !latest.formatSupported && release ? unsupported : nothing}</dd>`\n : nothing}\n <dt>${i18next.t('figure-library.label.category')}</dt>\n <dd class=\"wide\">${release?.category || '—'}</dd>\n <dt>${i18next.t('figure-library.label.capability')}</dt>\n <dd class=\"wide\">${release ? capabilityText(release.capabilities) : '—'}</dd>\n </dl>\n `\n }\n}\n"]}
|