@stonecrop/desktop 0.3.6 → 0.3.7

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/dist/desktop.d.ts CHANGED
@@ -5,19 +5,59 @@ import { Plugin as Plugin_2 } from 'vue';
5
5
  import Records from './components/Records.vue';
6
6
  import SheetNav from './components/SheetNav.vue';
7
7
 
8
+ /**
9
+ * Superset of all element types in the Action Set
10
+ * @public
11
+ */
12
+ export declare type ActionElements = ButtonElement | DropdownElement;
13
+
8
14
  export { ActionSet }
9
15
 
16
+ /**
17
+ * Base type for elements in the Action Set
18
+ * @public
19
+ */
20
+ export declare type BaseElement = {
21
+ label: string;
22
+ show?: boolean;
23
+ };
24
+
25
+ /**
26
+ * Button elements
27
+ * @public
28
+ */
29
+ export declare type ButtonElement = BaseElement & ElementAction & {
30
+ type: 'button';
31
+ };
32
+
10
33
  export { CommandPalette }
11
34
 
12
35
  export { Doctype }
13
36
 
37
+ /**
38
+ * Dropdown elements
39
+ * @public
40
+ */
41
+ export declare type DropdownElement = BaseElement & {
42
+ type: 'dropdown';
43
+ actions: ElementAction[];
44
+ };
45
+
46
+ /**
47
+ * Element actions
48
+ * @public
49
+ */
50
+ export declare type ElementAction = BaseElement & {
51
+ link?: string;
52
+ action?: () => void;
53
+ };
54
+
14
55
  export { Records }
15
56
 
16
57
  export { SheetNav }
17
58
 
18
59
  /**
19
- * This is the main plugin file that will be used to register all the components
20
- * that we want to use in our application.
60
+ * This is the main plugin that will be used to register all the desktop components.
21
61
  * @public
22
62
  */
23
63
  export declare const StonecropDesktop: Plugin_2;
package/dist/desktop.js CHANGED
@@ -11,7 +11,7 @@ const es = { class: "action-menu-icon" }, ts = ["onclick"], ns = { key: 1 }, os
11
11
  });
12
12
  const a = () => {
13
13
  for (const d of t.value)
14
- d.elementType === "dropdown" && (d.show = !1);
14
+ d.type === "dropdown" && (d.show = !1);
15
15
  }, i = () => {
16
16
  r.value = !0, o.value = setTimeout(() => {
17
17
  r.value && (n.value = !0);
@@ -69,12 +69,12 @@ const es = { class: "action-menu-icon" }, ts = ["onclick"], ns = { key: 1 }, os
69
69
  class: "action-element",
70
70
  key: p.label
71
71
  }, [
72
- p.elementType == "button" ? (A(), B("button", {
72
+ p.type == "button" ? (A(), B("button", {
73
73
  key: 0,
74
74
  onclick: p.action,
75
75
  class: "button-default"
76
76
  }, ve(p.label), 9, ts)) : ge("", !0),
77
- p.elementType == "dropdown" ? (A(), B("div", ns, [
77
+ p.type == "dropdown" ? (A(), B("div", ns, [
78
78
  W("button", {
79
79
  class: "button-default",
80
80
  onClick: (h) => c(f)
@@ -108,7 +108,7 @@ const es = { class: "action-menu-icon" }, ts = ["onclick"], ns = { key: 1 }, os
108
108
  for (const [o, r] of t)
109
109
  n[o] = r;
110
110
  return n;
111
- }, us = /* @__PURE__ */ En(ls, [["__scopeId", "data-v-4fb5c934"]]), ds = {};
111
+ }, us = /* @__PURE__ */ En(ls, [["__scopeId", "data-v-38e7af34"]]), ds = {};
112
112
  function ps(e, t) {
113
113
  return A(), B("dialog");
114
114
  }