@cozeloop/components 0.0.11 → 0.0.12-beta-1770714934822

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/es/index.css CHANGED
@@ -32,16 +32,16 @@
32
32
  height: 42px;
33
33
  color: var(--coz-fg-plus);
34
34
  background: var(--coz-bg, #f0f0f7);
35
+ background-color: var(--coz-bg, #f0f0f7);
35
36
  border-bottom: 1px solid var(--line-color-border-2, #eaedf1);
36
37
  padding: 5px 20px;
37
38
  font-size: 13px;
38
39
  font-weight: 500;
39
40
  line-height: 20px;
40
- background-color: var(--coz-bg, #f0f0f7) !important;
41
41
  }
42
42
 
43
43
  #loop-table-ZtuuXn .semi-table-row-head:before {
44
- background-color: var(--coz-bg, #f0f0f7) !important;
44
+ background-color: var(--coz-bg, #f0f0f7);
45
45
  }
46
46
 
47
47
  #loop-table-ZtuuXn .semi-table-row {
package/dist/es/index.mjs CHANGED
@@ -1,19 +1,18 @@
1
1
  import "./index.css";
2
2
  import "./static/svg/select.svg";
3
- import __rslib_svgr_url__1__ from "./static/svg/audio-icon.svg";
4
- import __rslib_svgr_url__2__ from "./static/svg/video-icon.svg";
3
+ import { __webpack_require__ } from "./rslib-runtime.mjs";
5
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
5
  import { arrayMove, sortableContainer as external_react_sortable_hoc_sortableContainer, sortableElement, sortableHandle } from "react-sortable-hoc";
7
- import react, { Fragment as external_react_Fragment, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
8
- import { I18n as i18n_I18n, initIntl } from "@cozeloop/i18n";
9
- import { IconCozArrowDown, IconCozArrowLeft, IconCozArrowRight, IconCozCheckMarkCircleFill, IconCozCheckMarkFill, IconCozContent, IconCozCopy, IconCozCross, IconCozCrossCircleFill, IconCozCrossCircleFillPalette, IconCozCrossFill, IconCozDownload, IconCozEye, IconCozFilter, IconCozHandle, IconCozImage, IconCozImageArrowUp, IconCozImageBroken, IconCozInfoCircle, IconCozLongArrowTopRight, IconCozLongArrowUp, IconCozMore, IconCozPencil, IconCozPlayCircle, IconCozPlus, IconCozPlusCircle, IconCozQuestionMarkCircle, IconCozRefresh, IconCozSetting, IconCozTableSetting, IconCozTrashCan, IconCozVideo, IconCozWarningCircle } from "@coze-arch/coze-design/icons";
10
- import { AudioPlayer, Banner, Button, ButtonGroup, Cascader, Checkbox, Col, Collapse, CozAvatar, CozInputNumber, CozPagination, DatePicker, Descriptions, Divider, Dropdown, Empty, EmptyState, Form, IconButton, Image, ImagePreview, Input, List, Loading, LoadingButton, Menu, Modal, Popover, Radio, RadioGroup, Row, Select, SideSheet, Skeleton, Slider, Space, Spin, Switch, Table, Tabs, Tag, TextArea, Toast, Tooltip, Typography, Upload, VideoPlayer, withField } from "@coze-arch/coze-design";
6
+ import react, { Fragment as external_react_Fragment, forwardRef, isValidElement, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
7
+ import { I18n as i18n_I18n } from "@cozeloop/i18n";
8
+ import { IconCozArrowDown, IconCozArrowLeft, IconCozArrowRight, IconCozCheckMarkCircleFill, IconCozCheckMarkFill, IconCozContent, IconCozCopy, IconCozCross, IconCozCrossCircleFill, IconCozCrossFill, IconCozEye, IconCozFilter, IconCozHandle, IconCozImage, IconCozImageArrowUp, IconCozImageBroken, IconCozInfoCircle, IconCozLongArrowTopRight, IconCozLongArrowUp, IconCozMore, IconCozPencil, IconCozPlayCircle, IconCozPlus, IconCozPlusCircle, IconCozQuestionMarkCircle, IconCozRefresh, IconCozSetting, IconCozTableSetting, IconCozTrashCan, IconCozVideo, IconCozWarningCircle } from "@coze-arch/coze-design/icons";
9
+ import { Banner, Button, ButtonGroup, Cascader, Checkbox, Col, Collapse, CozAvatar, CozInputNumber, CozPagination, DatePicker, Descriptions, Divider, Dropdown, Empty, EmptyState, Form, IconButton, Image, ImagePreview, Input, List, Loading, Menu, Modal, Popover, Radio, RadioGroup, Row, Select, SideSheet, Skeleton, Slider, Space, Spin, Switch, Table, Tabs, Tag, TextArea, Toast, Tooltip, Typography, Upload, withField } from "@coze-arch/coze-design";
11
10
  import classnames from "classnames";
12
11
  import { IconCozIllus404, IconCozIllus404Dark, IconCozIllusEmpty, IconCozIllusEmptyDark, IconCozIllusError, IconCozIllusErrorDark, IconCozIllusLock, IconCozIllusLockDark, IconCozIllusNone, IconCozIllusNoneDark } from "@coze-arch/coze-design/illustrations";
13
12
  import { useDebounceFn, useInfiniteScroll, useLatest, useMemoizedFn, useRequest, useSize } from "ahooks";
14
- import { cloneDeep, debounce, get, isEmpty as external_lodash_es_isEmpty, isFunction, isInteger, isNull, isNumber, isObject, isString, isUndefined, set } from "lodash-es";
13
+ import { cloneDeep, debounce, get, isEmpty as external_lodash_es_isEmpty, isInteger, isNull, isNumber, isObject, isString, isUndefined, set } from "lodash-es";
15
14
  import copy_to_clipboard from "copy-to-clipboard";
16
- import { fileDownload, formatTimestampToString, safeJsonParse, sleep as toolkit_sleep } from "@cozeloop/toolkit";
15
+ import { formatTimestampToString, safeJsonParse, sleep as toolkit_sleep } from "@cozeloop/toolkit";
17
16
  import _monaco_editor_react, { DiffEditor, loader } from "@monaco-editor/react";
18
17
  import sortablejs from "sortablejs";
19
18
  import { nanoid } from "nanoid";
@@ -21,10 +20,11 @@ import { ContentType } from "@cozeloop/api-schema/evaluation";
21
20
  import { ItemErrorType, StorageProvider } from "@cozeloop/api-schema/data";
22
21
  import { ContentType as prompt_ContentType } from "@cozeloop/api-schema/prompt";
23
22
  import { withTheme } from "@rjsf/core";
24
- import validator_ajv8 from "@rjsf/validator-ajv8";
23
+ import { defaultKeymap, history as commands_history, historyKeymap } from "@codemirror/commands";
25
24
  import { TranslatableString, ariaDescribedByIds, canExpand, enumOptionsIndexForValue, enumOptionsValueForIndex, errorId, examplesId, getInputProps, getSubmitButtonOptions, getTemplate, getUiOptions, optionId, rangeSpec } from "@rjsf/utils";
26
25
  import { useMouseDownOffset as hooks_useMouseDownOffset } from "@cozeloop/hooks";
27
26
  import dayjs from "dayjs";
27
+ import { useReportEvent } from "@cozeloop/config-provider";
28
28
  import { EditorProvider, createRenderer, option as react_option } from "@coze-editor/editor/react";
29
29
  import preset_code, { createTheme, languages, tags, themes, transformerCreator } from "@coze-editor/editor/preset-code";
30
30
  import { typescript } from "@coze-editor/editor/language-typescript";
@@ -35,29 +35,6 @@ import { mixLanguages } from "@coze-editor/editor";
35
35
  import { EditorView, keymap } from "@codemirror/view";
36
36
  import { goLanguage } from "@codemirror/lang-go";
37
37
  import preset_universal from "@coze-editor/editor/preset-universal";
38
- import { defaultKeymap, history as commands_history, historyKeymap } from "@codemirror/commands";
39
- var __webpack_require__ = {};
40
- (()=>{
41
- __webpack_require__.d = (exports, definition)=>{
42
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
43
- enumerable: true,
44
- get: definition[key]
45
- });
46
- };
47
- })();
48
- (()=>{
49
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
50
- })();
51
- (()=>{
52
- __webpack_require__.r = (exports)=>{
53
- if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
54
- value: 'Module'
55
- });
56
- Object.defineProperty(exports, '__esModule', {
57
- value: true
58
- });
59
- };
60
- })();
61
38
  var external_react_sortable_hoc_namespaceObject = {};
62
39
  __webpack_require__.r(external_react_sortable_hoc_namespaceObject);
63
40
  __webpack_require__.d(external_react_sortable_hoc_namespaceObject, {
@@ -1076,11 +1053,11 @@ const dealColumnsWithStorage = (storageKey, columns)=>{
1076
1053
  checked: sort[column.key]?.checked ?? true
1077
1054
  }));
1078
1055
  };
1079
- const PrimaryPage = ({ pageTitle, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, ...restProps })=>/*#__PURE__*/ jsxs("div", {
1056
+ const PrimaryPage = ({ pageTitle, renderCustomHeader, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, ...restProps })=>/*#__PURE__*/ jsxs("div", {
1080
1057
  className: classnames('pt-2 pb-3 h-full max-h-full flex flex-col', className),
1081
1058
  ...restProps,
1082
1059
  children: [
1083
- pageTitle || titleSlot ? /*#__PURE__*/ jsxs("div", {
1060
+ renderCustomHeader ? renderCustomHeader : pageTitle || titleSlot ? /*#__PURE__*/ jsxs("div", {
1084
1061
  className: classnames('flex items-center justify-between py-4 px-6', headerClassName),
1085
1062
  children: [
1086
1063
  /*#__PURE__*/ jsx("div", {
@@ -4496,40 +4473,6 @@ function TitleWithSub({ title, subTitle, className }) {
4496
4473
  ]
4497
4474
  });
4498
4475
  }
4499
- const CozeLoopContext = /*#__PURE__*/ createContext({});
4500
- function CozeLoopProvider({ children, defaultLanguage, resources, sendEvent }) {
4501
- const isInitialized = useRef(false);
4502
- const [initialized, setInitialized] = useState(false);
4503
- useEffect(()=>{
4504
- if (resources && !isInitialized.current) initIntl({
4505
- lng: defaultLanguage,
4506
- resources
4507
- }).then(()=>{
4508
- isInitialized.current = true;
4509
- setInitialized(true);
4510
- }).catch((error)=>{
4511
- console.error('Error initializing intl:', error);
4512
- isInitialized.current = true;
4513
- setInitialized(true);
4514
- });
4515
- }, [
4516
- resources,
4517
- defaultLanguage
4518
- ]);
4519
- if (!initialized) return /*#__PURE__*/ jsx(PageLoading, {});
4520
- return /*#__PURE__*/ jsx(CozeLoopContext.Provider, {
4521
- value: {
4522
- sendEvent
4523
- },
4524
- children: children
4525
- });
4526
- }
4527
- function useReportEvent() {
4528
- const context = useContext(CozeLoopContext);
4529
- return context.sendEvent ?? ((name, params)=>{
4530
- console.info(name, params);
4531
- });
4532
- }
4533
4476
  function FooterActions({ confirmBtnProps: { text: confirmBtnText, ...confirmBtnProps } = {}, cancelBtnProps: { text: cancelBtnText, ...cancelBtnProps } = {} }) {
4534
4477
  return /*#__PURE__*/ jsxs("div", {
4535
4478
  className: "flex justify-end",
@@ -5170,15 +5113,6 @@ const ResizableSideSheet = (props)=>{
5170
5113
  ]
5171
5114
  });
5172
5115
  };
5173
- var enum_EventNames = /*#__PURE__*/ function(EventNames) {
5174
- EventNames["INIT_LOOP_FORM"] = "init_loop_form";
5175
- EventNames["LOOP_FORM_FIELD_VALIDATE_ERROR"] = "loop_form_field_validate_error";
5176
- EventNames["LOOP_FORM_SUBMIT_INTERFACE_ERROR"] = "loop_form_submit_interface_error";
5177
- EventNames["LOOP_FORM_SUBMIT_SUCCESS"] = "loop_form_submit_success";
5178
- EventNames["LOOP_FORM_FIELD_CHANGE_TIMELINE"] = "loop_form_field_change_timeline";
5179
- EventNames["LOOP_FORM_CLOSE"] = "loop_form_close";
5180
- return EventNames;
5181
- }({});
5182
5116
  function safeStringify(obj) {
5183
5117
  return JSON.stringify(obj, (_, value)=>{
5184
5118
  if (/*#__PURE__*/ isValidElement(value)) return '[ReactElement]';
@@ -5204,7 +5138,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
5204
5138
  validateErrorCount.current = validateErrorCount.current + 1;
5205
5139
  const validateErrorTime = Date.now();
5206
5140
  const errorKeys = Object.keys(error) || [];
5207
- sendEvent(enum_EventNames.LOOP_FORM_FIELD_VALIDATE_ERROR, {
5141
+ sendEvent("loop_form_field_validate_error", {
5208
5142
  form_id: formID,
5209
5143
  session_id: sessionID,
5210
5144
  form_item_error_count: errorKeys.length,
@@ -5218,7 +5152,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
5218
5152
  if (isInterfaceError) {
5219
5153
  firstValidateSuccess.current = false;
5220
5154
  interfaceErrorCount.current = interfaceErrorCount.current + 1;
5221
- sendEvent?.(enum_EventNames.LOOP_FORM_SUBMIT_INTERFACE_ERROR, {
5155
+ sendEvent?.("loop_form_submit_interface_error", {
5222
5156
  form_id: formID,
5223
5157
  session_id: sessionID,
5224
5158
  form_interface_error_detail: JSON.stringify(error || {}),
@@ -5232,7 +5166,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
5232
5166
  const formItemShow = Object.keys(values);
5233
5167
  const formItemFilled = formItemShow.filter((key)=>values[key]);
5234
5168
  const successTime = Date.now();
5235
- sendEvent?.(enum_EventNames.LOOP_FORM_SUBMIT_SUCCESS, {
5169
+ sendEvent?.("loop_form_submit_success", {
5236
5170
  form_id: formID,
5237
5171
  session_id: sessionID,
5238
5172
  form_complete_consume_time: Date.now() - startTimeRef.current,
@@ -5340,7 +5274,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
5340
5274
  };
5341
5275
  const onFormClose = ()=>{
5342
5276
  const closeTime = Date.now();
5343
- sendEvent?.(enum_EventNames.LOOP_FORM_CLOSE, {
5277
+ sendEvent?.("loop_form_close", {
5344
5278
  form_id: formIdRef.current,
5345
5279
  session_id: sessionIdRef.current,
5346
5280
  form_no_operation: noOperation.current,
@@ -5383,7 +5317,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
5383
5317
  useEffect(()=>{
5384
5318
  if (sessionID && formID) {
5385
5319
  const initTime = Date.now();
5386
- sendEvent?.(enum_EventNames.INIT_LOOP_FORM, {
5320
+ sendEvent?.("init_loop_form", {
5387
5321
  form_id: formID,
5388
5322
  session_id: sessionID,
5389
5323
  time: initTime,
@@ -5394,7 +5328,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
5394
5328
  if (formID && sessionID && !flushedRef.current) {
5395
5329
  flushedRef.current = true;
5396
5330
  try {
5397
- sendEvent?.(enum_EventNames.LOOP_FORM_FIELD_CHANGE_TIMELINE, {
5331
+ sendEvent?.("loop_form_field_change_timeline", {
5398
5332
  form_id: formID,
5399
5333
  session_id: sessionID,
5400
5334
  time_line: JSON.stringify(operationTimelineRef.current)
@@ -5418,7 +5352,7 @@ const SentinelFormInner = ({ formID, children, onValueChange, onSubmit, getFormA
5418
5352
  if (!fid || !sid) return;
5419
5353
  flushedRef.current = true;
5420
5354
  try {
5421
- sendEvent?.(enum_EventNames.LOOP_FORM_FIELD_CHANGE_TIMELINE, {
5355
+ sendEvent?.("loop_form_field_change_timeline", {
5422
5356
  form_id: fid,
5423
5357
  session_id: sid,
5424
5358
  time_line: JSON.stringify(operationTimelineRef.current)
@@ -5905,7 +5839,7 @@ const CodeMirrorJsonEditor = /*#__PURE__*/ react.forwardRef((props, ref)=>{
5905
5839
  theme: isDarkTheme ? 'coze-dark' : 'coze-light',
5906
5840
  languageId: 'json',
5907
5841
  editable: !readonly,
5908
- transformer,
5842
+ transformer: transformer,
5909
5843
  minHeight,
5910
5844
  maxHeight,
5911
5845
  editorHeight,
@@ -6144,252 +6078,12 @@ const CollapseItem = ({ children, open: defaultOpen, title, className })=>{
6144
6078
  ]
6145
6079
  });
6146
6080
  };
6147
- const audio_icon = __rslib_svgr_url__1__;
6148
- function AudioRender({ audioUrl, audioName, className, showDownload, deletion, upload, size = 'small' }) {
6149
- const [modalVisible, setModalVisible] = useState(false);
6150
- const iconSizeCls = 'small' === size ? 'text-[14px]' : 'text-[20px]';
6151
- return /*#__PURE__*/ jsxs("div", {
6152
- className: "flex flex-col",
6153
- onClick: (e)=>{
6154
- e.stopPropagation();
6155
- },
6156
- children: [
6157
- /*#__PURE__*/ jsxs("div", {
6158
- className: classnames('inline-block relative group', 'small' === size ? 'w-[36px] h-[36px]' : 'w-[80px] h-[80px]', className),
6159
- children: [
6160
- upload?.status === 'error' ? /*#__PURE__*/ jsx("div", {
6161
- className: classnames('w-full h-full flex items-center justify-center rounded-[6px] coz-mg-primary', 'border border-solid coz-stroke-hglt-red'),
6162
- children: /*#__PURE__*/ jsx(IconCozImageBroken, {
6163
- className: "text-[20px] coz-fg-dim"
6164
- })
6165
- }) : /*#__PURE__*/ jsx(Spin, {
6166
- spinning: upload?.status === 'loading',
6167
- wrapperClassName: "!w-full !h-full [&_.semi-spin-children]:w-full [&_.semi-spin-children]:h-full",
6168
- children: /*#__PURE__*/ jsx("img", {
6169
- src: audio_icon,
6170
- alt: audioName,
6171
- width: '100%',
6172
- height: '100%',
6173
- style: {
6174
- objectFit: 'cover',
6175
- objectPosition: 'center'
6176
- }
6177
- })
6178
- }),
6179
- /*#__PURE__*/ jsxs("div", {
6180
- className: classnames('absolute inset-0 rounded-[6px] flex gap-3 items-center justify-center', 'z-[1]', 'bg-[rgba(0,0,0,0.4)]', 'invisible group-hover:visible'),
6181
- children: [
6182
- upload?.status === 'error' ? /*#__PURE__*/ jsx(IconCozRefresh, {
6183
- className: classnames('text-white cursor-pointer', iconSizeCls),
6184
- onClick: upload?.onRetry
6185
- }) : null,
6186
- audioUrl && ![
6187
- 'error',
6188
- 'loading'
6189
- ].includes(upload?.status || 'success') ? /*#__PURE__*/ jsx(IconCozPlayCircle, {
6190
- className: classnames('text-white cursor-pointer', iconSizeCls),
6191
- onClick: ()=>setModalVisible(true)
6192
- }) : null,
6193
- showDownload ? /*#__PURE__*/ jsx(IconCozDownload, {
6194
- className: classnames('text-white cursor-pointer', iconSizeCls),
6195
- onClick: ()=>{
6196
- if (audioUrl) fileDownload(audioUrl, audioName || i18n_I18n.t('test'));
6197
- }
6198
- }) : null,
6199
- isFunction(deletion) ? /*#__PURE__*/ jsx("div", {
6200
- className: "absolute right-[-8px] top-[-8px] p-[2px] shrink-0 inline-flex justify-center items-center cursor-pointer",
6201
- onClick: ()=>deletion(),
6202
- children: /*#__PURE__*/ jsx(IconCozCrossCircleFillPalette, {})
6203
- }) : null
6204
- ]
6205
- })
6206
- ]
6207
- }),
6208
- /*#__PURE__*/ jsx(Modal, {
6209
- visible: modalVisible,
6210
- closable: false,
6211
- title: /*#__PURE__*/ jsxs("div", {
6212
- className: "w-full flex items-center justify-between",
6213
- children: [
6214
- /*#__PURE__*/ jsx(Typography.Title, {
6215
- heading: 5,
6216
- ellipsis: {
6217
- showTooltip: true
6218
- },
6219
- children: audioName || i18n_I18n.t('audio')
6220
- }),
6221
- /*#__PURE__*/ jsxs("div", {
6222
- className: "flex items-center gap-2",
6223
- children: [
6224
- /*#__PURE__*/ jsx(LoadingButton, {
6225
- color: "primary",
6226
- icon: /*#__PURE__*/ jsx(IconCozDownload, {}),
6227
- onClick: async ()=>{
6228
- if (audioUrl) await fileDownload(audioUrl, audioName || i18n_I18n.t('test'));
6229
- },
6230
- children: i18n_I18n.t('download')
6231
- }),
6232
- /*#__PURE__*/ jsx(IconButton, {
6233
- size: "large",
6234
- color: "secondary",
6235
- className: "!w-[40px] !h-[40px]",
6236
- icon: /*#__PURE__*/ jsx(IconCozCross, {}),
6237
- onClick: ()=>setModalVisible(false)
6238
- })
6239
- ]
6240
- })
6241
- ]
6242
- }),
6243
- width: 800,
6244
- onCancel: ()=>setModalVisible(false),
6245
- children: /*#__PURE__*/ jsx(AudioPlayer, {
6246
- autoPlay: false,
6247
- audioUrl: audioUrl,
6248
- theme: "light",
6249
- skipDuration: 180,
6250
- className: classnames('rounded-[8px]', '[&_.semi-audio-player-control>span:not(:first-child)]:hidden', '[&_.semi-audio-player-control_button]:!coz-stroke-primary', '[&_.semi-audio-player-slider-progress]:bg-[--coz-fg-hglt]')
6251
- })
6252
- })
6253
- ]
6254
- });
6255
- }
6256
- const video_icon = __rslib_svgr_url__2__;
6257
- function VideoRender({ videoName, videoUrl, showDownload, deletion, upload, size = 'small', className }) {
6258
- const [modalVisible, setModalVisible] = useState(false);
6259
- const [videoElementStatus, setVideoElementStatus] = useState('loading');
6260
- const iconSizeCls = 'small' === size ? 'text-[14px]' : 'text-[20px]';
6261
- return /*#__PURE__*/ jsxs("div", {
6262
- className: "flex flex-col",
6263
- onClick: (e)=>{
6264
- e.stopPropagation();
6265
- },
6266
- children: [
6267
- /*#__PURE__*/ jsxs("div", {
6268
- className: classnames('inline-block relative group', 'small' === size ? 'w-[36px] h-[36px]' : 'w-[80px] h-[80px]', className),
6269
- children: [
6270
- 'loading' === videoElementStatus || upload?.status === 'loading' ? /*#__PURE__*/ jsx(Spin, {
6271
- spinning: true,
6272
- wrapperClassName: "absolute inset-0",
6273
- children: /*#__PURE__*/ jsx("img", {
6274
- src: video_icon,
6275
- className: "w-full h-full object-cover"
6276
- })
6277
- }) : null,
6278
- 'error' === videoElementStatus || upload?.status === 'error' ? /*#__PURE__*/ jsx("div", {
6279
- className: classnames('absolute inset-0 rounded-[6px] flex items-center justify-center coz-mg-primary', {
6280
- 'border border-solid coz-stroke-hglt-red': upload?.status === 'error'
6281
- }),
6282
- children: /*#__PURE__*/ jsx(IconCozImageBroken, {
6283
- className: classnames('text-[30px] coz-fg-dim')
6284
- })
6285
- }) : null,
6286
- /*#__PURE__*/ jsx("video", {
6287
- src: videoUrl,
6288
- width: '100%',
6289
- height: '100%',
6290
- className: classnames('rounded-[6px] pointer-events-none', {
6291
- invisible: 'loaded' !== videoElementStatus || [
6292
- 'error',
6293
- 'loading'
6294
- ].includes(upload?.status || 'success')
6295
- }),
6296
- style: {
6297
- objectFit: 'cover',
6298
- objectPosition: 'center'
6299
- },
6300
- onLoadedData: ()=>setVideoElementStatus('loaded'),
6301
- onError: ()=>setVideoElementStatus('error')
6302
- }),
6303
- /*#__PURE__*/ jsx("div", {
6304
- className: classnames('absolute inset-0 flex items-center justify-center rounded-[6px]', 'bg-[rgba(0,0,0,0.2)]', 'group-hover:invisible', 'loaded' !== videoElementStatus || [
6305
- 'error',
6306
- 'loading'
6307
- ].includes(upload?.status || 'success') ? 'invisible' : 'visible'),
6308
- children: /*#__PURE__*/ jsx(IconCozPlayCircle, {
6309
- className: classnames('coz-fg-hglt-plus', iconSizeCls)
6310
- })
6311
- }),
6312
- /*#__PURE__*/ jsxs("div", {
6313
- className: classnames('absolute inset-0 flex gap-3 items-center rounded-[6px] justify-center', 'z-[1]', 'bg-[rgba(0,0,0,0.4)]', 'invisible group-hover:visible'),
6314
- children: [
6315
- upload?.status === 'error' ? /*#__PURE__*/ jsx(IconCozRefresh, {
6316
- className: classnames('text-white cursor-pointer', iconSizeCls),
6317
- onClick: upload?.onRetry
6318
- }) : null,
6319
- videoUrl && ![
6320
- 'error',
6321
- 'loading'
6322
- ].includes(upload?.status || 'success') ? /*#__PURE__*/ jsx(IconCozPlayCircle, {
6323
- className: classnames('text-white cursor-pointer', iconSizeCls),
6324
- onClick: ()=>setModalVisible(true)
6325
- }) : null,
6326
- showDownload ? /*#__PURE__*/ jsx(IconCozDownload, {
6327
- className: classnames('text-white cursor-pointer', iconSizeCls),
6328
- onClick: ()=>{
6329
- if (videoUrl) fileDownload(videoUrl, videoName || i18n_I18n.t('test'));
6330
- }
6331
- }) : null,
6332
- isFunction(deletion) ? /*#__PURE__*/ jsx("div", {
6333
- className: "absolute right-[-8px] top-[-8px] p-[2px] shrink-0 inline-flex justify-center items-center cursor-pointer",
6334
- onClick: ()=>deletion(),
6335
- children: /*#__PURE__*/ jsx(IconCozCrossCircleFillPalette, {})
6336
- }) : null
6337
- ]
6338
- })
6339
- ]
6340
- }),
6341
- /*#__PURE__*/ jsx(Modal, {
6342
- visible: modalVisible,
6343
- closable: false,
6344
- className: "[&_div:has(>.semi-videoPlayer)]:overflow-hidden",
6345
- title: /*#__PURE__*/ jsxs("div", {
6346
- className: "w-full flex items-center justify-between",
6347
- children: [
6348
- /*#__PURE__*/ jsx(Typography.Title, {
6349
- heading: 5,
6350
- ellipsis: {
6351
- showTooltip: true
6352
- },
6353
- children: videoName || i18n_I18n.t('video')
6354
- }),
6355
- /*#__PURE__*/ jsxs("div", {
6356
- className: "flex items-center gap-2",
6357
- children: [
6358
- /*#__PURE__*/ jsx(LoadingButton, {
6359
- color: "primary",
6360
- icon: /*#__PURE__*/ jsx(IconCozDownload, {}),
6361
- onClick: async ()=>{
6362
- if (videoUrl) await fileDownload(videoUrl, videoName || i18n_I18n.t('test'));
6363
- },
6364
- children: i18n_I18n.t('download')
6365
- }),
6366
- /*#__PURE__*/ jsx(IconButton, {
6367
- size: "large",
6368
- color: "secondary",
6369
- className: "!w-[40px] !h-[40px]",
6370
- icon: /*#__PURE__*/ jsx(IconCozCross, {}),
6371
- onClick: ()=>setModalVisible(false)
6372
- })
6373
- ]
6374
- })
6375
- ]
6376
- }),
6377
- width: 900,
6378
- height: 600,
6379
- onCancel: ()=>setModalVisible(false),
6380
- children: /*#__PURE__*/ jsx(VideoPlayer, {
6381
- className: "rounded-[8px] overflow-hidden",
6382
- src: videoUrl || '',
6383
- controlsList: [
6384
- 'play',
6385
- 'time',
6386
- 'volume',
6387
- 'playbackRate',
6388
- 'fullscreen'
6389
- ]
6390
- })
6391
- })
6392
- ]
6393
- });
6081
+ function src_useReportEvent() {
6082
+ return (name, params)=>{
6083
+ console.info(name, params);
6084
+ };
6394
6085
  }
6395
- export { AudioRender, base_search_form_select as BaseSearchFormSelect, base_search_select as BaseSearchSelect, BasicCard, CardPane, ChipSelect, _monaco_editor_react as CodeEditor, CodeEditorWithLoading, CodeMirrorCodeEditor, CodeMirrorJsonEditor, CodeMirrorRawCodeEditor, CodeMirrorRawTextEditor, CodeMirrorTextEditor, CollapseCard, CollapseItem, ColumnSelector, Copyable, CozeLoopProvider, DEFAULT_FILE_COUNT, DEFAULT_FILE_SIZE, DEFAULT_PAGE_SIZE, DEFAULT_PART_COUNT, DEFAULT_SUPPORTED_FORMATS, DEFAULT_VIDEO_SUPPORTED_FORMATS, DiffEditor, EditIconButton, EditorProvider, FooterActions, FullPage, IDRender, IconButtonContainer, ImageItemRenderer, IndexControllerView, InfiniteScrollTable, InfoTooltip, InputSlider, InputWithCount, JumpIconButton, LargeTxtRender, Layout, LazyLoadComponent, LogicEditor, LogicExpr, LoopRadioGroup, LoopTable, LoopTabs, MultiPartRender, MultipartEditor, type_ImageStatus as MultipartRenderStatus, OpenDetailButton, PAGE_SIZE_OPTIONS, PageError, PageLoading, PageNoAuth, PageNoContent, PageNotFound, PrimaryPage, PrimaryTitle, RadioButton, ResizableSideSheet, ResizeSidesheet, SchemaEditor, SemiSchemaForm, SentinelForm, StepNav, TableBatchOperate, TableColActions, TableColsConfig, TableEmpty, TableHeader, TableWithPagination, TableWithoutPagination, TextAreaPro, TextWithCopy, TitleWithSub, TooltipWhenDisabled, TooltipWithDisabled, UploadButton, UserProfile, VersionItem, VersionList, VersionSwitchPanel, VideoItemRenderer, VideoRender, dealColumnsWithStorage, formateDecimalPlacesString, getColumnManageStorage, getStoragePageSize, handleCopy, validator_ajv8 as schemaValidators, setColumnsManageStorage, sleep, upload_uploadFile as uploadFile, useBatchOperate, useItemIndexController, useReportEvent, useUnsaveLeaveWarning };
6086
+ var src_DEFAULT_FILE_COUNT = 20;
6087
+ var src_DEFAULT_PART_COUNT = 50;
6088
+ export { default as schemaValidators } from "@rjsf/validator-ajv8";
6089
+ export { BasicCard, CardPane, ChipSelect, CodeEditorWithLoading, CodeMirrorCodeEditor, CodeMirrorJsonEditor, CodeMirrorRawCodeEditor, CodeMirrorRawTextEditor, CodeMirrorTextEditor, CollapseCard, CollapseItem, ColumnSelector, Copyable, DEFAULT_FILE_SIZE, DEFAULT_PAGE_SIZE, DEFAULT_SUPPORTED_FORMATS, DEFAULT_VIDEO_SUPPORTED_FORMATS, DiffEditor, EditIconButton, EditorProvider, FooterActions, FullPage, IDRender, IconButtonContainer, ImageItemRenderer, IndexControllerView, InfiniteScrollTable, InfoTooltip, InputSlider, InputWithCount, JumpIconButton, LargeTxtRender, Layout, LazyLoadComponent, LogicEditor, LogicExpr, LoopRadioGroup, LoopTable, LoopTabs, MultiPartRender, MultipartEditor, OpenDetailButton, PAGE_SIZE_OPTIONS, PageError, PageLoading, PageNoAuth, PageNoContent, PageNotFound, PrimaryPage, PrimaryTitle, RadioButton, ResizableSideSheet, ResizeSidesheet, SchemaEditor, SemiSchemaForm, SentinelForm, StepNav, TableBatchOperate, TableColActions, TableColsConfig, TableEmpty, TableHeader, TableWithPagination, TableWithoutPagination, TextAreaPro, TextWithCopy, TitleWithSub, TooltipWhenDisabled, TooltipWithDisabled, UploadButton, UserProfile, VersionItem, VersionList, VersionSwitchPanel, VideoItemRenderer, _monaco_editor_react as CodeEditor, base_search_form_select as BaseSearchFormSelect, base_search_select as BaseSearchSelect, dealColumnsWithStorage, formateDecimalPlacesString, getColumnManageStorage, getStoragePageSize, handleCopy, setColumnsManageStorage, sleep, src_DEFAULT_FILE_COUNT as DEFAULT_FILE_COUNT, src_DEFAULT_PART_COUNT as DEFAULT_PART_COUNT, src_useReportEvent as useReportEvent, type_ImageStatus as MultipartRenderStatus, upload_uploadFile as uploadFile, useBatchOperate, useItemIndexController, useUnsaveLeaveWarning };
@@ -1,2 +1,3 @@
1
1
  import "./index.css";
2
+ import "@arco-iconbox/react-cozeloop-icons";
2
3
  export * from "@arco-iconbox/react-cozeloop-icons";
@@ -0,0 +1,40 @@
1
+ import "./index.css";
2
+ var __webpack_modules__ = {};
3
+ var __webpack_module_cache__ = {};
4
+ function __webpack_require__(moduleId) {
5
+ var cachedModule = __webpack_module_cache__[moduleId];
6
+ if (void 0 !== cachedModule) return cachedModule.exports;
7
+ var module = __webpack_module_cache__[moduleId] = {
8
+ exports: {}
9
+ };
10
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
11
+ return module.exports;
12
+ }
13
+ __webpack_require__.m = __webpack_modules__;
14
+ (()=>{
15
+ __webpack_require__.add = function(modules) {
16
+ Object.assign(__webpack_require__.m, modules);
17
+ };
18
+ })();
19
+ (()=>{
20
+ __webpack_require__.d = (exports, definition)=>{
21
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: definition[key]
24
+ });
25
+ };
26
+ })();
27
+ (()=>{
28
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
29
+ })();
30
+ (()=>{
31
+ __webpack_require__.r = (exports)=>{
32
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
33
+ value: 'Module'
34
+ });
35
+ Object.defineProperty(exports, '__esModule', {
36
+ value: true
37
+ });
38
+ };
39
+ })();
40
+ export { __webpack_require__ };
@@ -58,7 +58,6 @@ export { InputWithCount } from './input-with-count';
58
58
  export { LoopRadioGroup } from './loop-radio-group';
59
59
  export { Layout } from './layout';
60
60
  export { TitleWithSub } from './title-with-sub';
61
- export { CozeLoopProvider, useReportEvent } from './provider';
62
61
  export { FooterActions } from './footer-actions';
63
62
  export { TableEmpty } from './table-empty';
64
63
  export { CardPane } from './card-pane';
@@ -69,4 +68,4 @@ export { CodeMirrorCodeEditor, CodeMirrorTextEditor, CodeMirrorJsonEditor, CodeM
69
68
  export { SchemaEditor } from './schema-editor';
70
69
  export { CodeEditorWithLoading } from './code-editor-with-loading';
71
70
  export { CollapseItem } from './collapse-item';
72
- export { AudioRender, type AudioRenderProps, VideoRender, type VideoRenderProps, } from './multi-modal-dataset-item-render';
71
+ export declare function useReportEvent(): (name: string, params: Record<string, unknown>) => void;
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  interface PrimaryPageHeaderProps {
3
3
  pageTitle?: ReactNode;
4
+ renderCustomHeader?: ReactNode;
4
5
  filterSlot?: ReactNode;
5
6
  children?: ReactNode;
6
7
  headerClassName?: string;
@@ -9,5 +10,5 @@ interface PrimaryPageHeaderProps {
9
10
  className?: string;
10
11
  titleSlot?: ReactNode;
11
12
  }
12
- export declare const PrimaryPage: ({ pageTitle, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, ...restProps }: PrimaryPageHeaderProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const PrimaryPage: ({ pageTitle, renderCustomHeader, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, ...restProps }: PrimaryPageHeaderProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cozeloop/components",
3
- "version": "0.0.11",
3
+ "version": "0.0.12-beta-1770714934822",
4
4
  "description": "common components for cozeloop",
5
5
  "author": "houtao.zzj@bytedance.com",
6
6
  "exports": {
@@ -32,11 +32,12 @@
32
32
  "@codemirror/lang-go": "^6.0.1",
33
33
  "@codemirror/state": "^6.4.1",
34
34
  "@codemirror/view": "^6.34.1",
35
- "@coze-arch/coze-design": "0.0.7-alpha.985c0d",
35
+ "@coze-arch/coze-design": "0.0.7-alpha.5f0418",
36
36
  "@coze-editor/editor": "0.1.0-alpha.577152",
37
- "@cozeloop/api-schema": "0.1.5",
37
+ "@cozeloop/api-schema": "0.1.6",
38
+ "@cozeloop/config-provider": "0.0.12-beta-1770714934822",
38
39
  "@cozeloop/hooks": "0.0.1",
39
- "@cozeloop/i18n": "0.0.3",
40
+ "@cozeloop/i18n": "0.0.12-beta-1770714934822",
40
41
  "@cozeloop/toolkit": "0.0.5",
41
42
  "@monaco-editor/react": "^4.5.2",
42
43
  "@rjsf/core": "~5.24.9",
@@ -1,6 +0,0 @@
1
- <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="36" height="36" rx="4" fill="#5768A1" fill-opacity="0.08"/>
3
- <path d="M8 9.2C8 8.07989 8 7.51984 8.21799 7.09202C8.40973 6.71569 8.71569 6.40973 9.09202 6.21799C9.51984 6 10.0799 6 11.2 6H20.0079C20.497 6 20.7416 6 20.9718 6.05526C21.1759 6.10425 21.3709 6.18506 21.5499 6.29472C21.7517 6.4184 21.9247 6.59135 22.2706 6.93726L27.0627 11.7294C27.4087 12.0753 27.5816 12.2483 27.7053 12.4501C27.8149 12.629 27.8957 12.8241 27.9447 13.0282C28 13.2584 28 13.503 28 13.9921V26.8C28 27.9201 28 28.4801 27.782 28.908C27.5903 29.2843 27.2843 29.5903 26.908 29.782C26.4801 30 25.9201 30 24.8 30H11.2C10.0799 30 9.51984 30 9.09202 29.782C8.71569 29.5903 8.40973 29.2843 8.21799 28.908C8 28.4801 8 27.9201 8 26.8V9.2Z" fill="#00BF40"/>
4
- <path d="M21.3334 6.77291C21.3334 6.53058 21.3334 6.40942 21.3813 6.35331C21.4228 6.30463 21.4852 6.2788 21.549 6.28382C21.6226 6.28961 21.7083 6.37528 21.8796 6.54664L27.4538 12.1208C27.6251 12.2921 27.7108 12.3778 27.7166 12.4513C27.7216 12.5152 27.6958 12.5775 27.6471 12.6191C27.591 12.667 27.4698 12.667 27.2275 12.667H24.5334C23.4132 12.667 22.8532 12.667 22.4254 12.449C22.049 12.2573 21.7431 11.9513 21.5514 11.575C21.3334 11.1472 21.3334 10.5871 21.3334 9.46703V6.77291Z" fill="white" fill-opacity="0.3"/>
5
- <path d="M16.0556 25.5C15.4445 25.5 14.9213 25.2824 14.4862 24.8472C14.051 24.4121 13.8334 23.8889 13.8334 23.2778C13.8334 22.6667 14.051 22.1435 14.4862 21.7083C14.9213 21.2731 15.4445 21.0555 16.0556 21.0555C16.2686 21.0555 16.4653 21.081 16.6459 21.1319C16.8264 21.1829 17 21.2593 17.1667 21.3611V16.3333C17.1667 15.8731 17.5398 15.5 18 15.5H21.3334V17.1667H18.6945C18.4644 17.1667 18.2778 17.3532 18.2778 17.5833V23.2778C18.2778 23.8889 18.0602 24.4121 17.625 24.8472C17.1898 25.2824 16.6667 25.5 16.0556 25.5Z" fill="white"/>
6
- </svg>
@@ -1,6 +0,0 @@
1
- <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="36" height="36" rx="4" fill="#5768A1" fill-opacity="0.08"/>
3
- <path d="M8 9.2C8 8.07989 8 7.51984 8.21799 7.09202C8.40973 6.71569 8.71569 6.40973 9.09202 6.21799C9.51984 6 10.0799 6 11.2 6H20.0079C20.497 6 20.7416 6 20.9718 6.05526C21.1759 6.10425 21.3709 6.18506 21.5499 6.29472C21.7517 6.4184 21.9247 6.59135 22.2706 6.93726L27.0627 11.7294C27.4087 12.0753 27.5816 12.2483 27.7053 12.4501C27.8149 12.629 27.8957 12.8241 27.9447 13.0282C28 13.2584 28 13.503 28 13.9921V26.8C28 27.9201 28 28.4801 27.782 28.908C27.5903 29.2843 27.2843 29.5903 26.908 29.782C26.4801 30 25.9201 30 24.8 30H11.2C10.0799 30 9.51984 30 9.09202 29.782C8.71569 29.5903 8.40973 29.2843 8.21799 28.908C8 28.4801 8 27.9201 8 26.8V9.2Z" fill="#4080FF"/>
4
- <path d="M21.3334 6.77291C21.3334 6.53058 21.3334 6.40942 21.3813 6.35331C21.4228 6.30463 21.4852 6.2788 21.549 6.28382C21.6226 6.28961 21.7083 6.37528 21.8796 6.54664L27.4538 12.1208C27.6251 12.2921 27.7108 12.3778 27.7166 12.4513C27.7216 12.5152 27.6958 12.5775 27.6471 12.6191C27.591 12.667 27.4698 12.667 27.2275 12.667H24.5334C23.4132 12.667 22.8532 12.667 22.4254 12.449C22.049 12.2573 21.7431 11.9513 21.5514 11.575C21.3334 11.1472 21.3334 10.5871 21.3334 9.46703V6.77291Z" fill="white" fill-opacity="0.3"/>
5
- <path d="M12.4447 16.6107C12.4447 16.1504 12.8178 15.7773 13.278 15.7773H19.1114C19.5716 15.7773 19.9447 16.1504 19.9447 16.6107V17.6003L21.2028 16.8925C21.7583 16.5801 22.4447 16.9815 22.4447 17.6189V21.4358C22.4447 22.0731 21.7583 22.4746 21.2028 22.1621L19.9447 21.4544V22.444C19.9447 22.9042 19.5716 23.2773 19.1114 23.2773H13.278C12.8178 23.2773 12.4447 22.9042 12.4447 22.444V16.6107ZM14.9447 19.1107C15.4049 19.1107 15.778 18.7375 15.778 18.2773C15.778 17.8171 15.4049 17.444 14.9447 17.444C14.4844 17.444 14.1114 17.8171 14.1114 18.2773C14.1114 18.7375 14.4844 19.1107 14.9447 19.1107Z" fill="white"/>
6
- </svg>
@@ -1,35 +0,0 @@
1
- export interface AudioRenderProps {
2
- audioUrl?: string;
3
- audioName?: string;
4
- showDownload?: boolean;
5
- /**
6
- * 删除按钮 复合参数
7
- *
8
- * - 若不展示删除按钮,则传 false | undefined
9
- * - 若展示删除按钮,则直接传回调函数
10
- *
11
- * (不叫 delete 是为了避讳 js 关键字)
12
- */
13
- deletion?: false | (() => void);
14
- /**
15
- * 上传态 展示配置
16
- *
17
- * 只有在可编辑表单中需要考虑
18
- */
19
- upload?: {
20
- /**
21
- * loading - 展示 loading 态
22
- * error - 展示 retry 按钮
23
- */
24
- status: 'success' | 'error' | 'loading';
25
- onRetry?: () => void;
26
- };
27
- /**
28
- * @enum 'small' - 整体宽高 36px;icon 宽高 14px
29
- * @enum 'medium' - 整体宽高 80px;icon 宽高 20px
30
- * @default 'small'
31
- */
32
- size?: 'small' | 'medium';
33
- className?: string;
34
- }
35
- export declare function AudioRender({ audioUrl, audioName, className, showDownload, deletion, upload, size, }: AudioRenderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- export { AudioRender, type AudioRenderProps } from './audio-render';
2
- export { VideoRender, type VideoRenderProps } from './video-render';
@@ -1,35 +0,0 @@
1
- export interface VideoRenderProps {
2
- videoName?: string;
3
- videoUrl?: string;
4
- showDownload?: boolean;
5
- /**
6
- * 删除按钮 复合参数
7
- *
8
- * - 若不展示删除按钮,则传 false | undefined
9
- * - 若展示删除按钮,则直接传回调函数
10
- *
11
- * (不叫 delete 是为了避讳 js 关键字)
12
- */
13
- deletion?: false | (() => void);
14
- /**
15
- * 上传态 展示配置
16
- *
17
- * 只有在可编辑表单中需要考虑
18
- */
19
- upload?: {
20
- /**
21
- * loading - 展示 loading 态
22
- * error - 展示 retry 按钮
23
- */
24
- status: 'success' | 'error' | 'loading';
25
- onRetry?: () => void;
26
- };
27
- /**
28
- * @enum 'small' - 整体宽高 36px;icon 宽高 14px
29
- * @enum 'medium' - 整体宽高 80px;icon 宽高 20px
30
- * @default 'small'
31
- */
32
- size?: 'small' | 'medium';
33
- className?: string;
34
- }
35
- export declare function VideoRender({ videoName, videoUrl, showDownload, deletion, upload, size, className, }: VideoRenderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- interface CozeLoopContextValue {
3
- resources?: {
4
- 'zh-CN': {
5
- translation: Record<string, string>;
6
- };
7
- 'en-US': {
8
- translation: Record<string, string>;
9
- };
10
- };
11
- defaultLanguage?: string;
12
- sendEvent?: (name: string, params: Record<string, unknown>, target?: HTMLElement | string | null) => void;
13
- }
14
- interface CozeLoopProviderProps extends CozeLoopContextValue {
15
- children: ReactNode;
16
- }
17
- export declare function CozeLoopProvider({ children, defaultLanguage, resources, sendEvent, }: CozeLoopProviderProps): import("react/jsx-runtime").JSX.Element;
18
- export declare function useReportEvent(): (name: string, params: Record<string, unknown>, target?: HTMLElement | string | null) => void;
19
- export {};