@nadicodeai/ui 12.1.201 → 12.1.202
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/components/catalog-card.d.ts +2 -2
- package/dist/components/catalog-card.js +2 -2
- package/dist/components/library-shelf.d.ts +6 -11
- package/dist/components/library-shelf.d.ts.map +1 -1
- package/dist/components/library-shelf.js +8 -8
- package/dist/showcase/usage.generated.js +4 -4
- package/package.json +2 -2
|
@@ -17,9 +17,9 @@ export type CatalogCardProps = {
|
|
|
17
17
|
* Browse Connectors draws a connector.
|
|
18
18
|
*
|
|
19
19
|
* @family Data
|
|
20
|
-
* @when A catalogue a person browses by picture and name, where opening one sets it up in a drawer: Nadia's Browse apps. On a `LibraryShelf` through its `
|
|
20
|
+
* @when A catalogue a person browses by picture and name, where opening one sets it up in a drawer: Nadia's Browse apps. On a `LibraryShelf` through its `cards`.
|
|
21
21
|
* @instead A thing added with one press, with no setup, is a `CatalogEntry`. An Agent or template chosen by its preview is an `AgentCard`. What a person already holds is a row of its `CollectionPage`.
|
|
22
|
-
* @behaviour A hairline card with the mark at 40 at its top, and at its foot the name, the line cut after two lines and the tags, so names line up along a row of cards. The whole card is one target and takes the `accent` hover, with no button of its own: the drawer holds the commands. On hover or focus an app's own logo fades in behind the card's top right corner, 112 px, blurred 40 px and more saturated, so the card glows in the app's colours
|
|
22
|
+
* @behaviour A hairline card with the mark at 40 at its top, and at its foot the name, the line cut after two lines and the tags, so names line up along a row of cards. The whole card is one target and takes the `accent` hover, with no button of its own: the drawer holds the commands. On hover or focus an app's own logo fades in behind the card's top right corner, 112 px, blurred 40 px and more saturated, so the card glows in the app's colours; a mark with no logo has no glow.
|
|
23
23
|
* @words The name as the catalogue gives it. The line says what it does. Tags are short facts: a category, "2 accounts".
|
|
24
24
|
* @access The name is a real button whose target covers the card, so the tab order holds one stop a card. The mark is decorative beside it.
|
|
25
25
|
*/
|
|
@@ -7,9 +7,9 @@ import { IdentityMark } from "./identity-mark.js";
|
|
|
7
7
|
* Browse Connectors draws a connector.
|
|
8
8
|
*
|
|
9
9
|
* @family Data
|
|
10
|
-
* @when A catalogue a person browses by picture and name, where opening one sets it up in a drawer: Nadia's Browse apps. On a `LibraryShelf` through its `
|
|
10
|
+
* @when A catalogue a person browses by picture and name, where opening one sets it up in a drawer: Nadia's Browse apps. On a `LibraryShelf` through its `cards`.
|
|
11
11
|
* @instead A thing added with one press, with no setup, is a `CatalogEntry`. An Agent or template chosen by its preview is an `AgentCard`. What a person already holds is a row of its `CollectionPage`.
|
|
12
|
-
* @behaviour A hairline card with the mark at 40 at its top, and at its foot the name, the line cut after two lines and the tags, so names line up along a row of cards. The whole card is one target and takes the `accent` hover, with no button of its own: the drawer holds the commands. On hover or focus an app's own logo fades in behind the card's top right corner, 112 px, blurred 40 px and more saturated, so the card glows in the app's colours
|
|
12
|
+
* @behaviour A hairline card with the mark at 40 at its top, and at its foot the name, the line cut after two lines and the tags, so names line up along a row of cards. The whole card is one target and takes the `accent` hover, with no button of its own: the drawer holds the commands. On hover or focus an app's own logo fades in behind the card's top right corner, 112 px, blurred 40 px and more saturated, so the card glows in the app's colours; a mark with no logo has no glow.
|
|
13
13
|
* @words The name as the catalogue gives it. The line says what it does. Tags are short facts: a category, "2 accounts".
|
|
14
14
|
* @access The name is a real button whose target covers the card, so the tab order holds one stop a card. The mark is decorative beside it.
|
|
15
15
|
*/
|
|
@@ -2,13 +2,6 @@ import type { ReactElement, ReactNode } from "react";
|
|
|
2
2
|
import type { CatalogSection } from "./catalog-entry.js";
|
|
3
3
|
import { type CollectionSearchProps } from "./collection-search.js";
|
|
4
4
|
import { type EmptyStateKind } from "./empty-state.js";
|
|
5
|
-
export type ShelfGallery = {
|
|
6
|
-
id: string;
|
|
7
|
-
title?: string;
|
|
8
|
-
cards: readonly ReactElement[];
|
|
9
|
-
/** Under the cards, for a shelf that shows only its first ones: a `LoadMoreButton`. */
|
|
10
|
-
more?: ReactNode;
|
|
11
|
-
};
|
|
12
5
|
export type LibraryShelfProps = {
|
|
13
6
|
/** One line saying what the shelf holds, for a shelf whose page has no title of its own to carry it, such as Nadia's gallery. */
|
|
14
7
|
definition?: string;
|
|
@@ -32,18 +25,20 @@ export type LibraryShelfProps = {
|
|
|
32
25
|
columns?: 2 | 3;
|
|
33
26
|
view?: "cards" | "rows";
|
|
34
27
|
}
|
|
35
|
-
/** A shelf of cards
|
|
28
|
+
/** A shelf of cards, three to a row: `CatalogCard` elements. */
|
|
36
29
|
| {
|
|
37
|
-
|
|
30
|
+
cards: readonly ReactElement[] | undefined;
|
|
31
|
+
/** Under the cards, for a shelf that shows only its first ones: a `LoadMoreButton`. */
|
|
32
|
+
more?: ReactNode;
|
|
38
33
|
});
|
|
39
34
|
/**
|
|
40
35
|
* A Library shelf: the one line saying what it holds, the search, then the
|
|
41
36
|
* reusable things a person adds, as two-column entries, or Agent template cards or rows.
|
|
42
37
|
*
|
|
43
38
|
* @family Compositions
|
|
44
|
-
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery; or a catalogue of cards
|
|
39
|
+
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery; or a catalogue of cards, as Vercel's Browse Connectors: Nadia's Browse apps (`cards`).
|
|
45
40
|
* @instead The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.
|
|
46
|
-
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"
|
|
41
|
+
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"`, or the cards, three to a row, with `more` under them. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty, with `searchEnd` at the end of its row.
|
|
47
42
|
* @words The product words every string: the optional definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
|
|
48
43
|
* @access Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.
|
|
49
44
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library-shelf.d.ts","sourceRoot":"","sources":["../../src/components/library-shelf.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"library-shelf.d.ts","sourceRoot":"","sources":["../../src/components/library-shelf.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iIAAiI;IACjI,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,8EAA8E;IAC9E,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IACjE,iGAAiG;IACjG,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACnC,GAAG,CACA;IAAE,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,CAAA;CAAE;AACrD,8FAA8F;GAC5F;IACE,SAAS,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;IAC/C,gDAAgD;IAChD,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB;AACH,gEAAgE;GAC9D;IACE,KAAK,EAAE,SAAS,YAAY,EAAE,GAAG,SAAS,CAAC;IAC3C,uFAAuF;IACvF,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CACJ,CAAC;AA6DF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAgCpD"}
|
|
@@ -8,8 +8,8 @@ import { CatalogList, CatalogSkeleton, catalogIsEmpty } from "../internal/catalo
|
|
|
8
8
|
function loadedShelf(props) {
|
|
9
9
|
if ("sections" in props)
|
|
10
10
|
return props.sections && { sections: props.sections };
|
|
11
|
-
if ("
|
|
12
|
-
return props.
|
|
11
|
+
if ("cards" in props)
|
|
12
|
+
return props.cards && { cards: props.cards, more: props.more };
|
|
13
13
|
return (props.templates && {
|
|
14
14
|
templates: props.templates,
|
|
15
15
|
columns: props.columns ?? 3,
|
|
@@ -19,8 +19,8 @@ function loadedShelf(props) {
|
|
|
19
19
|
function holdsNothing(shelf) {
|
|
20
20
|
if ("sections" in shelf)
|
|
21
21
|
return catalogIsEmpty(shelf.sections);
|
|
22
|
-
if ("
|
|
23
|
-
return shelf.
|
|
22
|
+
if ("cards" in shelf)
|
|
23
|
+
return shelf.cards.length === 0;
|
|
24
24
|
return shelf.templates.length === 0;
|
|
25
25
|
}
|
|
26
26
|
function ShelfCards({ cards, columns }) {
|
|
@@ -30,8 +30,8 @@ function ShelfContents({ shelf }) {
|
|
|
30
30
|
if ("sections" in shelf) {
|
|
31
31
|
return _jsx(CatalogList, { columns: 2, headingLevel: 2, sections: shelf.sections });
|
|
32
32
|
}
|
|
33
|
-
if ("
|
|
34
|
-
return (
|
|
33
|
+
if ("cards" in shelf) {
|
|
34
|
+
return (_jsxs("div", { className: "grid min-w-0 gap-3", children: [_jsx(ShelfCards, { cards: shelf.cards, columns: 3 }), shelf.more] }));
|
|
35
35
|
}
|
|
36
36
|
if (shelf.view === "rows") {
|
|
37
37
|
return (_jsx(Card, { className: "gap-0 overflow-hidden py-0", render: _jsx("ul", {}), children: shelf.templates.map((template, index) => (_jsx("li", { className: "not-last:border-b not-last:border-border", children: template }, template.key ?? index))) }));
|
|
@@ -43,9 +43,9 @@ function ShelfContents({ shelf }) {
|
|
|
43
43
|
* reusable things a person adds, as two-column entries, or Agent template cards or rows.
|
|
44
44
|
*
|
|
45
45
|
* @family Compositions
|
|
46
|
-
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery; or a catalogue of cards
|
|
46
|
+
* @when A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery; or a catalogue of cards, as Vercel's Browse Connectors: Nadia's Browse apps (`cards`).
|
|
47
47
|
* @instead The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.
|
|
48
|
-
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"
|
|
48
|
+
* @behaviour The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view="rows"`, or the cards, three to a row, with `more` under them. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty, with `searchEnd` at the end of its row.
|
|
49
49
|
* @words The product words every string: the optional definition (one sentence on what the shelf holds), the search's label ("Search skills"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.
|
|
50
50
|
* @access Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.
|
|
51
51
|
*/
|
|
@@ -162,9 +162,9 @@ export const USAGE = [
|
|
|
162
162
|
module: "library-shelf",
|
|
163
163
|
family: "Compositions",
|
|
164
164
|
summary: "A Library shelf: the one line saying what it holds, the search, then the reusable things a person adds, as two-column entries, or Agent template cards or rows.",
|
|
165
|
-
when: "A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery; or a catalogue of cards
|
|
165
|
+
when: "A gallery of reusable things a person adds, as Vercel's Templates gallery: the Portal's Agent templates, Nadia's New Agent gallery; or a catalogue of cards, as Vercel's Browse Connectors: Nadia's Browse apps (`cards`).",
|
|
166
166
|
instead: "The Portal's Skills and Plugins are entity rows a person finds, opens and adds, a CollectionPage; records a person already has and acts on are a CollectionPage too; choosing from a catalogue without leaving the page is a CatalogDrawer.",
|
|
167
|
-
behaviour: "The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view=\"rows\"
|
|
167
|
+
behaviour: "The definition line only where the page has no title row to stand under (a titled page follows the title with the search, as every collection does). Shows, the first that holds: the failure; still entries while the shelf loads; noMatch while the search finds nothing; empty when the shelf holds nothing; then each section's title over its entries, two to a row from md, or the templates as cards, three to a row or as `columns` says, or as one list of rows with `view=\"rows\"`, or the cards, three to a row, with `more` under them. Each entry has its kind's tile, its name (the link to its page), one line, one fact, one Add control or the word saying it is already added, then its menu. A failed add puts its message in the entry's line and its next steps beside its controls. The search shows unless the shelf is empty, with `searchEnd` at the end of its row.",
|
|
168
168
|
words: "The product words every string: the optional definition (one sentence on what the shelf holds), the search's label (\"Search skills\"), the loading label, each entry's name, line, Add label and added word, the empty, noMatch and failed messages.",
|
|
169
169
|
access: "Each section is a region named by its h2; entries are list items; loading is a status named by loadingLabel and aria-busy; a failed add is announced as an alert; each entry's menu is named by its label.",
|
|
170
170
|
},
|
|
@@ -1163,9 +1163,9 @@ export const USAGE = [
|
|
|
1163
1163
|
module: "catalog-card",
|
|
1164
1164
|
family: "Data",
|
|
1165
1165
|
summary: "One thing a person can connect, as a card in a catalogue that opens its drawer, as Vercel's Browse Connectors draws a connector.",
|
|
1166
|
-
when: "A catalogue a person browses by picture and name, where opening one sets it up in a drawer: Nadia's Browse apps. On a `LibraryShelf` through its `
|
|
1166
|
+
when: "A catalogue a person browses by picture and name, where opening one sets it up in a drawer: Nadia's Browse apps. On a `LibraryShelf` through its `cards`.",
|
|
1167
1167
|
instead: "A thing added with one press, with no setup, is a `CatalogEntry`. An Agent or template chosen by its preview is an `AgentCard`. What a person already holds is a row of its `CollectionPage`.",
|
|
1168
|
-
behaviour: "A hairline card with the mark at 40 at its top, and at its foot the name, the line cut after two lines and the tags, so names line up along a row of cards. The whole card is one target and takes the `accent` hover, with no button of its own: the drawer holds the commands. On hover or focus an app's own logo fades in behind the card's top right corner, 112 px, blurred 40 px and more saturated, so the card glows in the app's colours
|
|
1168
|
+
behaviour: "A hairline card with the mark at 40 at its top, and at its foot the name, the line cut after two lines and the tags, so names line up along a row of cards. The whole card is one target and takes the `accent` hover, with no button of its own: the drawer holds the commands. On hover or focus an app's own logo fades in behind the card's top right corner, 112 px, blurred 40 px and more saturated, so the card glows in the app's colours; a mark with no logo has no glow.",
|
|
1169
1169
|
words: 'The name as the catalogue gives it. The line says what it does. Tags are short facts: a category, "2 accounts".',
|
|
1170
1170
|
access: "The name is a real button whose target covers the card, so the tab order holds one stop a card. The mark is decorative beside it.",
|
|
1171
1171
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.202",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#jsx": "./src/jsx/index.ts",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@headless-tree/react": "1.8.0",
|
|
79
79
|
"@iconify-icons/logos": "^2.0.3",
|
|
80
80
|
"@iconify/react": "^6.0.2",
|
|
81
|
-
"@nadicodeai/design-system": "12.1.
|
|
81
|
+
"@nadicodeai/design-system": "12.1.202",
|
|
82
82
|
"@tanstack/react-table": "^9.3.1",
|
|
83
83
|
"@vgpu/wgsl": "0.6.0",
|
|
84
84
|
"class-variance-authority": "^0.7.1",
|