@nil-/doc 0.2.36 → 0.2.38

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 (35) hide show
  1. package/CHANGELOG.md +56 -50
  2. package/components/Layout.svelte +32 -18
  3. package/components/Layout.svelte.d.ts +1 -0
  4. package/components/block/Block.svelte +34 -17
  5. package/components/block/Block.svelte.d.ts +1 -0
  6. package/components/block/Controls.svelte +6 -1
  7. package/components/block/Controls.svelte.d.ts +1 -0
  8. package/components/block/Instance.svelte +111 -7
  9. package/components/block/Params.svelte +15 -18
  10. package/components/block/Params.svelte.d.ts +1 -0
  11. package/components/block/Template.svelte +17 -150
  12. package/components/block/Template.svelte.d.ts +1 -0
  13. package/components/block/context.d.ts +2 -2
  14. package/components/block/context.js +2 -1
  15. package/components/block/controls/misc/Styler.svelte +3 -2
  16. package/components/context.d.ts +0 -1
  17. package/components/context.js +0 -6
  18. package/components/etc/Container.svelte +19 -19
  19. package/components/etc/Container.svelte.d.ts +3 -3
  20. package/components/etc/ThemeIcon.svelte +1 -7
  21. package/components/navigation/Nav.svelte +12 -8
  22. package/components/navigation/Nav.svelte.d.ts +1 -3
  23. package/components/navigation/Node.svelte +1 -1
  24. package/components/navigation/Tree.svelte +1 -1
  25. package/components/navigation/utils/fuzz.d.ts +1 -0
  26. package/components/navigation/utils/fuzz.js +119 -0
  27. package/components/navigation/utils/renamer.d.ts +9 -0
  28. package/components/navigation/utils/renamer.js +15 -0
  29. package/components/navigation/utils/sort.d.ts +2 -0
  30. package/components/navigation/utils/sort.js +3 -0
  31. package/components/navigation/{utils.d.ts → utils/sorter.d.ts} +2 -12
  32. package/components/navigation/{utils.js → utils/sorter.js} +1 -17
  33. package/index.d.ts +2 -1
  34. package/index.js +2 -1
  35. package/package.json +1 -1
@@ -23,7 +23,7 @@ const sorterT = (l, r) => {
23
23
  * @param r - right operand
24
24
  * @returns `-1 | 0 | +1`
25
25
  */
26
- const sorter = (l, r) => {
26
+ export const sorter = (l, r) => {
27
27
  const lmatch = match.exec(l);
28
28
  const rmatch = match.exec(r);
29
29
  if (null == lmatch && null == rmatch) {
@@ -37,19 +37,3 @@ const sorter = (l, r) => {
37
37
  }
38
38
  return sorterT(parseInt(lmatch[1]), parseInt(rmatch[1]));
39
39
  };
40
- /**
41
- * If a text follows `<I>-<Name>` format,
42
- * this method simply removes the Prefix.
43
- *
44
- * @param text
45
- * @returns `<Name>`
46
- */
47
- const renamer = (text) => {
48
- const m = match.exec(text);
49
- if (m) {
50
- return m[2];
51
- }
52
- return text;
53
- };
54
- export const sort = (t, order) => Object.entries(t).sort(([l], [r]) => order(l, r));
55
- export { sorter, renamer };
package/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { renamer, sorter } from "./components/navigation/utils";
1
+ export { renamer } from "./components/navigation/utils/renamer";
2
+ export { sorter } from "./components/navigation/utils/sorter";
2
3
  export type { Control } from "./components/block/controls/types";
3
4
  export { default as Layout } from "./components/Layout.svelte";
4
5
  export { default as Instance } from "./components/block/Instance.svelte";
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
- export { renamer, sorter } from "./components/navigation/utils";
1
+ export { renamer } from "./components/navigation/utils/renamer";
2
+ export { sorter } from "./components/navigation/utils/sorter";
2
3
  export { default as Layout } from "./components/Layout.svelte";
3
4
  export { default as Instance } from "./components/block/Instance.svelte";
4
5
  export { default as Block } from "./components/block/Block.svelte";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nil-/doc",
3
- "version": "0.2.36",
3
+ "version": "0.2.38",
4
4
  "author": {
5
5
  "email": "njaldea@gmail.com",
6
6
  "name": "Neil Aldea"