@frigear-nu/widget 0.0.2 → 0.0.4

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": "@frigear-nu/widget",
3
3
  "configKey": "widgets",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.3",
7
7
  "unbuild": "unknown"
@@ -1,6 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  name: string;
3
3
  context?: Record<string, unknown>;
4
+ gridClass?: string;
4
5
  };
5
6
  declare var __VLS_1: {
6
7
  widget: any;
@@ -2,7 +2,8 @@
2
2
  import { getWidgetComponent } from "../utils/components";
3
3
  const props = defineProps({
4
4
  name: { type: String, required: true },
5
- context: { type: Object, required: false }
5
+ context: { type: Object, required: false },
6
+ gridClass: { type: String, required: false }
6
7
  });
7
8
  const { data: widgets } = await useWidgets(props.name, () => props.context);
8
9
  </script>
@@ -10,7 +11,7 @@ const { data: widgets } = await useWidgets(props.name, () => props.context);
10
11
  <template>
11
12
  <div
12
13
  v-if="widgets?.length"
13
- class="grid grid-cols-[repeat(auto-fit,minmax(16rem,1fr))] gap-4 md:grid-cols-4 md:[&>*]:[grid-column:span_var(--widget-span,1)]"
14
+ :class="gridClass ?? 'grid grid-cols-[repeat(auto-fit,minmax(16rem,1fr))] gap-4 md:grid-cols-4 md:[&>*]:[grid-column:span_var(--widget-span,1)]'"
14
15
  >
15
16
  <template
16
17
  v-for="widget in widgets"
@@ -1,6 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  name: string;
3
3
  context?: Record<string, unknown>;
4
+ gridClass?: string;
4
5
  };
5
6
  declare var __VLS_1: {
6
7
  widget: any;
@@ -3,7 +3,7 @@ import type { WidgetDefinition } from '../../types.js';
3
3
  import { sortWidgets } from './sort.js';
4
4
  export type { WidgetDefinition, RegisteredWidget } from '../../types.js';
5
5
  export { sortWidgets };
6
- /** Id for a widget without one: its component's file name, e.g. `NewMembers` for `.../NewMembers.vue`. */
6
+ /** Id for a widget without one: its component's file name, e.g. `NewUsers` for `.../NewUsers.vue`. */
7
7
  export declare function deriveWidgetId(widget: Pick<WidgetDefinition, 'id' | 'component'>): string;
8
8
  /**
9
9
  * Build-time API for modules to contribute widgets to a named area, without the host wiring anything. Call it
@@ -13,7 +13,7 @@ export declare function deriveWidgetId(widget: Pick<WidgetDefinition, 'id' | 'co
13
13
  * import { extendWidgets } from '@frigear-nu/widget/utils'
14
14
  *
15
15
  * extendWidgets(nuxt, 'admin.dashboard', {
16
- * component: resolver.resolve('./runtime/app/widgets/NewMembers.vue'),
16
+ * component: resolver.resolve('./runtime/app/widgets/NewUsers.vue'),
17
17
  * order: 10,
18
18
  * })
19
19
  * ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frigear-nu/widget",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Named widget areas - modules contribute widgets (extendWidgets) and hosts render them with <WidgetArea>, with ordering and a filter hook for gating.",
5
5
  "homepage": "https://docs.frigear.dev/modules/widget",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@nuxt/kit": "^4.6.0",
34
- "@frigear-nu/module-kit": "0.1.7"
34
+ "@frigear-nu/module-kit": "1.0.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@nuxt/devtools": "^3.4.2",