@threadlabs/looma 0.23.21 → 0.23.23

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 (54) hide show
  1. package/components/shared/overlay.js +1 -1
  2. package/components/ui-button/ui-button.html +68 -2
  3. package/components/ui-image/ui-image.html +177 -0
  4. package/components/ui-image/ui-image.js +107 -0
  5. package/components/ui-menu/ui-menu.js +1 -1
  6. package/components/ui-popover/ui-popover.js +4 -1
  7. package/components/ui-separator/ui-separator.html +26 -2
  8. package/dist/index.js +24 -23
  9. package/editor/chunks/extensions.js +633 -20
  10. package/editor/extensions/block-selection.d.ts +6 -0
  11. package/editor/extensions/expand.d.ts +31 -0
  12. package/editor/extensions/image.d.ts +12 -0
  13. package/editor/extensions/index.d.ts +4 -1
  14. package/editor/extensions/index.js +2 -2
  15. package/editor/extensions/preset.d.ts +8 -0
  16. package/editor/extensions/slash-command.d.ts +31 -3
  17. package/editor/extensions/table-of-contents.d.ts +58 -0
  18. package/editor/index.js +2 -2
  19. package/package.json +1 -1
  20. package/styles/ui-button.css +39 -0
  21. package/styles/ui-image.css +153 -0
  22. package/styles/ui-separator.css +22 -2
  23. package/vanilla/UiButton.d.ts +1 -1
  24. package/vanilla/UiButton.js +126 -10
  25. package/vanilla/UiImage.d.ts +21 -0
  26. package/vanilla/UiImage.js +84 -0
  27. package/vanilla/UiSeparator.d.ts +3 -0
  28. package/vanilla/UiSeparator.js +14 -4
  29. package/vanilla/index.js +1 -0
  30. package/vue/UiButton.d.ts +18 -6
  31. package/vue/UiButton.vue +269 -8
  32. package/vue/UiImage.d.ts +100 -0
  33. package/vue/UiImage.js +2 -0
  34. package/vue/UiImage.vue +463 -0
  35. package/vue/UiListItem.d.ts +1 -1
  36. package/vue/UiSection.d.ts +1 -1
  37. package/vue/UiSeparator.d.ts +27 -0
  38. package/vue/UiSeparator.vue +94 -3
  39. package/vue/UiSidebar.d.ts +1 -1
  40. package/vue/chunks/UiButton.js +196 -12
  41. package/vue/chunks/UiImage.js +313 -0
  42. package/vue/chunks/UiSeparator.js +106 -22
  43. package/vue/components.css +252 -53
  44. package/vue/editor/LoomaEditor.d.ts +19 -2
  45. package/vue/editor/divider.d.ts +6 -0
  46. package/vue/editor/expand.d.ts +7 -0
  47. package/vue/editor/image-controls.d.ts +19 -0
  48. package/vue/editor/image-delivery.d.ts +2 -2
  49. package/vue/editor/image.d.ts +7 -0
  50. package/vue/editor/index.d.ts +1 -1
  51. package/vue/editor/index.js +1188 -52
  52. package/vue/editor/table-of-contents.d.ts +7 -0
  53. package/vue/index.d.ts +1 -0
  54. package/vue/index.js +2 -1
@@ -2,34 +2,107 @@ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-hel
2
2
  import { i as vPropValidity, t as checkedProp } from "./props.js";
3
3
  import { computed, createElementBlock, defineComponent, getCurrentInstance, mergeProps, openBlock, unref, watchSyncEffect, withDirectives } from "vue";
4
4
  //#region .build/vue/UiSeparator.vue?vue&type=script&setup=true&lang.ts
5
- var _hoisted_1 = ["aria-orientation", "data-orientation"];
5
+ var _hoisted_1 = [
6
+ "aria-orientation",
7
+ "data-emphasis",
8
+ "data-orientation",
9
+ "data-selectable",
10
+ "data-selected",
11
+ "data-ui-separator-state"
12
+ ];
6
13
  //#endregion
7
14
  //#region .build/vue/UiSeparator.vue
8
15
  var UiSeparator_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
9
16
  inheritAttrs: false,
10
17
  __name: "UiSeparator",
11
- props: { orientation: {
12
- type: null,
13
- default: "horizontal"
14
- } },
18
+ props: {
19
+ emphasis: {
20
+ type: null,
21
+ default: "normal"
22
+ },
23
+ orientation: {
24
+ type: null,
25
+ default: "horizontal"
26
+ },
27
+ selectable: {
28
+ type: null,
29
+ default: false
30
+ },
31
+ selected: {
32
+ type: null,
33
+ default: false
34
+ }
35
+ },
15
36
  setup(__props) {
16
- const propValidityContract = { props: { orientation: {
17
- type: {
18
- kind: "terminal",
19
- name: "keyword"
37
+ const propValidityContract = { props: {
38
+ emphasis: {
39
+ type: {
40
+ kind: "terminal",
41
+ name: "keyword"
42
+ },
43
+ required: false,
44
+ target: { attribute: "emphasis" },
45
+ description: "Normal uses the decorative divider color; strong uses the stronger enclosing-edge color for clearer separation.",
46
+ values: ["normal", "strong"],
47
+ default: "normal"
20
48
  },
21
- required: false,
22
- target: { attribute: "aria-orientation" },
23
- description: "Whether the separator divides stacked content (horizontal) or inline content (vertical).",
24
- values: ["horizontal", "vertical"],
25
- default: "horizontal"
26
- } } };
49
+ orientation: {
50
+ type: {
51
+ kind: "terminal",
52
+ name: "keyword"
53
+ },
54
+ required: false,
55
+ target: { attribute: "aria-orientation" },
56
+ description: "Whether the separator divides stacked content (horizontal) or inline content (vertical).",
57
+ values: ["horizontal", "vertical"],
58
+ default: "horizontal"
59
+ },
60
+ selectable: {
61
+ type: {
62
+ kind: "terminal",
63
+ name: "boolean"
64
+ },
65
+ required: false,
66
+ target: { attribute: "selectable" },
67
+ description: "Gives a document divider a pointer-sized hit area. The editor owns selection and deletion.",
68
+ default: false
69
+ },
70
+ selected: {
71
+ type: {
72
+ kind: "terminal",
73
+ name: "boolean"
74
+ },
75
+ required: false,
76
+ target: { attribute: "selected" },
77
+ description: "Shows the selected document divider. Selection does not change separator semantics.",
78
+ default: false
79
+ }
80
+ } };
27
81
  const props = __props;
28
- const acceptedProps = { orientation: "horizontal" };
29
- const checkedProps = computed(() => ({ orientation: checkedProp(props["orientation"], {
30
- kind: "terminal",
31
- name: "keyword"
32
- }, false, "orientation", acceptedProps) }));
82
+ const acceptedProps = {
83
+ emphasis: "normal",
84
+ orientation: "horizontal",
85
+ selectable: false,
86
+ selected: false
87
+ };
88
+ const checkedProps = computed(() => ({
89
+ emphasis: checkedProp(props["emphasis"], {
90
+ kind: "terminal",
91
+ name: "keyword"
92
+ }, false, "emphasis", acceptedProps),
93
+ orientation: checkedProp(props["orientation"], {
94
+ kind: "terminal",
95
+ name: "keyword"
96
+ }, false, "orientation", acceptedProps),
97
+ selectable: checkedProp(props["selectable"], {
98
+ kind: "terminal",
99
+ name: "boolean"
100
+ }, false, "selectable", acceptedProps),
101
+ selected: checkedProp(props["selected"], {
102
+ kind: "terminal",
103
+ name: "boolean"
104
+ }, false, "selected", acceptedProps)
105
+ }));
33
106
  checkedProps.value;
34
107
  watchSyncEffect(() => {
35
108
  checkedProps.value;
@@ -54,16 +127,27 @@ var UiSeparator_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
54
127
  message: "Server markup for <ui-separator> has an incompatible root."
55
128
  })
56
129
  });
130
+ /** The values the styles' :host-state() rules test. */
131
+ const hostState = computed(() => [
132
+ checkedProps.value.emphasis && "emphasis",
133
+ checkedProps.value.emphasis != null && `emphasis=${encodeURIComponent(checkedProps.value.emphasis)}`,
134
+ checkedProps.value.selectable && "selectable",
135
+ checkedProps.value.selected && "selected"
136
+ ].filter(Boolean).join(" "));
57
137
  return (_ctx, _cache) => {
58
138
  return withDirectives((openBlock(), createElementBlock("hr", mergeProps({ "data-component": "ui-separator" }, nativeAttrs(_ctx.$attrs), {
59
139
  "aria-orientation": checkedProps.value.orientation ?? void 0,
60
- "data-orientation": reflectedProp("orientation", "orientation", checkedProps.value.orientation, void 0, false)
140
+ "data-emphasis": reflectedProp("emphasis", "emphasis", checkedProps.value.emphasis, void 0, false),
141
+ "data-orientation": reflectedProp("orientation", "orientation", checkedProps.value.orientation, void 0, false),
142
+ "data-selectable": reflectedProp("selectable", "selectable", checkedProps.value.selectable, void 0, false),
143
+ "data-selected": reflectedProp("selected", "selected", checkedProps.value.selected, void 0, false),
144
+ "data-ui-separator-state": hostState.value || void 0
61
145
  }), null, 16, _hoisted_1)), [[unref(vPropValidity), {
62
146
  contract: propValidityContract,
63
147
  values: { ...props }
64
148
  }]]);
65
149
  };
66
150
  }
67
- }), [["__scopeId", "data-v-5289daff"]]);
151
+ }), [["__scopeId", "data-v-a49de10a"]]);
68
152
  //#endregion
69
153
  export { UiSeparator_default as t };