kmcom-nuxt-layers 4.0.0 → 4.0.1

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.
@@ -0,0 +1,23 @@
1
+ // fallow-ignore-file unused-file
2
+
3
+ export type ContactEmailData = {
4
+ name: string
5
+ email: string
6
+ message: string
7
+ }
8
+
9
+ export type ContactSubmittedPayload = ContactEmailData
10
+
11
+ export type ContactSentPayload = {
12
+ messageId: string
13
+ } & ContactSubmittedPayload
14
+
15
+ export type ContactFailedPayload = {
16
+ error: unknown
17
+ } & ContactSubmittedPayload
18
+
19
+ export type MailerLayerHooks = {
20
+ 'contact:submitted': (payload: ContactSubmittedPayload) => void
21
+ 'contact:sent': (payload: ContactSentPayload) => void
22
+ 'contact:failed': (payload: ContactFailedPayload) => void
23
+ }
@@ -0,0 +1,2 @@
1
+ export type * from './metadata'
2
+ export type * from './providers'
@@ -0,0 +1,59 @@
1
+ import type { MetadataProviderId } from './providers'
2
+
3
+ export type MetadataMediaType =
4
+ | 'book'
5
+ | 'comic'
6
+ | 'comic-series'
7
+ | 'manga'
8
+ | 'graphic-novel'
9
+ | 'collected-edition'
10
+ | 'movie'
11
+ | 'tv-show'
12
+
13
+ export type MetadataCreator = {
14
+ name: string
15
+ role?: string
16
+ providerId?: string
17
+ }
18
+
19
+ export type MetadataIdentifiers = {
20
+ isbn10?: string
21
+ isbn13?: string
22
+ comicVineId?: string
23
+ openLibraryId?: string
24
+ googleBooksId?: string
25
+ tmdbId?: string
26
+ imdbId?: string
27
+ }
28
+
29
+ export type MetadataRecord = {
30
+ id: string
31
+ provider: MetadataProviderId
32
+ providerId: string
33
+ mediaType: MetadataMediaType
34
+ title: string
35
+ subtitle?: string
36
+ description?: string
37
+ creators?: MetadataCreator[]
38
+ publisher?: string
39
+ publishedAt?: string
40
+ coverUrl?: string
41
+ identifiers?: MetadataIdentifiers
42
+ sourceUrl?: string
43
+ raw?: unknown
44
+ lastSyncedAt?: string
45
+ }
46
+
47
+ export type MetadataCacheRecord = {
48
+ id: string
49
+ provider: MetadataProviderId
50
+ providerId: string
51
+ resourceType: string
52
+ mediaType: MetadataMediaType
53
+ normalised: MetadataRecord
54
+ raw: unknown
55
+ createdAt: string
56
+ updatedAt: string
57
+ lastSyncedAt: string
58
+ expiresAt?: string
59
+ }
@@ -0,0 +1,36 @@
1
+ import type { MetadataMediaType, MetadataRecord } from './metadata'
2
+
3
+ export type MetadataProviderId = 'comicvine' | 'openlibrary' | 'google-books' | 'tmdb' | 'local'
4
+
5
+ export type MetadataSearchInput = {
6
+ query: string
7
+ mediaType?: MetadataMediaType
8
+ providers?: MetadataProviderId[]
9
+ limit?: number
10
+ }
11
+
12
+ export type MetadataLookupInput = {
13
+ provider: MetadataProviderId
14
+ providerId: string
15
+ resourceType?: string
16
+ }
17
+
18
+ export type MetadataSyncInput = {
19
+ provider: MetadataProviderId
20
+ providerId: string
21
+ resourceType?: string
22
+ force?: boolean
23
+ }
24
+
25
+ export type MetadataSearchResult = MetadataRecord & {
26
+ score?: number
27
+ }
28
+
29
+ export type MetadataProvider = {
30
+ id: MetadataProviderId
31
+ label: string
32
+ mediaTypes: MetadataMediaType[]
33
+ search: (input: MetadataSearchInput) => Promise<MetadataSearchResult[]>
34
+ lookup: (input: MetadataLookupInput) => Promise<MetadataRecord | null>
35
+ sync?: (input: MetadataSyncInput) => Promise<MetadataRecord>
36
+ }
@@ -72,7 +72,8 @@ export async function checkWebGPUSupport(): Promise<boolean> {
72
72
  }
73
73
 
74
74
  try {
75
- const adapter = await navigator.gpu.requestAdapter()
75
+ const gpu = (navigator as Navigator & { gpu: { requestAdapter: () => Promise<unknown> } }).gpu
76
+ const adapter = await gpu.requestAdapter()
76
77
  return adapter !== null
77
78
  } catch {
78
79
  return false
@@ -1,4 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import type { Vector3 } from 'three'
3
+
2
4
  const {
3
5
  width = 2,
4
6
  height = 2,
@@ -17,7 +19,7 @@
17
19
  </script>
18
20
 
19
21
  <template>
20
- <TresMesh :position :rotation>
22
+ <TresMesh :position="position as unknown as Vector3" :rotation="rotation as unknown as Vector3">
21
23
  <TresPlaneGeometry :args="[width, height, widthSegments, heightSegments]" />
22
24
  <slot />
23
25
  </TresMesh>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kmcom-nuxt-layers",
3
3
  "private": false,
4
- "version": "4.0.0",
4
+ "version": "4.0.1",
5
5
  "description": "Composable Nuxt 4 layers for building scalable Vue applications",
6
6
  "exports": {
7
7
  "./layers/core": "./layers/core/nuxt.config.ts",
@@ -41,6 +41,7 @@
41
41
  "layers/*/app/**",
42
42
  "layers/*/public/**",
43
43
  "layers/*/server/**",
44
+ "layers/*/shared/**",
44
45
  "layers/*/*/nuxt.config.ts",
45
46
  "layers/*/*/app.config.ts",
46
47
  "layers/*/*/package.json",
@@ -49,6 +50,7 @@
49
50
  "layers/*/*/app/**",
50
51
  "layers/*/*/public/**",
51
52
  "layers/*/*/server/**",
53
+ "layers/*/*/shared/**",
52
54
  "layers/*/*/providers/*/nuxt.config.ts",
53
55
  "layers/*/*/providers/*/package.json",
54
56
  "layers/*/*/providers/*/tsconfig.json",