svelte-firekit 0.0.21 → 0.0.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.
@@ -1,12 +1,61 @@
1
+ /**
2
+ * @module FirekitCollection
3
+ */
1
4
  import { collection, query, onSnapshot } from "firebase/firestore";
2
5
  import { firebaseService } from "../firebase.js";
3
6
  import { browser } from "$app/environment";
7
+ /**
8
+ * Manages real-time Firestore collection subscriptions with reactive state
9
+ * @class
10
+ * @template T Collection document type
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * interface User {
15
+ * id: string;
16
+ * name: string;
17
+ * email: string;
18
+ * }
19
+ *
20
+ * // Create collection subscription
21
+ * const users = firekitCollection<User>('users',
22
+ * where('active', '==', true),
23
+ * orderBy('name')
24
+ * );
25
+ *
26
+ * // Access reactive state
27
+ * console.log(users.data); // Array of documents
28
+ * console.log(users.loading); // Loading state
29
+ * console.log(users.error); // Error state
30
+ * console.log(users.empty); // Whether collection is empty
31
+ * console.log(users.size); // Number of documents
32
+ * ```
33
+ */
4
34
  class FirekitCollection {
35
+ /** Current collection data */
5
36
  _data = $state([]);
37
+ /** Loading state */
6
38
  _loading = $state(true);
39
+ /** Error state */
7
40
  _error = $state(null);
41
+ /** Collection reference */
8
42
  colRef = null;
43
+ /** Query reference */
9
44
  queryRef = null;
45
+ /**
46
+ * Creates a collection subscription
47
+ * @param {string} path Collection path
48
+ * @param {...QueryConstraint[]} queryConstraints Query constraints (where, orderBy, limit, etc.)
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * const collection = new FirekitCollection('users',
53
+ * where('age', '>=', 18),
54
+ * orderBy('name', 'asc'),
55
+ * limit(10)
56
+ * );
57
+ * ```
58
+ */
10
59
  constructor(path, ...queryConstraints) {
11
60
  if (browser) {
12
61
  try {
@@ -31,21 +80,30 @@ class FirekitCollection {
31
80
  }
32
81
  }
33
82
  }
83
+ /** Gets current collection data */
34
84
  get data() {
35
85
  return this._data;
36
86
  }
87
+ /** Gets loading state */
37
88
  get loading() {
38
89
  return this._loading;
39
90
  }
91
+ /** Gets error state */
40
92
  get error() {
41
93
  return this._error;
42
94
  }
95
+ /** Checks if collection is empty */
43
96
  get empty() {
44
97
  return this._data.length === 0;
45
98
  }
99
+ /** Gets number of documents in collection */
46
100
  get size() {
47
101
  return this._data.length;
48
102
  }
103
+ /**
104
+ * Gets collection reference
105
+ * @throws {Error} If collection reference is not available
106
+ */
49
107
  get ref() {
50
108
  if (!this.colRef) {
51
109
  throw new Error("Collection reference is not available");
@@ -53,6 +111,27 @@ class FirekitCollection {
53
111
  return this.colRef;
54
112
  }
55
113
  }
114
+ /**
115
+ * Creates a collection subscription
116
+ * @template T Collection document type
117
+ * @param {string} path Collection path
118
+ * @param {...QueryConstraint[]} queryConstraints Query constraints
119
+ * @returns {FirekitCollection<T>} Collection subscription instance
120
+ *
121
+ * @example
122
+ * ```typescript
123
+ * interface Post {
124
+ * id: string;
125
+ * title: string;
126
+ * authorId: string;
127
+ * }
128
+ *
129
+ * const posts = firekitCollection<Post>('posts',
130
+ * where('authorId', '==', currentUserId),
131
+ * orderBy('createdAt', 'desc')
132
+ * );
133
+ * ```
134
+ */
56
135
  export function firekitCollection(path, ...queryConstraints) {
57
136
  return new FirekitCollection(path, ...queryConstraints);
58
137
  }
@@ -1,16 +1,90 @@
1
+ /**
2
+ * @module FirekitDoc
3
+ */
1
4
  import { DocumentReference } from "firebase/firestore";
5
+ /**
6
+ * Manages real-time Firestore document subscriptions with reactive state
7
+ * @class
8
+ * @template T Document data type
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * interface User {
13
+ * id: string;
14
+ * name: string;
15
+ * email: string;
16
+ * }
17
+ *
18
+ * // Create document subscription
19
+ * const userDoc = firekitDoc<User>('users/123', {
20
+ * id: '123',
21
+ * name: 'Loading...',
22
+ * email: ''
23
+ * });
24
+ * ```
25
+ */
2
26
  declare class FirekitDoc<T> {
27
+ /** Current document data */
3
28
  private _data;
29
+ /** Loading state */
4
30
  private _loading;
31
+ /** Error state */
5
32
  private _error;
33
+ /** Document reference */
6
34
  private docRef;
35
+ /**
36
+ * Creates a document subscription
37
+ * @param {string | DocumentReference<T>} ref Document path or reference
38
+ * @param {T} [startWith] Initial data before fetch completes
39
+ *
40
+ * @example
41
+ * ```typescript
42
+ * const doc = new FirekitDoc('users/123', defaultUser);
43
+ * // or
44
+ * const doc = new FirekitDoc(docRef, defaultUser);
45
+ * ```
46
+ */
7
47
  constructor(ref: string | DocumentReference<T>, startWith?: T);
48
+ /** Gets current document data */
8
49
  get data(): T | null;
50
+ /** Gets document ID */
9
51
  get id(): string;
52
+ /** Gets loading state */
10
53
  get loading(): boolean;
54
+ /** Gets error state */
11
55
  get error(): Error | null;
12
- get ref(): DocumentReference<T, import("@firebase/firestore").DocumentData>;
56
+ /**
57
+ * Gets document reference
58
+ * @throws {Error} If document reference is not available
59
+ */
60
+ get ref(): DocumentReference<T>;
61
+ /** Checks if document exists */
13
62
  get exists(): boolean;
14
63
  }
64
+ /**
65
+ * Creates a document subscription
66
+ * @template T Document data type
67
+ * @param {string | DocumentReference<T>} ref Document path or reference
68
+ * @param {T} [startWith] Initial data before fetch completes
69
+ * @returns {FirekitDoc<T>} Document subscription instance
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * const userDoc = firekitDoc<User>('users/123', {
74
+ * id: '123',
75
+ * name: 'Loading...',
76
+ * email: ''
77
+ * });
78
+ *
79
+ * // Access reactive state
80
+ * if (userDoc.loading) {
81
+ * console.log('Loading...');
82
+ * } else if (userDoc.error) {
83
+ * console.error(userDoc.error);
84
+ * } else if (userDoc.exists) {
85
+ * console.log(userDoc.data);
86
+ * }
87
+ * ```
88
+ */
15
89
  export declare function firekitDoc<T>(ref: string | DocumentReference<T>, startWith?: T): FirekitDoc<T>;
16
90
  export {};
@@ -1,11 +1,51 @@
1
+ /**
2
+ * @module FirekitDoc
3
+ */
1
4
  import { doc, DocumentReference, onSnapshot } from "firebase/firestore";
2
5
  import { firebaseService } from "../firebase.js";
3
6
  import { browser } from "$app/environment";
7
+ /**
8
+ * Manages real-time Firestore document subscriptions with reactive state
9
+ * @class
10
+ * @template T Document data type
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * interface User {
15
+ * id: string;
16
+ * name: string;
17
+ * email: string;
18
+ * }
19
+ *
20
+ * // Create document subscription
21
+ * const userDoc = firekitDoc<User>('users/123', {
22
+ * id: '123',
23
+ * name: 'Loading...',
24
+ * email: ''
25
+ * });
26
+ * ```
27
+ */
4
28
  class FirekitDoc {
29
+ /** Current document data */
5
30
  _data = $state(null);
31
+ /** Loading state */
6
32
  _loading = $state(true);
33
+ /** Error state */
7
34
  _error = $state(null);
35
+ /** Document reference */
8
36
  docRef = null;
37
+ /**
38
+ * Creates a document subscription
39
+ * @param {string | DocumentReference<T>} ref Document path or reference
40
+ * @param {T} [startWith] Initial data before fetch completes
41
+ *
42
+ * @example
43
+ * ```typescript
44
+ * const doc = new FirekitDoc('users/123', defaultUser);
45
+ * // or
46
+ * const doc = new FirekitDoc(docRef, defaultUser);
47
+ * ```
48
+ */
9
49
  constructor(ref, startWith) {
10
50
  this._data = startWith ?? null;
11
51
  if (browser) {
@@ -15,7 +55,6 @@ class FirekitDoc {
15
55
  ? doc(firestore, ref)
16
56
  : ref;
17
57
  onSnapshot(this.docRef, (snapshot) => {
18
- // this._data = (snapshot.data() as T) ?? null;
19
58
  const data = snapshot.data();
20
59
  this._data = data ? { ...data, id: snapshot.id } : null;
21
60
  this._loading = false;
@@ -31,28 +70,62 @@ class FirekitDoc {
31
70
  }
32
71
  }
33
72
  }
73
+ /** Gets current document data */
34
74
  get data() {
35
75
  return this._data;
36
76
  }
77
+ /** Gets document ID */
37
78
  get id() {
38
79
  return this.docRef?.id ?? '';
39
80
  }
81
+ /** Gets loading state */
40
82
  get loading() {
41
83
  return this._loading;
42
84
  }
85
+ /** Gets error state */
43
86
  get error() {
44
87
  return this._error;
45
88
  }
89
+ /**
90
+ * Gets document reference
91
+ * @throws {Error} If document reference is not available
92
+ */
46
93
  get ref() {
47
94
  if (this.docRef === null) {
48
95
  throw new Error("Document reference is not available yet.");
49
96
  }
50
97
  return this.docRef;
51
98
  }
99
+ /** Checks if document exists */
52
100
  get exists() {
53
101
  return this._data !== null;
54
102
  }
55
103
  }
104
+ /**
105
+ * Creates a document subscription
106
+ * @template T Document data type
107
+ * @param {string | DocumentReference<T>} ref Document path or reference
108
+ * @param {T} [startWith] Initial data before fetch completes
109
+ * @returns {FirekitDoc<T>} Document subscription instance
110
+ *
111
+ * @example
112
+ * ```typescript
113
+ * const userDoc = firekitDoc<User>('users/123', {
114
+ * id: '123',
115
+ * name: 'Loading...',
116
+ * email: ''
117
+ * });
118
+ *
119
+ * // Access reactive state
120
+ * if (userDoc.loading) {
121
+ * console.log('Loading...');
122
+ * } else if (userDoc.error) {
123
+ * console.error(userDoc.error);
124
+ * } else if (userDoc.exists) {
125
+ * console.log(userDoc.data);
126
+ * }
127
+ * ```
128
+ */
56
129
  export function firekitDoc(ref, startWith) {
57
130
  return new FirekitDoc(ref, startWith);
58
131
  }
@@ -1,27 +1,164 @@
1
+ /**
2
+ * @module FirekitDocumentMutations
3
+ */
1
4
  import { type DocumentData, type WithFieldValue, type PartialWithFieldValue } from "firebase/firestore";
5
+ /**
6
+ * Response structure for document mutations
7
+ * @interface MutationResponse
8
+ * @template T Document data type
9
+ */
2
10
  interface MutationResponse<T> {
11
+ /** Operation success status */
3
12
  success: boolean;
13
+ /** Document data */
4
14
  data?: T;
15
+ /** Document ID */
5
16
  id?: string;
17
+ /** Error details if operation failed */
6
18
  error?: {
7
19
  code: string;
8
20
  message: string;
9
21
  };
10
22
  }
23
+ /**
24
+ * Options for document mutations
25
+ * @interface MutationOptions
26
+ */
11
27
  interface MutationOptions {
28
+ /** Whether to include timestamp fields */
12
29
  timestamps?: boolean;
30
+ /** Whether to merge data in set operations */
13
31
  merge?: boolean;
32
+ /** Custom document ID for add operations */
14
33
  customId?: string;
15
34
  }
35
+ /**
36
+ * Manages Firestore document mutations with automatic timestamps and error handling
37
+ * @class
38
+ * @example
39
+ * ```typescript
40
+ * // Add a new document
41
+ * const result = await firekitDocMutations.add('users', {
42
+ * name: 'John Doe',
43
+ * email: 'john@example.com'
44
+ * });
45
+ *
46
+ * // Update a document
47
+ * await firekitDocMutations.update('users/123', {
48
+ * name: 'Jane Doe'
49
+ * });
50
+ *
51
+ * // Delete a document
52
+ * await firekitDocMutations.delete('users/123');
53
+ * ```
54
+ */
16
55
  declare class FirekitDocumentMutations {
56
+ /**
57
+ * Generates timestamp data for document mutations
58
+ * @private
59
+ * @param {boolean} [isNew=true] Whether this is a new document
60
+ * @returns {Record<string, any>} Timestamp data
61
+ */
17
62
  private getTimestampData;
63
+ /**
64
+ * Handles and formats mutation errors
65
+ * @private
66
+ * @param {any} error Error object
67
+ * @returns {MutationResponse<never>} Formatted error response
68
+ */
18
69
  private handleError;
70
+ /**
71
+ * Adds a new document to a collection
72
+ * @template T Document data type
73
+ * @param {string} collectionPath Collection path
74
+ * @param {WithFieldValue<T>} data Document data
75
+ * @param {MutationOptions} [options] Mutation options
76
+ * @returns {Promise<MutationResponse<T>>} Mutation response
77
+ *
78
+ * @example
79
+ * ```typescript
80
+ * const result = await firekitDocMutations.add('users', {
81
+ * name: 'John Doe',
82
+ * email: 'john@example.com'
83
+ * }, { timestamps: true, customId: 'custom-id' });
84
+ * ```
85
+ */
19
86
  add<T extends DocumentData>(collectionPath: string, data: WithFieldValue<T>, options?: MutationOptions): Promise<MutationResponse<T>>;
87
+ /**
88
+ * Sets document data at specified path
89
+ * @template T Document data type
90
+ * @param {string} path Document path
91
+ * @param {WithFieldValue<T>} data Document data
92
+ * @param {MutationOptions} [options] Mutation options
93
+ * @returns {Promise<MutationResponse<T>>} Mutation response
94
+ *
95
+ * @example
96
+ * ```typescript
97
+ * const result = await firekitDocMutations.set('users/123', {
98
+ * name: 'John Doe',
99
+ * email: 'john@example.com'
100
+ * }, { merge: true });
101
+ * ```
102
+ */
20
103
  set<T extends DocumentData>(path: string, data: WithFieldValue<T>, options?: MutationOptions): Promise<MutationResponse<T>>;
104
+ /**
105
+ * Updates a document at specified path
106
+ * @template T Document data type
107
+ * @param {string} path Document path
108
+ * @param {PartialWithFieldValue<T>} data Update data
109
+ * @param {MutationOptions} [options] Mutation options
110
+ * @returns {Promise<MutationResponse<Partial<T>>>} Mutation response
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * const result = await firekitDocMutations.update('users/123', {
115
+ * name: 'Jane Doe'
116
+ * });
117
+ * ```
118
+ */
21
119
  update<T extends DocumentData>(path: string, data: PartialWithFieldValue<T>, options?: MutationOptions): Promise<MutationResponse<Partial<T>>>;
120
+ /**
121
+ * Deletes a document at specified path
122
+ * @param {string} path Document path
123
+ * @returns {Promise<MutationResponse<void>>} Mutation response
124
+ *
125
+ * @example
126
+ * ```typescript
127
+ * const result = await firekitDocMutations.delete('users/123');
128
+ * ```
129
+ */
22
130
  delete(path: string): Promise<MutationResponse<void>>;
131
+ /**
132
+ * Checks if a document exists at specified path
133
+ * @param {string} path Document path
134
+ * @returns {Promise<boolean>} Whether document exists
135
+ *
136
+ * @example
137
+ * ```typescript
138
+ * const exists = await firekitDocMutations.exists('users/123');
139
+ * ```
140
+ */
23
141
  exists(path: string): Promise<boolean>;
142
+ /**
143
+ * Gets a document at specified path
144
+ * @template T Document data type
145
+ * @param {string} path Document path
146
+ * @returns {Promise<MutationResponse<T>>} Mutation response with document data
147
+ *
148
+ * @example
149
+ * ```typescript
150
+ * const result = await firekitDocMutations.getDoc<UserData>('users/123');
151
+ * if (result.success) {
152
+ * console.log(result.data);
153
+ * }
154
+ * ```
155
+ */
24
156
  getDoc<T extends DocumentData>(path: string): Promise<MutationResponse<T>>;
25
157
  }
158
+ /**
159
+ * Pre-initialized instance of FirekitDocumentMutations
160
+ * @const
161
+ * @type {FirekitDocumentMutations}
162
+ */
26
163
  export declare const firekitDocMutations: FirekitDocumentMutations;
27
164
  export {};
@@ -1,7 +1,36 @@
1
+ /**
2
+ * @module FirekitDocumentMutations
3
+ */
1
4
  import { addDoc, setDoc, updateDoc, deleteDoc, doc, getDoc, collection, serverTimestamp, } from "firebase/firestore";
2
5
  import { firebaseService } from "../firebase.js";
3
6
  import { firekitUser } from "../auth/user.svelte.js";
7
+ /**
8
+ * Manages Firestore document mutations with automatic timestamps and error handling
9
+ * @class
10
+ * @example
11
+ * ```typescript
12
+ * // Add a new document
13
+ * const result = await firekitDocMutations.add('users', {
14
+ * name: 'John Doe',
15
+ * email: 'john@example.com'
16
+ * });
17
+ *
18
+ * // Update a document
19
+ * await firekitDocMutations.update('users/123', {
20
+ * name: 'Jane Doe'
21
+ * });
22
+ *
23
+ * // Delete a document
24
+ * await firekitDocMutations.delete('users/123');
25
+ * ```
26
+ */
4
27
  class FirekitDocumentMutations {
28
+ /**
29
+ * Generates timestamp data for document mutations
30
+ * @private
31
+ * @param {boolean} [isNew=true] Whether this is a new document
32
+ * @returns {Record<string, any>} Timestamp data
33
+ */
5
34
  getTimestampData(isNew = true) {
6
35
  const timestamps = {
7
36
  updatedAt: serverTimestamp(),
@@ -13,6 +42,12 @@ class FirekitDocumentMutations {
13
42
  }
14
43
  return timestamps;
15
44
  }
45
+ /**
46
+ * Handles and formats mutation errors
47
+ * @private
48
+ * @param {any} error Error object
49
+ * @returns {MutationResponse<never>} Formatted error response
50
+ */
16
51
  handleError(error) {
17
52
  console.error('Firestore mutation error:', error);
18
53
  return {
@@ -23,6 +58,22 @@ class FirekitDocumentMutations {
23
58
  }
24
59
  };
25
60
  }
61
+ /**
62
+ * Adds a new document to a collection
63
+ * @template T Document data type
64
+ * @param {string} collectionPath Collection path
65
+ * @param {WithFieldValue<T>} data Document data
66
+ * @param {MutationOptions} [options] Mutation options
67
+ * @returns {Promise<MutationResponse<T>>} Mutation response
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * const result = await firekitDocMutations.add('users', {
72
+ * name: 'John Doe',
73
+ * email: 'john@example.com'
74
+ * }, { timestamps: true, customId: 'custom-id' });
75
+ * ```
76
+ */
26
77
  async add(collectionPath, data, options = { timestamps: true }) {
27
78
  try {
28
79
  const firestore = firebaseService.getDbInstance();
@@ -34,12 +85,12 @@ class FirekitDocumentMutations {
34
85
  let docRef;
35
86
  if (options.customId) {
36
87
  docRef = doc(colRef, options.customId);
37
- dataToAdd = { ...dataToAdd, id: docRef.id }; // Agregar el id al documento
88
+ dataToAdd = { ...dataToAdd, id: docRef.id };
38
89
  await setDoc(docRef, dataToAdd);
39
90
  }
40
91
  else {
41
92
  docRef = await addDoc(colRef, dataToAdd);
42
- dataToAdd = { ...dataToAdd, id: docRef.id }; // Agregar el id al documento
93
+ dataToAdd = { ...dataToAdd, id: docRef.id };
43
94
  await setDoc(docRef, dataToAdd);
44
95
  }
45
96
  return {
@@ -52,6 +103,22 @@ class FirekitDocumentMutations {
52
103
  return this.handleError(error);
53
104
  }
54
105
  }
106
+ /**
107
+ * Sets document data at specified path
108
+ * @template T Document data type
109
+ * @param {string} path Document path
110
+ * @param {WithFieldValue<T>} data Document data
111
+ * @param {MutationOptions} [options] Mutation options
112
+ * @returns {Promise<MutationResponse<T>>} Mutation response
113
+ *
114
+ * @example
115
+ * ```typescript
116
+ * const result = await firekitDocMutations.set('users/123', {
117
+ * name: 'John Doe',
118
+ * email: 'john@example.com'
119
+ * }, { merge: true });
120
+ * ```
121
+ */
55
122
  async set(path, data, options = { merge: false, timestamps: true }) {
56
123
  try {
57
124
  const firestore = firebaseService.getDbInstance();
@@ -79,6 +146,21 @@ class FirekitDocumentMutations {
79
146
  return this.handleError(error);
80
147
  }
81
148
  }
149
+ /**
150
+ * Updates a document at specified path
151
+ * @template T Document data type
152
+ * @param {string} path Document path
153
+ * @param {PartialWithFieldValue<T>} data Update data
154
+ * @param {MutationOptions} [options] Mutation options
155
+ * @returns {Promise<MutationResponse<Partial<T>>>} Mutation response
156
+ *
157
+ * @example
158
+ * ```typescript
159
+ * const result = await firekitDocMutations.update('users/123', {
160
+ * name: 'Jane Doe'
161
+ * });
162
+ * ```
163
+ */
82
164
  async update(path, data, options = { timestamps: true }) {
83
165
  try {
84
166
  const firestore = firebaseService.getDbInstance();
@@ -98,6 +180,16 @@ class FirekitDocumentMutations {
98
180
  return this.handleError(error);
99
181
  }
100
182
  }
183
+ /**
184
+ * Deletes a document at specified path
185
+ * @param {string} path Document path
186
+ * @returns {Promise<MutationResponse<void>>} Mutation response
187
+ *
188
+ * @example
189
+ * ```typescript
190
+ * const result = await firekitDocMutations.delete('users/123');
191
+ * ```
192
+ */
101
193
  async delete(path) {
102
194
  try {
103
195
  const firestore = firebaseService.getDbInstance();
@@ -112,6 +204,16 @@ class FirekitDocumentMutations {
112
204
  return this.handleError(error);
113
205
  }
114
206
  }
207
+ /**
208
+ * Checks if a document exists at specified path
209
+ * @param {string} path Document path
210
+ * @returns {Promise<boolean>} Whether document exists
211
+ *
212
+ * @example
213
+ * ```typescript
214
+ * const exists = await firekitDocMutations.exists('users/123');
215
+ * ```
216
+ */
115
217
  async exists(path) {
116
218
  try {
117
219
  const firestore = firebaseService.getDbInstance();
@@ -124,6 +226,20 @@ class FirekitDocumentMutations {
124
226
  return false;
125
227
  }
126
228
  }
229
+ /**
230
+ * Gets a document at specified path
231
+ * @template T Document data type
232
+ * @param {string} path Document path
233
+ * @returns {Promise<MutationResponse<T>>} Mutation response with document data
234
+ *
235
+ * @example
236
+ * ```typescript
237
+ * const result = await firekitDocMutations.getDoc<UserData>('users/123');
238
+ * if (result.success) {
239
+ * console.log(result.data);
240
+ * }
241
+ * ```
242
+ */
127
243
  async getDoc(path) {
128
244
  try {
129
245
  const firestore = firebaseService.getDbInstance();
@@ -149,4 +265,9 @@ class FirekitDocumentMutations {
149
265
  }
150
266
  }
151
267
  }
268
+ /**
269
+ * Pre-initialized instance of FirekitDocumentMutations
270
+ * @const
271
+ * @type {FirekitDocumentMutations}
272
+ */
152
273
  export const firekitDocMutations = new FirekitDocumentMutations();
package/dist/index.d.ts CHANGED
@@ -2,11 +2,12 @@ export { firebaseConfig } from './config.js';
2
2
  export { firebaseService } from './firebase.js';
3
3
  export { firekitUser } from './auth/user.svelte.js';
4
4
  export { firekitAuth } from './auth/auth.js';
5
- export { presenceService } from './auth/presence.svelte';
5
+ export { presenceService } from './auth/presence.svelte.js';
6
6
  export { firekitAwaitableDoc } from './firestore/awaitable-doc.svelte.js';
7
- export { firekitDocMutations } from './firestore/document-mutations.svelte';
7
+ export { firekitDocMutations } from './firestore/document-mutations.svelte.js';
8
8
  export { firekitCollection } from './firestore/collection.svelte.js';
9
9
  export { firekitDoc } from './firestore/doc.svelte.js';
10
+ export { firekitCollectionGroup } from './firestore/collection-group.svelte.js';
10
11
  export { firekitRealtimeDB } from './realtime/realtime.svelte.js';
11
12
  export { firekitDownloadUrl } from './storage/download-url.svelte.js';
12
13
  export { firekitStorageList } from './storage/storage-list.svelte.js';