@astryxdesign/lab 0.2.0-canary.8d64648 → 0.2.0-canary.8dfd7cf

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 (63) hide show
  1. package/dist/BottomSheet/BottomSheet.d.ts +41 -35
  2. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  3. package/dist/BottomSheet/BottomSheet.js +222 -75
  4. package/dist/BottomSheet/snapOffsets.d.ts +54 -0
  5. package/dist/BottomSheet/snapOffsets.d.ts.map +1 -0
  6. package/dist/BottomSheet/snapOffsets.js +101 -0
  7. package/dist/BottomSheet/useSheetGestures.d.ts +55 -12
  8. package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
  9. package/dist/BottomSheet/useSheetGestures.js +383 -40
  10. package/dist/Chart/index.d.ts +1 -1
  11. package/dist/Chart/index.d.ts.map +1 -1
  12. package/dist/Chart/index.js +1 -1
  13. package/dist/Stepper/Step.d.ts +1 -1
  14. package/dist/Stepper/Step.js +1 -1
  15. package/dist/Stepper/Stepper.d.ts +1 -1
  16. package/dist/Stepper/Stepper.js +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/lab.css +15 -8
  19. package/package.json +3 -2
  20. package/src/BottomSheet/BottomSheet.doc.mjs +13 -13
  21. package/src/BottomSheet/BottomSheet.test.tsx +81 -4
  22. package/src/BottomSheet/BottomSheet.tsx +333 -97
  23. package/src/BottomSheet/snapOffsets.test.ts +146 -0
  24. package/src/BottomSheet/snapOffsets.ts +126 -0
  25. package/src/BottomSheet/useSheetGestures.doc.mjs +7 -6
  26. package/src/BottomSheet/useSheetGestures.test.ts +315 -65
  27. package/src/BottomSheet/useSheetGestures.ts +515 -55
  28. package/src/Chart/ChartArea.doc.mjs +1 -1
  29. package/src/Chart/ChartBar.doc.mjs +1 -1
  30. package/src/Chart/ChartCandlestick.doc.mjs +1 -1
  31. package/src/Chart/ChartDot.doc.mjs +1 -1
  32. package/src/Chart/ChartDotGL.doc.mjs +1 -1
  33. package/src/Chart/ChartDotGLInteractive.doc.mjs +1 -1
  34. package/src/Chart/ChartHeatmapGL.doc.mjs +1 -1
  35. package/src/Chart/ChartLine.doc.mjs +1 -1
  36. package/src/Chart/ChartStreamGL.doc.mjs +1 -1
  37. package/src/Chart/index.ts +0 -1
  38. package/src/Chat/ChatEmojiPicker.doc.mjs +1 -1
  39. package/src/Chat/ChatReactionBar.doc.mjs +1 -1
  40. package/src/Chat/ChatTypingIndicator.doc.mjs +1 -1
  41. package/src/Chat/ChatUnreadDivider.doc.mjs +1 -1
  42. package/src/ChatReasoning/ChatReasoning.doc.mjs +1 -1
  43. package/src/CircularProgress/CircularProgress.doc.mjs +3 -3
  44. package/src/CodeEditor/CodeEditor.doc.mjs +1 -1
  45. package/src/Drawer/Drawer.doc.mjs +3 -3
  46. package/src/InfoTip/InfoTip.doc.mjs +3 -3
  47. package/src/LogStream/LogStream.doc.mjs +1 -1
  48. package/src/Radial/RadialChart.doc.mjs +1 -1
  49. package/src/RichTextEditor/RichTextEditor.doc.mjs +1 -1
  50. package/src/SVGIcon/SVGIcon.doc.mjs +1 -1
  51. package/src/Sankey/SankeyChart.doc.mjs +1 -1
  52. package/src/Schedule/Schedule.doc.mjs +1 -1
  53. package/src/Stat/Stat.doc.mjs +3 -3
  54. package/src/Stepper/Step.doc.mjs +1 -1
  55. package/src/Stepper/Step.tsx +1 -1
  56. package/src/Stepper/Stepper.doc.mjs +3 -3
  57. package/src/Stepper/Stepper.tsx +1 -1
  58. package/src/ThreeD/3DBar.doc.mjs +1 -1
  59. package/src/ThreeD/3DChart.doc.mjs +1 -1
  60. package/src/ThreeD/3DScatter.doc.mjs +1 -1
  61. package/src/ThreeD/3DScatterGL.doc.mjs +1 -1
  62. package/src/ThreeD/3DSurface.doc.mjs +1 -1
  63. package/src/index.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChartArea',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChartBar',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChartCandlestick',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChartDot',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChartDotGL',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChartDotGLInteractive',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChartHeatmapGL',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChartLine',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChartStreamGL',
@@ -68,7 +68,6 @@ export {
68
68
  sizeCanvas,
69
69
  mountCanvasOverSVG,
70
70
  compileShader,
71
- createProgram as createGLProgram,
72
71
  CIRCLE_FRAG_BODY,
73
72
  POINT_SIZE_COMPENSATION,
74
73
  } from './webgl';
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChatEmojiPicker',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChatReactionBar',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChatTypingIndicator',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChatUnreadDivider',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'ChatReasoning',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'CircularProgress',
@@ -117,7 +117,7 @@ export const docs = {
117
117
  ],
118
118
  };
119
119
 
120
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
120
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
121
121
  export const docsZh = {
122
122
  name: 'CircularProgress',
123
123
  displayName: 'Circular Progress',
@@ -212,7 +212,7 @@ export const docsZh = {
212
212
  },
213
213
  };
214
214
 
215
- /** @type {import('../../../core/src/docs-types').TranslationDoc} */
215
+ /** @type {import('@astryxdesign/cli/authoring').ComponentTranslationDoc} */
216
216
  export const docsDense = {
217
217
  description:
218
218
  'Circular/radial progress indicator showing completion as a ring arc.',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'CodeEditor',
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
2
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
3
3
 
4
4
  export const docs = {
5
5
  name: 'Drawer',
@@ -123,7 +123,7 @@ const [lineItem, setLineItem] = useState(null);
123
123
  ],
124
124
  };
125
125
 
126
- /** @type {import('../../../core/src/docs-types').TranslationDoc} */
126
+ /** @type {import('@astryxdesign/cli/authoring').ComponentTranslationDoc} */
127
127
  export const docsZh = {
128
128
  usage: {
129
129
  description: '用于检查器、详情视图和面板的边缘浮层——"点击表格行查看详情"的模式。按 Escape 关闭抽屉,焦点返回到打开它的元素。滑入/滑出动画遵循 prefers-reduced-motion。堆叠约定:同级抽屉后开的在上层,Escape 只关闭最上层的,关闭顺序由内向外——请以同级方式渲染,切勿嵌套。',
@@ -139,7 +139,7 @@ export const docsZh = {
139
139
  },
140
140
  };
141
141
 
142
- /** @type {import('../../../core/src/docs-types').TranslationDoc} */
142
+ /** @type {import('@astryxdesign/cli/authoring').ComponentTranslationDoc} */
143
143
  export const docsDense = {
144
144
  description: 'edge-anchored overlay (native <dialog>): start/end side panel or top/bottom sheet',
145
145
  usage: {
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'InfoTip',
@@ -39,7 +39,7 @@ export const docs = {
39
39
  },
40
40
  };
41
41
 
42
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
42
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
43
43
  export const docsZh = {
44
44
  name: 'InfoTip',
45
45
  displayName: 'Info Tip',
@@ -75,7 +75,7 @@ export const docsZh = {
75
75
  },
76
76
  };
77
77
 
78
- /** @type {import('../../../core/src/docs-types').TranslationDoc} */
78
+ /** @type {import('@astryxdesign/cli/authoring').ComponentTranslationDoc} */
79
79
  export const docsDense = {
80
80
  description:
81
81
  'Inline info-icon help affordance: accessible "i" button trigger pre-wired into a Tooltip.',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'LogStream',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'RadialChart',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'RichTextEditor',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'SVGIcon',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'SankeyChart',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'Schedule',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'Stat',
@@ -70,7 +70,7 @@ export const docs = {
70
70
  },
71
71
  };
72
72
 
73
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
73
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
74
74
  export const docsZh = {
75
75
  name: 'Stat',
76
76
  displayName: 'Stat',
@@ -136,7 +136,7 @@ export const docsZh = {
136
136
  },
137
137
  };
138
138
 
139
- /** @type {import('../../../core/src/docs-types').TranslationDoc} */
139
+ /** @type {import('@astryxdesign/cli/authoring').ComponentTranslationDoc} */
140
140
  export const docsDense = {
141
141
  description: 'KPI/metric display: label, large tabular-nums value, sentiment-aware delta, and trend media slot.',
142
142
  usage: {
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'Step',
@@ -13,7 +13,7 @@
13
13
  * - /packages/lab/src/Stepper/Stepper.test.tsx
14
14
  * - /packages/lab/src/Stepper/index.ts
15
15
  * - /apps/storybook/stories/Stepper.stories.tsx
16
- * - /packages/cli/templates/blocks/components/Stepper/ (showcase blocks)
16
+ * - /packages/cli/assets/templates/blocks/components/Stepper/ (showcase blocks)
17
17
  */
18
18
 
19
19
  import {type ReactNode} from 'react';
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: 'Stepper',
@@ -165,7 +165,7 @@ export const docs = {
165
165
  },
166
166
  };
167
167
 
168
- /** @type {import('../../../core/src/docs-types').TranslationDoc} */
168
+ /** @type {import('@astryxdesign/cli/authoring').ComponentTranslationDoc} */
169
169
  export const docsDense = {
170
170
  description: 'numbered step sequence for multi-step workflows',
171
171
  usage: {
@@ -212,7 +212,7 @@ export const docsDense = {
212
212
  ],
213
213
  };
214
214
 
215
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
215
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
216
216
  export const docsZh = {
217
217
  name: 'Stepper',
218
218
  displayName: 'Stepper',
@@ -13,7 +13,7 @@
13
13
  * - /packages/lab/src/Stepper/Stepper.test.tsx (tests for new/changed behavior)
14
14
  * - /packages/lab/src/Stepper/index.ts (exports if types change)
15
15
  * - /apps/storybook/stories/Stepper.stories.tsx (storybook stories)
16
- * - /packages/cli/templates/blocks/components/Stepper/ (showcase blocks)
16
+ * - /packages/cli/assets/templates/blocks/components/Stepper/ (showcase blocks)
17
17
  */
18
18
 
19
19
  import {Children, useMemo, type ReactNode} from 'react';
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: '3DBar',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: '3DChart',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: '3DScatter',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: '3DScatterGL',
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
 
3
- /** @type {import('../../../core/src/docs-types').ComponentDoc} */
3
+ /** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
4
4
 
5
5
  export const docs = {
6
6
  name: '3DSurface',
package/src/index.ts CHANGED
@@ -35,7 +35,7 @@ export * from './Chat';
35
35
  // Drawer — experimental overlay panel
36
36
  export {Drawer, type DrawerProps} from './Drawer';
37
37
 
38
- // BottomSheet — mobile touch sheet built on the Drawer <dialog> engine
38
+ // BottomSheet — mobile touch sheet on a native modal <dialog>
39
39
  export {BottomSheet, type BottomSheetProps} from './BottomSheet';
40
40
 
41
41
  // Stat — experimental KPI/metric display