@bysages/react 0.4.2 → 0.4.3
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/{ai-response-nhDOlELQ.mjs → ai-response-CjjjprMY.mjs} +10 -3
- package/dist/{chevron-a2nIZKN4.mjs → chevron-BA7kV9m7.mjs} +1 -1
- package/dist/components/accordion/index.mjs +1 -1
- package/dist/components/ai/index.mjs +1 -1
- package/dist/components/ai-attachments/index.mjs +1 -1
- package/dist/components/ai-prompt-input/index.mjs +1 -1
- package/dist/components/ai-reasoning/index.mjs +1 -1
- package/dist/components/ai-response/index.mjs +1 -1
- package/dist/components/ai-tool/index.mjs +1 -1
- package/dist/components/alert/index.mjs +1 -1
- package/dist/components/back-top/index.mjs +1 -1
- package/dist/components/banner/index.mjs +1 -1
- package/dist/components/calendar/index.mjs +1 -1
- package/dist/components/carousel/index.mjs +1 -1
- package/dist/components/cascade-select/index.mjs +1 -1
- package/dist/components/checkbox/index.mjs +1 -1
- package/dist/components/checkbox-group/index.mjs +1 -1
- package/dist/components/clipboard/index.mjs +1 -1
- package/dist/components/collapsible/index.mjs +1 -1
- package/dist/components/color-picker/index.mjs +1 -1
- package/dist/components/combobox/index.mjs +1 -1
- package/dist/components/date-picker/index.mjs +1 -1
- package/dist/components/dialog/index.mjs +1 -1
- package/dist/components/drawer/index.mjs +1 -1
- package/dist/components/dynamic-input/index.mjs +1 -1
- package/dist/components/editable/index.mjs +1 -1
- package/dist/components/file-upload/index.mjs +1 -1
- package/dist/components/floating-panel/index.mjs +1 -1
- package/dist/components/image/index.mjs +1 -1
- package/dist/components/image-viewer/index.mjs +1 -1
- package/dist/components/json-tree-view/index.mjs +1 -1
- package/dist/components/listbox/index.mjs +1 -1
- package/dist/components/media-player/index.mjs +1 -1
- package/dist/components/menu/index.mjs +1 -1
- package/dist/components/number-input/index.mjs +1 -1
- package/dist/components/order-list/index.mjs +1 -1
- package/dist/components/pagination/index.mjs +1 -1
- package/dist/components/password-input/index.mjs +1 -1
- package/dist/components/popover/index.mjs +1 -1
- package/dist/components/rating-group/index.mjs +1 -1
- package/dist/components/result/index.mjs +2 -1
- package/dist/components/select/index.mjs +1 -1
- package/dist/components/signature-pad/index.mjs +1 -1
- package/dist/components/split-button/index.mjs +1 -1
- package/dist/components/swap/index.mjs +1 -1
- package/dist/components/table/index.mjs +2 -2
- package/dist/components/tag/index.mjs +14 -8
- package/dist/components/tags-input/index.mjs +1 -1
- package/dist/components/toggle-group/index.mjs +1 -1
- package/dist/components/transfer/index.mjs +1 -1
- package/dist/components/tree-select/index.mjs +1 -1
- package/dist/components/tree-view/index.mjs +1 -1
- package/dist/generative/index.d.mts +53 -0
- package/dist/generative/index.mjs +670 -0
- package/dist/icon-Cri0-7-x.mjs +38 -0
- package/dist/{image-viewer-B-hKFkEw.mjs → image-viewer-D4FuYrk6.mjs} +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{media-player-DjVvo1_7.mjs → media-player-C0WcjVI-.mjs} +2 -2
- package/dist/{select-i9UZsQCU.mjs → select-D_soVdWK.mjs} +1 -1
- package/package.json +2 -2
- package/dist/icon-BALgGtNK.mjs +0 -18
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getIcon } from "@bysages/core/icons";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/internal/icon.tsx
|
|
4
|
+
/** Render a curated registry icon as a bare svg element — the components
|
|
5
|
+
* own default icons. No span shell: the part rules size the svg directly.
|
|
6
|
+
* Extra body appends after the icon's own body, for composed marks. */
|
|
7
|
+
function iconNode(name, attrs = {}, extraBody = "") {
|
|
8
|
+
const icon = getIcon(name);
|
|
9
|
+
if (!icon) throw new Error(`Unknown icon "${name}" in the curated core registry`);
|
|
10
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
11
|
+
viewBox: `0 0 ${icon.width} ${icon.height}`,
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
...attrs,
|
|
14
|
+
dangerouslySetInnerHTML: { __html: icon.body + extraBody }
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/** The curated icon's drawing body, for composed marks that share one svg. */
|
|
18
|
+
function iconBody(name) {
|
|
19
|
+
const icon = getIcon(name);
|
|
20
|
+
if (!icon) throw new Error(`Unknown icon "${name}" in the curated core registry`);
|
|
21
|
+
return icon.body;
|
|
22
|
+
}
|
|
23
|
+
/** The same curated icon as an HTML string, for enhancements that write
|
|
24
|
+
* innerHTML rather than mount elements. */
|
|
25
|
+
function iconHtml(name, attrs = {}, extraBody = "") {
|
|
26
|
+
const icon = getIcon(name);
|
|
27
|
+
if (!icon) throw new Error(`Unknown icon "${name}" in the curated core registry`);
|
|
28
|
+
const attributes = {
|
|
29
|
+
width: String(icon.width),
|
|
30
|
+
height: String(icon.height),
|
|
31
|
+
viewBox: `0 0 ${icon.width} ${icon.height}`,
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
...attrs
|
|
34
|
+
};
|
|
35
|
+
return `<svg${Object.entries(attributes).map(([key, value]) => ` ${key}="${value}"`).join("")}>${icon.body + extraBody}</svg>`;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { iconHtml as n, iconNode as r, iconBody as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "./icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "./id-C37UYLwJ.mjs";
|
|
3
3
|
import { n as useComponentMessages } from "./messages-1jJWtaYU.mjs";
|
|
4
4
|
import { Button } from "./components/button/index.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { n as MentionsVessel, r as useMentions, t as Mentions } from "./mentions
|
|
|
10
10
|
import { AiPromptInput as PromptInput } from "./components/ai-prompt-input/index.mjs";
|
|
11
11
|
import { Collapsible } from "./components/collapsible/index.mjs";
|
|
12
12
|
import { AiReasoning as Reasoning } from "./components/ai-reasoning/index.mjs";
|
|
13
|
-
import { t as Response } from "./ai-response-
|
|
13
|
+
import { t as Response } from "./ai-response-CjjjprMY.mjs";
|
|
14
14
|
import { AiSource as Source, AiSources as Sources } from "./components/ai-source/index.mjs";
|
|
15
15
|
import { AiSuggestion as Suggestion } from "./components/ai-suggestion/index.mjs";
|
|
16
16
|
import { AiTool as Tool } from "./components/ai-tool/index.mjs";
|
|
@@ -75,7 +75,7 @@ import { HoverCard } from "./components/hover-card/index.mjs";
|
|
|
75
75
|
import { Icon } from "./components/icon/index.mjs";
|
|
76
76
|
import { Image } from "./components/image/index.mjs";
|
|
77
77
|
import { ImageCropper } from "./components/image-cropper/index.mjs";
|
|
78
|
-
import { t as ImageViewer } from "./image-viewer-
|
|
78
|
+
import { t as ImageViewer } from "./image-viewer-D4FuYrk6.mjs";
|
|
79
79
|
import { InputGroup } from "./components/input-group/index.mjs";
|
|
80
80
|
import { JsonTreeView } from "./components/json-tree-view/index.mjs";
|
|
81
81
|
import { Kbd } from "./components/kbd/index.mjs";
|
|
@@ -104,7 +104,7 @@ import { RatingGroup } from "./components/rating-group/index.mjs";
|
|
|
104
104
|
import { Result, ResultIcon, ResultRoot } from "./components/result/index.mjs";
|
|
105
105
|
import { ScrollArea } from "./components/scroll-area/index.mjs";
|
|
106
106
|
import { SegmentGroup } from "./components/segment-group/index.mjs";
|
|
107
|
-
import { n as NativeSelect, t as Select } from "./select-
|
|
107
|
+
import { n as NativeSelect, t as Select } from "./select-D_soVdWK.mjs";
|
|
108
108
|
import { Separator } from "./components/separator/index.mjs";
|
|
109
109
|
import { SignaturePad } from "./components/signature-pad/index.mjs";
|
|
110
110
|
import { Skeleton } from "./components/skeleton/index.mjs";
|
|
@@ -139,6 +139,6 @@ import { Typography } from "./components/typography/index.mjs";
|
|
|
139
139
|
import { User } from "./components/user/index.mjs";
|
|
140
140
|
import { VirtualList } from "./components/virtual-list/index.mjs";
|
|
141
141
|
import { Watermark } from "./components/watermark/index.mjs";
|
|
142
|
-
import { n as Video, r as formatMediaTime, t as Audio } from "./media-player-
|
|
142
|
+
import { n as Video, r as formatMediaTime, t as Audio } from "./media-player-C0WcjVI-.mjs";
|
|
143
143
|
export * from "@bysages/core";
|
|
144
144
|
export { Accordion, Action, Action as AiAction, Affix, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, Message as AiMessage, Message, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AngleSlider, AspectRatio, Audio, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Banner, Bento, BentoCell, BentoRoot, BlockUI, Breadcrumb, Browser, BrowserBody, BrowserDots, BrowserRoot, BrowserTitleBar, BrowserUrlBar, Button, ButtonGroup, Calendar, Card, Carousel, CascadeSelect, Checkbox, CheckboxGroup, Chip, ClientOnly, Clipboard, Collapsible, ColorPicker, Combobox, Command, Comment, ConfigProvider, Container, DataTable, DataView, DateInput, DatePicker, DeferredContent, Descriptions, DescriptionsRoot, Dialog, Dock, DockItem, DockRoot, DownloadTrigger, Drawer, DynamicInput, Editable, Ellipsis, Empty, FLOAT_BUTTON_CONTEXT, Field, Fieldset, FileUpload, FlexRender, FloatButton, FloatingPanel, FocusTrap, Form, FormField, Format, Frame, Grid, Highlight, HoverCard, Icon, Image, ImageCropper, ImageViewer, Input, InputGroup, JsonTreeView, Kbd, Layout, Link, List, Listbox, Marquee, Masonry, Mentions, MentionsVessel, Menu, Menubar, Meter, NativeSelect, NavigationMenu, NumberInput, OrderList, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, Popover, Presence, PresenceProvider, Progress, ProgressGroup, QrCode, RadioGroup, RatingGroup, Result, ResultIcon, ResultRoot, ScrollArea, SegmentGroup, Select, Separator, SignaturePad, Skeleton, Slider, Spinner, SplitButton, Splitter, Spotlight, Stack, Stat, Steps, Swap, Switch, Tabs, Tag, TagsInput, Terminal, Textarea, Timeline, Timer, Toast, Toaster, Toc, Toggle, ToggleGroup, Toolbar, Tooltip, Tour, Transfer, TreeSelect, TreeView, Typography, User, Video, VirtualList, Watermark, createColumnHelper, createFileTreeCollection, createGridCollection, createToaster, createTreeCollection, formatMediaTime, useAsyncList, useConfig, useDownload, useField, useForm, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Select } from "./select-
|
|
1
|
+
import { r as iconNode } from "./icon-Cri0-7-x.mjs";
|
|
2
|
+
import { t as Select } from "./select-D_soVdWK.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { createContext, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as iconNode } from "./icon-Cri0-7-x.mjs";
|
|
2
2
|
import { t as useElementId } from "./id-C37UYLwJ.mjs";
|
|
3
3
|
import { injectComponentStyle } from "@bysages/core/styling";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bysages/react",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "By Sages Elements components for React — styled by the paper-and-ink design tokens",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessible",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@tanstack/react-virtual": "3.14.14",
|
|
54
54
|
"@zag-js/cascade-select": "1.45.0",
|
|
55
55
|
"@zag-js/react": "1.45.0",
|
|
56
|
-
"@bysages/core": "0.4.
|
|
56
|
+
"@bysages/core": "0.4.3"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@json-render/core": "0.21.0",
|
package/dist/icon-BALgGtNK.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { getIcon } from "@bysages/core/icons";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
//#region src/internal/icon.tsx
|
|
4
|
-
/** Render a curated registry icon as a bare svg element — the components
|
|
5
|
-
* own default icons. No span shell: the part rules size the svg directly.
|
|
6
|
-
* Extra body appends after the icon's own body, for composed marks. */
|
|
7
|
-
function iconNode(name, attrs = {}, extraBody = "") {
|
|
8
|
-
const icon = getIcon(name);
|
|
9
|
-
if (!icon) throw new Error(`Unknown icon "${name}" in the curated core registry`);
|
|
10
|
-
return /* @__PURE__ */ jsx("svg", {
|
|
11
|
-
viewBox: `0 0 ${icon.width} ${icon.height}`,
|
|
12
|
-
"aria-hidden": "true",
|
|
13
|
-
...attrs,
|
|
14
|
-
dangerouslySetInnerHTML: { __html: icon.body + extraBody }
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { iconNode as t };
|