@sdata/web-vue 3.26.0 → 3.27.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/dist/sd.css +4 -0
- package/dist/sd.min.css +1 -1
- package/es/_hooks/use-theme-mode.d.ts +1 -1
- package/es/_utils/date.js +5 -38
- package/es/components.d.ts +1 -0
- package/es/index.css +4 -0
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/index.scss +1 -0
- package/es/locale/constant.d.ts +2 -0
- package/es/locale/constant.js +5 -0
- package/es/locale/index.d.ts +1 -0
- package/es/locale/index.js +6 -5
- package/es/locale/interface.d.ts +11 -0
- package/es/locale/lang/en-us.js +12 -1
- package/es/locale/lang/zh-cn.js +14 -2
- package/es/sd-vue.js +2 -0
- package/es/thinking-orb/engine/braid.d.ts +2 -0
- package/es/thinking-orb/engine/braid.js +52 -0
- package/es/thinking-orb/engine/core.d.ts +28 -0
- package/es/thinking-orb/engine/core.js +104 -0
- package/es/thinking-orb/engine/lattice.d.ts +4 -0
- package/es/thinking-orb/engine/lattice.js +188 -0
- package/es/thinking-orb/engine/morph.d.ts +2 -0
- package/es/thinking-orb/engine/morph.js +111 -0
- package/es/thinking-orb/engine/orbits.d.ts +2 -0
- package/es/thinking-orb/engine/orbits.js +65 -0
- package/es/thinking-orb/engine/profiles.d.ts +6 -0
- package/es/thinking-orb/engine/profiles.js +150 -0
- package/es/thinking-orb/engine/registry.d.ts +3 -0
- package/es/thinking-orb/engine/registry.js +20 -0
- package/es/thinking-orb/engine/ribbon.d.ts +2 -0
- package/es/thinking-orb/engine/ribbon.js +71 -0
- package/es/thinking-orb/engine/types.d.ts +3 -0
- package/es/thinking-orb/engine/web.d.ts +2 -0
- package/es/thinking-orb/engine/web.js +87 -0
- package/es/thinking-orb/index.d.ts +21 -0
- package/es/thinking-orb/index.js +10 -0
- package/es/thinking-orb/presets.d.ts +10 -0
- package/es/thinking-orb/presets.js +176 -0
- package/es/thinking-orb/style/css.js +2 -0
- package/es/thinking-orb/style/index.css +20 -0
- package/es/thinking-orb/style/index.d.ts +2 -0
- package/es/thinking-orb/style/index.js +2 -0
- package/es/thinking-orb/style/index.scss +8 -0
- package/es/thinking-orb/thinking-orb.js +5 -0
- package/es/thinking-orb/thinking-orb.vue.d.ts +4 -0
- package/es/thinking-orb/thinking-orb.vue_vue_type_script_setup_true_lang.js +140 -0
- package/es/thinking-orb/types.d.ts +12 -0
- package/json/vetur-attributes.json +17 -0
- package/json/vetur-tags.json +9 -0
- package/json/web-types.json +48 -1
- package/package.json +1 -1
- package/es/locale/lang/ar-eg.d.ts +0 -3
- package/es/locale/lang/ar-eg.js +0 -262
- package/es/locale/lang/de-de.d.ts +0 -3
- package/es/locale/lang/de-de.js +0 -262
- package/es/locale/lang/es-es.d.ts +0 -3
- package/es/locale/lang/es-es.js +0 -262
- package/es/locale/lang/fr-fr.d.ts +0 -3
- package/es/locale/lang/fr-fr.js +0 -262
- package/es/locale/lang/id-id.d.ts +0 -3
- package/es/locale/lang/id-id.js +0 -262
- package/es/locale/lang/it-it.d.ts +0 -3
- package/es/locale/lang/it-it.js +0 -262
- package/es/locale/lang/ja-jp.d.ts +0 -3
- package/es/locale/lang/ja-jp.js +0 -262
- package/es/locale/lang/km-kh.d.ts +0 -3
- package/es/locale/lang/km-kh.js +0 -262
- package/es/locale/lang/ko-kr.d.ts +0 -3
- package/es/locale/lang/ko-kr.js +0 -262
- package/es/locale/lang/ms-my.d.ts +0 -3
- package/es/locale/lang/ms-my.js +0 -262
- package/es/locale/lang/nl-nl.d.ts +0 -3
- package/es/locale/lang/nl-nl.js +0 -262
- package/es/locale/lang/pt-pt.d.ts +0 -3
- package/es/locale/lang/pt-pt.js +0 -262
- package/es/locale/lang/ru-ru.d.ts +0 -3
- package/es/locale/lang/ru-ru.js +0 -262
- package/es/locale/lang/th-th.d.ts +0 -3
- package/es/locale/lang/th-th.js +0 -262
- package/es/locale/lang/vi-vn.d.ts +0 -3
- package/es/locale/lang/vi-vn.js +0 -262
- package/es/locale/lang/zh-tw.d.ts +0 -3
- package/es/locale/lang/zh-tw.js +0 -272
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
export type ThemeMode = 'light' | 'dark';
|
|
3
|
-
export declare function useThemeMode(target: Ref<
|
|
3
|
+
export declare function useThemeMode<T extends HTMLElement = HTMLElement>(target: Ref<T | null>): Ref<ThemeMode>;
|
package/es/_utils/date.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { isArray, isDayjs, isQuarter } from "./is.js";
|
|
3
|
+
import { DEFAULT_LOCALE_KEY } from "../locale/constant.js";
|
|
3
4
|
import _asyncToGenerator from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/asyncToGenerator.js";
|
|
4
5
|
import originDayjs from "dayjs";
|
|
5
6
|
import AdvancedFormat from "dayjs/plugin/advancedFormat";
|
|
@@ -11,25 +12,7 @@ import utc from "dayjs/plugin/utc";
|
|
|
11
12
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
12
13
|
import weekYear from "dayjs/plugin/weekYear";
|
|
13
14
|
//#region components/_utils/date.ts
|
|
14
|
-
var localeLoaders = {
|
|
15
|
-
"ar": () => import("dayjs/locale/ar"),
|
|
16
|
-
"de": () => import("dayjs/locale/de"),
|
|
17
|
-
"es": () => import("dayjs/locale/es"),
|
|
18
|
-
"fr": () => import("dayjs/locale/fr"),
|
|
19
|
-
"id": () => import("dayjs/locale/id"),
|
|
20
|
-
"it": () => import("dayjs/locale/it"),
|
|
21
|
-
"ja": () => import("dayjs/locale/ja"),
|
|
22
|
-
"km": () => import("dayjs/locale/km"),
|
|
23
|
-
"ko": () => import("dayjs/locale/ko"),
|
|
24
|
-
"ms": () => import("dayjs/locale/ms"),
|
|
25
|
-
"nl": () => import("dayjs/locale/nl"),
|
|
26
|
-
"pt": () => import("dayjs/locale/pt"),
|
|
27
|
-
"ru": () => import("dayjs/locale/ru"),
|
|
28
|
-
"th": () => import("dayjs/locale/th"),
|
|
29
|
-
"vi": () => import("dayjs/locale/vi"),
|
|
30
|
-
"zh-cn": () => import("dayjs/locale/zh-cn"),
|
|
31
|
-
"zh-tw": () => import("dayjs/locale/zh-tw")
|
|
32
|
-
};
|
|
15
|
+
var localeLoaders = { [DEFAULT_LOCALE_KEY]: () => import("dayjs/locale/zh-cn") };
|
|
33
16
|
var loadedLocales = /* @__PURE__ */ new Set();
|
|
34
17
|
var overwriteIsDayjs = (_, Dayjs, dayjs) => {
|
|
35
18
|
dayjs = function(date, c) {
|
|
@@ -59,24 +42,9 @@ originDayjs.extend(utc);
|
|
|
59
42
|
originDayjs.extend(timezone);
|
|
60
43
|
var dayjs = originDayjs;
|
|
61
44
|
var DAYJS_LOCALE_MAP = {
|
|
62
|
-
"
|
|
63
|
-
"de-de": "de",
|
|
45
|
+
"en": "en",
|
|
64
46
|
"en-us": "en",
|
|
65
|
-
|
|
66
|
-
"fr-fr": "fr",
|
|
67
|
-
"id-id": "id",
|
|
68
|
-
"it-it": "it",
|
|
69
|
-
"ja-jp": "ja",
|
|
70
|
-
"km-kh": "km",
|
|
71
|
-
"ko-kr": "ko",
|
|
72
|
-
"ms-my": "ms",
|
|
73
|
-
"nl-nl": "nl",
|
|
74
|
-
"pt-pt": "pt",
|
|
75
|
-
"ru-ru": "ru",
|
|
76
|
-
"th-th": "th",
|
|
77
|
-
"vi-vn": "vi",
|
|
78
|
-
"zh-cn": "zh-cn",
|
|
79
|
-
"zh-tw": "zh-tw"
|
|
47
|
+
[DEFAULT_LOCALE_KEY]: DEFAULT_LOCALE_KEY
|
|
80
48
|
};
|
|
81
49
|
var methods = {
|
|
82
50
|
add(time, value, unit) {
|
|
@@ -178,8 +146,7 @@ function initializeDateLocale(_x, _x2) {
|
|
|
178
146
|
function _initializeDateLocale() {
|
|
179
147
|
_initializeDateLocale = _asyncToGenerator(function* (localeName, weekStart) {
|
|
180
148
|
var _DAYJS_LOCALE_MAP$nor, _dayjs$Ls$dayjsLocale;
|
|
181
|
-
const
|
|
182
|
-
const dayjsLocaleName = (_DAYJS_LOCALE_MAP$nor = DAYJS_LOCALE_MAP[normalizedLocale]) !== null && _DAYJS_LOCALE_MAP$nor !== void 0 ? _DAYJS_LOCALE_MAP$nor : normalizedLocale;
|
|
149
|
+
const dayjsLocaleName = (_DAYJS_LOCALE_MAP$nor = DAYJS_LOCALE_MAP[localeName.toLowerCase()]) !== null && _DAYJS_LOCALE_MAP$nor !== void 0 ? _DAYJS_LOCALE_MAP$nor : DEFAULT_LOCALE_KEY;
|
|
183
150
|
if (dayjsLocaleName !== "en" && !loadedLocales.has(dayjsLocaleName)) {
|
|
184
151
|
const loader = localeLoaders[dayjsLocaleName];
|
|
185
152
|
if (loader) yield loader();
|
package/es/components.d.ts
CHANGED
package/es/index.css
CHANGED
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./components.d.ts" />
|
|
2
2
|
export { default } from './sd-vue';
|
|
3
|
-
export { addI18nMessages, useLocale, getLocale } from './locale';
|
|
3
|
+
export { DEFAULT_LOCALE, DEFAULT_LOCALE_KEY, addI18nMessages, useLocale, getLocale, } from './locale';
|
|
4
4
|
export type { Size, Status, MessageType, Direction } from './_utils/constant';
|
|
5
5
|
export { default as Affix } from './affix';
|
|
6
6
|
export type { AffixInstance } from './affix';
|
|
@@ -142,6 +142,8 @@ export { default as Space } from './space';
|
|
|
142
142
|
export type { SpaceInstance } from './space';
|
|
143
143
|
export { default as Spin } from './spin';
|
|
144
144
|
export type { SpinInstance, SpinProps } from './spin';
|
|
145
|
+
export { default as ThinkingOrb } from './thinking-orb';
|
|
146
|
+
export type { ThinkingOrbInstance, ThinkingOrbProps, ThinkingOrbSize, ThinkingOrbState, ThinkingOrbTheme, } from './thinking-orb';
|
|
145
147
|
export { default as Split } from './split';
|
|
146
148
|
export type { SplitInstance } from './split';
|
|
147
149
|
export { default as Statistic, Countdown } from './statistic';
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useFormItem } from "./_hooks/use-form-item.js";
|
|
2
2
|
import { getCssVarToken } from "./_utils/global-config.js";
|
|
3
3
|
import Affix from "./affix/index.js";
|
|
4
|
+
import { DEFAULT_LOCALE, DEFAULT_LOCALE_KEY } from "./locale/constant.js";
|
|
4
5
|
import { addI18nMessages, getLocale, useLocale } from "./locale/index.js";
|
|
5
6
|
import Alert from "./alert/index.js";
|
|
6
7
|
import anchor_link_default from "./anchor/anchor-link.js";
|
|
@@ -157,6 +158,7 @@ import tab_pane_default from "./tabs/tab-pane.js";
|
|
|
157
158
|
import Tabs from "./tabs/index.js";
|
|
158
159
|
import TagGroup from "./tag-group/index.js";
|
|
159
160
|
import ThemeProvider from "./theme-provider/index.js";
|
|
161
|
+
import ThinkingOrb from "./thinking-orb/index.js";
|
|
160
162
|
import item_default$1 from "./timeline/item.js";
|
|
161
163
|
import Timeline from "./timeline/index.js";
|
|
162
164
|
import Tour from "./tour/index.js";
|
|
@@ -167,4 +169,4 @@ import Typography from "./typography/index.js";
|
|
|
167
169
|
import Upload from "./upload/index.js";
|
|
168
170
|
import Watermark from "./watermark/index.js";
|
|
169
171
|
import SDVue from "./sd-vue.js";
|
|
170
|
-
export { $createInlineComponentNode, $isInlineComponentNode, A2UI_0_9_1, Affix, Alert, Anchor, anchor_link_default as AnchorLink, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, BasicCrudTable, BorderBeam, Breadcrumb, breadcrumb_item_default as BreadcrumbItem, Button, button_group_default as ButtonGroup, Calendar, Card, card_grid_default as CardGrid, card_meta_default as CardMeta, Carousel, carousel_item_default as CarouselItem, Cascader, cascader_panel_default as CascaderPanel, Checkbox, checkbox_group_default as CheckboxGroup, grid_col_default as Col, Collapse, collapse_item_default as CollapseItem, ColorPicker, Comment, ConfigProvider, Copy, countdown_default as Countdown, Cropper, DatePicker, Descriptions, descriptions_item_default as DescriptionsItem, dropdown_group_default as Dgroup, Divider, dropdown_option_default as Doption, Drawer, Dropdown, dropdown_button_default as DropdownButton, dropdown_submenu_default as Dsubmenu, Ellipsis, Empty, FilePreviewer, Form, form_item_default as FormItem, Grid, grid_item_default as GridItem, Icon, Image, preview_default as ImagePreview, preview_action_default as ImagePreviewAction, preview_group_default as ImagePreviewGroup, InlineComponentNode, Input, input_group_default as InputGroup, InputNumber, input_password_default as InputPassword, input_search_default as InputSearch, InputTag, JsonForm, KvList, Layout, content_default as LayoutContent, footer_default as LayoutFooter, header_default as LayoutHeader, sider_default as LayoutSider, Link, List, list_item_default as ListItem, list_item_meta_default as ListItemMeta, MODEL_SELECTOR_PROVIDERS, Mention, Menu, item_default as MenuItem, item_group_default as MenuItemGroup, Message, Modal, ModelSelector, model_selector_content_default as ModelSelectorContent, model_selector_dialog_default as ModelSelectorDialog, model_selector_empty_default as ModelSelectorEmpty, model_selector_group_default as ModelSelectorGroup, model_selector_input_default as ModelSelectorInput, model_selector_item_default as ModelSelectorItem, model_selector_list_default as ModelSelectorList, model_selector_logo_default as ModelSelectorLogo, model_selector_logo_group_default as ModelSelectorLogoGroup, model_selector_name_default as ModelSelectorName, model_selector_separator_default as ModelSelectorSeparator, model_selector_shortcut_default as ModelSelectorShortcut, model_selector_trigger_default as ModelSelectorTrigger, month_picker_default as MonthPicker, Notification, OverflowList, PageHeader, Pagination, PerformantEllipsis, Popconfirm, Popover, Progress, QrCode, quarter_picker_default as QuarterPicker, RICH_TEXT_EDITOR_BUILT_IN_NODE_NAMES, RICH_TEXT_EDITOR_JSON_FORM_NODE_NAMES, Radio, radio_group_default as RadioGroup, range_picker_default as RangePicker, Rate, recorder_core_default as RecorderCore, ResizeBox, Result, RichTextEditor, grid_row_default as Row, Scrollbar, Secret, Select, SelectableCard, Sender, SenderHeader, SenderSwitch, Skeleton, line_default as SkeletonLine, shape_default as SkeletonShape, Slider, Space, Spin, Split, Statistic, step_default as Step, Steps, sub_menu_default as SubMenu, Switch, tab_pane_default as TabPane, Table, table_column_default as TableColumn, Tabs, Tag, TagGroup, table_tbody_default as Tbody, table_td_default as Td, Textarea, table_th_default as Th, table_thead_default as Thead, ThemeProvider, TimePicker, Timeline, item_default$1 as TimelineItem, Toolbar, Tooltip, Tour, table_tr_default as Tr, Transfer, Tree, TreeSelect, Trigger, Typography, paragraph_default as TypographyParagraph, text_default as TypographyText, title_default as TypographyTitle, Upload, VerificationCode, Watermark, week_picker_default as WeekPicker, year_picker_default as YearPicker, addI18nMessages, SDVue as default, defineJsonFormComponents, defineJsonFormSchemas, getCssVarToken, getLocale, useFormItem, useLocale };
|
|
172
|
+
export { $createInlineComponentNode, $isInlineComponentNode, A2UI_0_9_1, Affix, Alert, Anchor, anchor_link_default as AnchorLink, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, BasicCrudTable, BorderBeam, Breadcrumb, breadcrumb_item_default as BreadcrumbItem, Button, button_group_default as ButtonGroup, Calendar, Card, card_grid_default as CardGrid, card_meta_default as CardMeta, Carousel, carousel_item_default as CarouselItem, Cascader, cascader_panel_default as CascaderPanel, Checkbox, checkbox_group_default as CheckboxGroup, grid_col_default as Col, Collapse, collapse_item_default as CollapseItem, ColorPicker, Comment, ConfigProvider, Copy, countdown_default as Countdown, Cropper, DEFAULT_LOCALE, DEFAULT_LOCALE_KEY, DatePicker, Descriptions, descriptions_item_default as DescriptionsItem, dropdown_group_default as Dgroup, Divider, dropdown_option_default as Doption, Drawer, Dropdown, dropdown_button_default as DropdownButton, dropdown_submenu_default as Dsubmenu, Ellipsis, Empty, FilePreviewer, Form, form_item_default as FormItem, Grid, grid_item_default as GridItem, Icon, Image, preview_default as ImagePreview, preview_action_default as ImagePreviewAction, preview_group_default as ImagePreviewGroup, InlineComponentNode, Input, input_group_default as InputGroup, InputNumber, input_password_default as InputPassword, input_search_default as InputSearch, InputTag, JsonForm, KvList, Layout, content_default as LayoutContent, footer_default as LayoutFooter, header_default as LayoutHeader, sider_default as LayoutSider, Link, List, list_item_default as ListItem, list_item_meta_default as ListItemMeta, MODEL_SELECTOR_PROVIDERS, Mention, Menu, item_default as MenuItem, item_group_default as MenuItemGroup, Message, Modal, ModelSelector, model_selector_content_default as ModelSelectorContent, model_selector_dialog_default as ModelSelectorDialog, model_selector_empty_default as ModelSelectorEmpty, model_selector_group_default as ModelSelectorGroup, model_selector_input_default as ModelSelectorInput, model_selector_item_default as ModelSelectorItem, model_selector_list_default as ModelSelectorList, model_selector_logo_default as ModelSelectorLogo, model_selector_logo_group_default as ModelSelectorLogoGroup, model_selector_name_default as ModelSelectorName, model_selector_separator_default as ModelSelectorSeparator, model_selector_shortcut_default as ModelSelectorShortcut, model_selector_trigger_default as ModelSelectorTrigger, month_picker_default as MonthPicker, Notification, OverflowList, PageHeader, Pagination, PerformantEllipsis, Popconfirm, Popover, Progress, QrCode, quarter_picker_default as QuarterPicker, RICH_TEXT_EDITOR_BUILT_IN_NODE_NAMES, RICH_TEXT_EDITOR_JSON_FORM_NODE_NAMES, Radio, radio_group_default as RadioGroup, range_picker_default as RangePicker, Rate, recorder_core_default as RecorderCore, ResizeBox, Result, RichTextEditor, grid_row_default as Row, Scrollbar, Secret, Select, SelectableCard, Sender, SenderHeader, SenderSwitch, Skeleton, line_default as SkeletonLine, shape_default as SkeletonShape, Slider, Space, Spin, Split, Statistic, step_default as Step, Steps, sub_menu_default as SubMenu, Switch, tab_pane_default as TabPane, Table, table_column_default as TableColumn, Tabs, Tag, TagGroup, table_tbody_default as Tbody, table_td_default as Td, Textarea, table_th_default as Th, table_thead_default as Thead, ThemeProvider, ThinkingOrb, TimePicker, Timeline, item_default$1 as TimelineItem, Toolbar, Tooltip, Tour, table_tr_default as Tr, Transfer, Tree, TreeSelect, Trigger, Typography, paragraph_default as TypographyParagraph, text_default as TypographyText, title_default as TypographyTitle, Upload, VerificationCode, Watermark, week_picker_default as WeekPicker, year_picker_default as YearPicker, addI18nMessages, SDVue as default, defineJsonFormComponents, defineJsonFormSchemas, getCssVarToken, getLocale, useFormItem, useLocale };
|
package/es/index.scss
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
@use '@components/tooltip/style/index.scss' as *;
|
|
16
16
|
@use '@components/timeline/style/index.scss' as *;
|
|
17
17
|
@use '@components/time-picker/style/index.scss' as *;
|
|
18
|
+
@use '@components/thinking-orb/style/index.scss' as *;
|
|
18
19
|
@use '@components/textarea/style/index.scss' as *;
|
|
19
20
|
@use '@components/toolbar/style/index.scss' as *;
|
|
20
21
|
@use '@components/tag/style/index.scss' as *;
|
package/es/locale/index.d.ts
CHANGED
package/es/locale/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
2
|
import { isString } from "../_utils/is.js";
|
|
3
|
+
import { DEFAULT_LOCALE, DEFAULT_LOCALE_KEY } from "./constant.js";
|
|
3
4
|
import lang from "./lang/zh-cn.js";
|
|
4
5
|
import { computed, inject, reactive, ref } from "vue";
|
|
5
6
|
//#region components/locale/index.ts
|
|
6
|
-
var LOCALE = ref(
|
|
7
|
-
var I18N_MESSAGES = reactive({
|
|
7
|
+
var LOCALE = ref(DEFAULT_LOCALE);
|
|
8
|
+
var I18N_MESSAGES = reactive({ [DEFAULT_LOCALE]: lang });
|
|
8
9
|
/**
|
|
9
10
|
* 添加地区语言包。添加过后的语言包可以通过 `useLocale` 使用
|
|
10
11
|
* @param messages 需要添加的地区语言数据
|
|
@@ -33,8 +34,8 @@ var getLocale = () => {
|
|
|
33
34
|
var useI18n = () => {
|
|
34
35
|
const configProvider = inject(configProviderInjectionKey, void 0);
|
|
35
36
|
const i18nMessage = computed(() => {
|
|
36
|
-
var _configProvider$local;
|
|
37
|
-
return (_configProvider$local = configProvider === null || configProvider === void 0 ? void 0 : configProvider.locale) !== null && _configProvider$local !== void 0 ? _configProvider$local : I18N_MESSAGES[LOCALE.value];
|
|
37
|
+
var _ref, _configProvider$local;
|
|
38
|
+
return (_ref = (_configProvider$local = configProvider === null || configProvider === void 0 ? void 0 : configProvider.locale) !== null && _configProvider$local !== void 0 ? _configProvider$local : I18N_MESSAGES[LOCALE.value]) !== null && _ref !== void 0 ? _ref : I18N_MESSAGES[DEFAULT_LOCALE];
|
|
38
39
|
});
|
|
39
40
|
const locale = computed(() => i18nMessage.value.locale);
|
|
40
41
|
const transform = (key, ...args) => {
|
|
@@ -60,4 +61,4 @@ var useI18n = () => {
|
|
|
60
61
|
};
|
|
61
62
|
};
|
|
62
63
|
//#endregion
|
|
63
|
-
export { addI18nMessages, getLocale, useI18n, useLocale };
|
|
64
|
+
export { DEFAULT_LOCALE, DEFAULT_LOCALE_KEY, addI18nMessages, getLocale, useI18n, useLocale };
|
package/es/locale/interface.d.ts
CHANGED
|
@@ -151,6 +151,17 @@ export interface SdA11yLang {
|
|
|
151
151
|
goToSlide: string;
|
|
152
152
|
characterOf: string;
|
|
153
153
|
qrCode: string;
|
|
154
|
+
thinkingOrb: {
|
|
155
|
+
working: string;
|
|
156
|
+
searching: string;
|
|
157
|
+
solving: string;
|
|
158
|
+
listening: string;
|
|
159
|
+
connecting: string;
|
|
160
|
+
weaving: string;
|
|
161
|
+
composing: string;
|
|
162
|
+
breathing: string;
|
|
163
|
+
shaping: string;
|
|
164
|
+
};
|
|
154
165
|
}
|
|
155
166
|
export interface SdLang {
|
|
156
167
|
locale: string;
|
package/es/locale/lang/en-us.js
CHANGED
|
@@ -192,7 +192,18 @@ var lang = {
|
|
|
192
192
|
slideOf: "Slide {0} of {1}",
|
|
193
193
|
goToSlide: "Go to slide {0}",
|
|
194
194
|
characterOf: "Character {0} of {1}",
|
|
195
|
-
qrCode: "QR code: {0}"
|
|
195
|
+
qrCode: "QR code: {0}",
|
|
196
|
+
thinkingOrb: {
|
|
197
|
+
working: "Working…",
|
|
198
|
+
searching: "Searching…",
|
|
199
|
+
solving: "Solving…",
|
|
200
|
+
listening: "Listening…",
|
|
201
|
+
connecting: "Connecting…",
|
|
202
|
+
weaving: "Weaving…",
|
|
203
|
+
composing: "Composing…",
|
|
204
|
+
breathing: "Thinking…",
|
|
205
|
+
shaping: "Shaping…"
|
|
206
|
+
}
|
|
196
207
|
},
|
|
197
208
|
sender: {
|
|
198
209
|
messageInput: "Message input",
|
package/es/locale/lang/zh-cn.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DEFAULT_LOCALE } from "../constant.js";
|
|
1
2
|
//#region components/locale/lang/zh-cn.ts
|
|
2
3
|
var calendarLang = {
|
|
3
4
|
formatYear: "YYYY 年",
|
|
@@ -69,7 +70,7 @@ var calendarLang = {
|
|
|
69
70
|
}
|
|
70
71
|
};
|
|
71
72
|
var lang = {
|
|
72
|
-
locale:
|
|
73
|
+
locale: DEFAULT_LOCALE,
|
|
73
74
|
readonlyTip: "当前为只读模式",
|
|
74
75
|
empty: { description: "暂无数据" },
|
|
75
76
|
drawer: {
|
|
@@ -245,7 +246,18 @@ var lang = {
|
|
|
245
246
|
slideOf: "第 {0} 张,共 {1} 张",
|
|
246
247
|
goToSlide: "跳转到第 {0} 张",
|
|
247
248
|
characterOf: "第 {0} 个字符,共 {1} 个",
|
|
248
|
-
qrCode: "二维码:{0}"
|
|
249
|
+
qrCode: "二维码:{0}",
|
|
250
|
+
thinkingOrb: {
|
|
251
|
+
working: "正在工作",
|
|
252
|
+
searching: "正在搜索",
|
|
253
|
+
solving: "正在求解",
|
|
254
|
+
listening: "正在聆听",
|
|
255
|
+
connecting: "正在连接",
|
|
256
|
+
weaving: "正在编织",
|
|
257
|
+
composing: "正在组织内容",
|
|
258
|
+
breathing: "正在思考",
|
|
259
|
+
shaping: "正在塑形"
|
|
260
|
+
}
|
|
249
261
|
},
|
|
250
262
|
sender: {
|
|
251
263
|
messageInput: "消息输入",
|
package/es/sd-vue.js
CHANGED
|
@@ -139,6 +139,7 @@ import tab_pane_default from "./tabs/tab-pane.js";
|
|
|
139
139
|
import Tabs from "./tabs/index.js";
|
|
140
140
|
import TagGroup from "./tag-group/index.js";
|
|
141
141
|
import ThemeProvider from "./theme-provider/index.js";
|
|
142
|
+
import ThinkingOrb from "./thinking-orb/index.js";
|
|
142
143
|
import item_default$1 from "./timeline/item.js";
|
|
143
144
|
import Timeline from "./timeline/index.js";
|
|
144
145
|
import Tour from "./tour/index.js";
|
|
@@ -221,6 +222,7 @@ var components = {
|
|
|
221
222
|
QrCode,
|
|
222
223
|
Result,
|
|
223
224
|
Spin,
|
|
225
|
+
ThinkingOrb,
|
|
224
226
|
Skeleton,
|
|
225
227
|
Breadcrumb,
|
|
226
228
|
Dropdown,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { fibDir, frac, makeProj, paint, radiusScale } from "./core.js";
|
|
2
|
+
//#region components/thinking-orb/engine/braid.ts
|
|
3
|
+
var drawBraid = (ctx, size, t, dark, o) => {
|
|
4
|
+
var _o$rsPow, _o$ghostN, _o$strandN, _o$turns;
|
|
5
|
+
const cx = size / 2;
|
|
6
|
+
const cy = size / 2;
|
|
7
|
+
const R = size / 2 * .76;
|
|
8
|
+
const pt = makeProj(t * .4, .3, cx, cy, 1);
|
|
9
|
+
const rs = radiusScale(size, (_o$rsPow = o.rsPow) !== null && _o$rsPow !== void 0 ? _o$rsPow : .6);
|
|
10
|
+
const dots = [];
|
|
11
|
+
const ghostN = (_o$ghostN = o.ghostN) !== null && _o$ghostN !== void 0 ? _o$ghostN : 150;
|
|
12
|
+
for (let i = 0; i < ghostN; i++) {
|
|
13
|
+
const d = fibDir(i, ghostN);
|
|
14
|
+
const [px, py, z] = pt(d[0] * R, d[1] * R, d[2] * R);
|
|
15
|
+
const depth = (z / R + 1) / 2;
|
|
16
|
+
dots.push({
|
|
17
|
+
x: px,
|
|
18
|
+
y: py,
|
|
19
|
+
z,
|
|
20
|
+
r: .8 * rs,
|
|
21
|
+
white: .78,
|
|
22
|
+
a: .1 + .22 * depth
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
const strandN = (_o$strandN = o.strandN) !== null && _o$strandN !== void 0 ? _o$strandN : 52;
|
|
26
|
+
const turns = (_o$turns = o.turns) !== null && _o$turns !== void 0 ? _o$turns : 3;
|
|
27
|
+
for (let s = 0; s < 3; s++) {
|
|
28
|
+
const phase = s / 3 * 2 * Math.PI;
|
|
29
|
+
for (let i = 0; i < strandN; i++) {
|
|
30
|
+
var _o$rBase, _o$rDepth;
|
|
31
|
+
const u = (frac(i / strandN + t * .045) * 2 - 1) * .96;
|
|
32
|
+
const surf = Math.sqrt(Math.max(0, 1 - u * u));
|
|
33
|
+
const endFade = Math.min(1, (1 - Math.abs(u)) / .1);
|
|
34
|
+
const a = u * Math.PI * turns + phase;
|
|
35
|
+
const weave = 1 + .075 * Math.sin(u * Math.PI * turns * 2 + phase * 2 + t * .8);
|
|
36
|
+
const rr = surf * R * weave;
|
|
37
|
+
const [px, py, zr] = pt(Math.cos(a) * rr, u * R * weave, Math.sin(a) * rr);
|
|
38
|
+
const depth = (zr / R + 1) / 2;
|
|
39
|
+
dots.push({
|
|
40
|
+
x: px,
|
|
41
|
+
y: py,
|
|
42
|
+
z: zr,
|
|
43
|
+
r: (((_o$rBase = o.rBase) !== null && _o$rBase !== void 0 ? _o$rBase : 1.2) + ((_o$rDepth = o.rDepth) !== null && _o$rDepth !== void 0 ? _o$rDepth : 1.8) * depth) * rs,
|
|
44
|
+
white: .55 - .45 * depth,
|
|
45
|
+
a: endFade * (.45 + .55 * depth)
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
paint(ctx, dots, dark, o.rMin);
|
|
50
|
+
};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { drawBraid };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface Dot {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
z: number;
|
|
5
|
+
r: number;
|
|
6
|
+
white: number;
|
|
7
|
+
a?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface Line {
|
|
10
|
+
x1: number;
|
|
11
|
+
y1: number;
|
|
12
|
+
x2: number;
|
|
13
|
+
y2: number;
|
|
14
|
+
white: number;
|
|
15
|
+
a?: number;
|
|
16
|
+
w: number;
|
|
17
|
+
}
|
|
18
|
+
export type Projector = (x: number, y: number, z: number) => [number, number, number];
|
|
19
|
+
export declare function lerp(a: number, b: number, f: number): number;
|
|
20
|
+
export declare function frac(x: number): number;
|
|
21
|
+
export declare function vnoise(x: number, y: number): number;
|
|
22
|
+
export declare function hashD(a: number, b: number): number;
|
|
23
|
+
export declare function fibDir(i: number, n: number): [number, number, number];
|
|
24
|
+
export declare function angleDelta(a: number, b: number): number;
|
|
25
|
+
export declare function makeProj(yaw: number, tilt: number, cx: number, cy: number, scale: number): Projector;
|
|
26
|
+
export declare function paint(ctx: CanvasRenderingContext2D, dots: Dot[], dark: boolean, rMin?: number): void;
|
|
27
|
+
export declare function paintLines(ctx: CanvasRenderingContext2D, lines: Line[], dark: boolean): void;
|
|
28
|
+
export declare function radiusScale(size: number, pow: number): number;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
//#region components/thinking-orb/engine/core.ts
|
|
2
|
+
function lerp(a, b, f) {
|
|
3
|
+
return a + (b - a) * f;
|
|
4
|
+
}
|
|
5
|
+
function frac(x) {
|
|
6
|
+
return x - Math.floor(x);
|
|
7
|
+
}
|
|
8
|
+
/** Value noise on a 2D lattice — smooth, deterministic, cheap. */
|
|
9
|
+
function vnoise(x, y) {
|
|
10
|
+
const xi = Math.floor(x);
|
|
11
|
+
const yi = Math.floor(y);
|
|
12
|
+
let fx = x - xi;
|
|
13
|
+
let fy = y - yi;
|
|
14
|
+
fx = fx * fx * (3 - 2 * fx);
|
|
15
|
+
fy = fy * fy * (3 - 2 * fy);
|
|
16
|
+
const a = hashD(xi, yi);
|
|
17
|
+
const b = hashD(xi + 1, yi);
|
|
18
|
+
const c = hashD(xi, yi + 1);
|
|
19
|
+
const d = hashD(xi + 1, yi + 1);
|
|
20
|
+
return a + (b - a) * fx + (c - a) * fy + (a - b - c + d) * fx * fy;
|
|
21
|
+
}
|
|
22
|
+
/** Deterministic hash in [0, 1). */
|
|
23
|
+
function hashD(a, b) {
|
|
24
|
+
const h = Math.sin(a * 12.9898 + b * 78.233) * 43758.5453;
|
|
25
|
+
return h - Math.floor(h);
|
|
26
|
+
}
|
|
27
|
+
/** Stable directions on a unit sphere (Fibonacci lattice). */
|
|
28
|
+
function fibDir(i, n) {
|
|
29
|
+
const golden = Math.PI * (3 - Math.sqrt(5));
|
|
30
|
+
const y = 1 - 2 * (i + .5) / n;
|
|
31
|
+
const rad = Math.sqrt(1 - y * y);
|
|
32
|
+
const a = i * golden;
|
|
33
|
+
return [
|
|
34
|
+
rad * Math.cos(a),
|
|
35
|
+
y,
|
|
36
|
+
rad * Math.sin(a)
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
/** Shortest signed angular distance, wrapped to (-π, π]. */
|
|
40
|
+
function angleDelta(a, b) {
|
|
41
|
+
return Math.atan2(Math.sin(a - b), Math.cos(a - b));
|
|
42
|
+
}
|
|
43
|
+
/** Shared spin + tilt + orthographic projection. */
|
|
44
|
+
function makeProj(yaw, tilt, cx, cy, scale) {
|
|
45
|
+
const st = Math.sin(tilt);
|
|
46
|
+
const ct = Math.cos(tilt);
|
|
47
|
+
const sy = Math.sin(yaw);
|
|
48
|
+
const cyw = Math.cos(yaw);
|
|
49
|
+
return (x, y, z) => {
|
|
50
|
+
const x1 = x * cyw + z * sy;
|
|
51
|
+
const z1 = -x * sy + z * cyw;
|
|
52
|
+
const y1 = y * ct - z1 * st;
|
|
53
|
+
const z2 = y * st + z1 * ct;
|
|
54
|
+
return [
|
|
55
|
+
cx + x1 * scale,
|
|
56
|
+
cy - y1 * scale,
|
|
57
|
+
z2
|
|
58
|
+
];
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Painter: z-sort far→near, matte grayscale dots. On dark substrates the
|
|
63
|
+
* ink value is mirrored (1 - white) so near dots read bright — the same
|
|
64
|
+
* depth language on an inverted substrate.
|
|
65
|
+
*/
|
|
66
|
+
function paint(ctx, dots, dark, rMin = .3) {
|
|
67
|
+
dots.sort((a, b) => a.z - b.z);
|
|
68
|
+
for (const d of dots) {
|
|
69
|
+
var _d$a;
|
|
70
|
+
const alpha = (_d$a = d.a) !== null && _d$a !== void 0 ? _d$a : 1;
|
|
71
|
+
if (alpha < .02) continue;
|
|
72
|
+
const w = Math.min(1, Math.max(0, d.white));
|
|
73
|
+
const g = Math.round((dark ? 1 - w : w) * 255);
|
|
74
|
+
ctx.fillStyle = `rgba(${g},${g},${g},${alpha})`;
|
|
75
|
+
ctx.beginPath();
|
|
76
|
+
ctx.arc(d.x, d.y, Math.max(rMin, d.r), 0, Math.PI * 2);
|
|
77
|
+
ctx.fill();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/** Stroke pass for edge-based modes. Runs before `paint` so nodes sit on top. */
|
|
81
|
+
function paintLines(ctx, lines, dark) {
|
|
82
|
+
for (const l of lines) {
|
|
83
|
+
var _l$a;
|
|
84
|
+
const alpha = (_l$a = l.a) !== null && _l$a !== void 0 ? _l$a : 1;
|
|
85
|
+
if (alpha < .02) continue;
|
|
86
|
+
const w = Math.min(1, Math.max(0, l.white));
|
|
87
|
+
const g = Math.round((dark ? 1 - w : w) * 255);
|
|
88
|
+
ctx.strokeStyle = `rgba(${g},${g},${g},${alpha})`;
|
|
89
|
+
ctx.lineWidth = l.w;
|
|
90
|
+
ctx.beginPath();
|
|
91
|
+
ctx.moveTo(l.x1, l.y1);
|
|
92
|
+
ctx.lineTo(l.x2, l.y2);
|
|
93
|
+
ctx.stroke();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Dot radii were tuned for a 300pt frame; sub-linear scaling keeps small
|
|
98
|
+
* spinners legible. Lower pow = radii shrink less with size.
|
|
99
|
+
*/
|
|
100
|
+
function radiusScale(size, pow) {
|
|
101
|
+
return Math.pow(size / 300, pow);
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { angleDelta, fibDir, frac, hashD, lerp, makeProj, paint, paintLines, radiusScale, vnoise };
|