@astryxdesign/lab 0.4.0-canary.dcf861c → 0.4.0-canary.e18b6db

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 (48) hide show
  1. package/dist/BottomSheet/BottomSheet.d.ts +3 -2
  2. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  3. package/dist/index.d.ts +0 -1
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +4 -3
  6. package/dist/lab.css +0 -28
  7. package/package.json +5 -62
  8. package/src/BottomSheet/BottomSheet.doc.mjs +4 -4
  9. package/src/BottomSheet/BottomSheet.tsx +3 -2
  10. package/src/index.ts +4 -28
  11. package/dist/RichTextEditor/RichTextEditor.d.ts +0 -222
  12. package/dist/RichTextEditor/RichTextEditor.d.ts.map +0 -1
  13. package/dist/RichTextEditor/RichTextEditor.js +0 -489
  14. package/dist/RichTextEditor/RichTextEditorAutoLinkPlugin.d.ts +0 -84
  15. package/dist/RichTextEditor/RichTextEditorAutoLinkPlugin.d.ts.map +0 -1
  16. package/dist/RichTextEditor/RichTextEditorAutoLinkPlugin.js +0 -94
  17. package/dist/RichTextEditor/RichTextEditorToolbar.d.ts +0 -126
  18. package/dist/RichTextEditor/RichTextEditorToolbar.d.ts.map +0 -1
  19. package/dist/RichTextEditor/RichTextEditorToolbar.js +0 -633
  20. package/dist/RichTextEditor/RichTextView.d.ts +0 -65
  21. package/dist/RichTextEditor/RichTextView.d.ts.map +0 -1
  22. package/dist/RichTextEditor/RichTextView.js +0 -168
  23. package/dist/RichTextEditor/editorNodes.d.ts +0 -8
  24. package/dist/RichTextEditor/editorNodes.d.ts.map +0 -1
  25. package/dist/RichTextEditor/editorNodes.js +0 -23
  26. package/dist/RichTextEditor/editorTheme.d.ts +0 -7
  27. package/dist/RichTextEditor/editorTheme.d.ts.map +0 -1
  28. package/dist/RichTextEditor/editorTheme.js +0 -101
  29. package/dist/RichTextEditor/index.d.ts +0 -22
  30. package/dist/RichTextEditor/index.d.ts.map +0 -1
  31. package/dist/RichTextEditor/index.js +0 -20
  32. package/dist/RichTextEditor/linkUtils.d.ts +0 -22
  33. package/dist/RichTextEditor/linkUtils.d.ts.map +0 -1
  34. package/dist/RichTextEditor/linkUtils.js +0 -91
  35. package/dist/RichTextEditor/markdownSerializers.d.ts +0 -40
  36. package/dist/RichTextEditor/markdownSerializers.d.ts.map +0 -1
  37. package/dist/RichTextEditor/markdownSerializers.js +0 -85
  38. package/src/RichTextEditor/RichTextEditor.doc.mjs +0 -197
  39. package/src/RichTextEditor/RichTextEditor.test.tsx +0 -1389
  40. package/src/RichTextEditor/RichTextEditor.tsx +0 -840
  41. package/src/RichTextEditor/RichTextEditorAutoLinkPlugin.tsx +0 -115
  42. package/src/RichTextEditor/RichTextEditorToolbar.tsx +0 -789
  43. package/src/RichTextEditor/RichTextView.tsx +0 -227
  44. package/src/RichTextEditor/editorNodes.ts +0 -34
  45. package/src/RichTextEditor/editorTheme.ts +0 -180
  46. package/src/RichTextEditor/index.ts +0 -54
  47. package/src/RichTextEditor/linkUtils.ts +0 -93
  48. package/src/RichTextEditor/markdownSerializers.ts +0 -105
@@ -82,9 +82,10 @@ export interface BottomSheetProps extends BaseProps<HTMLDialogElement> {
82
82
  * - `true` (default) — `showModal()`: renders in the top layer with a focus
83
83
  * trap, a `::backdrop` scrim, body scroll lock, and tap-scrim-to-dismiss.
84
84
  * The background is inert. Use for focused tasks (filters, forms).
85
- * - `false` — `show()`: a non-modal sheet with **no scrim**. The page behind
85
+ * - `false`: `show()` renders a viewport-anchored overlay with **no scrim**. It is
86
+ * still layered above the page, not rendered inline, but the page behind
86
87
  * stays interactive and scrollable (like Material's *standard* bottom
87
- * sheet, or an iOS undimmed detent). Escape still closes while focus is
88
+ * sheet or an iOS undimmed detent). Escape still closes while focus is
88
89
  * inside the sheet, and drag/flick-to-dismiss still work. Use for a peek
89
90
  * surface that coexists with the page (e.g. a panel over a live map).
90
91
  * @default true
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAiC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAErE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AA2BlD;;;;;;GAMG;AACH,QAAA,MAAM,cAAc;;;;CAIV,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,cAAc,CAAC;AAiL5D,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACpE,wDAAwD;IACxD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAEnC,8EAA8E;IAC9E,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAExC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,0EAA0E;IAC1E,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;IAE7C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,oCAAoC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,MAAiB,EACjB,QAAe,EACf,MAAM,EACN,GAAG,KAAK,EACT,EAAE,gBAAgB,+BA0LlB;yBApMe,WAAW"}
1
+ {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAiC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAErE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AA2BlD;;;;;;GAMG;AACH,QAAA,MAAM,cAAc;;;;CAIV,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,cAAc,CAAC;AAiL5D,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACpE,wDAAwD;IACxD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAEnC,8EAA8E;IAC9E,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAExC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,0EAA0E;IAC1E,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;IAE7C;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,oCAAoC;IACpC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,GAAG,EACH,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,MAAiB,EACjB,QAAe,EACf,MAAM,EACN,GAAG,KAAK,EACT,EAAE,gBAAgB,+BA0LlB;yBApMe,WAAW"}
package/dist/index.d.ts CHANGED
@@ -30,5 +30,4 @@ export * from './Stepper';
30
30
  export * from './CircularProgress';
31
31
  export * from './ListInput';
32
32
  export { LogStream, type LogStreamProps, type LogEntry, type LogStreamLevel, } from './LogStream';
33
- export { RichTextEditor, type RichTextEditorProps, type RichTextEditorRef, type RichTextEditorStatus, type RichTextEditorStatusType, type RichTextEditorSize, type Transformer, RichTextView, type RichTextViewProps, sharedEditorTheme, markdownToEditorStateJSON, editorStateJSONToMarkdown, type MarkdownSerializerOptions, RichTextEditorToolbar, type RichTextEditorToolbarProps, RICHTEXT_ICON_KEYS, RichTextEditorAutoLinkPlugin, type RichTextEditorAutoLinkPluginProps, DEFAULT_LINK_MATCHERS, NEW_TAB_LINK_ATTRIBUTES, sanitizeUrl, validateUrl, URL_MATCHER, EMAIL_MATCHER, } from './RichTextEditor';
34
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAGH,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,EAAC,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,QAAQ,EACR,aAAa,EACb,uBAAuB,EACvB,KAAK,WAAW,GACjB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAC,MAAM,WAAW,CAAC;AAGvE,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,kCAAkC,EACvC,KAAK,yBAAyB,GAC/B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,GACxB,MAAM,+BAA+B,CAAC;AACvC,cAAc,QAAQ,CAAC;AAGvB,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAC,MAAM,UAAU,CAAC;AAGlD,OAAO,EAAC,WAAW,EAAE,KAAK,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAGjE,OAAO,EACL,IAAI,EACJ,KAAK,SAAS,EACd,QAAQ,EACR,KAAK,aAAa,EAClB,OAAO,EACP,KAAK,aAAa,EAClB,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AAU,EACV,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,SAAS,EACT,KAAK,cAAc,EACnB,WAAW,EACX,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,UAAU,EACV,KAAK,eAAe,EACpB,UAAU,EACV,KAAK,eAAe,EACpB,WAAW,EACX,KAAK,gBAAgB,EACrB,SAAS,EACT,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC;AAIlB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AAGnC,cAAc,aAAa,CAAC;AAG5B,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -70,6 +70,7 @@ export * from "./ListInput/index.js";
70
70
  // LogStream — experimental streaming log viewer
71
71
  export { LogStream } from "./LogStream/index.js";
72
72
 
73
- // RichTextEditor — experimental Lexical WYSIWYG editor (RFC facebook/astryx#3899)
74
- // Optional peer deps: lexical + @lexical/*. Read-only rendering via RichTextView.
75
- export { RichTextEditor, RichTextView, sharedEditorTheme, markdownToEditorStateJSON, editorStateJSONToMarkdown, RichTextEditorToolbar, RICHTEXT_ICON_KEYS, RichTextEditorAutoLinkPlugin, DEFAULT_LINK_MATCHERS, NEW_TAB_LINK_ATTRIBUTES, sanitizeUrl, validateUrl, URL_MATCHER, EMAIL_MATCHER } from "./RichTextEditor/index.js";
73
+ // RichTextEditor (RFC facebook/astryx#3899) has graduated out of @astryxdesign/lab
74
+ // into its own canary-only package, @astryxdesign/richtext, so it can be canaried
75
+ // independently (e.g. into EPS/Nest). Import it from there:
76
+ // import {RichTextEditor, RichTextView} from '@astryxdesign/richtext';
package/dist/lab.css CHANGED
@@ -122,12 +122,8 @@
122
122
  .x15daork:not(#\#):not(#\#){grid-row:auto}
123
123
  .x33j1x8:not(#\#):not(#\#){grid-row:var(--x-gridRow)}
124
124
  .x17y0mx6:not(#\#):not(#\#){inset-inline:0}
125
- .x10im51j:not(#\#):not(#\#){margin-block:0}
126
125
  .x1yqqeh1:not(#\#):not(#\#){margin-block:var(--spacing-0-5)}
127
- .xsq74q5:not(#\#):not(#\#){margin-block:var(--spacing-1)}
128
- .x1g06x3t:not(#\#):not(#\#){margin-block:var(--spacing-2)}
129
126
  .x1oqu0vw:not(#\#):not(#\#){margin-block:var(--x-marginBlock)}
130
- .xrxpjvj:not(#\#):not(#\#){margin-inline:0}
131
127
  .x1a2a7pz:not(#\#):not(#\#){outline:none}
132
128
  .xysyzu8:not(#\#):not(#\#){overflow:auto}
133
129
  .xb3r6kr:not(#\#):not(#\#){overflow:hidden}
@@ -149,9 +145,7 @@
149
145
  .x1pzlopt:not(#\#):not(#\#){padding-inline:var(--spacing-4)}
150
146
  .x30g6up:not(#\#):not(#\#){padding-inline:var(--x-paddingInline)}
151
147
  .x1ku5rj1:not(#\#):not(#\#){place-items:center}
152
- .xmqliwb:not(#\#):not(#\#){text-decoration:line-through}
153
148
  .x1hl2dhg:not(#\#):not(#\#){text-decoration:none}
154
- .x1bvjpef:not(#\#):not(#\#){text-decoration:underline}
155
149
  .xb0j27v:not(#\#):not(#\#){transition:grid-template-rows var(--duration-medium) var(--ease-standard)}
156
150
  .x1ob6yzd:not(#\#):not(#\#){transition:transform var(--duration-fast) var(--ease-standard)}
157
151
  .x1xfd4ba:hover:not(#\#):not(#\#){border-color:transparent}
@@ -256,10 +250,8 @@
256
250
  .x18b5jzi:not(#\#):not(#\#):not(#\#){border-inline-end-style:solid}
257
251
  .x10w94by:not(#\#):not(#\#):not(#\#){border-inline-end-width:0}
258
252
  .xw8tdv1:not(#\#):not(#\#):not(#\#){border-inline-end-width:var(--border-width)}
259
- .x14ydlgx:not(#\#):not(#\#):not(#\#){border-inline-start-color:var(--color-border-emphasized)}
260
253
  .x1j92z86:not(#\#):not(#\#):not(#\#){border-inline-start-color:var(--color-border)}
261
254
  .x1t7ytsu:not(#\#):not(#\#):not(#\#){border-inline-start-style:solid}
262
- .xct1zlm:not(#\#):not(#\#):not(#\#){border-inline-start-width:3px}
263
255
  .xgbv0en:not(#\#):not(#\#):not(#\#){border-inline-start-width:var(--border-width)}
264
256
  .x7hs6f1:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-container)}
265
257
  .x81l70g:not(#\#):not(#\#):not(#\#){border-start-start-radius:var(--radius-container)}
@@ -326,7 +318,6 @@
326
318
  .xb5mbof:not(#\#):not(#\#):not(#\#){content-visibility:auto}
327
319
  .x1jm3nie:not(#\#):not(#\#):not(#\#){cursor:grab}
328
320
  .xi9pz9s:not(#\#):not(#\#):not(#\#){cursor:grabbing}
329
- .x1h6gzvc:not(#\#):not(#\#):not(#\#){cursor:not-allowed}
330
321
  .x1ypdohk:not(#\#):not(#\#):not(#\#){cursor:pointer}
331
322
  .x1lliihq:not(#\#):not(#\#):not(#\#){display:block}
332
323
  .xjp7ctv:not(#\#):not(#\#):not(#\#){display:contents}
@@ -346,10 +337,6 @@
346
337
  .x9ynric:not(#\#):not(#\#):not(#\#){font-family:var(--font-family-body)}
347
338
  .x9m5x89:not(#\#):not(#\#):not(#\#){font-family:var(--font-family-code)}
348
339
  .x1g81bgm:not(#\#):not(#\#):not(#\#){font-family:var(--font-family-heading)}
349
- .xeb7xqv:not(#\#):not(#\#):not(#\#){font-size:.9em}
350
- .x1c3i2sq:not(#\#):not(#\#):not(#\#){font-size:1.125rem}
351
- .x1603h9y:not(#\#):not(#\#):not(#\#){font-size:1.25rem}
352
- .xngnso2:not(#\#):not(#\#):not(#\#){font-size:1.5rem}
353
340
  .x1jvydc1:not(#\#):not(#\#):not(#\#){font-size:15px}
354
341
  .xosj86m:not(#\#):not(#\#):not(#\#){font-size:18px}
355
342
  .xhs0kqb:not(#\#):not(#\#):not(#\#){font-size:var(--font-size-2xl)}
@@ -361,7 +348,6 @@
361
348
  .xjm74w1:not(#\#):not(#\#):not(#\#){font-size:var(--text-body-size)}
362
349
  .xcr08ib:not(#\#):not(#\#):not(#\#){font-size:var(--text-label-size)}
363
350
  .x141an7d:not(#\#):not(#\#):not(#\#){font-size:var(--text-supporting-size)}
364
- .x1k4tb9n:not(#\#):not(#\#):not(#\#){font-style:italic}
365
351
  .xss6m8b:not(#\#):not(#\#):not(#\#){font-variant-numeric:tabular-nums}
366
352
  .x1lvx875:not(#\#):not(#\#):not(#\#){font-weight:var(--font-weight-bold)}
367
353
  .x1e4wzip:not(#\#):not(#\#):not(#\#){font-weight:var(--font-weight-medium)}
@@ -417,15 +403,7 @@
417
403
  .x1cpk1wn:not(#\#):not(#\#):not(#\#){line-height:var(--text-heading-2-leading)}
418
404
  .x1kq96og:not(#\#):not(#\#):not(#\#){line-height:var(--text-label-leading)}
419
405
  .x1ltkj2j:not(#\#):not(#\#):not(#\#){line-height:var(--text-supporting-leading)}
420
- .x43c9pm:not(#\#):not(#\#):not(#\#){list-style-position:outside}
421
- .xrylv2j:not(#\#):not(#\#):not(#\#){list-style-type:circle}
422
- .x3yw8vx:not(#\#):not(#\#):not(#\#){list-style-type:decimal}
423
- .xtaz4m5:not(#\#):not(#\#):not(#\#){list-style-type:disc}
424
- .x1sle589:not(#\#):not(#\#):not(#\#){list-style-type:inherit}
425
- .x1rrqm6h:not(#\#):not(#\#):not(#\#){list-style-type:lower-alpha}
426
- .x19k9dhg:not(#\#):not(#\#):not(#\#){list-style-type:lower-roman}
427
406
  .x3ct3a4:not(#\#):not(#\#):not(#\#){list-style-type:none}
428
- .x152237o:not(#\#):not(#\#):not(#\#){list-style-type:square}
429
407
  .x1h1dc9q:not(#\#):not(#\#):not(#\#){margin-inline-end:calc(var(--spacing-0-5) + var(--border-width))}
430
408
  .x1pezmd8:not(#\#):not(#\#):not(#\#){margin-inline-end:var(--spacing-2)}
431
409
  .x1m70ojl:not(#\#):not(#\#):not(#\#){margin-inline-start:calc(-1 * var(--spacing-1-5))}
@@ -447,8 +425,6 @@
447
425
  .xmarwi5:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--icon-inline-offset)}
448
426
  .x18gyask:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--spacing-0)}
449
427
  .x1vsv5vr:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--spacing-1)}
450
- .x12gdq22:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--spacing-2)}
451
- .x126nfab:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--spacing-3)}
452
428
  .x1rey3nv:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--spacing-4)}
453
429
  .x31w388:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--spacing-6)}
454
430
  .xchaq28:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--spacing-7)}
@@ -532,7 +508,6 @@
532
508
  @media (prefers-reduced-motion: reduce){.xnh0sag.xnh0sag:not(#\#):not(#\#):not(#\#){animation-duration:3s}}
533
509
  @media (prefers-reduced-motion: reduce){.xy02sl2.xy02sl2:not(#\#):not(#\#):not(#\#){animation-duration:4s}}
534
510
  @media (prefers-reduced-motion: reduce){.x1aquc0h.x1aquc0h:not(#\#):not(#\#):not(#\#){animation-name:none}}
535
- @media (pointer: coarse){.x6pjikd.x6pjikd:not(#\#):not(#\#):not(#\#){font-size:max(1rem,var(--text-body-size))}}
536
511
  @media (prefers-reduced-motion: reduce){.xsagj69.xsagj69:not(#\#):not(#\#):not(#\#){transition-duration:.01ms}}
537
512
  @media (prefers-reduced-motion: reduce){.xzg1mie.xzg1mie:not(#\#):not(#\#):not(#\#){transition-duration:.01s}}
538
513
  @media (prefers-reduced-motion: reduce){.x12w9bfk.x12w9bfk:not(#\#):not(#\#):not(#\#){transition-duration:0s}}
@@ -607,8 +582,6 @@
607
582
  .xisnujt:not(#\#):not(#\#):not(#\#):not(#\#){min-height:20px}
608
583
  .xjwf9q1:not(#\#):not(#\#):not(#\#):not(#\#){min-height:24px}
609
584
  .x1cy360x:not(#\#):not(#\#):not(#\#):not(#\#){min-height:3em}
610
- .x17qorbb:not(#\#):not(#\#):not(#\#):not(#\#){min-height:4.5rem}
611
- .x65nank:not(#\#):not(#\#):not(#\#):not(#\#){min-height:auto}
612
585
  .x1uogy3y:not(#\#):not(#\#):not(#\#):not(#\#){min-height:var(--size-element-md)}
613
586
  .x175cymr:not(#\#):not(#\#):not(#\#):not(#\#){min-height:var(--spacing-2)}
614
587
  .xu95rz8:not(#\#):not(#\#):not(#\#):not(#\#){min-height:var(--transfer-list-panel-min-block-size)}
@@ -629,7 +602,6 @@
629
602
  .x1xye8es:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--spacing-2)}
630
603
  .x13vifvy:not(#\#):not(#\#):not(#\#):not(#\#){top:0}
631
604
  .x80663w:not(#\#):not(#\#):not(#\#):not(#\#){top:auto}
632
- .x8d4r5l:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--spacing-1)}
633
605
  .xctzyg:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--spacing-2)}
634
606
  .xyx6v2t:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--spacing-3)}
635
607
  .xjbys53:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--x-top)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/lab",
3
- "version": "0.4.0-canary.dcf861c",
3
+ "version": "0.4.0-canary.e18b6db",
4
4
  "description": "Experimental Astryx components — published to npm only under the @canary dist-tag for early testing; never released as a stable (latest) version.",
5
5
  "author": "Meta Open Source",
6
6
  "license": "MIT",
@@ -45,20 +45,9 @@
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@stylexjs/stylex": ">=0.10.0",
48
- "@astryxdesign/core": "0.4.0-canary.dcf861c",
48
+ "@astryxdesign/core": "0.4.0-canary.e18b6db",
49
49
  "react": ">=19.0.0",
50
- "react-dom": ">=19.0.0",
51
- "lexical": "^0.46.0",
52
- "@lexical/react": "^0.46.0",
53
- "@lexical/markdown": "^0.46.0",
54
- "@lexical/headless": "^0.46.0",
55
- "@lexical/html": "^0.46.0",
56
- "@lexical/link": "^0.46.0",
57
- "@lexical/list": "^0.46.0",
58
- "@lexical/rich-text": "^0.46.0",
59
- "@lexical/selection": "^0.46.0",
60
- "@lexical/code": "^0.46.0",
61
- "@lexical/utils": "^0.46.0"
50
+ "react-dom": ">=19.0.0"
62
51
  },
63
52
  "dependencies": {
64
53
  "d3-array": "^3.2.4",
@@ -66,56 +55,10 @@
66
55
  "d3-shape": "^3.2.0"
67
56
  },
68
57
  "devDependencies": {
69
- "@astryxdesign/cli": "0.4.0-canary.dcf861c",
70
- "@lexical/code": "^0.46.0",
71
- "@lexical/headless": "^0.46.0",
72
- "@lexical/html": "^0.46.0",
73
- "@lexical/link": "^0.46.0",
74
- "@lexical/list": "^0.46.0",
75
- "@lexical/markdown": "^0.46.0",
76
- "@lexical/react": "^0.46.0",
77
- "@lexical/rich-text": "^0.46.0",
78
- "@lexical/selection": "^0.46.0",
79
- "@lexical/utils": "^0.46.0",
58
+ "@astryxdesign/cli": "0.4.0-canary.e18b6db",
80
59
  "@types/d3-array": "^3.2.2",
81
60
  "@types/d3-scale": "^4.0.9",
82
- "@types/d3-shape": "^3.1.8",
83
- "lexical": "^0.46.0"
84
- },
85
- "peerDependenciesMeta": {
86
- "lexical": {
87
- "optional": true
88
- },
89
- "@lexical/react": {
90
- "optional": true
91
- },
92
- "@lexical/markdown": {
93
- "optional": true
94
- },
95
- "@lexical/headless": {
96
- "optional": true
97
- },
98
- "@lexical/html": {
99
- "optional": true
100
- },
101
- "@lexical/link": {
102
- "optional": true
103
- },
104
- "@lexical/list": {
105
- "optional": true
106
- },
107
- "@lexical/rich-text": {
108
- "optional": true
109
- },
110
- "@lexical/selection": {
111
- "optional": true
112
- },
113
- "@lexical/code": {
114
- "optional": true
115
- },
116
- "@lexical/utils": {
117
- "optional": true
118
- }
61
+ "@types/d3-shape": "^3.1.8"
119
62
  },
120
63
  "scripts": {
121
64
  "build": "rm -rf dist && pnpm build:esm && tsc --project tsconfig.build.json && pnpm build:css && node ../../scripts/check-no-dev-jsx.mjs && node ../../scripts/check-fully-specified.mjs",
@@ -47,7 +47,7 @@ export const docs = {
47
47
  {
48
48
  name: 'hasScrim',
49
49
  type: 'boolean',
50
- description: "Whether to render a modal scrim behind the sheet. true (default) uses showModal(): top layer, focus trap, ::backdrop scrim, body scroll lock, and tap-scrim-to-dismiss, with the background inert. false uses show(): a non-modal sheet with no scrim, leaving the page behind interactive and scrollable (like Material's standard bottom sheet or an iOS undimmed detent). Escape still closes while focus is inside, and drag/flick-to-dismiss still work.",
50
+ description: "Whether to render a scrim, the semi-transparent overlay that covers and blocks the background, behind the sheet. true (default) uses showModal(): top layer, focus trap, ::backdrop scrim, body scroll lock, and tap-scrim-to-dismiss, with the background inert. false still renders a viewport-anchored overlay above the page, not inline content, but uses show() with no scrim, leaving the page behind interactive and scrollable. Escape still closes while focus is inside, and drag/flick-to-dismiss still work.",
51
51
  default: 'true',
52
52
  },
53
53
  ],
@@ -57,7 +57,7 @@ export const docs = {
57
57
  { guidance: true, description: 'Use for mobile-first surfaces (filters, share sheets, quick actions) where the content should rise from the bottom edge.' },
58
58
  { guidance: true, description: 'Keep the caller as the source of truth: derive isOpen from state and clear it in onOpenChange.' },
59
59
  { guidance: true, description: "Pick the starting height that fits the content: 'hug' for short bounded content, 'capped' for lists, 'tall' for streaming/resizing content; the user can then drag between snap points." },
60
- { guidance: true, description: "Use hasScrim={false} (non-modal, no scrim) for a peek surface that must coexist with a live page behind it (e.g. a panel over a map); keep the default (hasScrim) for focused tasks where the background should be inert." },
60
+ { guidance: true, description: "Use hasScrim={false} for a floating, no-scrim overlay that must coexist with a live page behind it (e.g. a panel over a map). It remains viewport-anchored rather than rendering inline. Keep the default for focused tasks where the background should be inert." },
61
61
  { guidance: false, description: 'Use a BottomSheet for desktop inspectors or master-detail; use Drawer (side="end", hasScrim={false}) instead.' },
62
62
  ],
63
63
  },
@@ -95,7 +95,7 @@ export const docs = {
95
95
  </BottomSheet>`,
96
96
  },
97
97
  {
98
- label: 'Non-modal sheet (no scrim): page stays interactive',
98
+ label: 'No scrim',
99
99
  code: `const [isOpen, setIsOpen] = useState(true);
100
100
  <BottomSheet
101
101
  isOpen={isOpen}
@@ -117,7 +117,7 @@ export const docsDense = {
117
117
  { guidance: true, description: 'Use for mobile-first bottom surfaces (filters, share sheets, quick actions).' },
118
118
  { guidance: true, description: 'Derive isOpen from state; clear it in onOpenChange.' },
119
119
  { guidance: true, description: "Pick a height that fits: 'hug' for short content, 'capped' for lists, 'tall' for streaming content." },
120
- { guidance: true, description: "hasScrim={false} for a non-modal peek over a live page; default (hasScrim) for focused tasks (inert background)." },
120
+ { guidance: true, description: "hasScrim={false} for a floating no-scrim overlay over a live page; it is not inline. Keep the default for focused tasks (inert background)." },
121
121
  { guidance: false, description: 'Use for desktop inspectors or master-detail; use Drawer instead.' },
122
122
  ],
123
123
  },
@@ -297,9 +297,10 @@ export interface BottomSheetProps extends BaseProps<HTMLDialogElement> {
297
297
  * - `true` (default) — `showModal()`: renders in the top layer with a focus
298
298
  * trap, a `::backdrop` scrim, body scroll lock, and tap-scrim-to-dismiss.
299
299
  * The background is inert. Use for focused tasks (filters, forms).
300
- * - `false` — `show()`: a non-modal sheet with **no scrim**. The page behind
300
+ * - `false`: `show()` renders a viewport-anchored overlay with **no scrim**. It is
301
+ * still layered above the page, not rendered inline, but the page behind
301
302
  * stays interactive and scrollable (like Material's *standard* bottom
302
- * sheet, or an iOS undimmed detent). Escape still closes while focus is
303
+ * sheet or an iOS undimmed detent). Escape still closes while focus is
303
304
  * inside the sheet, and drag/flick-to-dismiss still work. Use for a peek
304
305
  * surface that coexists with the page (e.g. a panel over a live map).
305
306
  * @default true
package/src/index.ts CHANGED
@@ -257,31 +257,7 @@ export {
257
257
  type LogStreamLevel,
258
258
  } from './LogStream';
259
259
 
260
- // RichTextEditor — experimental Lexical WYSIWYG editor (RFC facebook/astryx#3899)
261
- // Optional peer deps: lexical + @lexical/*. Read-only rendering via RichTextView.
262
- export {
263
- RichTextEditor,
264
- type RichTextEditorProps,
265
- type RichTextEditorRef,
266
- type RichTextEditorStatus,
267
- type RichTextEditorStatusType,
268
- type RichTextEditorSize,
269
- type Transformer,
270
- RichTextView,
271
- type RichTextViewProps,
272
- sharedEditorTheme,
273
- markdownToEditorStateJSON,
274
- editorStateJSONToMarkdown,
275
- type MarkdownSerializerOptions,
276
- RichTextEditorToolbar,
277
- type RichTextEditorToolbarProps,
278
- RICHTEXT_ICON_KEYS,
279
- RichTextEditorAutoLinkPlugin,
280
- type RichTextEditorAutoLinkPluginProps,
281
- DEFAULT_LINK_MATCHERS,
282
- NEW_TAB_LINK_ATTRIBUTES,
283
- sanitizeUrl,
284
- validateUrl,
285
- URL_MATCHER,
286
- EMAIL_MATCHER,
287
- } from './RichTextEditor';
260
+ // RichTextEditor (RFC facebook/astryx#3899) has graduated out of @astryxdesign/lab
261
+ // into its own canary-only package, @astryxdesign/richtext, so it can be canaried
262
+ // independently (e.g. into EPS/Nest). Import it from there:
263
+ // import {RichTextEditor, RichTextView} from '@astryxdesign/richtext';
@@ -1,222 +0,0 @@
1
- /**
2
- * @file RichTextEditor.tsx
3
- * @input Uses React, useId, Lexical (lexical + @lexical/react), Field,
4
- * VisuallyHidden, design tokens
5
- * @output Exports RichTextEditor component, RichTextEditorProps, RichTextEditorStatus,
6
- * RichTextEditorStatusType, RichTextEditorSize
7
- * @position Experimental (lab) implementation; consumed by RichTextEditor/index.ts and
8
- * re-exported from @astryxdesign/lab. Tested by RichTextEditor.test.tsx.
9
- *
10
- * SYNC: When modified, update these files to stay in sync:
11
- * - /packages/lab/src/RichTextEditor/RichTextEditor.doc.mjs (props table, features, implementation notes)
12
- * - /packages/lab/src/RichTextEditor/RichTextEditor.test.tsx (tests for new/changed behavior)
13
- * - /packages/lab/src/RichTextEditor/index.ts (exports if types change)
14
- * - /packages/lab/src/index.ts (barrel re-export)
15
- * - /apps/storybook/stories/RichTextEditor.stories.tsx (storybook stories)
16
- *
17
- * NOTE: This is an EXPERIMENTAL component in @astryxdesign/lab (published only under
18
- * the `@canary` dist-tag, never as stable `latest`). It is the initial landing for the
19
- * OSS Lexical editor RFC; the goal is graduation to @astryxdesign/core after the
20
- * Component Specification Protocol. `lexical` and `@lexical/*` are OPTIONAL peer
21
- * dependencies — install them to use this component.
22
- */
23
- import { type ReactNode } from 'react';
24
- import type { BaseProps } from '@astryxdesign/core';
25
- import type { SizeValue } from '@astryxdesign/core/utils';
26
- import { type Transformer } from '@lexical/markdown';
27
- export type { Transformer } from '@lexical/markdown';
28
- import { type EditorState, type Klass, type LexicalEditor, type LexicalNode } from 'lexical';
29
- export type RichTextEditorStatusType = 'warning' | 'error' | 'success';
30
- export type RichTextEditorSize = 'sm' | 'md' | 'lg';
31
- export interface RichTextEditorStatus {
32
- /** The type of status to display. */
33
- type: RichTextEditorStatusType;
34
- /** Optional message to display below the editor. */
35
- message?: string;
36
- }
37
- /**
38
- * Imperative handle exposed via `ref`. Lets callers focus, clear, and read the
39
- * editor without wiring a custom plugin. Available after mount.
40
- */
41
- export interface RichTextEditorRef {
42
- /**
43
- * Move focus into the editor's editable surface. No-op when the editor is
44
- * read-only or disabled.
45
- */
46
- focus: () => void;
47
- /**
48
- * Remove all content, resetting the editor to a single empty paragraph.
49
- * No-op when the editor is read-only or disabled.
50
- */
51
- clear: () => void;
52
- /** Read the current `EditorState`. Serialize with `.toJSON()` to persist. */
53
- getEditorState: () => EditorState;
54
- /**
55
- * Serialize the current content to a Markdown string, using the same
56
- * `transformers` the editor is configured with (so custom transformers
57
- * layered in via the `transformers` prop are honored). Equivalent to
58
- * `$convertToMarkdownString` run in a read context.
59
- */
60
- getMarkdown: () => string;
61
- /**
62
- * Serialize the current content to an HTML string via
63
- * `$generateHtmlFromNodes`. Requires a DOM (available in the browser and in
64
- * jsdom-based tests). Useful for copy/paste, email, or non-Lexical consumers.
65
- */
66
- getHTML: () => string;
67
- /**
68
- * Access the underlying `LexicalEditor` instance for advanced use cases
69
- * (custom commands, listeners, node transforms).
70
- */
71
- getEditor: () => LexicalEditor;
72
- }
73
- export interface RichTextEditorProps extends Omit<BaseProps, 'onChange' | 'defaultValue'> {
74
- /** Label text for the editor (always rendered for accessibility). */
75
- label: string;
76
- /**
77
- * Whether to visually hide the label (still accessible to screen readers).
78
- * @default false
79
- */
80
- isLabelHidden?: boolean;
81
- /** Description text displayed between the label and editor. */
82
- description?: string;
83
- /**
84
- * Whether the field is optional. Mutually exclusive with isRequired.
85
- * @default false
86
- */
87
- isOptional?: boolean;
88
- /**
89
- * Whether the field is required. Mutually exclusive with isOptional.
90
- * @default false
91
- */
92
- isRequired?: boolean;
93
- /**
94
- * Initial serialized editor state (a JSON string produced by
95
- * `JSON.stringify(editorState.toJSON())`), used to seed the editor on mount.
96
- * The editor is uncontrolled: this is read once.
97
- */
98
- defaultValue?: string;
99
- /**
100
- * Callback fired when the editor content changes. Receives the current
101
- * `EditorState` and the `LexicalEditor` instance. Serialize with
102
- * `editorState.toJSON()` for persistence.
103
- */
104
- onChange?: (editorState: EditorState, editor: LexicalEditor) => void;
105
- /** Placeholder text shown when the editor is empty. */
106
- placeholder?: string;
107
- /**
108
- * Whether the editor is read-only (non-editable).
109
- * @default false
110
- */
111
- isReadOnly?: boolean;
112
- /**
113
- * Whether the editor is disabled (non-editable, dimmed).
114
- * @default false
115
- */
116
- isDisabled?: boolean;
117
- /**
118
- * Status indicator. When set, displays a colored border. If message is
119
- * provided, displays a message box below the editor.
120
- */
121
- status?: RichTextEditorStatus;
122
- /**
123
- * Width of the field. Numbers are treated as pixels, strings are used as-is
124
- * (e.g. `'100%'`).
125
- */
126
- width?: SizeValue;
127
- /** Tooltip text to display in an info icon at the end of the label. */
128
- labelTooltip?: string;
129
- /**
130
- * The size of the editor, affecting internal padding.
131
- * @default 'md'
132
- */
133
- size?: RichTextEditorSize;
134
- /**
135
- * Additional Lexical nodes to register beyond the default OSS set
136
- * (Heading, Quote, List, Link, Code). Use this extension point to plug in
137
- * custom nodes (e.g. mentions, images) without forking the editor.
138
- */
139
- nodes?: ReadonlyArray<Klass<LexicalNode>>;
140
- /**
141
- * Additional Lexical plugins to render inside the composer. Use this to
142
- * compose extra behaviour (toolbars, mentions, autolink, etc.) on top of the
143
- * base editor. Plugins receive the editor via `useLexicalComposerContext()`.
144
- */
145
- plugins?: ReactNode;
146
- /**
147
- * Whether to enable Markdown shortcut typing (e.g. `# ` for a heading,
148
- * `- ` for a list). Uses the `transformers` prop (defaults to the standard
149
- * `@lexical/markdown` transformers).
150
- * @default true
151
- */
152
- hasMarkdownShortcuts?: boolean;
153
- /**
154
- * Markdown transformers — the single source of truth for markdown behaviour.
155
- * Defaults to the standard `@lexical/markdown` `TRANSFORMERS`.
156
- *
157
- * The same array drives all three markdown operations in Lexical (see the
158
- * lexical-playground reference, where one `PLAYGROUND_TRANSFORMERS` array
159
- * feeds each):
160
- * - shortcut typing — `registerMarkdownShortcuts` (wired here today)
161
- * - markdown -> state — `$convertFromMarkdownString` (future import API)
162
- * - state -> markdown — `$convertToMarkdownString` (future `getMarkdown`)
163
- *
164
- * Pass a custom array to support additional node types (e.g. custom
165
- * transformers layered in via the `nodes` extension point) consistently
166
- * across all three. Shortcut typing is only applied when
167
- * `hasMarkdownShortcuts` is true; the array is still the intended input for
168
- * the serialization APIs added in later phases.
169
- */
170
- transformers?: ReadonlyArray<Transformer>;
171
- /** Whether to automatically focus the editor on mount. @default false */
172
- hasAutoFocus?: boolean;
173
- /**
174
- * Screen-reader hint describing how to move focus out of the editor, since
175
- * Tab is bound to indentation (press Escape, then Tab). Rendered visually
176
- * hidden and referenced from the editor's `aria-describedby`. Override it
177
- * to localize the text, or pass an empty string to omit the hint entirely
178
- * (e.g. when the host app provides its own instructions).
179
- * @default 'Press Escape then Tab to move focus out of the editor.'
180
- */
181
- tabEscapeHint?: string;
182
- /**
183
- * Maximum number of characters. When set, a character counter
184
- * (current/max) is displayed below the editor. Like TextArea, this does
185
- * NOT enforce the limit natively — the counter shows error styling when the
186
- * plain-text length exceeds the limit. Count is the editor's plain-text
187
- * content length.
188
- */
189
- maxLength?: number;
190
- /**
191
- * The Lexical composer namespace, used for editor identity.
192
- * @default 'astryx-editor'
193
- */
194
- namespace?: string;
195
- }
196
- /**
197
- * A WYSIWYG rich-text editor built on Lexical, styled with Astryx design
198
- * tokens. Experimental — ships from `@astryxdesign/lab` (canary). `lexical` and
199
- * `@lexical/*` are optional peer dependencies — install them to use this
200
- * component.
201
- *
202
- * The editor is intentionally minimal and extensible: pass `nodes` and
203
- * `plugins` to layer richer behaviour (toolbars, mentions, hover cards) on top
204
- * without forking.
205
- *
206
- * The forwarded `RichTextEditorRef` exposes imperative `focus()` and `clear()`
207
- * methods for callers that manage the editor from outside.
208
- *
209
- * @example
210
- * ```
211
- * import {RichTextEditor, type RichTextEditorRef} from '@astryxdesign/lab';
212
- * const ref = useRef<RichTextEditorRef>(null);
213
- * <RichTextEditor
214
- * ref={ref}
215
- * label="Notes"
216
- * placeholder="Write something..."
217
- * onChange={state => save(JSON.stringify(state.toJSON()))}
218
- * />
219
- * ```
220
- */
221
- export declare const RichTextEditor: import("react").ForwardRefExoticComponent<RichTextEditorProps & import("react").RefAttributes<RichTextEditorRef>>;
222
- //# sourceMappingURL=RichTextEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../src/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAQL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAgBf,OAAO,KAAK,EAAC,SAAS,EAAC,M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