@lobehub/ui 5.54.0 → 5.56.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.
Files changed (116) hide show
  1. package/es/EditableText/ControlInput.mjs +2 -2
  2. package/es/EditableText/ControlInput.mjs.map +1 -1
  3. package/es/Image/index.d.mts +2 -1
  4. package/es/Image/index.mjs +2 -1
  5. package/es/Image/index.mjs.map +1 -1
  6. package/es/Image/useImagePreview.d.mts +11 -0
  7. package/es/Image/useImagePreview.mjs +32 -0
  8. package/es/Image/useImagePreview.mjs.map +1 -0
  9. package/es/Image/viewer/registry.d.mts +1 -1
  10. package/es/SearchBar/SearchBar.mjs +2 -2
  11. package/es/SearchBar/SearchBar.mjs.map +1 -1
  12. package/es/base-ui/Checkbox/Checkbox.d.mts +6 -2
  13. package/es/base-ui/Checkbox/Checkbox.mjs +2 -1
  14. package/es/base-ui/Checkbox/Checkbox.mjs.map +1 -1
  15. package/es/base-ui/Checkbox/CheckboxGroup.mjs +2 -2
  16. package/es/base-ui/Checkbox/CheckboxGroup.mjs.map +1 -1
  17. package/es/base-ui/Checkbox/index.d.mts +2 -2
  18. package/es/base-ui/ColorPicker/ColorPicker.mjs +4 -4
  19. package/es/base-ui/ColorPicker/ColorPicker.mjs.map +1 -1
  20. package/es/base-ui/DatePicker/style.mjs +1 -0
  21. package/es/base-ui/DatePicker/style.mjs.map +1 -1
  22. package/es/base-ui/Form/components/FormGroup.mjs +13 -5
  23. package/es/base-ui/Form/components/FormGroup.mjs.map +1 -1
  24. package/es/base-ui/Form/index.d.mts +3 -0
  25. package/es/base-ui/Form/index.mjs +3 -0
  26. package/es/base-ui/Form/index.mjs.map +1 -1
  27. package/es/base-ui/Form/style.mjs +32 -6
  28. package/es/base-ui/Form/style.mjs.map +1 -1
  29. package/es/base-ui/FormKit/Field.d.mts +9 -0
  30. package/es/base-ui/FormKit/Field.mjs +167 -0
  31. package/es/base-ui/FormKit/Field.mjs.map +1 -0
  32. package/es/base-ui/FormKit/Form.mjs +96 -0
  33. package/es/base-ui/FormKit/Form.mjs.map +1 -0
  34. package/es/base-ui/FormKit/List.d.mts +34 -0
  35. package/es/base-ui/FormKit/List.mjs +102 -0
  36. package/es/base-ui/FormKit/List.mjs.map +1 -0
  37. package/es/base-ui/FormKit/SubmitFooter.d.mts +6 -0
  38. package/es/base-ui/FormKit/SubmitFooter.mjs +36 -0
  39. package/es/base-ui/FormKit/SubmitFooter.mjs.map +1 -0
  40. package/es/base-ui/FormKit/binding.mjs +23 -0
  41. package/es/base-ui/FormKit/binding.mjs.map +1 -0
  42. package/es/base-ui/FormKit/context.d.mts +7 -0
  43. package/es/base-ui/FormKit/context.mjs +14 -0
  44. package/es/base-ui/FormKit/context.mjs.map +1 -0
  45. package/es/base-ui/FormKit/engine/tanstack.mjs +293 -0
  46. package/es/base-ui/FormKit/engine/tanstack.mjs.map +1 -0
  47. package/es/base-ui/FormKit/engine/types.d.mts +6 -0
  48. package/es/base-ui/FormKit/index.d.mts +31 -0
  49. package/es/base-ui/FormKit/index.mjs +28 -0
  50. package/es/base-ui/FormKit/index.mjs.map +1 -0
  51. package/es/base-ui/FormKit/instance.mjs +67 -0
  52. package/es/base-ui/FormKit/instance.mjs.map +1 -0
  53. package/es/base-ui/FormKit/schema.d.mts +33 -0
  54. package/es/base-ui/FormKit/schema.mjs +23 -0
  55. package/es/base-ui/FormKit/schema.mjs.map +1 -0
  56. package/es/base-ui/FormKit/style.mjs +119 -0
  57. package/es/base-ui/FormKit/style.mjs.map +1 -0
  58. package/es/base-ui/FormKit/type.d.mts +122 -0
  59. package/es/base-ui/FormKit/useForm.d.mts +10 -0
  60. package/es/base-ui/FormKit/useForm.mjs +54 -0
  61. package/es/base-ui/FormKit/useForm.mjs.map +1 -0
  62. package/es/base-ui/FormKit/useStoreSelector.mjs +25 -0
  63. package/es/base-ui/FormKit/useStoreSelector.mjs.map +1 -0
  64. package/es/base-ui/FormKit/useWatch.d.mts +7 -0
  65. package/es/base-ui/FormKit/useWatch.mjs +12 -0
  66. package/es/base-ui/FormKit/useWatch.mjs.map +1 -0
  67. package/es/base-ui/Input/Input.d.mts +6 -2
  68. package/es/base-ui/Input/Input.mjs +2 -1
  69. package/es/base-ui/Input/Input.mjs.map +1 -1
  70. package/es/base-ui/Input/InputNumber.d.mts +6 -2
  71. package/es/base-ui/Input/InputNumber.mjs +13 -6
  72. package/es/base-ui/Input/InputNumber.mjs.map +1 -1
  73. package/es/base-ui/Input/InputPassword.d.mts +6 -2
  74. package/es/base-ui/Input/InputPassword.mjs +4 -3
  75. package/es/base-ui/Input/InputPassword.mjs.map +1 -1
  76. package/es/base-ui/Input/TextArea.d.mts +6 -2
  77. package/es/base-ui/Input/TextArea.mjs +2 -1
  78. package/es/base-ui/Input/TextArea.mjs.map +1 -1
  79. package/es/base-ui/Input/index.d.mts +5 -5
  80. package/es/base-ui/Input/style.d.mts +4 -1
  81. package/es/base-ui/Input/style.mjs +21 -8
  82. package/es/base-ui/Input/style.mjs.map +1 -1
  83. package/es/base-ui/Modal/Modal.mjs +4 -8
  84. package/es/base-ui/Modal/Modal.mjs.map +1 -1
  85. package/es/base-ui/Slider/SliderWithInput.mjs +2 -2
  86. package/es/base-ui/Slider/SliderWithInput.mjs.map +1 -1
  87. package/es/base-ui/Switch/Switch.mjs +2 -2
  88. package/es/base-ui/Switch/Switch.mjs.map +1 -1
  89. package/es/base-ui/Tree/TreeNode.mjs +2 -2
  90. package/es/base-ui/Tree/TreeNode.mjs.map +1 -1
  91. package/es/base-ui/index.d.mts +8 -8
  92. package/es/base-ui/index.mjs +6 -6
  93. package/es/chat/ChatInputArea/components/ChatInputAreaInner.mjs +2 -2
  94. package/es/chat/ChatInputArea/components/ChatInputAreaInner.mjs.map +1 -1
  95. package/es/chat/MessageInput/MessageInput.mjs +2 -2
  96. package/es/chat/MessageInput/MessageInput.mjs.map +1 -1
  97. package/es/chat/MessageModal/MessageModal.mjs +2 -2
  98. package/es/chat/MessageModal/MessageModal.mjs.map +1 -1
  99. package/es/eslint/index.d.mts +27 -3
  100. package/es/eslint/index.mjs +7 -2
  101. package/es/eslint/index.mjs.map +1 -1
  102. package/es/eslint/noInlineFormSchema.mjs +44 -0
  103. package/es/eslint/noInlineFormSchema.mjs.map +1 -0
  104. package/es/i18n/resources/en/form.d.mts +4 -0
  105. package/es/i18n/resources/en/form.mjs +4 -0
  106. package/es/i18n/resources/en/form.mjs.map +1 -1
  107. package/es/i18n/resources/zhCn/form.d.mts +4 -0
  108. package/es/i18n/resources/zhCn/form.mjs +4 -0
  109. package/es/i18n/resources/zhCn/form.mjs.map +1 -1
  110. package/es/index.d.mts +2 -1
  111. package/es/index.mjs +2 -1
  112. package/es/node_modules/.pnpm/@eslint_core@0.17.0/node_modules/@eslint/core/dist/esm/types.d.mts +1139 -0
  113. package/es/node_modules/.pnpm/@types_estree@1.0.9/node_modules/@types/estree/index.d.mts +528 -0
  114. package/es/node_modules/.pnpm/@types_json-schema@7.0.15/node_modules/@types/json-schema/index.d.mts +201 -0
  115. package/es/node_modules/.pnpm/eslint@9.39.5_jiti@2.6.1_supports-color@10.2.2/node_modules/eslint/lib/types/index.d.mts +962 -0
  116. package/package.json +6 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MessageInput.mjs","names":["Flexbox"],"sources":["../../../src/chat/MessageInput/MessageInput.tsx"],"sourcesContent":["'use client';\n\nimport { cx, useResponsive } from 'antd-style';\nimport { memo, useState } from 'react';\nimport { useHotkeys } from 'react-hotkeys-hook';\n\nimport Button from '@/base-ui/Button';\nimport { TextArea } from '@/base-ui/Input';\nimport CodeEditor from '@/CodeEditor';\nimport { Flexbox } from '@/Flex';\nimport { KeyMapEnum } from '@/Hotkey/const';\nimport { combineKeys } from '@/Hotkey/utils';\nimport Tooltip from '@/Tooltip';\n\nimport { styles } from './style';\nimport type { MessageInputProps } from './type';\n\nconst MessageInput = memo<MessageInputProps>(\n ({\n text,\n variant = 'borderless',\n onCancel,\n defaultValue,\n onConfirm,\n renderButtons,\n placeholder,\n styles: customStyles,\n style,\n editButtonSize = 'middle',\n classNames,\n shortcut,\n language = 'markdown',\n ...rest\n }) => {\n const { mobile } = useResponsive();\n const [temporaryValue, setValue] = useState<string>(defaultValue || '');\n const confirmHotkey = combineKeys([KeyMapEnum.Mod, KeyMapEnum.Enter]);\n const confirmText = text?.confirm || 'Confirm';\n const cancelHotkey = combineKeys([KeyMapEnum.Esc]);\n const cancelText = text?.cancel || 'Cancel';\n\n const handleConfirm = () => onConfirm?.(temporaryValue);\n const handleCancel = () => onCancel?.();\n\n useHotkeys(confirmHotkey, handleConfirm, {\n enableOnFormTags: true,\n enabled: shortcut,\n preventDefault: true,\n });\n\n const confirmButton = (\n <Button size={editButtonSize} type=\"primary\" onClick={handleConfirm}>\n {confirmText}\n </Button>\n );\n\n const cancllButton = (\n <Button size={editButtonSize} type={'fill'} onClick={handleCancel}>\n {text?.cancel || 'Cancel'}\n </Button>\n );\n\n return (\n <Flexbox gap={16} style={{ flex: 1, width: '100%', ...style }} {...rest}>\n {mobile ? (\n <TextArea\n autoSize\n className={cx(styles, classNames?.editor)}\n placeholder={placeholder}\n style={customStyles?.editor}\n value={temporaryValue}\n variant={variant}\n onBlur={(e) => setValue(e.target.value)}\n onChange={(e) => setValue(e.target.value)}\n />\n ) : (\n <CodeEditor\n className={cx(styles, classNames?.editor)}\n classNames={classNames}\n language={language}\n placeholder={placeholder}\n style={customStyles?.editor}\n styles={customStyles}\n value={temporaryValue}\n variant={variant}\n onBlur={(e) => setValue(e.target.value)}\n onValueChange={(e) => setValue(e)}\n />\n )}\n <Flexbox direction={'horizontal-reverse'} gap={8}>\n {renderButtons ? (\n renderButtons(temporaryValue).map((buttonProps, index) => (\n <Button key={index} size={editButtonSize} {...buttonProps} />\n ))\n ) : (\n <>\n {shortcut ? (\n <Tooltip hotkey={confirmHotkey} title={confirmText}>\n {confirmButton}\n </Tooltip>\n ) : (\n confirmButton\n )}\n {shortcut ? (\n <Tooltip hotkey={cancelHotkey} title={cancelText}>\n {cancllButton}\n </Tooltip>\n ) : (\n cancllButton\n )}\n </>\n )}\n </Flexbox>\n </Flexbox>\n );\n },\n);\n\nexport default MessageInput;\n"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAM,eAAe,MAClB,EACC,MACA,UAAU,cACV,UACA,cACA,WACA,eACA,aACA,QAAQ,cACR,OACA,iBAAiB,UACjB,YACA,UACA,WAAW,YACX,GAAG,WACC;CACJ,MAAM,EAAE,WAAW,cAAc;CACjC,MAAM,CAAC,gBAAgB,YAAY,SAAiB,gBAAgB,EAAE;CACtE,MAAM,gBAAgB,YAAY,CAAC,WAAW,KAAK,WAAW,KAAK,CAAC;CACpE,MAAM,cAAc,MAAM,WAAW;CACrC,MAAM,eAAe,YAAY,CAAC,WAAW,GAAG,CAAC;CACjD,MAAM,aAAa,MAAM,UAAU;CAEnC,MAAM,sBAAsB,YAAY,cAAc;CACtD,MAAM,qBAAqB,WAAW;CAEtC,WAAW,eAAe,eAAe;EACvC,kBAAkB;EAClB,SAAS;EACT,gBAAgB;CAClB,CAAC;CAED,MAAM,gBACJ,oBAAC,QAAD;EAAQ,MAAM;EAAgB,MAAK;EAAU,SAAS;EACnD,UAAA;CACK,CAAA;CAGV,MAAM,eACJ,oBAAC,QAAD;EAAQ,MAAM;EAAgB,MAAM;EAAQ,SAAS;EAClD,UAAA,MAAM,UAAU;CACX,CAAA;CAGV,OACE,qBAACA,mBAAD;EAAS,KAAK;EAAI,OAAO;GAAE,MAAM;GAAG,OAAO;GAAQ,GAAG;EAAM;EAAG,GAAI;EAAnE,UAAA,CACG,SACC,oBAAC,UAAD;GACE,UAAA;GACA,WAAW,GAAG,QAAQ,YAAY,MAAM;GAC3B;GACb,OAAO,cAAc;GACrB,OAAO;GACE;GACT,SAAS,MAAM,SAAS,EAAE,OAAO,KAAK;GACtC,WAAW,MAAM,SAAS,EAAE,OAAO,KAAK;EACzC,CAAA,IAED,oBAAC,YAAD;GACE,WAAW,GAAG,QAAQ,YAAY,MAAM;GAC5B;GACF;GACG;GACb,OAAO,cAAc;GACrB,QAAQ;GACR,OAAO;GACE;GACT,SAAS,MAAM,SAAS,EAAE,OAAO,KAAK;GACtC,gBAAgB,MAAM,SAAS,CAAC;EACjC,CAAA,GAEH,oBAACA,mBAAD;GAAS,WAAW;GAAsB,KAAK;GAC5C,UAAA,gBACC,cAAc,cAAc,CAAC,CAAC,KAAK,aAAa,UAC9C,oBAAC,QAAD;IAAoB,MAAM;IAAgB,GAAI;GAAc,GAA/C,KAA+C,CAC7D,IAED,qBAAA,YAAA,EAAA,UAAA,CACG,WACC,oBAAC,SAAD;IAAS,QAAQ;IAAe,OAAO;IACpC,UAAA;GACM,CAAA,IAET,eAED,WACC,oBAAC,SAAD;IAAS,QAAQ;IAAc,OAAO;IACnC,UAAA;GACM,CAAA,IAET,YAEF,EAAA,CAAA;EAEG,CAAA,CACF;;AAEb,CACF"}
1
+ {"version":3,"file":"MessageInput.mjs","names":["Flexbox","TextArea"],"sources":["../../../src/chat/MessageInput/MessageInput.tsx"],"sourcesContent":["'use client';\n\nimport { cx, useResponsive } from 'antd-style';\nimport { memo, useState } from 'react';\nimport { useHotkeys } from 'react-hotkeys-hook';\n\nimport Button from '@/base-ui/Button';\nimport { TextArea } from '@/base-ui/Input';\nimport CodeEditor from '@/CodeEditor';\nimport { Flexbox } from '@/Flex';\nimport { KeyMapEnum } from '@/Hotkey/const';\nimport { combineKeys } from '@/Hotkey/utils';\nimport Tooltip from '@/Tooltip';\n\nimport { styles } from './style';\nimport type { MessageInputProps } from './type';\n\nconst MessageInput = memo<MessageInputProps>(\n ({\n text,\n variant = 'borderless',\n onCancel,\n defaultValue,\n onConfirm,\n renderButtons,\n placeholder,\n styles: customStyles,\n style,\n editButtonSize = 'middle',\n classNames,\n shortcut,\n language = 'markdown',\n ...rest\n }) => {\n const { mobile } = useResponsive();\n const [temporaryValue, setValue] = useState<string>(defaultValue || '');\n const confirmHotkey = combineKeys([KeyMapEnum.Mod, KeyMapEnum.Enter]);\n const confirmText = text?.confirm || 'Confirm';\n const cancelHotkey = combineKeys([KeyMapEnum.Esc]);\n const cancelText = text?.cancel || 'Cancel';\n\n const handleConfirm = () => onConfirm?.(temporaryValue);\n const handleCancel = () => onCancel?.();\n\n useHotkeys(confirmHotkey, handleConfirm, {\n enableOnFormTags: true,\n enabled: shortcut,\n preventDefault: true,\n });\n\n const confirmButton = (\n <Button size={editButtonSize} type=\"primary\" onClick={handleConfirm}>\n {confirmText}\n </Button>\n );\n\n const cancllButton = (\n <Button size={editButtonSize} type={'fill'} onClick={handleCancel}>\n {text?.cancel || 'Cancel'}\n </Button>\n );\n\n return (\n <Flexbox gap={16} style={{ flex: 1, width: '100%', ...style }} {...rest}>\n {mobile ? (\n <TextArea\n autoSize\n className={cx(styles, classNames?.editor)}\n placeholder={placeholder}\n style={customStyles?.editor}\n value={temporaryValue}\n variant={variant}\n onBlur={(e) => setValue(e.target.value)}\n onChange={(e) => setValue(e.target.value)}\n />\n ) : (\n <CodeEditor\n className={cx(styles, classNames?.editor)}\n classNames={classNames}\n language={language}\n placeholder={placeholder}\n style={customStyles?.editor}\n styles={customStyles}\n value={temporaryValue}\n variant={variant}\n onBlur={(e) => setValue(e.target.value)}\n onValueChange={(e) => setValue(e)}\n />\n )}\n <Flexbox direction={'horizontal-reverse'} gap={8}>\n {renderButtons ? (\n renderButtons(temporaryValue).map((buttonProps, index) => (\n <Button key={index} size={editButtonSize} {...buttonProps} />\n ))\n ) : (\n <>\n {shortcut ? (\n <Tooltip hotkey={confirmHotkey} title={confirmText}>\n {confirmButton}\n </Tooltip>\n ) : (\n confirmButton\n )}\n {shortcut ? (\n <Tooltip hotkey={cancelHotkey} title={cancelText}>\n {cancllButton}\n </Tooltip>\n ) : (\n cancllButton\n )}\n </>\n )}\n </Flexbox>\n </Flexbox>\n );\n },\n);\n\nexport default MessageInput;\n"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAM,eAAe,MAClB,EACC,MACA,UAAU,cACV,UACA,cACA,WACA,eACA,aACA,QAAQ,cACR,OACA,iBAAiB,UACjB,YACA,UACA,WAAW,YACX,GAAG,WACC;CACJ,MAAM,EAAE,WAAW,cAAc;CACjC,MAAM,CAAC,gBAAgB,YAAY,SAAiB,gBAAgB,EAAE;CACtE,MAAM,gBAAgB,YAAY,CAAC,WAAW,KAAK,WAAW,KAAK,CAAC;CACpE,MAAM,cAAc,MAAM,WAAW;CACrC,MAAM,eAAe,YAAY,CAAC,WAAW,GAAG,CAAC;CACjD,MAAM,aAAa,MAAM,UAAU;CAEnC,MAAM,sBAAsB,YAAY,cAAc;CACtD,MAAM,qBAAqB,WAAW;CAEtC,WAAW,eAAe,eAAe;EACvC,kBAAkB;EAClB,SAAS;EACT,gBAAgB;CAClB,CAAC;CAED,MAAM,gBACJ,oBAAC,QAAD;EAAQ,MAAM;EAAgB,MAAK;EAAU,SAAS;EACnD,UAAA;CACK,CAAA;CAGV,MAAM,eACJ,oBAAC,QAAD;EAAQ,MAAM;EAAgB,MAAM;EAAQ,SAAS;EAClD,UAAA,MAAM,UAAU;CACX,CAAA;CAGV,OACE,qBAACA,mBAAD;EAAS,KAAK;EAAI,OAAO;GAAE,MAAM;GAAG,OAAO;GAAQ,GAAG;EAAM;EAAG,GAAI;EAAnE,UAAA,CACG,SACC,oBAACC,kBAAD;GACE,UAAA;GACA,WAAW,GAAG,QAAQ,YAAY,MAAM;GAC3B;GACb,OAAO,cAAc;GACrB,OAAO;GACE;GACT,SAAS,MAAM,SAAS,EAAE,OAAO,KAAK;GACtC,WAAW,MAAM,SAAS,EAAE,OAAO,KAAK;EACzC,CAAA,IAED,oBAAC,YAAD;GACE,WAAW,GAAG,QAAQ,YAAY,MAAM;GAC5B;GACF;GACG;GACb,OAAO,cAAc;GACrB,QAAQ;GACR,OAAO;GACE;GACT,SAAS,MAAM,SAAS,EAAE,OAAO,KAAK;GACtC,gBAAgB,MAAM,SAAS,CAAC;EACjC,CAAA,GAEH,oBAACD,mBAAD;GAAS,WAAW;GAAsB,KAAK;GAC5C,UAAA,gBACC,cAAc,cAAc,CAAC,CAAC,KAAK,aAAa,UAC9C,oBAAC,QAAD;IAAoB,MAAM;IAAgB,GAAI;GAAc,GAA/C,KAA+C,CAC7D,IAED,qBAAA,YAAA,EAAA,UAAA,CACG,WACC,oBAAC,SAAD;IAAS,QAAQ;IAAe,OAAO;IACpC,UAAA;GACM,CAAA,IAET,eAED,WACC,oBAAC,SAAD;IAAS,QAAQ;IAAc,OAAO;IACnC,UAAA;GACM,CAAA,IAET,YAEF,EAAA,CAAA;EAEG,CAAA,CACF;;AAEb,CACF"}
@@ -3,7 +3,7 @@ import FlexBasic_default from "../../Flex/FlexBasic.mjs";
3
3
  import Button from "../../base-ui/Button/Button.mjs";
4
4
  import CodeEditor from "../../CodeEditor/CodeEditor.mjs";
5
5
  import { useTranslation } from "../../i18n/useTranslation.mjs";
6
- import TextArea from "../../base-ui/Input/TextArea.mjs";
6
+ import TextArea_default from "../../base-ui/Input/TextArea.mjs";
7
7
  import Markdown from "../../Markdown/Markdown.mjs";
8
8
  import Modal from "../../base-ui/Modal/Modal.mjs";
9
9
  import { styles } from "../MessageInput/style.mjs";
@@ -61,7 +61,7 @@ const MessageModal = memo(({ editing, open, height = "75vh", onOpenChange, onEdi
61
61
  setTyping(false);
62
62
  setMessage(value);
63
63
  },
64
- children: isEdit ? mobile ? /* @__PURE__ */ jsx(TextArea, {
64
+ children: isEdit ? mobile ? /* @__PURE__ */ jsx(TextArea_default, {
65
65
  autoSize: true,
66
66
  className: styles,
67
67
  defaultValue: temporaryValue,
@@ -1 +1 @@
1
- {"version":3,"file":"MessageModal.mjs","names":["messageModalMessages","useControlledState","Flexbox","textStyles"],"sources":["../../../src/chat/MessageModal/MessageModal.tsx"],"sourcesContent":["'use client';\n\nimport { useResponsive } from 'antd-style';\nimport { memo, useState } from 'react';\nimport useControlledState from 'use-merge-value';\n\nimport Button from '@/base-ui/Button';\nimport { TextArea } from '@/base-ui/Input';\nimport { Modal } from '@/base-ui/Modal';\nimport { styles as textStyles } from '@/chat/MessageInput/style';\nimport CodeEditor from '@/CodeEditor';\nimport { Flexbox } from '@/Flex';\nimport messageModalMessages from '@/i18n/resources/en/messageModal';\nimport { useTranslation } from '@/i18n/useTranslation';\nimport Markdown from '@/Markdown';\n\nimport { type MessageModalProps } from './type';\n\nconst MessageModal = memo<MessageModalProps>(\n ({\n editing,\n open,\n height = '75vh',\n onOpenChange,\n onEditingChange,\n placeholder,\n value,\n language = 'markdown',\n onChange,\n text,\n footer,\n extra,\n }) => {\n const { mobile } = useResponsive();\n const { t } = useTranslation(messageModalMessages);\n const [isEdit, setTyping] = useControlledState(false, {\n onChange: onEditingChange,\n value: editing,\n });\n\n const [showModal, setShowModal] = useControlledState(false, {\n onChange: onOpenChange,\n value: open,\n });\n\n const [temporaryValue, setMessage] = useState(value);\n\n const confirmText = text?.confirm ?? t('messageModal.confirm');\n const cancelText = text?.cancel ?? t('messageModal.cancel');\n const editText = text?.edit ?? t('messageModal.edit');\n\n const modalFooter = isEdit ? (\n <Flexbox direction={'horizontal-reverse'} gap={8}>\n <Button\n type=\"primary\"\n onClick={() => {\n setTyping(false);\n onChange?.(temporaryValue);\n setMessage(value);\n }}\n >\n {confirmText}\n </Button>\n <Button\n onClick={() => {\n setTyping(false);\n setMessage(value);\n }}\n >\n {cancelText}\n </Button>\n </Flexbox>\n ) : (\n footer\n );\n\n return (\n <Modal\n allowFullscreen\n destroyOnHidden\n cancelText={cancelText}\n footer={modalFooter}\n height={height}\n okText={editText}\n open={showModal}\n title={text?.title}\n onOk={() => setTyping(true)}\n onCancel={() => {\n setShowModal(false);\n setTyping(false);\n setMessage(value);\n }}\n >\n {isEdit ? (\n mobile ? (\n <TextArea\n autoSize\n className={textStyles}\n defaultValue={temporaryValue}\n placeholder={placeholder}\n value={temporaryValue}\n variant={'borderless'}\n onBlur={(e) => setMessage(e.target.value)}\n onChange={(value) => setMessage(value.target.value)}\n />\n ) : (\n <CodeEditor\n className={textStyles}\n defaultValue={temporaryValue}\n language={language}\n placeholder={placeholder}\n value={temporaryValue}\n variant={'borderless'}\n onBlur={(e) => setMessage(e.target.value)}\n onValueChange={(value) => setMessage(value)}\n />\n )\n ) : (\n <>\n {extra}\n <Markdown variant={'chat'}>{String(value || placeholder)}</Markdown>\n </>\n )}\n </Modal>\n );\n },\n);\n\nMessageModal.displayName = 'MessageModal';\n\nexport default MessageModal;\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAM,eAAe,MAClB,EACC,SACA,MACA,SAAS,QACT,cACA,iBACA,aACA,OACA,WAAW,YACX,UACA,MACA,QACA,YACI;CACJ,MAAM,EAAE,WAAW,cAAc;CACjC,MAAM,EAAE,MAAM,eAAeA,oBAAoB;CACjD,MAAM,CAAC,QAAQ,aAAaC,cAAmB,OAAO;EACpD,UAAU;EACV,OAAO;CACT,CAAC;CAED,MAAM,CAAC,WAAW,gBAAgBA,cAAmB,OAAO;EAC1D,UAAU;EACV,OAAO;CACT,CAAC;CAED,MAAM,CAAC,gBAAgB,cAAc,SAAS,KAAK;CAEnD,MAAM,cAAc,MAAM,WAAW,EAAE,sBAAsB;CAC7D,MAAM,aAAa,MAAM,UAAU,EAAE,qBAAqB;CAC1D,MAAM,WAAW,MAAM,QAAQ,EAAE,mBAAmB;CA2BpD,OACE,oBAAC,OAAD;EACE,iBAAA;EACA,iBAAA;EACY;EACZ,QA9BgB,SAClB,qBAACC,mBAAD;GAAS,WAAW;GAAsB,KAAK;GAA/C,UAAA,CACE,oBAAC,QAAD;IACE,MAAK;IACL,eAAe;KACb,UAAU,KAAK;KACf,WAAW,cAAc;KACzB,WAAW,KAAK;IAClB;IAEC,UAAA;GACK,CAAA,GACR,oBAAC,QAAD;IACE,eAAe;KACb,UAAU,KAAK;KACf,WAAW,KAAK;IAClB;IAEC,UAAA;GACK,CAAA,CACD;EAET,CAAA,IAAA;EASU;EACR,QAAQ;EACR,MAAM;EACN,OAAO,MAAM;EACb,YAAY,UAAU,IAAI;EAC1B,gBAAgB;GACd,aAAa,KAAK;GAClB,UAAU,KAAK;GACf,WAAW,KAAK;EAClB;EAEC,UAAA,SACC,SACE,oBAAC,UAAD;GACE,UAAA;GACA,WAAWC;GACX,cAAc;GACD;GACb,OAAO;GACP,SAAS;GACT,SAAS,MAAM,WAAW,EAAE,OAAO,KAAK;GACxC,WAAW,UAAU,WAAW,MAAM,OAAO,KAAK;EACnD,CAAA,IAED,oBAAC,YAAD;GACE,WAAWA;GACX,cAAc;GACJ;GACG;GACb,OAAO;GACP,SAAS;GACT,SAAS,MAAM,WAAW,EAAE,OAAO,KAAK;GACxC,gBAAgB,UAAU,WAAW,KAAK;EAC3C,CAAA,IAGH,qBAAA,YAAA,EAAA,UAAA,CACG,OACD,oBAAC,UAAD;GAAU,SAAS;GAAS,UAAA,OAAO,SAAS,WAAW;EAAY,CAAA,CACnE,EAAA,CAAA;CAEC,CAAA;AAEX,CACF;AAEA,aAAa,cAAc"}
1
+ {"version":3,"file":"MessageModal.mjs","names":["messageModalMessages","useControlledState","Flexbox","TextArea","textStyles"],"sources":["../../../src/chat/MessageModal/MessageModal.tsx"],"sourcesContent":["'use client';\n\nimport { useResponsive } from 'antd-style';\nimport { memo, useState } from 'react';\nimport useControlledState from 'use-merge-value';\n\nimport Button from '@/base-ui/Button';\nimport { TextArea } from '@/base-ui/Input';\nimport { Modal } from '@/base-ui/Modal';\nimport { styles as textStyles } from '@/chat/MessageInput/style';\nimport CodeEditor from '@/CodeEditor';\nimport { Flexbox } from '@/Flex';\nimport messageModalMessages from '@/i18n/resources/en/messageModal';\nimport { useTranslation } from '@/i18n/useTranslation';\nimport Markdown from '@/Markdown';\n\nimport { type MessageModalProps } from './type';\n\nconst MessageModal = memo<MessageModalProps>(\n ({\n editing,\n open,\n height = '75vh',\n onOpenChange,\n onEditingChange,\n placeholder,\n value,\n language = 'markdown',\n onChange,\n text,\n footer,\n extra,\n }) => {\n const { mobile } = useResponsive();\n const { t } = useTranslation(messageModalMessages);\n const [isEdit, setTyping] = useControlledState(false, {\n onChange: onEditingChange,\n value: editing,\n });\n\n const [showModal, setShowModal] = useControlledState(false, {\n onChange: onOpenChange,\n value: open,\n });\n\n const [temporaryValue, setMessage] = useState(value);\n\n const confirmText = text?.confirm ?? t('messageModal.confirm');\n const cancelText = text?.cancel ?? t('messageModal.cancel');\n const editText = text?.edit ?? t('messageModal.edit');\n\n const modalFooter = isEdit ? (\n <Flexbox direction={'horizontal-reverse'} gap={8}>\n <Button\n type=\"primary\"\n onClick={() => {\n setTyping(false);\n onChange?.(temporaryValue);\n setMessage(value);\n }}\n >\n {confirmText}\n </Button>\n <Button\n onClick={() => {\n setTyping(false);\n setMessage(value);\n }}\n >\n {cancelText}\n </Button>\n </Flexbox>\n ) : (\n footer\n );\n\n return (\n <Modal\n allowFullscreen\n destroyOnHidden\n cancelText={cancelText}\n footer={modalFooter}\n height={height}\n okText={editText}\n open={showModal}\n title={text?.title}\n onOk={() => setTyping(true)}\n onCancel={() => {\n setShowModal(false);\n setTyping(false);\n setMessage(value);\n }}\n >\n {isEdit ? (\n mobile ? (\n <TextArea\n autoSize\n className={textStyles}\n defaultValue={temporaryValue}\n placeholder={placeholder}\n value={temporaryValue}\n variant={'borderless'}\n onBlur={(e) => setMessage(e.target.value)}\n onChange={(value) => setMessage(value.target.value)}\n />\n ) : (\n <CodeEditor\n className={textStyles}\n defaultValue={temporaryValue}\n language={language}\n placeholder={placeholder}\n value={temporaryValue}\n variant={'borderless'}\n onBlur={(e) => setMessage(e.target.value)}\n onValueChange={(value) => setMessage(value)}\n />\n )\n ) : (\n <>\n {extra}\n <Markdown variant={'chat'}>{String(value || placeholder)}</Markdown>\n </>\n )}\n </Modal>\n );\n },\n);\n\nMessageModal.displayName = 'MessageModal';\n\nexport default MessageModal;\n"],"mappings":";;;;;;;;;;;;;;;AAkBA,MAAM,eAAe,MAClB,EACC,SACA,MACA,SAAS,QACT,cACA,iBACA,aACA,OACA,WAAW,YACX,UACA,MACA,QACA,YACI;CACJ,MAAM,EAAE,WAAW,cAAc;CACjC,MAAM,EAAE,MAAM,eAAeA,oBAAoB;CACjD,MAAM,CAAC,QAAQ,aAAaC,cAAmB,OAAO;EACpD,UAAU;EACV,OAAO;CACT,CAAC;CAED,MAAM,CAAC,WAAW,gBAAgBA,cAAmB,OAAO;EAC1D,UAAU;EACV,OAAO;CACT,CAAC;CAED,MAAM,CAAC,gBAAgB,cAAc,SAAS,KAAK;CAEnD,MAAM,cAAc,MAAM,WAAW,EAAE,sBAAsB;CAC7D,MAAM,aAAa,MAAM,UAAU,EAAE,qBAAqB;CAC1D,MAAM,WAAW,MAAM,QAAQ,EAAE,mBAAmB;CA2BpD,OACE,oBAAC,OAAD;EACE,iBAAA;EACA,iBAAA;EACY;EACZ,QA9BgB,SAClB,qBAACC,mBAAD;GAAS,WAAW;GAAsB,KAAK;GAA/C,UAAA,CACE,oBAAC,QAAD;IACE,MAAK;IACL,eAAe;KACb,UAAU,KAAK;KACf,WAAW,cAAc;KACzB,WAAW,KAAK;IAClB;IAEC,UAAA;GACK,CAAA,GACR,oBAAC,QAAD;IACE,eAAe;KACb,UAAU,KAAK;KACf,WAAW,KAAK;IAClB;IAEC,UAAA;GACK,CAAA,CACD;EAET,CAAA,IAAA;EASU;EACR,QAAQ;EACR,MAAM;EACN,OAAO,MAAM;EACb,YAAY,UAAU,IAAI;EAC1B,gBAAgB;GACd,aAAa,KAAK;GAClB,UAAU,KAAK;GACf,WAAW,KAAK;EAClB;EAEC,UAAA,SACC,SACE,oBAACC,kBAAD;GACE,UAAA;GACA,WAAWC;GACX,cAAc;GACD;GACb,OAAO;GACP,SAAS;GACT,SAAS,MAAM,WAAW,EAAE,OAAO,KAAK;GACxC,WAAW,UAAU,WAAW,MAAM,OAAO,KAAK;EACnD,CAAA,IAED,oBAAC,YAAD;GACE,WAAWA;GACX,cAAc;GACJ;GACG;GACb,OAAO;GACP,SAAS;GACT,SAAS,MAAM,WAAW,EAAE,OAAO,KAAK;GACxC,gBAAgB,UAAU,WAAW,KAAK;EAC3C,CAAA,IAGH,qBAAA,YAAA,EAAA,UAAA,CACG,OACD,oBAAC,UAAD;GAAU,SAAS;GAAS,UAAA,OAAO,SAAS,WAAW;EAAY,CAAA,CACnE,EAAA,CAAA;CAEC,CAAA;AAEX,CACF;AAEA,aAAa,cAAc"}
@@ -1,3 +1,4 @@
1
+ import { Rule } from "../node_modules/.pnpm/eslint@9.39.5_jiti@2.6.1_supports-color@10.2.2/node_modules/eslint/lib/types/index.mjs";
1
2
  //#region src/eslint/index.d.ts
2
3
  declare const restrictedImports: {
3
4
  rules: {
@@ -18,7 +19,19 @@ declare const restrictedImports: {
18
19
  })[];
19
20
  };
20
21
  };
21
- declare const _default: {
22
+ declare const formSchemaRules: {
23
+ plugins: {
24
+ '@lobehub/ui': {
25
+ rules: {
26
+ 'no-inline-form-schema': Rule.RuleModule;
27
+ };
28
+ };
29
+ };
30
+ rules: {
31
+ '@lobehub/ui/no-inline-form-schema': string;
32
+ };
33
+ };
34
+ declare const _default: ({
22
35
  rules: {
23
36
  'no-restricted-imports': (string | {
24
37
  paths: ({
@@ -36,7 +49,18 @@ declare const _default: {
36
49
  }[];
37
50
  })[];
38
51
  };
39
- }[];
52
+ } | {
53
+ plugins: {
54
+ '@lobehub/ui': {
55
+ rules: {
56
+ 'no-inline-form-schema': Rule.RuleModule;
57
+ };
58
+ };
59
+ };
60
+ rules: {
61
+ '@lobehub/ui/no-inline-form-schema': string;
62
+ };
63
+ })[];
40
64
  //#endregion
41
- export { _default as default, restrictedImports };
65
+ export { _default as default, formSchemaRules, restrictedImports };
42
66
  //# sourceMappingURL=index.d.mts.map
@@ -1,3 +1,4 @@
1
+ import { noInlineFormSchema } from "./noInlineFormSchema.mjs";
1
2
  //#region src/eslint/index.ts
2
3
  const DEPRECATED_UI_COMPONENTS = [
3
4
  "Accordion",
@@ -274,8 +275,12 @@ const restrictedImports = { rules: { "no-restricted-imports": ["error", {
274
275
  message: "Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead."
275
276
  }]
276
277
  }] } };
277
- var eslint_default = [restrictedImports];
278
+ const formSchemaRules = {
279
+ plugins: { "@lobehub/ui": { rules: { "no-inline-form-schema": noInlineFormSchema } } },
280
+ rules: { "@lobehub/ui/no-inline-form-schema": "warn" }
281
+ };
282
+ var eslint_default = [restrictedImports, formSchemaRules];
278
283
  //#endregion
279
- export { eslint_default as default, restrictedImports };
284
+ export { eslint_default as default, formSchemaRules, restrictedImports };
280
285
 
281
286
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/eslint/index.ts"],"sourcesContent":["const DEPRECATED_UI_COMPONENTS = [\n 'Accordion',\n 'AccordionItem',\n 'ActionIcon',\n 'Alert',\n 'AutoComplete',\n 'Avatar',\n 'AvatarGroup',\n 'Burger',\n 'Button',\n 'Checkbox',\n 'CheckboxGroup',\n 'Collapse',\n 'DatePicker',\n 'DraggablePanel',\n 'DraggablePanelBody',\n 'DraggablePanelContainer',\n 'DraggablePanelFooter',\n 'DraggablePanelHeader',\n 'Drawer',\n 'Dropdown',\n 'FormSubmitFooter',\n 'FormTitle',\n 'Input',\n 'InputNumber',\n 'InputOPT',\n 'InputPassword',\n 'Modal',\n 'ModalHost',\n 'Radio',\n 'RadioGroup',\n 'Segmented',\n 'Select',\n 'Skeleton',\n 'SkeletonAvatar',\n 'SkeletonBlock',\n 'SkeletonButton',\n 'SkeletonParagraph',\n 'SkeletonTags',\n 'SkeletonTitle',\n 'Slider',\n 'SliderWithInput',\n 'Switch',\n 'Tabs',\n 'Tag',\n 'Text',\n 'TextArea',\n 'Tree',\n];\n\nconst DEPRECATED_ANTD_ONLY = [\n 'Anchor',\n 'Badge',\n 'Breadcrumb',\n 'Card',\n 'Carousel',\n 'ColorPicker',\n 'Descriptions',\n 'Divider',\n 'Empty',\n 'FloatButton',\n 'List',\n 'Menu',\n 'Pagination',\n 'Popover',\n 'Progress',\n 'QRCode',\n 'Rate',\n 'Result',\n 'Spin',\n 'Statistic',\n 'Steps',\n 'Table',\n 'Tooltip',\n 'Typography',\n 'Upload',\n];\n\nconst DEPRECATED_ANTD_COMPONENT_PATHS = [\n 'antd/es/alert',\n 'antd/es/alert/*',\n 'antd/es/anchor',\n 'antd/es/anchor/*',\n 'antd/es/auto-complete',\n 'antd/es/auto-complete/*',\n 'antd/es/badge',\n 'antd/es/badge/*',\n 'antd/es/breadcrumb',\n 'antd/es/breadcrumb/*',\n 'antd/es/card',\n 'antd/es/card/*',\n 'antd/es/carousel',\n 'antd/es/carousel/*',\n 'antd/es/checkbox',\n 'antd/es/checkbox/*',\n 'antd/es/collapse',\n 'antd/es/collapse/*',\n 'antd/es/color-picker',\n 'antd/es/color-picker/*',\n 'antd/es/date-picker',\n 'antd/es/date-picker/*',\n 'antd/es/descriptions',\n 'antd/es/descriptions/*',\n 'antd/es/divider',\n 'antd/es/divider/*',\n 'antd/es/dropdown',\n 'antd/es/dropdown/*',\n 'antd/es/empty',\n 'antd/es/empty/*',\n 'antd/es/float-button',\n 'antd/es/float-button/*',\n 'antd/es/input',\n 'antd/es/input-number',\n 'antd/es/input-number/*',\n 'antd/es/input/*',\n 'antd/es/list',\n 'antd/es/list/*',\n 'antd/es/message',\n 'antd/es/message/*',\n 'antd/es/notification',\n 'antd/es/notification/*',\n 'antd/es/pagination',\n 'antd/es/pagination/*',\n 'antd/es/popover',\n 'antd/es/popover/*',\n 'antd/es/progress',\n 'antd/es/progress/*',\n 'antd/es/qr-code',\n 'antd/es/qr-code/*',\n 'antd/es/radio',\n 'antd/es/radio/*',\n 'antd/es/rate',\n 'antd/es/rate/*',\n 'antd/es/result',\n 'antd/es/result/*',\n 'antd/es/skeleton',\n 'antd/es/skeleton/*',\n 'antd/es/slider',\n 'antd/es/slider/*',\n 'antd/es/spin',\n 'antd/es/spin/*',\n 'antd/es/statistic',\n 'antd/es/statistic/*',\n 'antd/es/steps',\n 'antd/es/steps/*',\n 'antd/es/switch',\n 'antd/es/switch/*',\n 'antd/es/table',\n 'antd/es/table/*',\n 'antd/es/tooltip',\n 'antd/es/tooltip/*',\n 'antd/es/tree',\n 'antd/es/tree/*',\n 'antd/es/typography',\n 'antd/es/typography/*',\n 'antd/es/upload',\n 'antd/es/upload/*',\n 'antd/lib/alert',\n 'antd/lib/alert/*',\n 'antd/lib/anchor',\n 'antd/lib/anchor/*',\n 'antd/lib/auto-complete',\n 'antd/lib/auto-complete/*',\n 'antd/lib/badge',\n 'antd/lib/badge/*',\n 'antd/lib/breadcrumb',\n 'antd/lib/breadcrumb/*',\n 'antd/lib/card',\n 'antd/lib/card/*',\n 'antd/lib/carousel',\n 'antd/lib/carousel/*',\n 'antd/lib/checkbox',\n 'antd/lib/checkbox/*',\n 'antd/lib/collapse',\n 'antd/lib/collapse/*',\n 'antd/lib/color-picker',\n 'antd/lib/color-picker/*',\n 'antd/lib/date-picker',\n 'antd/lib/date-picker/*',\n 'antd/lib/descriptions',\n 'antd/lib/descriptions/*',\n 'antd/lib/divider',\n 'antd/lib/divider/*',\n 'antd/lib/dropdown',\n 'antd/lib/dropdown/*',\n 'antd/lib/empty',\n 'antd/lib/empty/*',\n 'antd/lib/float-button',\n 'antd/lib/float-button/*',\n 'antd/lib/input',\n 'antd/lib/input-number',\n 'antd/lib/input-number/*',\n 'antd/lib/input/*',\n 'antd/lib/list',\n 'antd/lib/list/*',\n 'antd/lib/message',\n 'antd/lib/message/*',\n 'antd/lib/notification',\n 'antd/lib/notification/*',\n 'antd/lib/pagination',\n 'antd/lib/pagination/*',\n 'antd/lib/popover',\n 'antd/lib/popover/*',\n 'antd/lib/progress',\n 'antd/lib/progress/*',\n 'antd/lib/qr-code',\n 'antd/lib/qr-code/*',\n 'antd/lib/radio',\n 'antd/lib/radio/*',\n 'antd/lib/rate',\n 'antd/lib/rate/*',\n 'antd/lib/result',\n 'antd/lib/result/*',\n 'antd/lib/skeleton',\n 'antd/lib/skeleton/*',\n 'antd/lib/slider',\n 'antd/lib/slider/*',\n 'antd/lib/spin',\n 'antd/lib/spin/*',\n 'antd/lib/statistic',\n 'antd/lib/statistic/*',\n 'antd/lib/steps',\n 'antd/lib/steps/*',\n 'antd/lib/switch',\n 'antd/lib/switch/*',\n 'antd/lib/table',\n 'antd/lib/table/*',\n 'antd/lib/tooltip',\n 'antd/lib/tooltip/*',\n 'antd/lib/tree',\n 'antd/lib/tree/*',\n 'antd/lib/typography',\n 'antd/lib/typography/*',\n 'antd/lib/upload',\n 'antd/lib/upload/*',\n];\n\nexport const restrictedImports = {\n rules: {\n 'no-restricted-imports': [\n 'error',\n {\n paths: [\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message:\n 'The antd-based wrapper is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: '@lobehub/ui',\n },\n {\n importNames: ['createStyles'],\n message:\n '`createStyles` is banned in this project. Use `createStaticStyles` from \"antd-style\" instead.',\n name: 'antd-style',\n },\n {\n importNames: [...DEPRECATED_UI_COMPONENTS, ...DEPRECATED_ANTD_ONLY],\n message: 'Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: 'antd',\n },\n {\n importNames: ['message', 'notification'],\n message: 'antd feedback APIs are deprecated. Use `toast` from \"@lobehub/ui/base-ui\".',\n name: 'antd',\n },\n {\n importNames: ['LoadingOutlined'],\n message: 'Use `Spin` from \"@lobehub/ui/base-ui\" instead of a hand-rolled spinner.',\n name: '@ant-design/icons',\n },\n {\n message: 'Use `Spin variant=\"network\"` from \"@lobehub/ui/base-ui\" instead.',\n name: 'thinking-orbs',\n },\n {\n message: 'ProComponents are deprecated. Use `Table` from \"@lobehub/ui/base-ui\" instead.',\n name: '@ant-design/pro-components',\n },\n ],\n patterns: [\n {\n group: DEPRECATED_ANTD_COMPONENT_PATHS,\n message:\n 'Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n },\n ],\n },\n ],\n },\n};\n\nexport default [restrictedImports];\n"],"mappings":";AAAA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,kCAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB,EAC/B,OAAO,EACL,yBAAyB,CACvB,SACA;CACE,OAAO;EACL;GACE,aAAa;GACb,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,cAAc;GAC5B,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,GAAG,0BAA0B,GAAG,oBAAoB;GAClE,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,WAAW,cAAc;GACvC,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,iBAAiB;GAC/B,SAAS;GACT,MAAM;EACR;EACA;GACE,SAAS;GACT,MAAM;EACR;EACA;GACE,SAAS;GACT,MAAM;EACR;CACF;CACA,UAAU,CACR;EACE,OAAO;EACP,SACE;CACJ,CACF;AACF,CACF,EACF,EACF;AAEA,IAAA,iBAAe,CAAC,iBAAiB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/eslint/index.ts"],"sourcesContent":["import { noInlineFormSchema } from './noInlineFormSchema';\n\nconst DEPRECATED_UI_COMPONENTS = [\n 'Accordion',\n 'AccordionItem',\n 'ActionIcon',\n 'Alert',\n 'AutoComplete',\n 'Avatar',\n 'AvatarGroup',\n 'Burger',\n 'Button',\n 'Checkbox',\n 'CheckboxGroup',\n 'Collapse',\n 'DatePicker',\n 'DraggablePanel',\n 'DraggablePanelBody',\n 'DraggablePanelContainer',\n 'DraggablePanelFooter',\n 'DraggablePanelHeader',\n 'Drawer',\n 'Dropdown',\n 'FormSubmitFooter',\n 'FormTitle',\n 'Input',\n 'InputNumber',\n 'InputOPT',\n 'InputPassword',\n 'Modal',\n 'ModalHost',\n 'Radio',\n 'RadioGroup',\n 'Segmented',\n 'Select',\n 'Skeleton',\n 'SkeletonAvatar',\n 'SkeletonBlock',\n 'SkeletonButton',\n 'SkeletonParagraph',\n 'SkeletonTags',\n 'SkeletonTitle',\n 'Slider',\n 'SliderWithInput',\n 'Switch',\n 'Tabs',\n 'Tag',\n 'Text',\n 'TextArea',\n 'Tree',\n];\n\nconst DEPRECATED_ANTD_ONLY = [\n 'Anchor',\n 'Badge',\n 'Breadcrumb',\n 'Card',\n 'Carousel',\n 'ColorPicker',\n 'Descriptions',\n 'Divider',\n 'Empty',\n 'FloatButton',\n 'List',\n 'Menu',\n 'Pagination',\n 'Popover',\n 'Progress',\n 'QRCode',\n 'Rate',\n 'Result',\n 'Spin',\n 'Statistic',\n 'Steps',\n 'Table',\n 'Tooltip',\n 'Typography',\n 'Upload',\n];\n\nconst DEPRECATED_ANTD_COMPONENT_PATHS = [\n 'antd/es/alert',\n 'antd/es/alert/*',\n 'antd/es/anchor',\n 'antd/es/anchor/*',\n 'antd/es/auto-complete',\n 'antd/es/auto-complete/*',\n 'antd/es/badge',\n 'antd/es/badge/*',\n 'antd/es/breadcrumb',\n 'antd/es/breadcrumb/*',\n 'antd/es/card',\n 'antd/es/card/*',\n 'antd/es/carousel',\n 'antd/es/carousel/*',\n 'antd/es/checkbox',\n 'antd/es/checkbox/*',\n 'antd/es/collapse',\n 'antd/es/collapse/*',\n 'antd/es/color-picker',\n 'antd/es/color-picker/*',\n 'antd/es/date-picker',\n 'antd/es/date-picker/*',\n 'antd/es/descriptions',\n 'antd/es/descriptions/*',\n 'antd/es/divider',\n 'antd/es/divider/*',\n 'antd/es/dropdown',\n 'antd/es/dropdown/*',\n 'antd/es/empty',\n 'antd/es/empty/*',\n 'antd/es/float-button',\n 'antd/es/float-button/*',\n 'antd/es/input',\n 'antd/es/input-number',\n 'antd/es/input-number/*',\n 'antd/es/input/*',\n 'antd/es/list',\n 'antd/es/list/*',\n 'antd/es/message',\n 'antd/es/message/*',\n 'antd/es/notification',\n 'antd/es/notification/*',\n 'antd/es/pagination',\n 'antd/es/pagination/*',\n 'antd/es/popover',\n 'antd/es/popover/*',\n 'antd/es/progress',\n 'antd/es/progress/*',\n 'antd/es/qr-code',\n 'antd/es/qr-code/*',\n 'antd/es/radio',\n 'antd/es/radio/*',\n 'antd/es/rate',\n 'antd/es/rate/*',\n 'antd/es/result',\n 'antd/es/result/*',\n 'antd/es/skeleton',\n 'antd/es/skeleton/*',\n 'antd/es/slider',\n 'antd/es/slider/*',\n 'antd/es/spin',\n 'antd/es/spin/*',\n 'antd/es/statistic',\n 'antd/es/statistic/*',\n 'antd/es/steps',\n 'antd/es/steps/*',\n 'antd/es/switch',\n 'antd/es/switch/*',\n 'antd/es/table',\n 'antd/es/table/*',\n 'antd/es/tooltip',\n 'antd/es/tooltip/*',\n 'antd/es/tree',\n 'antd/es/tree/*',\n 'antd/es/typography',\n 'antd/es/typography/*',\n 'antd/es/upload',\n 'antd/es/upload/*',\n 'antd/lib/alert',\n 'antd/lib/alert/*',\n 'antd/lib/anchor',\n 'antd/lib/anchor/*',\n 'antd/lib/auto-complete',\n 'antd/lib/auto-complete/*',\n 'antd/lib/badge',\n 'antd/lib/badge/*',\n 'antd/lib/breadcrumb',\n 'antd/lib/breadcrumb/*',\n 'antd/lib/card',\n 'antd/lib/card/*',\n 'antd/lib/carousel',\n 'antd/lib/carousel/*',\n 'antd/lib/checkbox',\n 'antd/lib/checkbox/*',\n 'antd/lib/collapse',\n 'antd/lib/collapse/*',\n 'antd/lib/color-picker',\n 'antd/lib/color-picker/*',\n 'antd/lib/date-picker',\n 'antd/lib/date-picker/*',\n 'antd/lib/descriptions',\n 'antd/lib/descriptions/*',\n 'antd/lib/divider',\n 'antd/lib/divider/*',\n 'antd/lib/dropdown',\n 'antd/lib/dropdown/*',\n 'antd/lib/empty',\n 'antd/lib/empty/*',\n 'antd/lib/float-button',\n 'antd/lib/float-button/*',\n 'antd/lib/input',\n 'antd/lib/input-number',\n 'antd/lib/input-number/*',\n 'antd/lib/input/*',\n 'antd/lib/list',\n 'antd/lib/list/*',\n 'antd/lib/message',\n 'antd/lib/message/*',\n 'antd/lib/notification',\n 'antd/lib/notification/*',\n 'antd/lib/pagination',\n 'antd/lib/pagination/*',\n 'antd/lib/popover',\n 'antd/lib/popover/*',\n 'antd/lib/progress',\n 'antd/lib/progress/*',\n 'antd/lib/qr-code',\n 'antd/lib/qr-code/*',\n 'antd/lib/radio',\n 'antd/lib/radio/*',\n 'antd/lib/rate',\n 'antd/lib/rate/*',\n 'antd/lib/result',\n 'antd/lib/result/*',\n 'antd/lib/skeleton',\n 'antd/lib/skeleton/*',\n 'antd/lib/slider',\n 'antd/lib/slider/*',\n 'antd/lib/spin',\n 'antd/lib/spin/*',\n 'antd/lib/statistic',\n 'antd/lib/statistic/*',\n 'antd/lib/steps',\n 'antd/lib/steps/*',\n 'antd/lib/switch',\n 'antd/lib/switch/*',\n 'antd/lib/table',\n 'antd/lib/table/*',\n 'antd/lib/tooltip',\n 'antd/lib/tooltip/*',\n 'antd/lib/tree',\n 'antd/lib/tree/*',\n 'antd/lib/typography',\n 'antd/lib/typography/*',\n 'antd/lib/upload',\n 'antd/lib/upload/*',\n];\n\nexport const restrictedImports = {\n rules: {\n 'no-restricted-imports': [\n 'error',\n {\n paths: [\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message:\n 'The antd-based wrapper is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: '@lobehub/ui',\n },\n {\n importNames: ['createStyles'],\n message:\n '`createStyles` is banned in this project. Use `createStaticStyles` from \"antd-style\" instead.',\n name: 'antd-style',\n },\n {\n importNames: [...DEPRECATED_UI_COMPONENTS, ...DEPRECATED_ANTD_ONLY],\n message: 'Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: 'antd',\n },\n {\n importNames: ['message', 'notification'],\n message: 'antd feedback APIs are deprecated. Use `toast` from \"@lobehub/ui/base-ui\".',\n name: 'antd',\n },\n {\n importNames: ['LoadingOutlined'],\n message: 'Use `Spin` from \"@lobehub/ui/base-ui\" instead of a hand-rolled spinner.',\n name: '@ant-design/icons',\n },\n {\n message: 'Use `Spin variant=\"network\"` from \"@lobehub/ui/base-ui\" instead.',\n name: 'thinking-orbs',\n },\n {\n message:\n 'ProComponents are deprecated. Use `Table` from \"@lobehub/ui/base-ui\" instead.',\n name: '@ant-design/pro-components',\n },\n ],\n patterns: [\n {\n group: DEPRECATED_ANTD_COMPONENT_PATHS,\n message:\n 'Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n },\n ],\n },\n ],\n },\n};\n\nexport const formSchemaRules = {\n plugins: {\n '@lobehub/ui': { rules: { 'no-inline-form-schema': noInlineFormSchema } },\n },\n rules: {\n '@lobehub/ui/no-inline-form-schema': 'warn',\n },\n};\n\nexport default [restrictedImports, formSchemaRules];\n"],"mappings":";;AAEA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,kCAAkC;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB,EAC/B,OAAO,EACL,yBAAyB,CACvB,SACA;CACE,OAAO;EACL;GACE,aAAa;GACb,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,cAAc;GAC5B,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,GAAG,0BAA0B,GAAG,oBAAoB;GAClE,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,WAAW,cAAc;GACvC,SAAS;GACT,MAAM;EACR;EACA;GACE,aAAa,CAAC,iBAAiB;GAC/B,SAAS;GACT,MAAM;EACR;EACA;GACE,SAAS;GACT,MAAM;EACR;EACA;GACE,SACE;GACF,MAAM;EACR;CACF;CACA,UAAU,CACR;EACE,OAAO;EACP,SACE;CACJ,CACF;AACF,CACF,EACF,EACF;AAEA,MAAa,kBAAkB;CAC7B,SAAS,EACP,eAAe,EAAE,OAAO,EAAE,yBAAyB,mBAAmB,EAAE,EAC1E;CACA,OAAO,EACL,qCAAqC,OACvC;AACF;AAEA,IAAA,iBAAe,CAAC,mBAAmB,eAAe"}
@@ -0,0 +1,44 @@
1
+ //#region src/eslint/noInlineFormSchema.ts
2
+ const SCHEMA_NAMESPACES = /* @__PURE__ */ new Set([
3
+ "z",
4
+ "v",
5
+ "yup"
6
+ ]);
7
+ const rootIdentifier = (node) => {
8
+ let current = node;
9
+ while (current) {
10
+ if (current.type === "Identifier") return current.name;
11
+ if (current.type === "CallExpression") current = current.callee;
12
+ else if (current.type === "MemberExpression") current = current.object;
13
+ else return void 0;
14
+ }
15
+ };
16
+ const isInlineSchema = (node) => node?.type === "CallExpression" && SCHEMA_NAMESPACES.has(rootIdentifier(node) ?? "");
17
+ const MESSAGE = "Schemas built inline are recreated on every render. Define the schema at module scope (or in useMemo) and pass the reference.";
18
+ const noInlineFormSchema = {
19
+ create: (context) => ({
20
+ "CallExpression[callee.name=\"useForm\"] > ObjectExpression > Property": function(node) {
21
+ if (node.key?.name === "schema" && isInlineSchema(node.value)) context.report({
22
+ message: MESSAGE,
23
+ node: node.value
24
+ });
25
+ },
26
+ "JSXAttribute": function(node) {
27
+ if (node.name?.name !== "validate") return;
28
+ const expression = node.value?.expression;
29
+ if (isInlineSchema(expression)) context.report({
30
+ message: MESSAGE,
31
+ node: expression
32
+ });
33
+ }
34
+ }),
35
+ meta: {
36
+ docs: { description: "Disallow constructing form schemas inline in render" },
37
+ schema: [],
38
+ type: "suggestion"
39
+ }
40
+ };
41
+ //#endregion
42
+ export { noInlineFormSchema };
43
+
44
+ //# sourceMappingURL=noInlineFormSchema.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noInlineFormSchema.mjs","names":[],"sources":["../../src/eslint/noInlineFormSchema.ts"],"sourcesContent":["import type { Rule } from 'eslint';\n\nconst SCHEMA_NAMESPACES = new Set(['z', 'v', 'yup']);\n\nconst rootIdentifier = (node: any): string | undefined => {\n let current = node;\n while (current) {\n if (current.type === 'Identifier') return current.name;\n if (current.type === 'CallExpression') current = current.callee;\n else if (current.type === 'MemberExpression') current = current.object;\n else return undefined;\n }\n return undefined;\n};\n\nconst isInlineSchema = (node: any) =>\n node?.type === 'CallExpression' && SCHEMA_NAMESPACES.has(rootIdentifier(node) ?? '');\n\nconst MESSAGE =\n 'Schemas built inline are recreated on every render. Define the schema at module scope (or in useMemo) and pass the reference.';\n\nexport const noInlineFormSchema: Rule.RuleModule = {\n create: (context) => ({\n 'CallExpression[callee.name=\"useForm\"] > ObjectExpression > Property': function (node: any) {\n if (node.key?.name === 'schema' && isInlineSchema(node.value))\n context.report({ message: MESSAGE, node: node.value });\n },\n 'JSXAttribute': function(node: any) {\n if (node.name?.name !== 'validate') return;\n const expression = node.value?.expression;\n if (isInlineSchema(expression)) context.report({ message: MESSAGE, node: expression });\n },\n }),\n meta: {\n docs: { description: 'Disallow constructing form schemas inline in render' },\n schema: [],\n type: 'suggestion',\n },\n};\n"],"mappings":";AAEA,MAAM,oCAAoB,IAAI,IAAI;CAAC;CAAK;CAAK;AAAK,CAAC;AAEnD,MAAM,kBAAkB,SAAkC;CACxD,IAAI,UAAU;CACd,OAAO,SAAS;EACd,IAAI,QAAQ,SAAS,cAAc,OAAO,QAAQ;EAClD,IAAI,QAAQ,SAAS,kBAAkB,UAAU,QAAQ;OACpD,IAAI,QAAQ,SAAS,oBAAoB,UAAU,QAAQ;OAC3D,OAAO,KAAA;CACd;AAEF;AAEA,MAAM,kBAAkB,SACtB,MAAM,SAAS,oBAAoB,kBAAkB,IAAI,eAAe,IAAI,KAAK,EAAE;AAErF,MAAM,UACJ;AAEF,MAAa,qBAAsC;CACjD,SAAS,aAAa;EACpB,yEAAuE,SAAU,MAAW;GAC1F,IAAI,KAAK,KAAK,SAAS,YAAY,eAAe,KAAK,KAAK,GAC1D,QAAQ,OAAO;IAAE,SAAS;IAAS,MAAM,KAAK;GAAM,CAAC;EACzD;EACA,gBAAgB,SAAS,MAAW;GAClC,IAAI,KAAK,MAAM,SAAS,YAAY;GACpC,MAAM,aAAa,KAAK,OAAO;GAC/B,IAAI,eAAe,UAAU,GAAG,QAAQ,OAAO;IAAE,SAAS;IAAS,MAAM;GAAW,CAAC;EACvF;CACF;CACA,MAAM;EACJ,MAAM,EAAE,aAAa,sDAAsD;EAC3E,QAAQ,CAAC;EACT,MAAM;CACR;AACF"}
@@ -1,5 +1,9 @@
1
1
  //#region src/i18n/resources/en/form.d.ts
2
2
  declare const _default: {
3
+ readonly 'form.list.add': "Add";
4
+ readonly 'form.list.empty': "No items yet";
5
+ readonly 'form.list.remove': "Remove";
6
+ readonly 'form.required': "This field is required";
3
7
  readonly 'form.reset': "Reset";
4
8
  readonly 'form.submit': "Submit";
5
9
  readonly 'form.unsavedChanges': "Unsaved changes";
@@ -1,5 +1,9 @@
1
1
  //#region src/i18n/resources/en/form.ts
2
2
  var form_default = {
3
+ "form.list.add": "Add",
4
+ "form.list.empty": "No items yet",
5
+ "form.list.remove": "Remove",
6
+ "form.required": "This field is required",
3
7
  "form.reset": "Reset",
4
8
  "form.submit": "Submit",
5
9
  "form.unsavedChanges": "Unsaved changes",
@@ -1 +1 @@
1
- {"version":3,"file":"form.mjs","names":[],"sources":["../../../../src/i18n/resources/en/form.ts"],"sourcesContent":["export default {\n 'form.reset': 'Reset',\n 'form.submit': 'Submit',\n 'form.unsavedChanges': 'Unsaved changes',\n 'form.unsavedWarning': 'You have unsaved changes. Are you sure you want to leave?',\n} as const;\n"],"mappings":";AAAA,IAAA,eAAe;CACb,cAAc;CACd,eAAe;CACf,uBAAuB;CACvB,uBAAuB;AACzB"}
1
+ {"version":3,"file":"form.mjs","names":[],"sources":["../../../../src/i18n/resources/en/form.ts"],"sourcesContent":["export default {\n 'form.list.add': 'Add',\n 'form.list.empty': 'No items yet',\n 'form.list.remove': 'Remove',\n 'form.required': 'This field is required',\n 'form.reset': 'Reset',\n 'form.submit': 'Submit',\n 'form.unsavedChanges': 'Unsaved changes',\n 'form.unsavedWarning': 'You have unsaved changes. Are you sure you want to leave?',\n} as const;\n"],"mappings":";AAAA,IAAA,eAAe;CACb,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB,iBAAiB;CACjB,cAAc;CACd,eAAe;CACf,uBAAuB;CACvB,uBAAuB;AACzB"}
@@ -1,5 +1,9 @@
1
1
  //#region src/i18n/resources/zhCn/form.d.ts
2
2
  declare const _default: {
3
+ readonly 'form.list.add': "添加";
4
+ readonly 'form.list.empty': "暂无内容";
5
+ readonly 'form.list.remove': "删除";
6
+ readonly 'form.required': "此项为必填项";
3
7
  readonly 'form.reset': "重置";
4
8
  readonly 'form.submit': "提交";
5
9
  readonly 'form.unsavedChanges': "未保存的更改";
@@ -1,5 +1,9 @@
1
1
  //#region src/i18n/resources/zhCn/form.ts
2
2
  var form_default = {
3
+ "form.list.add": "添加",
4
+ "form.list.empty": "暂无内容",
5
+ "form.list.remove": "删除",
6
+ "form.required": "此项为必填项",
3
7
  "form.reset": "重置",
4
8
  "form.submit": "提交",
5
9
  "form.unsavedChanges": "未保存的更改",
@@ -1 +1 @@
1
- {"version":3,"file":"form.mjs","names":[],"sources":["../../../../src/i18n/resources/zhCn/form.ts"],"sourcesContent":["export default {\n 'form.reset': '重置',\n 'form.submit': '提交',\n 'form.unsavedChanges': '未保存的更改',\n 'form.unsavedWarning': '您有未保存的更改。确定要离开吗?',\n} as const;\n"],"mappings":";AAAA,IAAA,eAAe;CACb,cAAc;CACd,eAAe;CACf,uBAAuB;CACvB,uBAAuB;AACzB"}
1
+ {"version":3,"file":"form.mjs","names":[],"sources":["../../../../src/i18n/resources/zhCn/form.ts"],"sourcesContent":["export default {\n 'form.list.add': '添加',\n 'form.list.empty': '暂无内容',\n 'form.list.remove': '删除',\n 'form.required': '此项为必填项',\n 'form.reset': '重置',\n 'form.submit': '提交',\n 'form.unsavedChanges': '未保存的更改',\n 'form.unsavedWarning': '您有未保存的更改。确定要离开吗?',\n} as const;\n"],"mappings":";AAAA,IAAA,eAAe;CACb,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB,iBAAiB;CACjB,cAAc;CACd,eAAe;CACf,uBAAuB;CACvB,uBAAuB;AACzB"}
package/es/index.d.mts CHANGED
@@ -185,6 +185,7 @@ import { AUTO_HEIGHT_MESSAGE_TYPE } from "./HtmlPreview/injectAutoHeightScript.m
185
185
  import "./HtmlPreview/index.mjs";
186
186
  import { ImagePreviewOptions, ImageProps, PreviewGroupProps } from "./Image/type.mjs";
187
187
  import PreviewGroup from "./Image/PreviewGroup.mjs";
188
+ import { UseImagePreviewResult, useImagePreview } from "./Image/useImagePreview.mjs";
188
189
  import Image from "./Image/index.mjs";
189
190
  import A from "./A/index.mjs";
190
191
  import { BadgeProps, BadgeSize, BadgeStatus } from "./base-ui/Badge/type.mjs";
@@ -328,4 +329,4 @@ import { LayoutToc } from "./Layout/components/LayoutToc.mjs";
328
329
  import Layout from "./Layout/index.mjs";
329
330
  import { rehypeStreamAnimated } from "@lobehub/streamdown";
330
331
  import { ErrorBoundary, ErrorBoundaryProps } from "react-error-boundary";
331
- export { A, type AProps, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionIcon, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconProps, type ActionIconSize, Alert, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemType, Block, type BlockProps, Burger, type BurgerProps, Button, type ButtonProps, type CDN, CLASSNAMES, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapse, type CollapseItemType, type CollapseProps, type ColorPalettes, type ColorPalettesAlpha, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, type DiffViewMode, type DivProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelProps, DraggableSideNav, type DraggableSideNavProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type MenuItemType as DropdownMenuItemType, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, _default as FlexBasic, type FlexBasicProps, _default as Flexbox, type FlexboxProps, FluentEmoji, type FluentEmojiProps, FontLoader, type FontLoaderProps, Footer, type FooterProps, Form, FormGroup, type FormGroupItemType, type FormGroupProps, type FormInstance, FormItem, type FormItemProps, FormModal, type FormModalProps, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, Freeze, type FreezeProps, type GenericItemType, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconProps, IconProvider, type IconSize, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, Input, InputNumber, type InputNumberProps, InputOPT, type InputOPTProps, InputPassword, type InputPasswordProps, type InputProps, type ItemType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, List, ListItem, type ListItemProps, type ListProps, type LobeCustomStylish, type LobeCustomToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, Menu, type MenuCheckboxItemType, type MenuInfo, type MenuItemType, type MenuProps, Mermaid, type MermaidProps, Meta, type MetaProps, Modal, ModalHost, type ModalHostProps, type ModalInstance, type ModalProps, ModalProvider, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationProps, type PaginationSize, PatchDiff, type PatchDiffProps, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, PopoverPortal, type PopoverPortalAtomProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, type RawModalComponent, type RawModalComponentProps, type RawModalInstance, type RawModalKeyOptions, type RawModalOptions, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedProps, Select, type SelectProps, _default$1 as ShikiLobeTheme, SideNav, type SideNavProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBlock, type SkeletonBlockProps, SkeletonButton, type SkeletonButtonProps, SkeletonParagraph, type SkeletonParagraphProps, type SkeletonProps, SkeletonTags, type SkeletonTagsProps, SkeletonTitle, type SkeletonTitleProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, type SvgProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Tabs, type TabsProps, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextProps, ThemeProvider, type ThemeProviderProps, ThemeSwitch, type ThemeSwitchProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, Video, type VideoProps, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, installGlobalFocusRing, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };
332
+ export { A, type AProps, Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionIcon, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconProps, type ActionIconSize, Alert, type AlertProps, AutoComplete, type AutoCompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemType, Block, type BlockProps, Burger, type BurgerProps, Button, type ButtonProps, type CDN, CLASSNAMES, Center, type CenterProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapse, type CollapseItemType, type CollapseProps, type ColorPalettes, type ColorPalettesAlpha, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, type DiffViewMode, type DivProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelProps, DraggableSideNav, type DraggableSideNavProps, Drawer, type DrawerProps, Dropdown, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type MenuItemType as DropdownMenuItemType, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, type DropdownProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, _default as FlexBasic, type FlexBasicProps, _default as Flexbox, type FlexboxProps, FluentEmoji, type FluentEmojiProps, FontLoader, type FontLoaderProps, Footer, type FooterProps, Form, FormGroup, type FormGroupItemType, type FormGroupProps, type FormInstance, FormItem, type FormItemProps, FormModal, type FormModalProps, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, Freeze, type FreezeProps, type GenericItemType, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconProps, IconProvider, type IconSize, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, Input, InputNumber, type InputNumberProps, InputOPT, type InputOPTProps, InputPassword, type InputPasswordProps, type InputProps, type ItemType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, List, ListItem, type ListItemProps, type ListProps, type LobeCustomStylish, type LobeCustomToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, Menu, type MenuCheckboxItemType, type MenuInfo, type MenuItemType, type MenuProps, Mermaid, type MermaidProps, Meta, type MetaProps, Modal, ModalHost, type ModalHostProps, type ModalInstance, type ModalProps, ModalProvider, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationProps, type PaginationSize, PatchDiff, type PatchDiffProps, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, PopoverPortal, type PopoverPortalAtomProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, type RawModalComponent, type RawModalComponentProps, type RawModalInstance, type RawModalKeyOptions, type RawModalOptions, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedProps, Select, type SelectProps, _default$1 as ShikiLobeTheme, SideNav, type SideNavProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBlock, type SkeletonBlockProps, SkeletonButton, type SkeletonButtonProps, SkeletonParagraph, type SkeletonParagraphProps, type SkeletonProps, SkeletonTags, type SkeletonTagsProps, SkeletonTitle, type SkeletonTitleProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, type SvgProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Tabs, type TabsProps, Tag, type TagProps, Text, TextArea, type TextAreaProps, type TextProps, ThemeProvider, type ThemeProviderProps, ThemeSwitch, type ThemeSwitchProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, Toc, type TocProps, Tooltip, TooltipGroup, type TooltipProps, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseImagePreviewResult, Video, type VideoProps, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, installGlobalFocusRing, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useImagePreview, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };
package/es/index.mjs CHANGED
@@ -116,6 +116,7 @@ import { AUTO_HEIGHT_MESSAGE_TYPE } from "./HtmlPreview/injectAutoHeightScript.m
116
116
  import { HtmlPreviewIframe } from "./HtmlPreview/Iframe.mjs";
117
117
  import HtmlPreview from "./HtmlPreview/HtmlPreview.mjs";
118
118
  import PreviewGroup from "./Image/PreviewGroup.mjs";
119
+ import { useImagePreview } from "./Image/useImagePreview.mjs";
119
120
  import Image from "./Image/index.mjs";
120
121
  import ImageSelect from "./ImageSelect/ImageSelect.mjs";
121
122
  import Input from "./Input/Input.mjs";
@@ -168,4 +169,4 @@ import ThemeSwitch from "./ThemeSwitch/ThemeSwitch.mjs";
168
169
  import Toc from "./Toc/Toc.mjs";
169
170
  import { rehypeStreamAnimated } from "@lobehub/streamdown";
170
171
  import { ErrorBoundary } from "react-error-boundary";
171
- export { A, Accordion, AccordionItem, ActionIcon, ActionIconGroup, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Block, Burger, Button, CLASSNAMES, Center, Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapse, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelFooter, DraggablePanelHeader, DraggableSideNav, Drawer, Dropdown, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FluentEmoji, FontLoader, Footer, Form, FormGroup, FormItem, FormModal, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input, InputNumber, InputOPT, InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, ListItem, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Menu, Mermaid, Meta, Modal, ModalHost, ModalProvider, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, Select, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonBlock, SkeletonButton, SkeletonParagraph, SkeletonTags, SkeletonTitle, SliderWithInput, Snippet, SortableList, Spin, SyntaxHighlighter, SyntaxMermaid, Tabs, Tag, Text, TextArea, ThemeProvider, ThemeSwitch, ToastHost, Toc, Tooltip, TooltipGroup, Typography, Upload, UploadDragger, Video, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, installGlobalFocusRing, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };
172
+ export { A, Accordion, AccordionItem, ActionIcon, ActionIconGroup, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Block, Burger, Button, CLASSNAMES, Center, Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapse, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelFooter, DraggablePanelHeader, DraggableSideNav, Drawer, Dropdown, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FluentEmoji, FontLoader, Footer, Form, FormGroup, FormItem, FormModal, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input, InputNumber, InputOPT, InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, ListItem, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Menu, Mermaid, Meta, Modal, ModalHost, ModalProvider, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, Select, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonBlock, SkeletonButton, SkeletonParagraph, SkeletonTags, SkeletonTitle, SliderWithInput, Snippet, SortableList, Spin, SyntaxHighlighter, SyntaxMermaid, Tabs, Tag, Text, TextArea, ThemeProvider, ThemeSwitch, ToastHost, Toc, Tooltip, TooltipGroup, Typography, Upload, UploadDragger, Video, closeContextMenu, combineKeys, copyToClipboard, createModal, createRawModal, findCustomThemeName, genCdnUrl, generateColorNeutralPalette, generateColorPalette, highlighterThemes, containsScript as htmlPreviewContainsScript, installGlobalFocusRing, isFullHtmlDocument, isHtmlContentClosed, generateCustomStylish as lobeCustomStylish, generateCustomToken as lobeCustomToken, staticStylish as lobeStaticStylish, styles as menuSharedStyles, mermaidThemes, neutralColors, neutralColorsSwatches, placementMap, preprocessMarkdownContent, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, setContextMenuInterceptor, showContextMenu, stopPropagation, toFloatingUIPlacement, toast, updateContextMenuItems, useAppElement, useCdnFn, useImagePreview, useModalContext, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useToast, useTranslation };