@brickflow/ui 0.0.1 → 0.0.3

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.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
- target?: string;
5
4
  componentPrefix?: string;
5
+ target?: string;
6
6
  }
7
7
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
8
8
 
package/dist/module.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
- "name": "@brickflow/ui",
3
- "configKey": "brickflowUi",
4
2
  "compatibility": {
5
3
  "nuxt": ">=4.0.0"
6
4
  },
7
- "version": "0.0.1",
5
+ "configKey": "brickflowUi",
6
+ "name": "@brickflow/ui",
7
+ "version": "0.0.3",
8
8
  "builder": {
9
- "@nuxt/module-builder": "1.0.2",
9
+ "@nuxt/module-builder": "1.0.1",
10
10
  "unbuild": "3.6.1"
11
11
  }
12
12
  }
package/dist/module.mjs CHANGED
@@ -1,26 +1,26 @@
1
+ import { createBrickGreeting } from '@brickflow/utils';
1
2
  import { defineNuxtModule, createResolver, addImportsDir, addComponentsDir } from '@nuxt/kit';
2
3
  import tailwindcss from '@tailwindcss/vite';
3
- import { createBrickGreeting } from '@brickflow/utils';
4
4
 
5
5
  const module$1 = defineNuxtModule({
6
+ defaults: {
7
+ componentPrefix: "Brick",
8
+ target: "world"
9
+ },
6
10
  meta: {
7
- name: "@brickflow/ui",
8
- configKey: "brickflowUi",
9
11
  compatibility: {
10
12
  nuxt: ">=4.0.0"
11
- }
12
- },
13
- defaults: {
14
- target: "world",
15
- componentPrefix: "Brick"
13
+ },
14
+ configKey: "brickflowUi",
15
+ name: "@brickflow/ui"
16
16
  },
17
17
  setup(options, nuxt) {
18
18
  const resolver = createResolver(import.meta.url);
19
19
  const currentConfig = nuxt.options.runtimeConfig.public.brickflowUi ?? {};
20
20
  nuxt.options.runtimeConfig.public.brickflowUi = {
21
21
  ...currentConfig,
22
- target: options.target ?? "world",
23
- message: createBrickGreeting(options.target ?? "world")
22
+ message: createBrickGreeting(options.target ?? "world"),
23
+ target: options.target ?? "world"
24
24
  };
25
25
  nuxt.options.css.push(resolver.resolve("./runtime/assets/css/main.css"));
26
26
  nuxt.hook("vite:extendConfig", (config) => {
@@ -31,8 +31,8 @@ const module$1 = defineNuxtModule({
31
31
  addImportsDir(resolver.resolve("./runtime/composables"));
32
32
  addComponentsDir({
33
33
  path: resolver.resolve("./runtime/components"),
34
- prefix: options.componentPrefix ?? "Brick",
35
- pathPrefix: false
34
+ pathPrefix: false,
35
+ prefix: options.componentPrefix ?? "Brick"
36
36
  });
37
37
  }
38
38
  });
@@ -1,16 +1,16 @@
1
1
  interface Props {
2
+ size?: 'md' | 'sm';
3
+ type?: 'button' | 'reset' | 'submit';
2
4
  variant?: 'primary' | 'secondary';
3
- size?: 'sm' | 'md';
4
- type?: 'button' | 'submit' | 'reset';
5
5
  }
6
6
  declare var __VLS_1: {};
7
7
  type __VLS_Slots = {} & {
8
8
  default?: (props: typeof __VLS_1) => any;
9
9
  };
10
10
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
11
+ size: "md" | "sm";
12
+ type: "button" | "reset" | "submit";
11
13
  variant: "primary" | "secondary";
12
- size: "sm" | "md";
13
- type: "button" | "submit" | "reset";
14
14
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
16
  declare const _default: typeof __VLS_export;
@@ -1,13 +1,11 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  const props = defineProps({
4
- variant: { type: String, required: false, default: "primary" },
5
4
  size: { type: String, required: false, default: "md" },
6
- type: { type: String, required: false, default: "button" }
5
+ type: { type: String, required: false, default: "button" },
6
+ variant: { type: String, required: false, default: "primary" }
7
7
  });
8
- const sizeClass = computed(
9
- () => props.size === "sm" ? "min-h-10 px-4 text-sm" : "min-h-12 px-5 text-sm/6"
10
- );
8
+ const sizeClass = computed(() => props.size === "sm" ? "min-h-10 px-4 text-sm" : "min-h-12 px-5 text-sm/6");
11
9
  const variantClass = computed(
12
10
  () => props.variant === "secondary" ? "border border-brick-200/80 bg-white/70 text-ink-950 shadow-[inset_0_1px_0_rgba(255,255,255,0.85)] hover:border-brick-400/50 hover:bg-brick-50" : "border border-brick-500/80 bg-linear-to-r from-brick-500 to-brick-600 text-white shadow-brick hover:from-brick-400 hover:to-brick-500"
13
11
  );
@@ -1,16 +1,16 @@
1
1
  interface Props {
2
+ size?: 'md' | 'sm';
3
+ type?: 'button' | 'reset' | 'submit';
2
4
  variant?: 'primary' | 'secondary';
3
- size?: 'sm' | 'md';
4
- type?: 'button' | 'submit' | 'reset';
5
5
  }
6
6
  declare var __VLS_1: {};
7
7
  type __VLS_Slots = {} & {
8
8
  default?: (props: typeof __VLS_1) => any;
9
9
  };
10
10
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
11
+ size: "md" | "sm";
12
+ type: "button" | "reset" | "submit";
11
13
  variant: "primary" | "secondary";
12
- size: "sm" | "md";
13
- type: "button" | "submit" | "reset";
14
14
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
16
  declare const _default: typeof __VLS_export;
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
+ import { usebrickflow } from "../composables/useBrickme";
2
3
  import Button from "./Button.vue";
3
- import { usebrickflow } from "../composables/usebrickflow";
4
4
  const brickflow = usebrickflow();
5
5
  </script>
6
6
 
@@ -1,6 +1,9 @@
1
- export declare const usebrickflow: () => {
2
- target: import("vue").ComputedRef<string>;
3
- className: import("vue").ComputedRef<string>;
4
- message: import("vue").ComputedRef<string>;
5
- };
1
+ import { type ComputedRef } from 'vue';
2
+ interface brickflowComposable {
3
+ className: ComputedRef<string>;
4
+ message: ComputedRef<string>;
5
+ target: ComputedRef<string>;
6
+ }
7
+ export declare const usebrickflow: () => brickflowComposable;
8
+ export {};
6
9
  //# sourceMappingURL=useBrickme.d.ts.map
@@ -1,15 +1,13 @@
1
- import { computed } from "vue";
2
- import { useRuntimeConfig } from "nuxt/app";
3
1
  import { createBrickGreeting, toBrickClassName } from "@brickflow/utils";
2
+ import { useRuntimeConfig } from "nuxt/app";
3
+ import { computed } from "vue";
4
4
  export const usebrickflow = () => {
5
5
  const config = useRuntimeConfig();
6
- const brickflowConfig = computed(
7
- () => config.public.brickflowUi ?? {}
8
- );
6
+ const brickflowConfig = computed(() => config.public.brickflowUi ?? {});
9
7
  const target = computed(() => brickflowConfig.value.target ?? "world");
10
8
  return {
11
- target,
12
9
  className: computed(() => `brick-demo--${toBrickClassName(target.value)}`),
13
- message: computed(() => createBrickGreeting(target.value))
10
+ message: computed(() => createBrickGreeting(target.value)),
11
+ target
14
12
  };
15
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickflow/ui",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "description": "brickflow UI Nuxt module.",
6
6
  "files": [
@@ -16,7 +16,7 @@
16
16
  "scripts": {
17
17
  "build": "nuxt-module-build",
18
18
  "typecheck": "vue-tsc --project tsconfig.json --noEmit",
19
- "lint": "pnpm exec eslint .",
19
+ "lint": "pnpm typecheck && eslint -v && NODE_ENV=deploy eslint --cache .",
20
20
  "lint:fix": "pnpm exec eslint . --fix",
21
21
  "format": "pnpm exec prettier . --ignore-path ../../.prettierignore --write",
22
22
  "format:check": "pnpm exec prettier . --ignore-path ../../.prettierignore --check"
@@ -26,17 +26,17 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@brickflow/utils": "workspace:*",
29
- "@tailwindcss/vite": "^4.3.0",
30
- "tailwindcss": "^4.3.0"
29
+ "@tailwindcss/vite": "4.3.0",
30
+ "tailwindcss": "4.3.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@brickflow/lint": "workspace:*",
34
34
  "@brickflow/prettier": "workspace:*",
35
- "@nuxt/kit": "^4.3.1",
36
- "@nuxt/module-builder": "^1.0.1",
37
- "nuxt": "^4.3.1",
38
- "vue": "^3.5.13",
39
- "vue-tsc": "^3.1.1"
35
+ "@nuxt/kit": "4.3.1",
36
+ "@nuxt/module-builder": "1.0.1",
37
+ "nuxt": "4.3.1",
38
+ "vue": "3.5.13",
39
+ "vue-tsc": "3.1.1"
40
40
  },
41
41
  "author": "",
42
42
  "license": "ISC"