sprintify-ui 0.11.21 → 0.11.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.
@@ -84,6 +84,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
84
84
  default: boolean;
85
85
  type: BooleanConstructor;
86
86
  };
87
+ optionColor: {
88
+ default: undefined;
89
+ type: PropType<(option: RawOption) => string>;
90
+ };
91
+ optionIcon: {
92
+ default: undefined;
93
+ type: PropType<(option: RawOption) => string>;
94
+ };
87
95
  }>, {
88
96
  focus: () => void | undefined;
89
97
  blur: () => void | undefined;
@@ -140,6 +148,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
140
148
  default: boolean;
141
149
  type: BooleanConstructor;
142
150
  };
151
+ optionColor: {
152
+ default: undefined;
153
+ type: PropType<(option: RawOption) => string>;
154
+ };
155
+ optionIcon: {
156
+ default: undefined;
157
+ type: PropType<(option: RawOption) => string>;
158
+ };
143
159
  }>> & Readonly<{
144
160
  onFocus?: ((...args: any[]) => any) | undefined;
145
161
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -151,6 +167,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
151
167
  disabled: boolean;
152
168
  hasError: boolean;
153
169
  max: number;
170
+ optionColor: (option: RawOption) => string;
171
+ optionIcon: (option: RawOption) => string;
154
172
  focusOnMount: boolean;
155
173
  queryKey: string;
156
174
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.11.21",
3
+ "version": "0.11.23",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "generate-llm-txt": "node scripts/generate-llm-txt.js",
@@ -40,6 +40,8 @@
40
40
  "dependencies": {
41
41
  "@floating-ui/vue": "^1.0.6",
42
42
  "@headlessui/vue": "^1.7.19",
43
+ "@tiptap/extension-subscript": "^3.20.4",
44
+ "@tiptap/extension-superscript": "^3.20.4",
43
45
  "color2k": "^2.0.3",
44
46
  "tailwind-merge": "^2.4.0"
45
47
  },
@@ -47,6 +47,30 @@ const Template = (args) => {
47
47
  export const Demo = Template.bind({});
48
48
  Demo.args = {};
49
49
 
50
+ export const OptionColor = Template.bind({});
51
+ OptionColor.args = {};
52
+
53
+ export const OptionIcon = Template.bind({});
54
+ OptionIcon.args = {
55
+ optionColor: undefined,
56
+ optionIcon: (option) => {
57
+ if (option.type === "work") return "heroicons:briefcase";
58
+ if (option.type === "personal") return "heroicons:user";
59
+ if (option.type === "family") return "heroicons:home";
60
+ return "heroicons:tag";
61
+ },
62
+ };
63
+
64
+ export const OptionIconWithColor = Template.bind({});
65
+ OptionIconWithColor.args = {
66
+ optionIcon: (option) => {
67
+ if (option.type === "work") return "heroicons:briefcase";
68
+ if (option.type === "personal") return "heroicons:user";
69
+ if (option.type === "family") return "heroicons:home";
70
+ return "heroicons:tag";
71
+ },
72
+ };
73
+
50
74
  export const LabelFunction = Template.bind({});
51
75
  LabelFunction.args = {
52
76
  labelKey: (option) => {
@@ -13,6 +13,8 @@
13
13
  :max="max"
14
14
  :filter="() => true"
15
15
  :focus-on-mount="focusOnMount"
16
+ :option-color="optionColor"
17
+ :option-icon="optionIcon"
16
18
  @open="onOpen"
17
19
  @typing="onTyping"
18
20
  @scroll-bottom="scrollBottom"
@@ -116,6 +118,14 @@ const props = defineProps({
116
118
  default: false,
117
119
  type: Boolean,
118
120
  },
121
+ optionColor: {
122
+ default: undefined,
123
+ type: Function as PropType<(option: RawOption) => string>,
124
+ },
125
+ optionIcon: {
126
+ default: undefined,
127
+ type: Function as PropType<(option: RawOption) => string>,
128
+ },
119
129
  });
120
130
 
121
131
  defineEmits(['update:modelValue', 'typing', 'focus', 'scrollBottom']);
@@ -37,6 +37,8 @@
37
37
  import { Editor, EditorContent } from '@tiptap/vue-3';
38
38
  import Document from '@tiptap/extension-document';
39
39
  import Link from '@tiptap/extension-link';
40
+ import Superscript from '@tiptap/extension-superscript';
41
+ import Subscript from '@tiptap/extension-subscript';
40
42
  import { Placeholder } from '@tiptap/extensions'
41
43
  import { Footnotes, FootnoteReference, Footnote } from "tiptap-footnotes";
42
44
  import StarterKit from '@tiptap/starter-kit';
@@ -70,6 +72,8 @@ const editor = new Editor({
70
72
  Placeholder.configure({
71
73
  placeholder: props.placeholder || 'Start typing here...',
72
74
  }),
75
+ Superscript,
76
+ Subscript,
73
77
  Footnotes,
74
78
  Footnote,
75
79
  FootnoteReference,
@@ -219,6 +223,16 @@ const actions = computed<Action[]>(() => {
219
223
  icon: 'material-symbols:format-underlined',
220
224
  command: () => editor.chain().focus().toggleUnderline().run(),
221
225
  },
226
+ {
227
+ name: 'superscript',
228
+ icon: 'material-symbols:superscript',
229
+ command: () => editor.chain().focus().toggleSuperscript().run(),
230
+ },
231
+ {
232
+ name: 'subscript',
233
+ icon: 'material-symbols:subscript',
234
+ command: () => editor.chain().focus().toggleSubscript().run(),
235
+ },
222
236
  {
223
237
  name: 'link',
224
238
  icon: 'material-symbols:link',