frappe-ui 1.0.0 → 1.0.2
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/experimental/TextEditor/TextEditor.vue +7 -0
- package/package.json +6 -4
- package/src/charts/axisChartCommon.ts +97 -33
- package/src/charts/axisChartOptions.ts +3 -22
- package/src/charts/core/dataLabelFit.ts +88 -0
- package/src/charts/core/useAxisChart.ts +37 -0
- package/src/charts/scatterOptions.ts +1 -6
- package/src/components/Checkbox/Checkbox.vue +8 -4
- package/src/components/Combobox/Combobox.vue +20 -7
- package/src/components/Combobox/ComboboxResults.vue +2 -0
- package/src/components/Dialog/Dialog.vue +8 -1
- package/src/components/MobileNav/MobileNav.vue +4 -3
- package/src/components/MobileShell/MobileShell.md +4 -1
- package/src/components/MultiSelect/MultiSelect.vue +2 -0
- package/src/components/PageHeader/PageHeaderMobile.vue +2 -2
- package/src/components/Progress/Progress.md +2 -2
- package/src/components/Progress/Progress.vue +4 -5
- package/src/components/SidebarRail/SidebarRail.api.md +1 -1
- package/src/components/SidebarRail/SidebarRail.md +3 -1
- package/src/components/SidebarRail/SidebarRailItem.vue +7 -3
- package/src/components/SidebarRail/types.ts +2 -1
- package/src/components/shared/selection/useFilteredGroups.ts +39 -5
- package/src/molecules/editor/extensions/mention/mention-extension.ts +2 -2
- package/src/molecules/editor/extensions/shared/media-plugin.ts +30 -7
- package/src/molecules/editor/extensions/shared/suggestion-helpers.ts +9 -0
- package/src/molecules/editor/extensions/shared/suggestion-renderer.ts +30 -2
- package/src/molecules/editor/useEditor.ts +8 -0
- package/src/resources/realtime.ts +20 -4
- package/src/style.css +12 -0
- package/src/utils/rankMatch.ts +18 -0
- package/tailwind/plugin.js +7 -13
- package/vite/benchFiles.js +36 -0
- package/vite/index.js +4 -0
- package/vite/utils.js +57 -7
package/vite/utils.js
CHANGED
|
@@ -22,16 +22,28 @@ export function getCommonSiteConfig() {
|
|
|
22
22
|
return null
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
const warnedBenchPaths = new Set()
|
|
26
|
+
|
|
25
27
|
export function findBenchPath() {
|
|
26
28
|
let currentDir = path.resolve('.')
|
|
27
|
-
while (currentDir !==
|
|
28
|
-
if (
|
|
29
|
-
fs.existsSync(path.join(currentDir, 'sites')) &&
|
|
30
|
-
fs.existsSync(path.join(currentDir, 'apps'))
|
|
31
|
-
) {
|
|
29
|
+
while (currentDir !== path.dirname(currentDir)) {
|
|
30
|
+
if (isBench(currentDir)) {
|
|
32
31
|
return currentDir
|
|
33
32
|
}
|
|
34
|
-
currentDir = path.
|
|
33
|
+
currentDir = path.dirname(currentDir)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// An app linked into apps/ from elsewhere has no bench above it. Tools that
|
|
37
|
+
// link it, such as `pilot dev`, set FRAPPE_BENCH_PATH to the bench.
|
|
38
|
+
if (process.env.FRAPPE_BENCH_PATH) {
|
|
39
|
+
const benchPath = path.resolve(process.env.FRAPPE_BENCH_PATH)
|
|
40
|
+
if (!isBench(benchPath) && !warnedBenchPaths.has(benchPath)) {
|
|
41
|
+
warnedBenchPaths.add(benchPath)
|
|
42
|
+
console.warn(
|
|
43
|
+
`FRAPPE_BENCH_PATH is ${benchPath}, which has no apps/ and sites/ folders`,
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
return benchPath
|
|
35
47
|
}
|
|
36
48
|
return null
|
|
37
49
|
}
|
|
@@ -53,7 +65,7 @@ export function findAppName() {
|
|
|
53
65
|
|
|
54
66
|
// Walk up from cwd until we find a directory whose parent is the apps folder
|
|
55
67
|
let currentDir = path.resolve('.')
|
|
56
|
-
while (currentDir !==
|
|
68
|
+
while (currentDir !== path.dirname(currentDir)) {
|
|
57
69
|
const parent = path.dirname(currentDir)
|
|
58
70
|
if (path.resolve(parent) === path.resolve(appsFolder)) {
|
|
59
71
|
return path.basename(currentDir)
|
|
@@ -61,9 +73,47 @@ export function findAppName() {
|
|
|
61
73
|
currentDir = parent
|
|
62
74
|
}
|
|
63
75
|
|
|
76
|
+
return findLinkedAppName(appsFolder)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Finds an app symlinked into apps/ from another folder by comparing real paths.
|
|
80
|
+
function findLinkedAppName(appsFolder) {
|
|
81
|
+
let names
|
|
82
|
+
try {
|
|
83
|
+
names = fs.readdirSync(appsFolder)
|
|
84
|
+
} catch {
|
|
85
|
+
return null
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const apps = new Map(
|
|
89
|
+
names.map((name) => [realPath(path.join(appsFolder, name)), name]),
|
|
90
|
+
)
|
|
91
|
+
let currentDir = realPath(path.resolve('.'))
|
|
92
|
+
while (currentDir !== path.dirname(currentDir)) {
|
|
93
|
+
if (apps.has(currentDir)) {
|
|
94
|
+
return apps.get(currentDir)
|
|
95
|
+
}
|
|
96
|
+
currentDir = path.dirname(currentDir)
|
|
97
|
+
}
|
|
98
|
+
|
|
64
99
|
return null
|
|
65
100
|
}
|
|
66
101
|
|
|
102
|
+
function isBench(dir) {
|
|
103
|
+
return (
|
|
104
|
+
fs.existsSync(path.join(dir, 'sites')) &&
|
|
105
|
+
fs.existsSync(path.join(dir, 'apps'))
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function realPath(filePath) {
|
|
110
|
+
try {
|
|
111
|
+
return fs.realpathSync(filePath)
|
|
112
|
+
} catch {
|
|
113
|
+
return filePath
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
67
117
|
export async function getInstalledAppSites(appName) {
|
|
68
118
|
const { execFile } = await import('node:child_process')
|
|
69
119
|
const { promisify } = await import('node:util')
|