@moldable-ai/editor 0.1.3 → 0.1.6

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.
package/LICENSE CHANGED
@@ -1,101 +1,105 @@
1
- Copyright (c) 2026-present Desiderata LLC
1
+ # Functional Source License, Version 1.1, ALv2 Future License
2
2
 
3
- Portions of this software are licensed as follows:
3
+ ## Abbreviation
4
4
 
5
- - All third party components incorporated into the Moldable Software are licensed
6
- under the original license provided by the owner of the applicable component.
7
- - All other content is available under the "Elastic License 2.0" license as defined below.
5
+ FSL-1.1-ALv2
8
6
 
9
- Elastic License 2.0
7
+ ## Notice
10
8
 
11
- URL: https://www.elastic.co/licensing/elastic-license
9
+ Copyright 2026 Desiderata LLC
12
10
 
13
- ## Acceptance
11
+ ## Terms and Conditions
14
12
 
15
- By using the software, you agree to all of the terms and conditions below.
13
+ ### Licensor ("We")
16
14
 
17
- ## Copyright License
15
+ The party offering the Software under these Terms and Conditions.
18
16
 
19
- The licensor grants you a non-exclusive, royalty-free, worldwide,
20
- non-sublicensable, non-transferable license to use, copy, distribute, make
21
- available, and prepare derivative works of the software, in each case subject to
22
- the limitations and conditions below.
17
+ ### The Software
23
18
 
24
- ## Limitations
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
25
22
 
26
- You may not provide the software to third parties as a hosted or managed
27
- service, where the service provides users with access to any substantial set of
28
- the features or functionality of the software.
23
+ ### License Grant
29
24
 
30
- You may not move, change, disable, or circumvent the license key functionality
31
- in the software, and you may not remove or obscure any functionality in the
32
- software that is protected by the license key.
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
33
29
 
34
- You may not alter, remove, or obscure any licensing, copyright, or other notices
35
- of the licensor in the software. Any use of the licensor's trademarks is subject
36
- to applicable law.
30
+ ### Permitted Purpose
37
31
 
38
- ## Patents
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
39
35
 
40
- The licensor grants you a license, under any patent claims the licensor can
41
- license, or becomes able to license, to make, have made, use, sell, offer for
42
- sale, import and have imported the software, in each case subject to the
43
- limitations and conditions in this license. This license does not cover any
44
- patent claims that you cause to be infringed by modifications or additions to
45
- the software. If you or your company make any written claim that the software
46
- infringes or contributes to infringement of any patent, your patent license for
47
- the software granted under these terms ends immediately. If your company makes
48
- such a claim, your patent license ends immediately for work on behalf of your
49
- company.
36
+ 1. substitutes for the Software;
50
37
 
51
- ## Notices
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
52
40
 
53
- You must ensure that anyone who gets a copy of any part of the software from you
54
- also gets a copy of these terms.
41
+ 3. offers the same or substantially similar functionality as the Software.
55
42
 
56
- If you modify the software, you must include in any modified copies of the
57
- software prominent notices stating that you have modified the software.
43
+ Permitted Purposes specifically include using the Software:
58
44
 
59
- ## No Other Rights
45
+ 1. for your internal use and access;
60
46
 
61
- These terms do not imply any licenses other than those expressly granted in
62
- these terms.
47
+ 2. for non-commercial education;
63
48
 
64
- ## Termination
49
+ 3. for non-commercial research; and
65
50
 
66
- If you use the software in violation of these terms, such use is not licensed,
67
- and your licenses will automatically terminate. If the licensor provides you
68
- with a notice of your violation, and you cease all violation of this license no
69
- later than 30 days after you receive that notice, your licenses will be
70
- reinstated retroactively. However, if you violate these terms after such
71
- reinstatement, any additional violation of these terms will cause your licenses
72
- to terminate automatically and permanently.
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
73
53
 
74
- ## No Liability
54
+ ### Patents
75
55
 
76
- _As far as the law allows, the software comes as is, without any warranty or
77
- condition, and the licensor will not be liable to you for any damages arising
78
- out of these terms or the use or nature of the software, under any kind of
79
- legal claim._
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
80
61
 
81
- ## Definitions
62
+ ### Redistribution
82
63
 
83
- The **licensor** is the entity offering these terms, and the **software** is the
84
- software the licensor makes available under these terms, including any portion
85
- of it.
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
86
66
 
87
- **you** refers to the individual or entity agreeing to these terms.
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
88
70
 
89
- **your company** is any legal entity, sole proprietorship, or other kind of
90
- organization that you work for, plus all organizations that have control over,
91
- are under the control of, or are under common control with that
92
- organization. **control** means ownership of substantially all the assets of an
93
- entity, or the power to direct its management and policies by vote, contract, or
94
- otherwise. Control can be direct or indirect.
71
+ ### Disclaimer
95
72
 
96
- **your licenses** are all the licenses granted to you for the software under
97
- these terms.
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
98
76
 
99
- **use** means anything you do with the software requiring one of your licenses.
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
100
80
 
101
- **trademark** means trademarks, service marks, and similar rights.
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
@@ -11,7 +11,7 @@ export const editorTheme = {
11
11
  underline: 'underline',
12
12
  strikethrough: 'line-through',
13
13
  underlineStrikethrough: 'underline line-through',
14
- code: 'bg-muted px-1.5 py-0.5 rounded font-mono text-sm',
14
+ code: 'rounded bg-muted/60 px-1 py-0.5 font-sans text-[0.92em] text-muted-foreground break-words whitespace-normal',
15
15
  },
16
16
  heading: {
17
17
  h1: 'text-2xl font-bold my-3',
@@ -33,5 +33,5 @@ export const editorTheme = {
33
33
  },
34
34
  link: 'text-primary underline hover:text-primary/80 cursor-pointer',
35
35
  quote: 'border-l-4 border-muted px-4 py-2 my-2 text-muted-foreground',
36
- code: 'bg-muted p-3 my-4 rounded font-mono text-sm',
36
+ code: 'bg-muted p-3 my-4 rounded-md overflow-x-auto font-mono text-sm leading-loose text-muted-foreground',
37
37
  };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@moldable-ai/editor",
3
- "version": "0.1.3",
3
+ "version": "0.1.6",
4
4
  "description": "Rich text markdown editor for Moldable applications",
5
5
  "author": "Desiderata LLC",
6
- "license": "Elastic-2.0",
6
+ "license": "SEE LICENSE IN LICENSE",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/moldable-ai/moldable.git",
@@ -74,7 +74,7 @@
74
74
  "vitest": "^4.0.16"
75
75
  },
76
76
  "peerDependencies": {
77
- "@moldable-ai/ui": ">=0.1.0",
77
+ "@moldable-ai/ui": ">=0.2.5",
78
78
  "react": "^19.0.0",
79
79
  "react-dom": "^19.0.0"
80
80
  }
@@ -61,6 +61,25 @@
61
61
  display: none;
62
62
  }
63
63
 
64
+ /* Code styles */
65
+ [data-lexical-editor='true'] pre {
66
+ overflow-x: auto;
67
+ overflow-wrap: anywhere;
68
+ white-space: pre-wrap;
69
+ tab-size: 2;
70
+ }
71
+
72
+ [data-lexical-editor='true'] pre *,
73
+ [data-lexical-editor='true'] pre [data-lexical-text='true'] {
74
+ line-height: inherit;
75
+ letter-spacing: 0;
76
+ }
77
+
78
+ [data-lexical-editor='true'] :not(pre) > code {
79
+ white-space: normal;
80
+ word-break: break-word;
81
+ }
82
+
64
83
  /* Mention styles */
65
84
  .mention {
66
85
  color: hsl(var(--primary));