@fireproof/use-fireproof 0.24.14 → 0.24.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fireproof/use-fireproof",
3
- "version": "0.24.14",
3
+ "version": "0.24.16",
4
4
  "description": "Fireproof live ledger, JavaScript API and React hooks",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -21,17 +21,17 @@
21
21
  "gptdoc": "Fireproof/React/Usage: import { useFireproof } from 'use-fireproof'; function WordCounterApp() { const { useLiveQuery, useDocument } = useFireproof('my-word-app'); const { doc: wordInput, merge: updateWordInput, save: saveWordInput, reset: clearWordInput } = useDocument({ word: '', timestamp: Date.now() }); const recentWords = useLiveQuery('timestamp', { descending: true, limit: 10 }); const { doc: { totalSubmitted }, merge: updateTotalSubmitted, save: saveTotalSubmitted } = useDocument({ _id: 'word-counter', totalSubmitted: 0 }); const handleWordSubmission = (e) => { e.preventDefault(); updateTotalSubmitted({ totalSubmitted: totalSubmitted + 1 }); saveTotalSubmitted(); saveWordInput(); clearWordInput();}; return (<><p>{totalSubmitted} words submitted</p><form onSubmit={handleWordSubmission}><input type='text' value={wordInput.word} onChange={e => updateWordInput({ word: e.target.value })} placeholder='Enter a word' /></form><ul>{recentWords.docs.map(entry => (<li key={entry._id}>{entry.word}</li>))} </ul></>) } export default WordCounterApp;",
22
22
  "dependencies": {
23
23
  "@adviser/cement": "~0.5.34",
24
- "@fireproof/core-base": "0.24.14",
25
- "@fireproof/core-gateways-cloud": "0.24.14",
26
- "@fireproof/core-keybag": "0.24.14",
27
- "@fireproof/core-protocols-dashboard": "0.24.14",
28
- "@fireproof/core-runtime": "0.24.14",
29
- "@fireproof/core-types-base": "0.24.14",
30
- "@fireproof/core-types-blockstore": "0.24.14",
31
- "@fireproof/core-types-protocols-cloud": "0.24.14",
32
- "@fireproof/vendor": "0.24.14",
24
+ "@fireproof/core-base": "0.24.16",
25
+ "@fireproof/core-gateways-cloud": "0.24.16",
26
+ "@fireproof/core-keybag": "0.24.16",
27
+ "@fireproof/core-protocols-dashboard": "0.24.16",
28
+ "@fireproof/core-runtime": "0.24.16",
29
+ "@fireproof/core-types-base": "0.24.16",
30
+ "@fireproof/core-types-blockstore": "0.24.16",
31
+ "@fireproof/core-types-protocols-cloud": "0.24.16",
32
+ "@fireproof/vendor": "0.24.16",
33
33
  "dompurify": "~3.3.3",
34
- "jose": "~6.2.1",
34
+ "jose": "~6.2.2",
35
35
  "react": "~19.2.4",
36
36
  "ts-essentials": "~10.1.1"
37
37
  },
@@ -6,7 +6,7 @@ interface ImgFileProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src">
6
6
  meta?: FileType;
7
7
  }
8
8
  export declare function ImgFile({ file, meta, ...imgProps }: ImgFileProps): React.DetailedReactHTMLElement<{
9
- children?: React.ReactNode;
9
+ children?: React.ReactNode | undefined;
10
10
  dangerouslySetInnerHTML?: {
11
11
  __html: string | TrustedHTML;
12
12
  } | undefined;
@@ -180,34 +180,34 @@ export declare function ImgFile({ file, meta, ...imgProps }: ImgFileProps): Reac
180
180
  onTransitionStartCapture?: React.TransitionEventHandler<HTMLImageElement> | undefined;
181
181
  "aria-activedescendant"?: string | undefined;
182
182
  "aria-atomic"?: ("false" | "true" | boolean) | undefined;
183
- "aria-autocomplete"?: "both" | "inline" | "list" | "none" | undefined;
183
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
184
184
  "aria-braillelabel"?: string | undefined;
185
185
  "aria-brailleroledescription"?: string | undefined;
186
186
  "aria-busy"?: ("false" | "true" | boolean) | undefined;
187
- "aria-checked"?: "false" | "mixed" | "true" | boolean | undefined;
187
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
188
188
  "aria-colcount"?: number | undefined;
189
189
  "aria-colindex"?: number | undefined;
190
190
  "aria-colindextext"?: string | undefined;
191
191
  "aria-colspan"?: number | undefined;
192
192
  "aria-controls"?: string | undefined;
193
- "aria-current"?: "date" | "false" | "location" | "page" | "step" | "time" | "true" | boolean | undefined;
193
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
194
194
  "aria-describedby"?: string | undefined;
195
195
  "aria-description"?: string | undefined;
196
196
  "aria-details"?: string | undefined;
197
197
  "aria-disabled"?: ("false" | "true" | boolean) | undefined;
198
- "aria-dropeffect"?: "copy" | "execute" | "link" | "move" | "none" | "popup" | undefined;
198
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
199
199
  "aria-errormessage"?: string | undefined;
200
200
  "aria-expanded"?: ("false" | "true" | boolean) | undefined;
201
201
  "aria-flowto"?: string | undefined;
202
202
  "aria-grabbed"?: ("false" | "true" | boolean) | undefined;
203
- "aria-haspopup"?: "dialog" | "false" | "grid" | "listbox" | "menu" | "tree" | "true" | boolean | undefined;
203
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
204
204
  "aria-hidden"?: ("false" | "true" | boolean) | undefined;
205
- "aria-invalid"?: "false" | "grammar" | "spelling" | "true" | boolean | undefined;
205
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
206
206
  "aria-keyshortcuts"?: string | undefined;
207
207
  "aria-label"?: string | undefined;
208
208
  "aria-labelledby"?: string | undefined;
209
209
  "aria-level"?: number | undefined;
210
- "aria-live"?: "assertive" | "off" | "polite" | undefined;
210
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
211
211
  "aria-modal"?: ("false" | "true" | boolean) | undefined;
212
212
  "aria-multiline"?: ("false" | "true" | boolean) | undefined;
213
213
  "aria-multiselectable"?: ("false" | "true" | boolean) | undefined;
@@ -215,7 +215,7 @@ export declare function ImgFile({ file, meta, ...imgProps }: ImgFileProps): Reac
215
215
  "aria-owns"?: string | undefined;
216
216
  "aria-placeholder"?: string | undefined;
217
217
  "aria-posinset"?: number | undefined;
218
- "aria-pressed"?: "false" | "mixed" | "true" | boolean | undefined;
218
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
219
219
  "aria-readonly"?: ("false" | "true" | boolean) | undefined;
220
220
  "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
221
221
  "aria-required"?: ("false" | "true" | boolean) | undefined;
@@ -226,7 +226,7 @@ export declare function ImgFile({ file, meta, ...imgProps }: ImgFileProps): Reac
226
226
  "aria-rowspan"?: number | undefined;
227
227
  "aria-selected"?: ("false" | "true" | boolean) | undefined;
228
228
  "aria-setsize"?: number | undefined;
229
- "aria-sort"?: "ascending" | "descending" | "none" | "other" | undefined;
229
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
230
230
  "aria-valuemax"?: number | undefined;
231
231
  "aria-valuemin"?: number | undefined;
232
232
  "aria-valuenow"?: number | undefined;
@@ -236,14 +236,14 @@ export declare function ImgFile({ file, meta, ...imgProps }: ImgFileProps): Reac
236
236
  suppressContentEditableWarning?: boolean | undefined;
237
237
  suppressHydrationWarning?: boolean | undefined;
238
238
  accessKey?: string | undefined;
239
- autoCapitalize?: "characters" | "none" | "off" | "on" | "sentences" | "words" | (string & {}) | undefined;
239
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
240
240
  autoFocus?: boolean | undefined;
241
241
  className?: string | undefined;
242
- contentEditable?: "inherit" | "plaintext-only" | ("false" | "true" | boolean) | undefined;
242
+ contentEditable?: ("false" | "true" | boolean) | "inherit" | "plaintext-only" | undefined;
243
243
  contextMenu?: string | undefined;
244
244
  dir?: string | undefined;
245
245
  draggable?: ("false" | "true" | boolean) | undefined;
246
- enterKeyHint?: "done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined;
246
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
247
247
  hidden?: boolean | undefined;
248
248
  id?: string | undefined;
249
249
  lang?: string | undefined;
@@ -253,7 +253,7 @@ export declare function ImgFile({ file, meta, ...imgProps }: ImgFileProps): Reac
253
253
  style?: React.CSSProperties | undefined;
254
254
  tabIndex?: number | undefined;
255
255
  title?: string | undefined;
256
- translate?: "no" | "yes" | undefined;
256
+ translate?: "yes" | "no" | undefined;
257
257
  radioGroup?: string | undefined;
258
258
  role?: React.AriaRole | undefined;
259
259
  about?: string | undefined;
@@ -277,26 +277,26 @@ export declare function ImgFile({ file, meta, ...imgProps }: ImgFileProps): Reac
277
277
  itemRef?: string | undefined;
278
278
  results?: number | undefined;
279
279
  security?: string | undefined;
280
- unselectable?: "off" | "on" | undefined;
281
- popover?: "" | "auto" | "hint" | "manual" | undefined;
282
- popoverTargetAction?: "hide" | "show" | "toggle" | undefined;
280
+ unselectable?: "on" | "off" | undefined;
281
+ popover?: "" | "auto" | "manual" | "hint" | undefined;
282
+ popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
283
283
  popoverTarget?: string | undefined;
284
284
  inert?: boolean | undefined;
285
- inputMode?: "decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url" | undefined;
285
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
286
286
  is?: string | undefined;
287
287
  exportparts?: string | undefined;
288
288
  part?: string | undefined;
289
289
  alt?: string | undefined;
290
290
  crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
291
291
  decoding?: "async" | "auto" | "sync" | undefined;
292
- fetchPriority?: "auto" | "high" | "low" | undefined;
293
- height?: string | number | undefined;
292
+ fetchPriority?: "high" | "low" | "auto";
293
+ height?: number | string | undefined;
294
294
  loading?: "eager" | "lazy" | undefined;
295
295
  referrerPolicy?: React.HTMLAttributeReferrerPolicy | undefined;
296
296
  sizes?: string | undefined;
297
297
  srcSet?: string | undefined;
298
298
  useMap?: string | undefined;
299
- width?: string | number | undefined;
299
+ width?: number | string | undefined;
300
300
  src: string;
301
301
  }, HTMLElement> | null;
302
302
  export default ImgFile;
@@ -1,3 +1,3 @@
1
- import type { AllDocsQueryOpts, Database } from "@fireproof/core-types-base";
1
+ import type { AllDocsQueryOpts, DocTypes, Database } from "@fireproof/core-types-base";
2
2
  import type { AllDocsResult } from "./types.js";
3
- export declare function createUseAllDocs(database: Database): <T extends {}>(query?: Partial<AllDocsQueryOpts>) => AllDocsResult<T>;
3
+ export declare function createUseAllDocs(database: Database): <T extends DocTypes>(query?: Partial<AllDocsQueryOpts>) => AllDocsResult<T>;
@@ -1,3 +1,3 @@
1
- import type { ChangesOptions, ClockHead, Database } from "@fireproof/core-types-base";
1
+ import type { ChangesOptions, ClockHead, DocTypes, Database } from "@fireproof/core-types-base";
2
2
  import type { ChangesResult } from "./types.js";
3
- export declare function createUseChanges(database: Database): <T extends {}>(since?: ClockHead, opts?: ChangesOptions) => ChangesResult<T>;
3
+ export declare function createUseChanges(database: Database): <T extends DocTypes>(since?: ClockHead, opts?: ChangesOptions) => ChangesResult<T>;
@@ -1,3 +1,3 @@
1
- import type { Database } from "@fireproof/core-types-base";
1
+ import type { DocTypes, Database } from "@fireproof/core-types-base";
2
2
  import type { UseDocumentInitialDocOrFn, UseDocumentResult } from "./types.js";
3
- export declare function createUseDocument(database: Database): <T extends {}>(initialDocOrFn?: UseDocumentInitialDocOrFn<T> | undefined) => UseDocumentResult<T>;
3
+ export declare function createUseDocument(database: Database): <T extends DocTypes>(initialDocOrFn?: UseDocumentInitialDocOrFn<T>) => UseDocumentResult<T>;
@@ -1,3 +1,3 @@
1
- import type { DocFragment, IndexKeyType, FPIndexRow, MapFn, Database } from "@fireproof/core-types-base";
1
+ import type { DocFragment, DocTypes, IndexKeyType, FPIndexRow, MapFn, Database } from "@fireproof/core-types-base";
2
2
  import type { LiveQueryResult } from "./types.js";
3
- export declare function createUseLiveQuery(database: Database): <T extends {}, K extends IndexKeyType = string, R extends DocFragment = T>(mapFn: string | MapFn<T>, query?: {}, initialRows?: FPIndexRow<K, T, R>[]) => LiveQueryResult<T, K, R>;
3
+ export declare function createUseLiveQuery(database: Database): <T extends DocTypes, K extends IndexKeyType = string, R extends DocFragment = T>(mapFn: MapFn<T> | string, query?: {}, initialRows?: FPIndexRow<K, T, R>[]) => LiveQueryResult<T, K, R>;