@shwfed/nuxt 0.1.27 → 0.1.28

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.1.27",
4
+ "version": "0.1.28",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -51,29 +51,30 @@ whenever(() => meta_k?.value, () => {
51
51
  </section>
52
52
  </CommandEmpty>
53
53
 
54
- <CommandGroup
55
- v-for="(group, i) in commands"
54
+ <template
55
+ v-for="(group, i) in commands?.filter((group2) => group2.children.length > 0)"
56
56
  :key="group.id"
57
- :heading="group.title"
58
57
  >
59
- <CommandItem
60
- v-for="child in group.children"
61
- :key="child.id"
62
- :value="child.id"
63
- @select="
58
+ <CommandGroup :heading="group.title">
59
+ <CommandItem
60
+ v-for="child in group.children"
61
+ :key="child.id"
62
+ :value="child.id"
63
+ @select="
64
64
  child.effect.pipe(Effect.scoped).pipe(Effect.tap(() => {
65
65
  isCommandOpen = false;
66
66
  })).pipe(Effect.runPromise)
67
67
  "
68
- >
69
- <Icon
70
- v-if="child.icon"
71
- :icon="child.icon"
72
- />
73
- <span>{{ child.title }}</span>
74
- </CommandItem>
68
+ >
69
+ <Icon
70
+ v-if="child.icon"
71
+ :icon="child.icon"
72
+ />
73
+ <span>{{ child.title }}</span>
74
+ </CommandItem>
75
+ </CommandGroup>
75
76
  <CommandSeparator v-if="i !== Object.keys(commands ?? {}).length - 1" />
76
- </CommandGroup>
77
+ </template>
77
78
  </CommandList>
78
79
  </CommandDialog>
79
80
  </ClientOnly>
@@ -8,7 +8,7 @@ export function createEnvironment(options) {
8
8
  homogeneousAggregateLiterals: false,
9
9
  unlistedVariablesAreDyn: true
10
10
  });
11
- env.registerType("Date", TZDate).registerVariable("now", "Date").registerFunction("date(string): Date", (date) => {
11
+ env.registerType("Date", TZDate).registerVariable("now", "Date").registerVariable("today", "Date").registerFunction("date(string): Date", (date) => {
12
12
  return new TZDate(date);
13
13
  }).registerOperator("Date < Date", (date1, date2) => {
14
14
  return isBefore(date1, date2);
@@ -20,7 +20,8 @@ export default defineNuxtPlugin({
20
20
  */
21
21
  evaluate: (...args) => (context) => {
22
22
  return env.evaluate(String.raw(...args), defu(context, {
23
- now: /* @__PURE__ */ new Date()
23
+ now: /* @__PURE__ */ new Date(),
24
+ today: /* @__PURE__ */ new Date()
24
25
  }));
25
26
  }
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",