@tempots/beatui 0.82.0 → 0.82.1

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 (173) hide show
  1. package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
  2. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +63 -1351
  5. package/dist/auth-divider-BqZPH1-z.cjs +1 -0
  6. package/dist/auth-divider-Wr-S16kF.js +1355 -0
  7. package/dist/beatui.css +1347 -0
  8. package/dist/beatui.tailwind.css +1347 -0
  9. package/dist/better-auth/index.cjs.js +1 -0
  10. package/dist/better-auth/index.es.js +754 -0
  11. package/dist/{deep-merge-CiOwVWn8.js → deep-merge-BYm0y62g.js} +34 -33
  12. package/dist/deep-merge-d7sf0xmN.cjs +1 -0
  13. package/dist/duration-input-B9UNmUCh.cjs +1 -0
  14. package/dist/{duration-input-B3vnnwBZ.js → duration-input-DqcJbxKD.js} +23 -22
  15. package/dist/editor-toolbar-group--a-xgsJw.cjs +1 -0
  16. package/dist/editor-toolbar-group-CVpl5mxF.js +31 -0
  17. package/dist/{hls.light.min-Bhrf47iR.cjs → hls.light.min-C6xKDzRR.cjs} +1 -1
  18. package/dist/{hls.light.min-C6VwviEa.js → hls.light.min-hEMf_E8u.js} +1 -1
  19. package/dist/{index-C5YCCgnn.cjs → index-05UbKOYe.cjs} +1 -1
  20. package/dist/{index-ChsRjiIp.cjs → index-Bt7FYl80.cjs} +19 -19
  21. package/dist/{index-DT6-HMMz.js → index-C2Lq1m45.js} +1432 -1462
  22. package/dist/{index-CiAVfKIZ.js → index-lYhXnu6I.js} +1 -1
  23. package/dist/index.cjs.js +4 -4
  24. package/dist/index.es.js +2326 -2680
  25. package/dist/input-container-C6qEIjcA.cjs +1 -0
  26. package/dist/input-container-DiCjOzR2.js +247 -0
  27. package/dist/json-schema/index.cjs.js +1 -1
  28. package/dist/json-schema/index.es.js +33 -32
  29. package/dist/json-schema-display/index.cjs.js +1 -1
  30. package/dist/json-schema-display/index.es.js +1 -1
  31. package/dist/json-structure/index.cjs.js +1 -1
  32. package/dist/json-structure/index.es.js +542 -700
  33. package/dist/lexical/index.cjs.js +46 -0
  34. package/dist/lexical/index.es.js +21370 -0
  35. package/dist/lexical.css +1124 -0
  36. package/dist/menu-CZzRsQP_.js +372 -0
  37. package/dist/menu-ClrU72xH.cjs +1 -0
  38. package/dist/modal-I5srcntN.cjs +1 -0
  39. package/dist/modal-v3u2Fpnd.js +488 -0
  40. package/dist/{notice-CZHWWwOQ.js → notice-BuZvdvZh.js} +48 -47
  41. package/dist/notice-CLDdy1MW.cjs +1 -0
  42. package/dist/{oneof-branch-detection-C8g3eWnx.cjs → oneof-branch-detection-DsM1K5xc.cjs} +1 -1
  43. package/dist/{oneof-branch-detection-BVNoKU9d.js → oneof-branch-detection-Dt8ss9lc.js} +1 -1
  44. package/dist/prosemirror/index.cjs.js +1 -1
  45. package/dist/prosemirror/index.es.js +1 -1
  46. package/dist/session-id-3KiilioY.js +8 -0
  47. package/dist/session-id-B5lJMzbB.cjs +1 -0
  48. package/dist/styles-url-B2dzXrYt.cjs +1 -0
  49. package/dist/styles-url-Cw_mxshe.js +4 -0
  50. package/dist/text-input-B3VBat1k.js +44 -0
  51. package/dist/text-input-Ds8e7Z1G.cjs +1 -0
  52. package/dist/{toolbar-DR2Zd4Oo.js → toolbar-D994_E_s.js} +4 -4
  53. package/dist/toolbar-x0_8lmKu.cjs +1 -0
  54. package/dist/types/better-auth/bridge.d.ts +2 -0
  55. package/dist/types/better-auth/callbacks.d.ts +6 -0
  56. package/dist/types/better-auth/components/authenticated.d.ts +4 -0
  57. package/dist/types/better-auth/components/better-auth-container.d.ts +4 -0
  58. package/dist/types/better-auth/components/better-auth-modal.d.ts +4 -0
  59. package/dist/types/better-auth/components/magic-link-form.d.ts +7 -0
  60. package/dist/types/better-auth/components/passkey-management.d.ts +6 -0
  61. package/dist/types/better-auth/components/passkey-signin.d.ts +12 -0
  62. package/dist/types/better-auth/components/two-factor-setup.d.ts +8 -0
  63. package/dist/types/better-auth/components/two-factor-verify.d.ts +10 -0
  64. package/dist/types/better-auth/i18n/default.d.ts +29 -0
  65. package/dist/types/better-auth/i18n/locales/en.d.ts +28 -0
  66. package/dist/types/better-auth/i18n/translations.d.ts +27 -0
  67. package/dist/types/better-auth/index.d.ts +22 -0
  68. package/dist/types/better-auth/provider.d.ts +6 -0
  69. package/dist/types/better-auth/session.d.ts +14 -0
  70. package/dist/types/better-auth/social-mapping.d.ts +2 -0
  71. package/dist/types/better-auth/types.d.ts +164 -0
  72. package/dist/types/components/auth/auth-container.d.ts +1 -1
  73. package/dist/types/components/auth/social-providers.d.ts +1 -1
  74. package/dist/types/components/auth/types.d.ts +2 -0
  75. package/dist/types/components/editor-toolbar/editor-toolbar-button.d.ts +16 -0
  76. package/dist/types/components/editor-toolbar/editor-toolbar-group.d.ts +9 -0
  77. package/dist/types/components/editor-toolbar/index.d.ts +2 -0
  78. package/dist/types/components/json-structure/controls/control-utils.d.ts +19 -0
  79. package/dist/types/components/json-structure/controls/index.d.ts +1 -0
  80. package/dist/types/components/lexical/bare-editor.d.ts +29 -0
  81. package/dist/types/components/lexical/code/index.d.ts +1 -0
  82. package/dist/types/components/lexical/code/language-selector.d.ts +13 -0
  83. package/dist/types/components/lexical/contextual-editor.d.ts +22 -0
  84. package/dist/types/components/lexical/docked-editor.d.ts +23 -0
  85. package/dist/types/components/lexical/floating/block-handle.d.ts +16 -0
  86. package/dist/types/components/lexical/floating/floating-toolbar.d.ts +12 -0
  87. package/dist/types/components/lexical/floating/index.d.ts +6 -0
  88. package/dist/types/components/lexical/floating/slash-command-palette.d.ts +20 -0
  89. package/dist/types/components/lexical/index.d.ts +8 -0
  90. package/dist/types/components/lexical/lexical-editor-input.d.ts +30 -0
  91. package/dist/types/components/lexical/table/index.d.ts +1 -0
  92. package/dist/types/components/lexical/table/table-controls.d.ts +12 -0
  93. package/dist/types/components/lexical/toolbar/index.d.ts +6 -0
  94. package/dist/types/components/lexical/toolbar/lexical-toolbar.d.ts +12 -0
  95. package/dist/types/components/lexical/toolbar/toolbar-button.d.ts +1 -0
  96. package/dist/types/components/lexical/toolbar/toolbar-group.d.ts +1 -0
  97. package/dist/types/components/lexical/toolbar/toolbar-helpers.d.ts +30 -0
  98. package/dist/types/components/prosemirror/etoolbar-button.d.ts +1 -11
  99. package/dist/types/components/prosemirror/etoolbar-group.d.ts +1 -4
  100. package/dist/types/lexical/commands/index.d.ts +17 -0
  101. package/dist/types/lexical/headless.d.ts +39 -0
  102. package/dist/types/lexical/horizontal-rule-node.d.ts +20 -0
  103. package/dist/types/lexical/index.d.ts +20 -0
  104. package/dist/types/lexical/lazy-loader.d.ts +35 -0
  105. package/dist/types/lexical/nodes.d.ts +29 -0
  106. package/dist/types/lexical/plugins/auto-link.d.ts +7 -0
  107. package/dist/types/lexical/plugins/clipboard.d.ts +11 -0
  108. package/dist/types/lexical/plugins/code-shiki.d.ts +11 -0
  109. package/dist/types/lexical/plugins/code.d.ts +7 -0
  110. package/dist/types/lexical/plugins/dragon.d.ts +6 -0
  111. package/dist/types/lexical/plugins/file-io.d.ts +10 -0
  112. package/dist/types/lexical/plugins/hashtag.d.ts +7 -0
  113. package/dist/types/lexical/plugins/history.d.ts +7 -0
  114. package/dist/types/lexical/plugins/horizontal-rule.d.ts +12 -0
  115. package/dist/types/lexical/plugins/html-io.d.ts +9 -0
  116. package/dist/types/lexical/plugins/index.d.ts +24 -0
  117. package/dist/types/lexical/plugins/link.d.ts +6 -0
  118. package/dist/types/lexical/plugins/list.d.ts +6 -0
  119. package/dist/types/lexical/plugins/mark.d.ts +15 -0
  120. package/dist/types/lexical/plugins/markdown-io.d.ts +13 -0
  121. package/dist/types/lexical/plugins/offset.d.ts +6 -0
  122. package/dist/types/lexical/plugins/overflow.d.ts +7 -0
  123. package/dist/types/lexical/plugins/plain-text.d.ts +6 -0
  124. package/dist/types/lexical/plugins/rich-text.d.ts +6 -0
  125. package/dist/types/lexical/plugins/selection.d.ts +6 -0
  126. package/dist/types/lexical/plugins/slash-commands.d.ts +26 -0
  127. package/dist/types/lexical/plugins/table.d.ts +11 -0
  128. package/dist/types/lexical/plugins/text.d.ts +13 -0
  129. package/dist/types/lexical/plugins/yjs.d.ts +9 -0
  130. package/dist/types/lexical/styles-url.d.ts +2 -0
  131. package/dist/types/lexical/styles.d.ts +2 -0
  132. package/dist/types/lexical/types.d.ts +634 -0
  133. package/dist/types/lexical-i18n/default.d.ts +92 -0
  134. package/dist/types/lexical-i18n/index.d.ts +21 -0
  135. package/dist/types/lexical-i18n/locales/ar.d.ts +91 -0
  136. package/dist/types/lexical-i18n/locales/de.d.ts +91 -0
  137. package/dist/types/lexical-i18n/locales/en.d.ts +91 -0
  138. package/dist/types/lexical-i18n/locales/es.d.ts +91 -0
  139. package/dist/types/lexical-i18n/locales/fa.d.ts +91 -0
  140. package/dist/types/lexical-i18n/locales/fr.d.ts +91 -0
  141. package/dist/types/lexical-i18n/locales/he.d.ts +91 -0
  142. package/dist/types/lexical-i18n/locales/hi.d.ts +91 -0
  143. package/dist/types/lexical-i18n/locales/it.d.ts +91 -0
  144. package/dist/types/lexical-i18n/locales/ja.d.ts +91 -0
  145. package/dist/types/lexical-i18n/locales/ko.d.ts +91 -0
  146. package/dist/types/lexical-i18n/locales/nl.d.ts +91 -0
  147. package/dist/types/lexical-i18n/locales/pl.d.ts +91 -0
  148. package/dist/types/lexical-i18n/locales/pt.d.ts +91 -0
  149. package/dist/types/lexical-i18n/locales/ru.d.ts +91 -0
  150. package/dist/types/lexical-i18n/locales/tr.d.ts +91 -0
  151. package/dist/types/lexical-i18n/locales/ur.d.ts +91 -0
  152. package/dist/types/lexical-i18n/locales/vi.d.ts +91 -0
  153. package/dist/types/lexical-i18n/locales/zh.d.ts +91 -0
  154. package/dist/types/lexical-i18n/translations.d.ts +21 -0
  155. package/dist/use-animated-toggle-ChycsEoj.js +175 -0
  156. package/dist/use-animated-toggle-DR6CyMac.cjs +1 -0
  157. package/dist/{use-form-CgZyrACX.js → use-form-B56E_x5Y.js} +83 -88
  158. package/dist/use-form-Cnp3XQ5X.cjs +2 -0
  159. package/dist/widget-customization-Dk7XcVly.cjs +1 -0
  160. package/dist/{widget-customization-DRA7E9Zf.js → widget-customization-Ds9sicAg.js} +106 -105
  161. package/package.json +48 -3
  162. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  163. package/dist/_commonjsHelpers-DwGv2jUC.cjs +0 -1
  164. package/dist/deep-merge-DxZqCkE5.cjs +0 -1
  165. package/dist/duration-input-Dg5SX3lM.cjs +0 -1
  166. package/dist/modal-D2xE47kr.cjs +0 -1
  167. package/dist/modal-hkQD1bqZ.js +0 -655
  168. package/dist/notice-C0SmlheE.cjs +0 -1
  169. package/dist/text-input-CByq5OIo.cjs +0 -1
  170. package/dist/text-input-CFJntP7G.js +0 -287
  171. package/dist/toolbar-TPWYzoiF.cjs +0 -1
  172. package/dist/use-form-JjeKCINk.cjs +0 -2
  173. package/dist/widget-customization-G-QLB1rw.cjs +0 -1
@@ -0,0 +1,164 @@
1
+ import { Signal } from '@tempots/dom';
2
+ import { AuthContainerLabels, AuthContainerOptions, AuthProviderInfo, AuthProviderName, PasswordRules, ResetPasswordFormOptions, SignInFormOptions, SignUpFormOptions } from '../components/auth';
3
+ export interface BetterAuthClient {
4
+ signIn: {
5
+ email: (opts: {
6
+ email: string;
7
+ password: string;
8
+ rememberMe?: boolean;
9
+ callbackURL?: string;
10
+ }) => Promise<BetterAuthResult<unknown>>;
11
+ social: (opts: {
12
+ provider: string;
13
+ callbackURL?: string;
14
+ errorCallbackURL?: string;
15
+ }) => Promise<BetterAuthResult<unknown>>;
16
+ magicLink?: (opts: {
17
+ email: string;
18
+ callbackURL?: string;
19
+ }) => Promise<BetterAuthResult<unknown>>;
20
+ passkey?: (opts?: {
21
+ autoFill?: boolean;
22
+ }) => Promise<BetterAuthResult<unknown>>;
23
+ };
24
+ signUp: {
25
+ email: (opts: {
26
+ name?: string;
27
+ email: string;
28
+ password: string;
29
+ callbackURL?: string;
30
+ }) => Promise<BetterAuthResult<unknown>>;
31
+ };
32
+ signOut: (opts?: object) => Promise<BetterAuthResult<unknown>>;
33
+ getSession: () => Promise<BetterAuthResult<{
34
+ session: unknown;
35
+ user: BetterAuthUser;
36
+ }>>;
37
+ requestPasswordReset: (opts: {
38
+ email: string;
39
+ redirectTo?: string;
40
+ }) => Promise<BetterAuthResult<unknown>>;
41
+ resetPassword?: (opts: {
42
+ newPassword: string;
43
+ token: string;
44
+ }) => Promise<BetterAuthResult<unknown>>;
45
+ changePassword?: (opts: {
46
+ newPassword: string;
47
+ currentPassword: string;
48
+ revokeOtherSessions?: boolean;
49
+ }) => Promise<BetterAuthResult<unknown>>;
50
+ sendVerificationEmail?: (opts: {
51
+ email: string;
52
+ callbackURL: string;
53
+ }) => Promise<BetterAuthResult<unknown>>;
54
+ twoFactor?: TwoFactorClient;
55
+ passkey?: PasskeyClient;
56
+ magicLink?: {
57
+ verify: (opts: {
58
+ token: string;
59
+ }) => Promise<BetterAuthResult<unknown>>;
60
+ };
61
+ }
62
+ export interface BetterAuthResult<T> {
63
+ data: T | null;
64
+ error: {
65
+ message: string;
66
+ status: number;
67
+ statusText: string;
68
+ } | null;
69
+ }
70
+ export interface BetterAuthUser {
71
+ id: string;
72
+ name?: string;
73
+ email: string;
74
+ image?: string;
75
+ }
76
+ export interface TwoFactorClient {
77
+ enable: (opts: {
78
+ password: string;
79
+ issuer?: string;
80
+ }) => Promise<BetterAuthResult<{
81
+ totpURI: string;
82
+ backupCodes: string[];
83
+ }>>;
84
+ disable: (opts: {
85
+ password: string;
86
+ }) => Promise<BetterAuthResult<unknown>>;
87
+ getTotpUri: (opts: {
88
+ password: string;
89
+ }) => Promise<BetterAuthResult<{
90
+ totpURI: string;
91
+ }>>;
92
+ verifyTotp: (opts: {
93
+ code: string;
94
+ trustDevice?: boolean;
95
+ }) => Promise<BetterAuthResult<unknown>>;
96
+ sendOtp?: (opts?: {
97
+ trustDevice?: boolean;
98
+ }) => Promise<BetterAuthResult<unknown>>;
99
+ verifyOtp?: (opts: {
100
+ code: string;
101
+ trustDevice?: boolean;
102
+ }) => Promise<BetterAuthResult<unknown>>;
103
+ generateBackupCodes: (opts: {
104
+ password: string;
105
+ }) => Promise<BetterAuthResult<{
106
+ backupCodes: string[];
107
+ }>>;
108
+ verifyBackupCode: (opts: {
109
+ code: string;
110
+ }) => Promise<BetterAuthResult<unknown>>;
111
+ }
112
+ export interface PasskeyClient {
113
+ addPasskey: (opts?: {
114
+ name?: string;
115
+ }) => Promise<BetterAuthResult<unknown>>;
116
+ listUserPasskeys: () => Promise<BetterAuthResult<PasskeyInfo[]>>;
117
+ deletePasskey: (opts: {
118
+ id: string;
119
+ }) => Promise<BetterAuthResult<unknown>>;
120
+ updatePasskey: (opts: {
121
+ id: string;
122
+ name: string;
123
+ }) => Promise<BetterAuthResult<unknown>>;
124
+ }
125
+ export interface PasskeyInfo {
126
+ id: string;
127
+ name?: string;
128
+ createdAt: string;
129
+ }
130
+ export interface BetterAuthBridgeOptions {
131
+ callbackURL?: string;
132
+ errorCallbackURL?: string;
133
+ socialProviders?: AuthProviderName[];
134
+ passwordRules?: PasswordRules;
135
+ showRememberMe?: boolean;
136
+ showNameField?: boolean;
137
+ showConfirmPassword?: boolean;
138
+ showPasswordStrength?: boolean;
139
+ refreshInterval?: number;
140
+ onSessionChange?: (session: BetterAuthSession | null) => void;
141
+ onError?: (error: {
142
+ message: string;
143
+ status: number;
144
+ }) => void;
145
+ labels?: AuthContainerLabels;
146
+ }
147
+ export interface BetterAuthSession {
148
+ user: BetterAuthUser;
149
+ [key: string]: unknown;
150
+ }
151
+ export interface BetterAuthBridge {
152
+ session: Signal<BetterAuthSession | null>;
153
+ isPending: Signal<boolean>;
154
+ user: Signal<BetterAuthUser | null>;
155
+ isAuthenticated: Signal<boolean>;
156
+ containerOptions: AuthContainerOptions;
157
+ signInOptions: SignInFormOptions;
158
+ signUpOptions: SignUpFormOptions;
159
+ resetOptions: ResetPasswordFormOptions;
160
+ socialProviders: AuthProviderInfo[];
161
+ signOut: () => Promise<void>;
162
+ refreshSession: () => Promise<void>;
163
+ dispose: () => void;
164
+ }
@@ -1,6 +1,6 @@
1
1
  import { TNode } from '@tempots/dom';
2
2
  import { AuthContainerOptions } from './index';
3
- export declare function AuthContainer({ mode: initialMode, socialProviders, initialName, initialEmail, passwordRules, showRememberMe, showSocialDivider, showPasswordStrength, labels, onSignIn, onSignUp, onResetPassword, onModeChange, showContainer, }: AuthContainerOptions, ...children: TNode[]): TNode;
3
+ export declare function AuthContainer({ mode: initialMode, socialProviders, initialName, initialEmail, passwordRules, showRememberMe, showSocialDivider, showPasswordStrength, labels, onSignIn, onSignUp, onResetPassword, onModeChange, onSocialLogin, showContainer, }: AuthContainerOptions, ...children: TNode[]): TNode;
4
4
  export declare function AuthModal(fn: (open: (options: AuthContainerOptions & {
5
5
  modalTitle?: () => string;
6
6
  }) => void) => TNode): TNode;
@@ -1,2 +1,2 @@
1
1
  import { SocialProvidersOptions } from './types';
2
- export declare function SocialProviders({ providers }: SocialProvidersOptions): import("@tempots/dom").Renderable;
2
+ export declare function SocialProviders({ providers, onSocialLogin }: SocialProvidersOptions): import("@tempots/dom").Renderable;
@@ -73,6 +73,7 @@ export interface AuthContainerOptions {
73
73
  onSignUp?: (data: SignUpData) => Promise<string | null>;
74
74
  onResetPassword?: (data: ResetPasswordData) => Promise<string | null>;
75
75
  onModeChange?: (mode: AuthMode) => void;
76
+ onSocialLogin?: (provider: AuthProviderName) => Promise<void>;
76
77
  showPasswordStrength?: Value<boolean>;
77
78
  showAlreadyHaveAccountLink?: boolean;
78
79
  showNameField?: boolean;
@@ -83,6 +84,7 @@ export interface AuthContainerOptions {
83
84
  }
84
85
  export interface SocialProvidersOptions {
85
86
  providers: AuthProviderInfo[];
87
+ onSocialLogin?: (provider: AuthProviderName) => Promise<void>;
86
88
  }
87
89
  export interface SignInFormLabels {
88
90
  emailLabel?: Value<string>;
@@ -0,0 +1,16 @@
1
+ import { Signal, Value } from '@tempots/dom';
2
+ import { ControlSize } from '../theme';
3
+ export interface EditorToolbarButtonOptions {
4
+ active: Signal<boolean>;
5
+ display: Signal<boolean>;
6
+ onClick: () => void;
7
+ disabled: Signal<boolean>;
8
+ label: Value<string>;
9
+ icon: Value<string>;
10
+ size: Value<ControlSize>;
11
+ }
12
+ /**
13
+ * A reusable toolbar button component for rich text editors.
14
+ * Used by both Lexical and ProseMirror editor toolbars.
15
+ */
16
+ export declare function EditorToolbarButton(options: EditorToolbarButtonOptions): import("@tempots/dom").Renderable;
@@ -0,0 +1,9 @@
1
+ import { Signal, TNode } from '@tempots/dom';
2
+ /**
3
+ * A reusable toolbar group component for rich text editors.
4
+ * Shows the group only when at least one of the display signals is true.
5
+ * Used by both Lexical and ProseMirror editor toolbars.
6
+ */
7
+ export declare function EditorToolbarGroup({ display, }: {
8
+ display: Signal<boolean>[];
9
+ }, ...children: TNode[]): import("@tempots/dom").Renderable;
@@ -0,0 +1,2 @@
1
+ export { EditorToolbarButton, type EditorToolbarButtonOptions, } from './editor-toolbar-button';
2
+ export { EditorToolbarGroup } from './editor-toolbar-group';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Shared utilities for JSON Structure controls
3
+ */
4
+ import type { StructureContext } from '../structure-context';
5
+ import type { TypeDefinition } from '../structure-types';
6
+ /**
7
+ * Create input wrapper options from context
8
+ * Shared by all control components
9
+ */
10
+ export declare function createInputOptions(ctx: StructureContext): {
11
+ label: string | undefined;
12
+ description: string | undefined;
13
+ required: boolean;
14
+ };
15
+ /**
16
+ * Get the default value for a type based on its definition
17
+ * Used when creating new items in arrays, sets, maps, tuples, and objects
18
+ */
19
+ export declare function makeDefaultValue(definition: TypeDefinition): unknown;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Controls module exports
3
3
  */
4
+ export * from './control-utils';
4
5
  export * from './generic-control';
5
6
  export * from './string-control';
6
7
  export * from './boolean-control';
@@ -0,0 +1,29 @@
1
+ import { Renderable } from '@tempots/dom';
2
+ import type { BareEditorOptions } from '../../lexical/types';
3
+ /**
4
+ * BareEditor - Foundational headless rich text editor component
5
+ *
6
+ * A minimal Lexical editor surface with no UI chrome. This is the base component
7
+ * that Docked and Contextual presets will build upon.
8
+ *
9
+ * Features:
10
+ * - Headless editor surface (contenteditable)
11
+ * - Plugin-based architecture (rich-text, plain-text, history, clipboard, list, link)
12
+ * - Multiple content formats (markdown, JSON)
13
+ * - Theme integration (light/dark)
14
+ * - Reactive value binding
15
+ * - Read-only mode support
16
+ * - Event callbacks (onInput, onChange, onBlur, onReady, onError)
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const content = prop('')
21
+ * BareEditor({
22
+ * value: content,
23
+ * format: 'markdown',
24
+ * plugins: { richText: true, history: true },
25
+ * onInput: (value) => console.log('Input:', value),
26
+ * })
27
+ * ```
28
+ */
29
+ export declare const BareEditor: (options: BareEditorOptions) => Renderable;
@@ -0,0 +1 @@
1
+ export * from './language-selector';
@@ -0,0 +1,13 @@
1
+ import { Signal, TNode } from '@tempots/dom';
2
+ import type { LexicalEditor } from 'lexical';
3
+ export interface LanguageSelectorOptions {
4
+ editor: Signal<LexicalEditor | null>;
5
+ stateUpdate: Signal<number>;
6
+ readOnly?: Signal<boolean>;
7
+ languages?: string[];
8
+ }
9
+ /**
10
+ * Language selector that appears when a code block is selected.
11
+ * Allows changing the programming language for syntax highlighting.
12
+ */
13
+ export declare function LanguageSelector({ editor, stateUpdate, readOnly, languages, }: LanguageSelectorOptions): TNode;
@@ -0,0 +1,22 @@
1
+ import { Renderable } from '@tempots/dom';
2
+ import type { ContextualEditorOptions } from '../../lexical/types';
3
+ /**
4
+ * ContextualEditor - Rich text editor with floating toolbar and block handle
5
+ *
6
+ * A clean editor surface that shows a floating toolbar when text is selected
7
+ * and a block handle at the left of each block for changing block types.
8
+ * No permanent UI chrome.
9
+ *
10
+ * Default plugins: richText, history, clipboard, list, link
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const content = prop('')
15
+ * ContextualEditor({
16
+ * value: content,
17
+ * format: 'markdown',
18
+ * onInput: (value) => console.log('Input:', value),
19
+ * })
20
+ * ```
21
+ */
22
+ export declare const ContextualEditor: (options: ContextualEditorOptions) => Renderable;
@@ -0,0 +1,23 @@
1
+ import { Renderable } from '@tempots/dom';
2
+ import type { DockedEditorOptions } from '../../lexical/types';
3
+ /**
4
+ * DockedEditor - Rich text editor with a persistent toolbar
5
+ *
6
+ * Extends the BareEditor pattern by adding a configurable toolbar above
7
+ * (or below) the editor surface. Includes all standard formatting groups:
8
+ * text-formatting, headings, lists, blocks, links, and history.
9
+ *
10
+ * Default plugins: richText, history, clipboard, list, link
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const content = prop('')
15
+ * DockedEditor({
16
+ * value: content,
17
+ * format: 'markdown',
18
+ * toolbar: { maxHeadingLevel: 3, hiddenGroups: ['tables'] },
19
+ * onInput: (value) => console.log('Input:', value),
20
+ * })
21
+ * ```
22
+ */
23
+ export declare const DockedEditor: (options: DockedEditorOptions) => Renderable;
@@ -0,0 +1,16 @@
1
+ import { Signal, TNode } from '@tempots/dom';
2
+ import type { LexicalEditor } from 'lexical';
3
+ export interface BlockCommand {
4
+ id: string;
5
+ label: string;
6
+ icon: string;
7
+ handler: (editor: LexicalEditor) => void;
8
+ }
9
+ export declare const DEFAULT_BLOCK_COMMANDS: BlockCommand[];
10
+ export interface BlockHandleOptions {
11
+ editor: Signal<LexicalEditor | null>;
12
+ stateUpdate: Signal<number>;
13
+ readOnly?: Signal<boolean>;
14
+ commands?: BlockCommand[];
15
+ }
16
+ export declare function BlockHandle({ editor, stateUpdate, readOnly, commands, }: BlockHandleOptions): TNode;
@@ -0,0 +1,12 @@
1
+ import { Signal, TNode } from '@tempots/dom';
2
+ import type { LexicalEditor } from 'lexical';
3
+ import type { ToolbarGroupId } from '../../../lexical/types';
4
+ import { ControlSize } from '../../theme';
5
+ export interface FloatingToolbarOptions {
6
+ editor: Signal<LexicalEditor | null>;
7
+ stateUpdate: Signal<number>;
8
+ groups?: ToolbarGroupId[];
9
+ readOnly?: Signal<boolean>;
10
+ size?: ControlSize;
11
+ }
12
+ export declare function FloatingToolbar({ editor, stateUpdate, groups, readOnly, size, }: FloatingToolbarOptions): TNode;
@@ -0,0 +1,6 @@
1
+ export { FloatingToolbar } from './floating-toolbar';
2
+ export type { FloatingToolbarOptions } from './floating-toolbar';
3
+ export { SlashCommandPalette, DEFAULT_SLASH_COMMANDS, } from './slash-command-palette';
4
+ export type { SlashCommandPaletteOptions } from './slash-command-palette';
5
+ export { BlockHandle, DEFAULT_BLOCK_COMMANDS } from './block-handle';
6
+ export type { BlockHandleOptions, BlockCommand } from './block-handle';
@@ -0,0 +1,20 @@
1
+ import { Signal, Prop, TNode } from '@tempots/dom';
2
+ import type { LexicalEditor } from 'lexical';
3
+ import type { SlashCommandDefinition } from '../../../lexical/types';
4
+ export interface SlashCommandPaletteOptions {
5
+ editor: Signal<LexicalEditor | null>;
6
+ commands: SlashCommandDefinition[];
7
+ isVisible: Prop<boolean>;
8
+ filterText: Signal<string>;
9
+ position: Signal<{
10
+ top: number;
11
+ left: number;
12
+ }>;
13
+ onSelect: (command: SlashCommandDefinition) => void;
14
+ onDismiss: () => void;
15
+ }
16
+ /**
17
+ * Default slash commands for the editor
18
+ */
19
+ export declare const DEFAULT_SLASH_COMMANDS: SlashCommandDefinition[];
20
+ export declare function SlashCommandPalette({ commands, isVisible, filterText, position, onSelect, onDismiss, }: SlashCommandPaletteOptions): TNode;
@@ -0,0 +1,8 @@
1
+ export { BareEditor } from './bare-editor';
2
+ export { DockedEditor } from './docked-editor';
3
+ export { LexicalToolbar } from './toolbar';
4
+ export type { LexicalToolbarOptions } from './toolbar';
5
+ export { ContextualEditor } from './contextual-editor';
6
+ export { LexicalEditorInput } from './lexical-editor-input';
7
+ export { FloatingToolbar, SlashCommandPalette, DEFAULT_SLASH_COMMANDS, BlockHandle, DEFAULT_BLOCK_COMMANDS, } from './floating';
8
+ export type { FloatingToolbarOptions, SlashCommandPaletteOptions, BlockHandleOptions, BlockCommand, } from './floating';
@@ -0,0 +1,30 @@
1
+ import { Renderable } from '@tempots/dom';
2
+ import type { LexicalInputOptions } from '../../lexical/types';
3
+ /**
4
+ * LexicalEditorInput - Form-compatible rich text editor input
5
+ *
6
+ * Wraps BareEditor with BeatUI's form system integration (InputContainer).
7
+ * Supports markdown, HTML, and JSON formats. Compatible with form controllers
8
+ * and validation.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const content = prop('')
13
+ * LexicalEditorInput({
14
+ * value: content,
15
+ * format: 'markdown',
16
+ * placeholder: 'Enter text...',
17
+ * onInput: (v) => console.log(v),
18
+ * })
19
+ * ```
20
+ *
21
+ * @example With form controller:
22
+ * ```ts
23
+ * Control(LexicalEditorInput, {
24
+ * controller: formController.field('description'),
25
+ * label: 'Description',
26
+ * format: 'markdown',
27
+ * })
28
+ * ```
29
+ */
30
+ export declare const LexicalEditorInput: (options: LexicalInputOptions) => Renderable;
@@ -0,0 +1 @@
1
+ export * from './table-controls';
@@ -0,0 +1,12 @@
1
+ import { Signal, TNode } from '@tempots/dom';
2
+ import type { LexicalEditor } from 'lexical';
3
+ export interface TableControlsOptions {
4
+ editor: Signal<LexicalEditor | null>;
5
+ stateUpdate: Signal<number>;
6
+ readOnly?: Signal<boolean>;
7
+ }
8
+ /**
9
+ * Table context menu that appears when a table cell is selected.
10
+ * Provides operations like insert/delete rows/columns.
11
+ */
12
+ export declare function TableControls({ editor, stateUpdate, readOnly, }: TableControlsOptions): TNode;
@@ -0,0 +1,6 @@
1
+ export { LexicalToolbar } from './lexical-toolbar';
2
+ export type { LexicalToolbarOptions } from './lexical-toolbar';
3
+ export { LexicalToolbarButton } from './toolbar-button';
4
+ export type { LexicalToolbarButtonOptions } from './toolbar-button';
5
+ export { LexicalToolbarGroup } from './toolbar-group';
6
+ export { createToolbarHelpers, createButtonFactory } from './toolbar-helpers';
@@ -0,0 +1,12 @@
1
+ import { Signal, Value, TNode } from '@tempots/dom';
2
+ import { type LexicalEditor } from 'lexical';
3
+ import type { ToolbarConfig } from '../../../lexical/types';
4
+ import { ControlSize } from '../../theme';
5
+ export interface LexicalToolbarOptions {
6
+ editor: Signal<LexicalEditor | null>;
7
+ stateUpdate: Signal<number>;
8
+ toolbar?: ToolbarConfig;
9
+ readOnly?: Signal<boolean>;
10
+ size?: Value<ControlSize>;
11
+ }
12
+ export declare function LexicalToolbar({ editor, stateUpdate, toolbar, readOnly, size, }: LexicalToolbarOptions): TNode;
@@ -0,0 +1 @@
1
+ export { EditorToolbarButton as LexicalToolbarButton, type EditorToolbarButtonOptions as LexicalToolbarButtonOptions, } from '../../editor-toolbar';
@@ -0,0 +1 @@
1
+ export { EditorToolbarGroup as LexicalToolbarGroup } from '../../editor-toolbar';
@@ -0,0 +1,30 @@
1
+ import { Signal, Value } from '@tempots/dom';
2
+ import { type LexicalEditor, type TextFormatType, type RangeSelection, type ElementNode, type LexicalCommand } from 'lexical';
3
+ import { ControlSize } from '../../theme';
4
+ /**
5
+ * Create reactive state and action helpers for Lexical toolbar integration.
6
+ * Both the docked toolbar and floating toolbar share these helpers.
7
+ */
8
+ export declare function createToolbarHelpers(ed: Signal<LexicalEditor>, stateUpdate: Signal<number>): {
9
+ withSelection: <T>(fn: (sel: RangeSelection) => T, fallback: T) => Signal<T>;
10
+ getAnchorElement: (sel: RangeSelection) => ElementNode | import("lexical").TextNode;
11
+ textFormatActive: (fmt: TextFormatType) => Signal<boolean>;
12
+ blockTypeActive: (type: string) => Signal<boolean>;
13
+ listTypeActive: (listType: string) => Signal<boolean>;
14
+ headingActive: (level: number) => import("@tempots/dom").Computed<boolean>;
15
+ linkActive: () => Signal<boolean>;
16
+ dispatch: <T>(command: LexicalCommand<T>, payload: T) => () => void;
17
+ toggleBlock: (type: string, create: () => ElementNode) => () => void;
18
+ toggleLink: () => void;
19
+ };
20
+ /**
21
+ * Create a button factory bound to shared readOnly and size props.
22
+ * Returns a function that takes a display signal and produces
23
+ * a group-specific button builder.
24
+ */
25
+ export declare function createButtonFactory(readOnly: Signal<boolean>, size: Value<ControlSize>): (display: Signal<boolean>) => (opts: {
26
+ active: Signal<boolean>;
27
+ onClick: () => void;
28
+ label: string;
29
+ icon: string;
30
+ }) => import("@tempots/dom").Renderable;
@@ -1,11 +1 @@
1
- import { Signal, Value } from '@tempots/dom';
2
- import { ControlSize } from '../theme';
3
- export declare function EToolbarButton({ active, display, onClick, disabled, label, icon, size, }: {
4
- active: Signal<boolean>;
5
- display: Signal<boolean>;
6
- onClick: () => void;
7
- disabled: Signal<boolean>;
8
- label: Value<string>;
9
- icon: Value<string>;
10
- size: Value<ControlSize>;
11
- }): import("@tempots/dom").Renderable;
1
+ export { EditorToolbarButton as EToolbarButton } from '../editor-toolbar';
@@ -1,4 +1 @@
1
- import { Signal, TNode } from '@tempots/dom';
2
- export declare function EToolbarGroup({ display, }: {
3
- display: Signal<boolean>[];
4
- }, ...children: TNode[]): import("@tempots/dom").Renderable;
1
+ export { EditorToolbarGroup as EToolbarGroup } from '../editor-toolbar';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Lexical commands re-exports and custom BeatUI commands.
3
+ *
4
+ * Re-exports commonly used Lexical commands so consumers don't need
5
+ * to import from 'lexical' directly for basic operations.
6
+ */
7
+ export { FORMAT_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, UNDO_COMMAND, REDO_COMMAND, INDENT_CONTENT_COMMAND, OUTDENT_CONTENT_COMMAND, SELECTION_CHANGE_COMMAND, KEY_ENTER_COMMAND, KEY_ESCAPE_COMMAND, KEY_TAB_COMMAND, INSERT_PARAGRAPH_COMMAND, PASTE_COMMAND, COPY_COMMAND, CUT_COMMAND, CLEAR_EDITOR_COMMAND, CLICK_COMMAND, FOCUS_COMMAND, BLUR_COMMAND, COMMAND_PRIORITY_LOW, COMMAND_PRIORITY_NORMAL, COMMAND_PRIORITY_HIGH, COMMAND_PRIORITY_CRITICAL, COMMAND_PRIORITY_EDITOR, createCommand, } from 'lexical';
8
+ export { INSERT_ORDERED_LIST_COMMAND, INSERT_UNORDERED_LIST_COMMAND, INSERT_CHECK_LIST_COMMAND, REMOVE_LIST_COMMAND, } from '@lexical/list';
9
+ /** Command to toggle the slash command palette */
10
+ export declare const TOGGLE_SLASH_COMMAND_PALETTE: import("lexical").LexicalCommand<void>;
11
+ /** Command to insert a horizontal rule */
12
+ export declare const INSERT_HORIZONTAL_RULE_COMMAND: import("lexical").LexicalCommand<void>;
13
+ /** Command to insert an image (future use) */
14
+ export declare const INSERT_IMAGE_COMMAND: import("lexical").LexicalCommand<{
15
+ src: string;
16
+ alt?: string;
17
+ }>;
@@ -0,0 +1,39 @@
1
+ import type { LexicalEditor, SerializedEditorState } from 'lexical';
2
+ import type { HeadlessEditorOptions } from './types';
3
+ /**
4
+ * Create a headless Lexical editor instance (no DOM mounting).
5
+ * Useful for server-side rendering, testing, or programmatic content manipulation.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const editor = await createHeadlessEditor({
10
+ * nodes: [MyCustomNode],
11
+ * plugins: [myPlugin],
12
+ * })
13
+ *
14
+ * editor.update(() => {
15
+ * const root = $getRoot()
16
+ * root.clear()
17
+ * // ... manipulate content
18
+ * })
19
+ *
20
+ * const json = editor.getEditorState().toJSON()
21
+ * ```
22
+ */
23
+ export declare function createHeadlessEditor(options?: HeadlessEditorOptions): Promise<LexicalEditor>;
24
+ /**
25
+ * Convert markdown string to Lexical JSON using a headless editor.
26
+ */
27
+ export declare function markdownToLexicalJson(markdown: string): Promise<SerializedEditorState>;
28
+ /**
29
+ * Convert Lexical JSON to markdown string using a headless editor.
30
+ */
31
+ export declare function lexicalJsonToMarkdown(json: SerializedEditorState): Promise<string>;
32
+ /**
33
+ * Convert HTML string to Lexical JSON using a headless editor.
34
+ */
35
+ export declare function htmlToLexicalJson(html: string): Promise<SerializedEditorState>;
36
+ /**
37
+ * Convert Lexical JSON to HTML string using a headless editor.
38
+ */
39
+ export declare function lexicalJsonToHtml(json: SerializedEditorState): Promise<string>;
@@ -0,0 +1,20 @@
1
+ import { DecoratorNode, type DOMConversionMap, type DOMExportOutput, type LexicalNode, type SerializedLexicalNode, type Spread } from 'lexical';
2
+ export type SerializedHorizontalRuleNode = Spread<{
3
+ type: 'horizontal-rule';
4
+ version: 1;
5
+ }, SerializedLexicalNode>;
6
+ export declare class HorizontalRuleNode extends DecoratorNode<null> {
7
+ static getType(): string;
8
+ static clone(node: HorizontalRuleNode): HorizontalRuleNode;
9
+ static importJSON(_serializedNode: SerializedHorizontalRuleNode): HorizontalRuleNode;
10
+ static importDOM(): DOMConversionMap | null;
11
+ exportJSON(): SerializedHorizontalRuleNode;
12
+ exportDOM(): DOMExportOutput;
13
+ createDOM(): HTMLElement;
14
+ updateDOM(): false;
15
+ getTextContent(): string;
16
+ isInline(): false;
17
+ decorate(): null;
18
+ }
19
+ export declare function $createHorizontalRuleNode(): HorizontalRuleNode;
20
+ export declare function $isHorizontalRuleNode(node: LexicalNode | null | undefined): node is HorizontalRuleNode;