@startsimpli/ui 0.4.103 → 0.4.104
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startsimpli/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.104",
|
|
4
4
|
"description": "Shared UI components package for StartSimpli applications",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"react": "^18.0.0 || ^19.0.0",
|
|
46
46
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
47
47
|
"@startsimpli/api": "^0.5.56",
|
|
48
|
-
"@startsimpli/
|
|
49
|
-
"@startsimpli/
|
|
48
|
+
"@startsimpli/i18n": "^0.1.3",
|
|
49
|
+
"@startsimpli/auth": "^0.4.35"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@startsimpli/api": {
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
"tailwindcss": "^3.4.19",
|
|
121
121
|
"tsup": "^8.5.1",
|
|
122
122
|
"typescript": "^6.0.3",
|
|
123
|
-
"@startsimpli/
|
|
124
|
-
"@startsimpli/
|
|
123
|
+
"@startsimpli/i18n": "0.1.3",
|
|
124
|
+
"@startsimpli/realtime": "0.0.2"
|
|
125
125
|
},
|
|
126
126
|
"keywords": [
|
|
127
127
|
"ui",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { Columns2, Eye, Pencil, Plus, Trash2, Loader2, Check, AlertCircle } from 'lucide-react';
|
|
15
|
+
import { wordCount } from '../validation/checks';
|
|
15
16
|
|
|
16
17
|
import { cn } from '../../lib/utils';
|
|
17
18
|
import { MarkdownRenderer } from '../blog/MarkdownRenderer';
|
|
@@ -34,9 +35,17 @@ export interface DocumentEditorProps {
|
|
|
34
35
|
className?: string;
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
/**
|
|
39
|
+
* ONE word counter in this package, not two (bd startsim-wn2p.28).
|
|
40
|
+
*
|
|
41
|
+
* This file had its own `split(/\s+/)` copy, so after the validation rail
|
|
42
|
+
* learned to count Chinese the editor still did not: the same Chinese draft
|
|
43
|
+
* showed "Blog word count 524 words" in the rail and "16 words" on the tab
|
|
44
|
+
* heading directly above it. A reader cannot tell which number to believe, and
|
|
45
|
+
* the honest answer was that only one of them was counting.
|
|
46
|
+
*/
|
|
37
47
|
function countWords(s: string): number {
|
|
38
|
-
|
|
39
|
-
return t ? t.split(/\s+/).length : 0;
|
|
48
|
+
return wordCount(s);
|
|
40
49
|
}
|
|
41
50
|
|
|
42
51
|
function asString(v: unknown): string {
|