@kupcad/files 0.1.4 → 0.1.5
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/README.md +6 -5
- package/package.json +3 -2
- package/src/index.js +2 -1
package/README.md
CHANGED
|
@@ -37,11 +37,12 @@ host brings the file system.
|
|
|
37
37
|
and a file's Download where the host gives them (a browser's). A desktop app draws it as a
|
|
38
38
|
native menu; a page draws it with `ContextMenu`, a popover at the pointer that the arrow keys
|
|
39
39
|
move through and Escape, a click elsewhere or the focus leaving close.
|
|
40
|
-
* **The folder** (`listFolder(root, { readDir })
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
* **The folder** (`listFolder(root, { readDir })`; alone, without Svelte, from
|
|
41
|
+
`@kupcad/files/tree`, for Node or a module no Svelte compiler sees): the tree of `root`, each
|
|
42
|
+
folder's folders first, hidden folders, `node_modules` and `target` left out, and a folder
|
|
43
|
+
holding files but no script or file a script reads (`kindOf`), at most `MAX_ENTRIES`. The
|
|
44
|
+
names a new entry may take (`nameProblem`, `scriptName`), and paths in it (`childPath`,
|
|
45
|
+
`parentOf`, `within`) with the host's separator, `/` or `\`.
|
|
45
46
|
* **The scripts read** (`Scripts`, over the host's `read`, `write` and `exists`): each one's text
|
|
46
47
|
now and as the disk had it, for what is unsaved; a save that finds the disk changed since
|
|
47
48
|
holds the disk's text as a conflict for the person to choose; each script's editor snapshot,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kupcad/files",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "A KupCAD project's files as a tree, for any host of them (the desktop app's disk, a browser's private file system): the Svelte tree with its bar, its rows' menu, the folder model and the scripts read with their unsaved changes.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
".": {
|
|
19
19
|
"svelte": "./src/index.js",
|
|
20
20
|
"default": "./src/index.js"
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
|
+
"./tree": "./src/tree.js"
|
|
22
23
|
},
|
|
23
24
|
"publishConfig": {
|
|
24
25
|
"access": "public"
|
package/src/index.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// disk, the browser IDE's in its private file system): the tree (FileTree), its rows' menu
|
|
3
3
|
// (rowMenu, drawn by a host's native menu or by ContextMenu), the folder listed through the
|
|
4
4
|
// host's `readDir` and the paths and names in it (tree.js), and the scripts read, their unsaved
|
|
5
|
-
// changes and undo histories (Scripts).
|
|
5
|
+
// changes and undo histories (Scripts). The folder alone, for a module that loads no Svelte
|
|
6
|
+
// (Node, a plain script), is `@kupcad/files/tree`.
|
|
6
7
|
|
|
7
8
|
export { default as ContextMenu } from './ContextMenu.svelte';
|
|
8
9
|
export { default as FileTree } from './FileTree.svelte';
|