@lec-space/liquidglass 0.0.0-stage → 1.0.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 (90) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +58 -2
  3. package/dist/button-BCSOcrTI.cjs +1 -0
  4. package/dist/button-SXD_7EGY.js +970 -0
  5. package/dist/index.cjs +2 -0
  6. package/dist/index.js +4440 -0
  7. package/dist/styles.css +3804 -0
  8. package/dist/types/activity-calendar.d.ts +18 -0
  9. package/dist/types/alert.d.ts +18 -0
  10. package/dist/types/avatar.d.ts +12 -0
  11. package/dist/types/badge.d.ts +13 -0
  12. package/dist/types/button.d.ts +16 -0
  13. package/dist/types/card.d.ts +10 -0
  14. package/dist/types/checkbox.d.ts +9 -0
  15. package/dist/types/command-palette.d.ts +22 -0
  16. package/dist/types/config-provider.d.ts +62 -0
  17. package/dist/types/context-menu.d.ts +17 -0
  18. package/dist/types/data-table.d.ts +32 -0
  19. package/dist/types/date-range-picker.d.ts +23 -0
  20. package/dist/types/descriptions.d.ts +13 -0
  21. package/dist/types/dialog.d.ts +19 -0
  22. package/dist/types/drawer.d.ts +7 -0
  23. package/dist/types/empty.d.ts +8 -0
  24. package/dist/types/filter-bar.d.ts +9 -0
  25. package/dist/types/form-field.d.ts +19 -0
  26. package/dist/types/glass-group.d.ts +10 -0
  27. package/dist/types/glass.d.ts +3 -0
  28. package/dist/types/import-wizard.d.ts +11 -0
  29. package/dist/types/index.d.ts +53 -0
  30. package/dist/types/input.d.ts +11 -0
  31. package/dist/types/internal/bend.d.ts +15 -0
  32. package/dist/types/internal/calendar-day.d.ts +13 -0
  33. package/dist/types/internal/chevron.d.ts +6 -0
  34. package/dist/types/internal/contour.d.ts +10 -0
  35. package/dist/types/internal/controllable.d.ts +1 -0
  36. package/dist/types/internal/cx.d.ts +1 -0
  37. package/dist/types/internal/date-only.d.ts +4 -0
  38. package/dist/types/internal/field-error.d.ts +6 -0
  39. package/dist/types/internal/floating.d.ts +15 -0
  40. package/dist/types/internal/form-reset.d.ts +3 -0
  41. package/dist/types/internal/hold.d.ts +8 -0
  42. package/dist/types/internal/href.d.ts +7 -0
  43. package/dist/types/internal/jelly.d.ts +22 -0
  44. package/dist/types/internal/modal.d.ts +11 -0
  45. package/dist/types/internal/placement.d.ts +33 -0
  46. package/dist/types/internal/press.d.ts +2 -0
  47. package/dist/types/internal/range-calendar-navigation.d.ts +6 -0
  48. package/dist/types/internal/range-calendar.d.ts +11 -0
  49. package/dist/types/internal/refraction.d.ts +20 -0
  50. package/dist/types/internal/scroller.d.ts +2 -0
  51. package/dist/types/internal/sheet-drag.d.ts +17 -0
  52. package/dist/types/internal/spring.d.ts +13 -0
  53. package/dist/types/internal/styles.d.ts +5 -0
  54. package/dist/types/internal/tab-motion.d.ts +2 -0
  55. package/dist/types/internal/tree-branch.d.ts +13 -0
  56. package/dist/types/member-picker.d.ts +15 -0
  57. package/dist/types/menu.d.ts +61 -0
  58. package/dist/types/message.d.ts +12 -0
  59. package/dist/types/multi-select.d.ts +25 -0
  60. package/dist/types/navigation-bar.d.ts +25 -0
  61. package/dist/types/page-control.d.ts +13 -0
  62. package/dist/types/pagination.d.ts +12 -0
  63. package/dist/types/popover.d.ts +20 -0
  64. package/dist/types/progress.d.ts +10 -0
  65. package/dist/types/radio.d.ts +8 -0
  66. package/dist/types/search-field.d.ts +5 -0
  67. package/dist/types/segmented-control.d.ts +14 -0
  68. package/dist/types/select.d.ts +20 -0
  69. package/dist/types/sheet.d.ts +14 -0
  70. package/dist/types/skeleton.d.ts +9 -0
  71. package/dist/types/slider.d.ts +10 -0
  72. package/dist/types/statistic.d.ts +11 -0
  73. package/dist/types/stepper.d.ts +12 -0
  74. package/dist/types/style-entry.d.ts +1 -0
  75. package/dist/types/switch.d.ts +7 -0
  76. package/dist/types/tab-bar.d.ts +23 -0
  77. package/dist/types/table.d.ts +22 -0
  78. package/dist/types/tabs.d.ts +19 -0
  79. package/dist/types/tag.d.ts +10 -0
  80. package/dist/types/text-area.d.ts +13 -0
  81. package/dist/types/toast.d.ts +35 -0
  82. package/dist/types/toolbar.d.ts +13 -0
  83. package/dist/types/tooltip.d.ts +16 -0
  84. package/dist/types/tree.d.ts +18 -0
  85. package/dist/types/typography.d.ts +11 -0
  86. package/dist/types/upload.d.ts +15 -0
  87. package/dist/types/workspace.d.ts +22 -0
  88. package/dist/workspace.cjs +1 -0
  89. package/dist/workspace.js +42 -0
  90. package/package.json +65 -3
@@ -0,0 +1,15 @@
1
+ /** 文件选择与拖放入口,校验大小、数量和类型,网络上传由接入项目处理。 */
2
+ import { type JSX } from "react";
3
+ export interface UploadProps {
4
+ value?: readonly File[];
5
+ defaultValue?: readonly File[];
6
+ onValueChange?: (files: File[]) => void;
7
+ accept?: string;
8
+ multiple?: boolean;
9
+ maxFiles?: number;
10
+ maxBytes?: number;
11
+ disabled?: boolean;
12
+ progress?: number;
13
+ "aria-label": string;
14
+ }
15
+ export declare function Upload({ value, defaultValue, onValueChange, accept, multiple, maxFiles, maxBytes, disabled, progress, "aria-label": label, }: UploadProps): JSX.Element;
@@ -0,0 +1,22 @@
1
+ /** 可选分栏工作区,复用项目已有的面板引擎;从独立 workspace 入口按需加载。 */
2
+ import "./style-entry.js";
3
+ import { type JSX, type ReactNode } from "react";
4
+ import { type Layout, type PanelProps } from "react-resizable-panels";
5
+ export interface WorkspacePanel {
6
+ id: string;
7
+ title: ReactNode;
8
+ content: ReactNode;
9
+ defaultSize?: PanelProps["defaultSize"];
10
+ minSize?: PanelProps["minSize"];
11
+ maxSize?: PanelProps["maxSize"];
12
+ collapsible?: boolean;
13
+ }
14
+ export interface ResizableWorkspaceProps {
15
+ panels: readonly WorkspacePanel[];
16
+ direction?: "horizontal" | "vertical";
17
+ defaultLayout?: Layout;
18
+ onLayoutChange?: (layout: Layout) => void;
19
+ onReset?: () => void;
20
+ "aria-label": string;
21
+ }
22
+ export declare function ResizableWorkspace({ panels, direction, defaultLayout, onLayoutChange, onReset, "aria-label": label, }: ResizableWorkspaceProps): JSX.Element;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./button-BCSOcrTI.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("react-resizable-panels");function i({panels:i,direction:a=`horizontal`,defaultLayout:o,onLayoutChange:s,onReset:c,"aria-label":l}){return(0,n.jsxs)(`div`,{className:`lg-workspace`,"aria-label":l,children:[c&&(0,n.jsx)(`div`,{className:`lg-workspace-tools`,children:(0,n.jsx)(e.t,{size:`small`,onClick:c,children:`重置布局`})}),(0,n.jsx)(r.Group,{style:{flex:1,minHeight:0},orientation:a,defaultLayout:o,onLayoutChanged:e=>s?.(e),children:i.map((e,i)=>(0,n.jsxs)(t.Fragment,{children:[i>0&&(0,n.jsx)(r.Separator,{className:`lg-workspace-separator`,"aria-label":`调整分栏`}),(0,n.jsx)(r.Panel,{id:e.id,defaultSize:e.defaultSize,minSize:e.minSize,maxSize:e.maxSize,collapsible:e.collapsible,children:(0,n.jsxs)(`section`,{className:`lg-workspace-panel`,children:[(0,n.jsx)(`header`,{children:e.title}),(0,n.jsx)(`div`,{children:e.content})]})})]},e.id))})]})}exports.ResizableWorkspace=i;
@@ -0,0 +1,42 @@
1
+ import { t as e } from "./button-SXD_7EGY.js";
2
+ import { Fragment as t } from "react";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ import { Group as i, Panel as a, Separator as o } from "react-resizable-panels";
5
+ // src/workspace.tsx
6
+ function s({ panels: s, direction: c = "horizontal", defaultLayout: l, onLayoutChange: u, onReset: d, "aria-label": f }) {
7
+ return /* @__PURE__ */ r("div", {
8
+ className: "lg-workspace",
9
+ "aria-label": f,
10
+ children: [d && /* @__PURE__ */ n("div", {
11
+ className: "lg-workspace-tools",
12
+ children: /* @__PURE__ */ n(e, {
13
+ size: "small",
14
+ onClick: d,
15
+ children: "重置布局"
16
+ })
17
+ }), /* @__PURE__ */ n(i, {
18
+ style: {
19
+ flex: 1,
20
+ minHeight: 0
21
+ },
22
+ orientation: c,
23
+ defaultLayout: l,
24
+ onLayoutChanged: (e) => u?.(e),
25
+ children: s.map((e, i) => /* @__PURE__ */ r(t, { children: [i > 0 && /* @__PURE__ */ n(o, {
26
+ className: "lg-workspace-separator",
27
+ "aria-label": "调整分栏"
28
+ }), /* @__PURE__ */ n(a, {
29
+ id: e.id,
30
+ defaultSize: e.defaultSize,
31
+ minSize: e.minSize,
32
+ maxSize: e.maxSize,
33
+ collapsible: e.collapsible,
34
+ children: /* @__PURE__ */ r("section", {
35
+ className: "lg-workspace-panel",
36
+ children: [/* @__PURE__ */ n("header", { children: e.title }), /* @__PURE__ */ n("div", { children: e.content })]
37
+ })
38
+ })] }, e.id))
39
+ })]
40
+ });
41
+ }
42
+ export { s as ResizableWorkspace };
package/package.json CHANGED
@@ -1,6 +1,68 @@
1
1
  {
2
2
  "name": "@lec-space/liquidglass",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "sideEffects": [
7
+ "./src/style-entry.ts",
8
+ "./src/index.ts",
9
+ "./src/workspace.tsx",
10
+ "./dist/*.js",
11
+ "./dist/*.cjs",
12
+ "**/*.css"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/types/index.d.ts",
17
+ "import": "./dist/index.js",
18
+ "require": "./dist/index.cjs"
19
+ },
20
+ "./workspace": {
21
+ "types": "./dist/types/workspace.d.ts",
22
+ "import": "./dist/workspace.js",
23
+ "require": "./dist/workspace.cjs"
24
+ },
25
+ "./styles.css": "./dist/styles.css"
26
+ },
27
+ "peerDependencies": {
28
+ "react": ">=18",
29
+ "react-dom": ">=18",
30
+ "react-resizable-panels": "^4.21.0"
31
+ },
32
+ "devDependencies": {
33
+ "@types/react": "19.3.0",
34
+ "@types/react-dom": "19.3.0",
35
+ "typescript": "5.9.3",
36
+ "vite": "8.3.7",
37
+ "react-resizable-panels": "4.21.0"
38
+ },
39
+ "files": [
40
+ "dist",
41
+ "LICENSE",
42
+ "README.md"
43
+ ],
44
+ "peerDependenciesMeta": {
45
+ "react-resizable-panels": {
46
+ "optional": true
47
+ }
48
+ },
49
+ "publishConfig": {
50
+ "access": "public",
51
+ "registry": "https://registry.npmjs.org"
52
+ },
53
+ "dependencies": {
54
+ "@daypicker/react": "10.0.2"
55
+ },
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/lec-org/liquidglass.git"
59
+ },
60
+ "homepage": "https://lec-org.github.io/liquidglass/",
61
+ "bugs": {
62
+ "url": "https://github.com/lec-org/liquidglass/issues"
63
+ },
64
+ "scripts": {
65
+ "typecheck": "tsc --noEmit",
66
+ "build": "vite build && tsc -p tsconfig.build.json && node scripts/finalize-build.mjs"
67
+ }
6
68
  }