[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-tanstack-offline":3,"mdc-etd4nn-key":33,"related-org-tanstack-offline":5146,"related-repo-tanstack-offline":5288},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":28,"sourceUrl":31,"mdContent":32},"offline","implement offline transaction support","Offline transaction support for TanStack DB. OfflineExecutor orchestrates persistent outbox (IndexedDB\u002FlocalStorage), leader election (WebLocks\u002F BroadcastChannel), retry with backoff, and connectivity detection. createOfflineTransaction\u002FcreateOfflineAction wrap TanStack DB primitives with offline persistence. Idempotency keys for at-least-once delivery. Graceful degradation to online-only mode when storage unavailable. React Native support via separate entry point.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"tanstack","TanStack","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftanstack.png",[12,16,19,21],{"name":13,"slug":14,"type":15},"Performance","performance","tag",{"name":17,"slug":18,"type":15},"Database","database",{"name":20,"slug":4,"type":15},"Offline",{"name":9,"slug":8,"type":15},3811,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Fdb","2026-07-16T06:04:22.953157",null,245,[],{"repoUrl":23,"stars":22,"forks":26,"topics":29,"description":30},[],"The reactive client store for your API.","https:\u002F\u002Fgithub.com\u002FTanStack\u002Fdb\u002Ftree\u002FHEAD\u002Fpackages\u002Foffline-transactions\u002Fskills\u002Foffline","---\nname: offline\ndescription: >\n  Offline transaction support for TanStack DB. OfflineExecutor orchestrates\n  persistent outbox (IndexedDB\u002FlocalStorage), leader election (WebLocks\u002F\n  BroadcastChannel), retry with backoff, and connectivity detection.\n  createOfflineTransaction\u002FcreateOfflineAction wrap TanStack DB primitives\n  with offline persistence. Idempotency keys for at-least-once delivery.\n  Graceful degradation to online-only mode when storage unavailable.\n  React Native support via separate entry point.\ntype: composition\nlibrary: db\nlibrary_version: '0.6.0'\nrequires:\n  - db-core\n  - db-core\u002Fmutations-optimistic\nsources:\n  - 'TanStack\u002Fdb:packages\u002Foffline-transactions\u002Fsrc\u002FOfflineExecutor.ts'\n  - 'TanStack\u002Fdb:packages\u002Foffline-transactions\u002Fsrc\u002Ftypes.ts'\n  - 'TanStack\u002Fdb:packages\u002Foffline-transactions\u002Fsrc\u002Findex.ts'\n---\n\nThis skill builds on db-core and mutations-optimistic. Read those first.\n\n# TanStack DB — Offline Transactions\n\n## Setup\n\n```ts\nimport {\n  startOfflineExecutor,\n  IndexedDBAdapter,\n} from '@tanstack\u002Foffline-transactions'\nimport { todoCollection } from '.\u002Fcollections'\n\nconst executor = startOfflineExecutor({\n  collections: { todos: todoCollection },\n  mutationFns: {\n    createTodo: async ({ transaction, idempotencyKey }) => {\n      const mutation = transaction.mutations[0]\n      await api.todos.create({\n        ...mutation.modified,\n        idempotencyKey,\n      })\n    },\n    updateTodo: async ({ transaction, idempotencyKey }) => {\n      const mutation = transaction.mutations[0]\n      await api.todos.update(mutation.key, {\n        ...mutation.changes,\n        idempotencyKey,\n      })\n    },\n  },\n})\n\n\u002F\u002F Wait for initialization (storage probe, leader election, outbox replay)\nawait executor.waitForInit()\n```\n\n## Core API\n\n### createOfflineTransaction\n\n```ts\nconst tx = executor.createOfflineTransaction({\n  mutationFnName: 'createTodo',\n})\n\n\u002F\u002F Mutations run inside tx.mutate() — uses ambient transaction context\ntx.mutate(() => {\n  todoCollection.insert({ id: crypto.randomUUID(), text: 'New todo' })\n})\ntx.commit()\n```\n\nIf the executor is not the leader tab, falls back to `createTransaction` directly (no offline persistence).\n\n### createOfflineAction\n\n```ts\nconst addTodo = executor.createOfflineAction({\n  mutationFnName: 'createTodo',\n  onMutate: (variables) => {\n    todoCollection.insert({\n      id: crypto.randomUUID(),\n      text: variables.text,\n    })\n  },\n})\n\n\u002F\u002F Call it\naddTodo({ text: 'Buy milk' })\n```\n\nIf the executor is not the leader tab, falls back to `createOptimisticAction` directly.\n\n## Architecture\n\n### Components\n\n| Component               | Purpose                                     | Default                           |\n| ----------------------- | ------------------------------------------- | --------------------------------- |\n| **Storage**             | Persist transactions to survive page reload | IndexedDB → localStorage fallback |\n| **OutboxManager**       | FIFO queue of pending transactions          | Automatic                         |\n| **KeyScheduler**        | Serialize transactions touching same keys   | Automatic                         |\n| **TransactionExecutor** | Execute with retry + backoff                | Automatic                         |\n| **LeaderElection**      | Only one tab processes the outbox           | WebLocks → BroadcastChannel       |\n| **OnlineDetector**      | Pause\u002Fresume on connectivity changes        | navigator.onLine + events         |\n\n### Transaction lifecycle\n\n1. Mutation applied optimistically to collection (instant UI update)\n2. Transaction serialized and persisted to storage (outbox)\n3. Leader tab picks up transaction and executes `mutationFn`\n4. On success: removed from outbox, optimistic state resolved\n5. On failure: retried with exponential backoff\n6. On page reload: outbox replayed, optimistic state restored\n\n### Leader election\n\nOnly one tab processes the outbox to prevent duplicate execution. Non-leader tabs use regular `createTransaction`\u002F`createOptimisticAction` (online-only, no persistence).\n\n```ts\nconst executor = startOfflineExecutor({\n  \u002F\u002F ...\n  onLeadershipChange: (isLeader) => {\n    console.log(\n      isLeader\n        ? 'This tab is processing offline transactions'\n        : 'Another tab is leader',\n    )\n  },\n})\n\nexecutor.isOfflineEnabled \u002F\u002F true only if leader AND storage available\n```\n\n### Storage degradation\n\nThe executor probes storage availability on startup:\n\n```ts\nconst executor = startOfflineExecutor({\n  \u002F\u002F ...\n  onStorageFailure: (diagnostic) => {\n    \u002F\u002F diagnostic.code: 'STORAGE_BLOCKED' | 'QUOTA_EXCEEDED' | 'UNKNOWN_ERROR'\n    \u002F\u002F diagnostic.mode: 'online-only'\n    console.warn(diagnostic.message)\n  },\n})\n\nexecutor.mode \u002F\u002F 'offline' | 'online-only'\nexecutor.storageDiagnostic \u002F\u002F Full diagnostic info\n```\n\nWhen storage is unavailable (private browsing, quota exceeded), the executor operates in online-only mode — mutations work normally but aren't persisted across page reloads.\n\n## Configuration\n\n```ts\ninterface OfflineConfig {\n  collections: Record\u003Cstring, Collection> \u002F\u002F Collections for optimistic state restoration\n  mutationFns: Record\u003Cstring, OfflineMutationFn> \u002F\u002F Named mutation functions\n  storage?: StorageAdapter \u002F\u002F Custom storage (default: auto-detect)\n  maxConcurrency?: number \u002F\u002F Parallel execution limit\n  jitter?: boolean \u002F\u002F Add jitter to retry delays\n  beforeRetry?: (txs) => txs \u002F\u002F Transform\u002Ffilter before retry\n  onUnknownMutationFn?: (name, tx) => void \u002F\u002F Handle orphaned transactions\n  onLeadershipChange?: (isLeader) => void \u002F\u002F Leadership state callback\n  onStorageFailure?: (diagnostic) => void \u002F\u002F Storage probe failure callback\n  leaderElection?: LeaderElection \u002F\u002F Custom leader election\n  onlineDetector?: OnlineDetector \u002F\u002F Custom connectivity detection\n}\n```\n\n### Custom storage adapter\n\n```ts\ninterface StorageAdapter {\n  get: (key: string) => Promise\u003Cstring | null>\n  set: (key: string, value: string) => Promise\u003Cvoid>\n  delete: (key: string) => Promise\u003Cvoid>\n  keys: () => Promise\u003CArray\u003Cstring>>\n  clear: () => Promise\u003Cvoid>\n}\n```\n\n## Error Handling\n\n### NonRetriableError\n\n```ts\nimport { NonRetriableError } from '@tanstack\u002Foffline-transactions'\n\nconst executor = startOfflineExecutor({\n  mutationFns: {\n    createTodo: async ({ transaction, idempotencyKey }) => {\n      const res = await fetch('\u002Fapi\u002Ftodos', { method: 'POST', body: ... })\n      if (res.status === 409) {\n        throw new NonRetriableError('Duplicate detected')\n      }\n      if (!res.ok) throw new Error('Server error')\n    },\n  },\n})\n```\n\nThrowing `NonRetriableError` stops retry and removes the transaction from the outbox. Use for permanent failures (validation errors, conflicts, 4xx responses).\n\n### Idempotency keys\n\nEvery offline transaction includes an `idempotencyKey`. Pass it to your API to prevent duplicate execution on retry:\n\n```ts\nmutationFns: {\n  createTodo: async ({ transaction, idempotencyKey }) => {\n    await fetch('\u002Fapi\u002Ftodos', {\n      method: 'POST',\n      headers: { 'Idempotency-Key': idempotencyKey },\n      body: JSON.stringify(transaction.mutations[0].modified),\n    })\n  },\n}\n```\n\n## React Native\n\n```ts\nimport {\n  startOfflineExecutor,\n} from '@tanstack\u002Foffline-transactions\u002Freact-native'\n\n\u002F\u002F Uses ReactNativeOnlineDetector automatically\n\u002F\u002F Uses AsyncStorage-compatible storage\nconst executor = startOfflineExecutor({ ... })\n```\n\n## Outbox Management\n\n```ts\n\u002F\u002F Inspect pending transactions\nconst pending = await executor.peekOutbox()\n\n\u002F\u002F Get counts\nexecutor.getPendingCount() \u002F\u002F Queued transactions\nexecutor.getRunningCount() \u002F\u002F Currently executing\n\n\u002F\u002F Clear all pending transactions\nawait executor.clearOutbox()\n\n\u002F\u002F Cleanup\nexecutor.dispose()\n```\n\n## Common Mistakes\n\n### CRITICAL Not passing idempotencyKey to the API\n\nWrong:\n\n```ts\nmutationFns: {\n  createTodo: async ({ transaction }) => {\n    await api.todos.create(transaction.mutations[0].modified)\n  },\n}\n```\n\nCorrect:\n\n```ts\nmutationFns: {\n  createTodo: async ({ transaction, idempotencyKey }) => {\n    await api.todos.create({\n      ...transaction.mutations[0].modified,\n      idempotencyKey,\n    })\n  },\n}\n```\n\nOffline transactions retry on failure. Without idempotency keys, retries can create duplicate records on the server.\n\n### HIGH Not waiting for initialization\n\nWrong:\n\n```ts\nconst executor = startOfflineExecutor({ ... })\nconst tx = executor.createOfflineTransaction({ mutationFnName: 'createTodo' })\n```\n\nCorrect:\n\n```ts\nconst executor = startOfflineExecutor({ ... })\nawait executor.waitForInit()\nconst tx = executor.createOfflineTransaction({ mutationFnName: 'createTodo' })\n```\n\n`startOfflineExecutor` initializes asynchronously (probes storage, requests leadership, replays outbox). Creating transactions before initialization completes may miss the leader election result and use the wrong code path.\n\n### HIGH Missing collection in collections map\n\nWrong:\n\n```ts\nconst executor = startOfflineExecutor({\n  collections: {},\n  mutationFns: { createTodo: ... },\n})\n```\n\nCorrect:\n\n```ts\nconst executor = startOfflineExecutor({\n  collections: { todos: todoCollection },\n  mutationFns: { createTodo: ... },\n})\n```\n\nThe `collections` map is used to restore optimistic state from the outbox on page reload. Without it, previously pending mutations won't show their optimistic state while being replayed.\n\n### MEDIUM Not handling NonRetriableError for permanent failures\n\nWrong:\n\n```ts\nmutationFns: {\n  createTodo: async ({ transaction }) => {\n    const res = await fetch('\u002Fapi\u002Ftodos', { ... })\n    if (!res.ok) throw new Error('Failed')\n  },\n}\n```\n\nCorrect:\n\n```ts\nmutationFns: {\n  createTodo: async ({ transaction }) => {\n    const res = await fetch('\u002Fapi\u002Ftodos', { ... })\n    if (res.status >= 400 && res.status \u003C 500) {\n      throw new NonRetriableError(`Client error: ${res.status}`)\n    }\n    if (!res.ok) throw new Error('Server error')\n  },\n}\n```\n\nWithout distinguishing retriable from permanent errors, 4xx responses (validation, auth, not found) will retry forever until max retries, wasting resources and filling logs.\n\nSee also: db-core\u002Fmutations-optimistic\u002FSKILL.md — for the underlying mutation primitives.\n\nSee also: db-core\u002Fcollection-setup\u002FSKILL.md — for setting up collections used with offline transactions.\n",{"data":34,"body":45},{"name":4,"description":6,"type":35,"library":36,"library_version":37,"requires":38,"sources":41},"composition","db","0.6.0",[39,40],"db-core","db-core\u002Fmutations-optimistic",[42,43,44],"TanStack\u002Fdb:packages\u002Foffline-transactions\u002Fsrc\u002FOfflineExecutor.ts","TanStack\u002Fdb:packages\u002Foffline-transactions\u002Fsrc\u002Ftypes.ts","TanStack\u002Fdb:packages\u002Foffline-transactions\u002Fsrc\u002Findex.ts",{"type":46,"children":47},"root",[48,56,63,70,767,773,780,1031,1044,1050,1330,1342,1348,1354,1512,1518,1559,1565,1584,1790,1796,1801,1995,2000,2006,2395,2401,2700,2706,2712,3130,3142,3148,3161,3431,3437,3552,3558,3750,3756,3762,3767,3905,3910,4091,4096,4102,4106,4216,4220,4352,4363,4369,4373,4466,4470,4577,4590,4596,4600,4796,4800,5125,5130,5135,5140],{"type":49,"tag":50,"props":51,"children":52},"element","p",{},[53],{"type":54,"value":55},"text","This skill builds on db-core and mutations-optimistic. Read those first.",{"type":49,"tag":57,"props":58,"children":60},"h1",{"id":59},"tanstack-db-offline-transactions",[61],{"type":54,"value":62},"TanStack DB — Offline Transactions",{"type":49,"tag":64,"props":65,"children":67},"h2",{"id":66},"setup",[68],{"type":54,"value":69},"Setup",{"type":49,"tag":71,"props":72,"children":77},"pre",{"className":73,"code":74,"language":75,"meta":76,"style":76},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import {\n  startOfflineExecutor,\n  IndexedDBAdapter,\n} from '@tanstack\u002Foffline-transactions'\nimport { todoCollection } from '.\u002Fcollections'\n\nconst executor = startOfflineExecutor({\n  collections: { todos: todoCollection },\n  mutationFns: {\n    createTodo: async ({ transaction, idempotencyKey }) => {\n      const mutation = transaction.mutations[0]\n      await api.todos.create({\n        ...mutation.modified,\n        idempotencyKey,\n      })\n    },\n    updateTodo: async ({ transaction, idempotencyKey }) => {\n      const mutation = transaction.mutations[0]\n      await api.todos.update(mutation.key, {\n        ...mutation.changes,\n        idempotencyKey,\n      })\n    },\n  },\n})\n\n\u002F\u002F Wait for initialization (storage probe, leader election, outbox replay)\nawait executor.waitForInit()\n","ts","",[78],{"type":49,"tag":79,"props":80,"children":81},"code",{"__ignoreMap":76},[82,100,115,128,158,198,208,244,282,299,352,401,441,468,481,495,504,549,589,643,668,680,692,700,709,721,729,739],{"type":49,"tag":83,"props":84,"children":87},"span",{"class":85,"line":86},"line",1,[88,94],{"type":49,"tag":83,"props":89,"children":91},{"style":90},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[92],{"type":54,"value":93},"import",{"type":49,"tag":83,"props":95,"children":97},{"style":96},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[98],{"type":54,"value":99}," {\n",{"type":49,"tag":83,"props":101,"children":103},{"class":85,"line":102},2,[104,110],{"type":49,"tag":83,"props":105,"children":107},{"style":106},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[108],{"type":54,"value":109},"  startOfflineExecutor",{"type":49,"tag":83,"props":111,"children":112},{"style":96},[113],{"type":54,"value":114},",\n",{"type":49,"tag":83,"props":116,"children":118},{"class":85,"line":117},3,[119,124],{"type":49,"tag":83,"props":120,"children":121},{"style":106},[122],{"type":54,"value":123},"  IndexedDBAdapter",{"type":49,"tag":83,"props":125,"children":126},{"style":96},[127],{"type":54,"value":114},{"type":49,"tag":83,"props":129,"children":131},{"class":85,"line":130},4,[132,137,142,147,153],{"type":49,"tag":83,"props":133,"children":134},{"style":96},[135],{"type":54,"value":136},"}",{"type":49,"tag":83,"props":138,"children":139},{"style":90},[140],{"type":54,"value":141}," from",{"type":49,"tag":83,"props":143,"children":144},{"style":96},[145],{"type":54,"value":146}," '",{"type":49,"tag":83,"props":148,"children":150},{"style":149},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[151],{"type":54,"value":152},"@tanstack\u002Foffline-transactions",{"type":49,"tag":83,"props":154,"children":155},{"style":96},[156],{"type":54,"value":157},"'\n",{"type":49,"tag":83,"props":159,"children":161},{"class":85,"line":160},5,[162,166,171,176,181,185,189,194],{"type":49,"tag":83,"props":163,"children":164},{"style":90},[165],{"type":54,"value":93},{"type":49,"tag":83,"props":167,"children":168},{"style":96},[169],{"type":54,"value":170}," {",{"type":49,"tag":83,"props":172,"children":173},{"style":106},[174],{"type":54,"value":175}," todoCollection",{"type":49,"tag":83,"props":177,"children":178},{"style":96},[179],{"type":54,"value":180}," }",{"type":49,"tag":83,"props":182,"children":183},{"style":90},[184],{"type":54,"value":141},{"type":49,"tag":83,"props":186,"children":187},{"style":96},[188],{"type":54,"value":146},{"type":49,"tag":83,"props":190,"children":191},{"style":149},[192],{"type":54,"value":193},".\u002Fcollections",{"type":49,"tag":83,"props":195,"children":196},{"style":96},[197],{"type":54,"value":157},{"type":49,"tag":83,"props":199,"children":201},{"class":85,"line":200},6,[202],{"type":49,"tag":83,"props":203,"children":205},{"emptyLinePlaceholder":204},true,[206],{"type":54,"value":207},"\n",{"type":49,"tag":83,"props":209,"children":211},{"class":85,"line":210},7,[212,218,223,228,234,239],{"type":49,"tag":83,"props":213,"children":215},{"style":214},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[216],{"type":54,"value":217},"const",{"type":49,"tag":83,"props":219,"children":220},{"style":106},[221],{"type":54,"value":222}," executor ",{"type":49,"tag":83,"props":224,"children":225},{"style":96},[226],{"type":54,"value":227},"=",{"type":49,"tag":83,"props":229,"children":231},{"style":230},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[232],{"type":54,"value":233}," startOfflineExecutor",{"type":49,"tag":83,"props":235,"children":236},{"style":106},[237],{"type":54,"value":238},"(",{"type":49,"tag":83,"props":240,"children":241},{"style":96},[242],{"type":54,"value":243},"{\n",{"type":49,"tag":83,"props":245,"children":247},{"class":85,"line":246},8,[248,254,259,263,268,272,277],{"type":49,"tag":83,"props":249,"children":251},{"style":250},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[252],{"type":54,"value":253},"  collections",{"type":49,"tag":83,"props":255,"children":256},{"style":96},[257],{"type":54,"value":258},":",{"type":49,"tag":83,"props":260,"children":261},{"style":96},[262],{"type":54,"value":170},{"type":49,"tag":83,"props":264,"children":265},{"style":250},[266],{"type":54,"value":267}," todos",{"type":49,"tag":83,"props":269,"children":270},{"style":96},[271],{"type":54,"value":258},{"type":49,"tag":83,"props":273,"children":274},{"style":106},[275],{"type":54,"value":276}," todoCollection ",{"type":49,"tag":83,"props":278,"children":279},{"style":96},[280],{"type":54,"value":281},"},\n",{"type":49,"tag":83,"props":283,"children":285},{"class":85,"line":284},9,[286,291,295],{"type":49,"tag":83,"props":287,"children":288},{"style":250},[289],{"type":54,"value":290},"  mutationFns",{"type":49,"tag":83,"props":292,"children":293},{"style":96},[294],{"type":54,"value":258},{"type":49,"tag":83,"props":296,"children":297},{"style":96},[298],{"type":54,"value":99},{"type":49,"tag":83,"props":300,"children":302},{"class":85,"line":301},10,[303,308,312,317,322,328,333,338,343,348],{"type":49,"tag":83,"props":304,"children":305},{"style":230},[306],{"type":54,"value":307},"    createTodo",{"type":49,"tag":83,"props":309,"children":310},{"style":96},[311],{"type":54,"value":258},{"type":49,"tag":83,"props":313,"children":314},{"style":214},[315],{"type":54,"value":316}," async",{"type":49,"tag":83,"props":318,"children":319},{"style":96},[320],{"type":54,"value":321}," ({",{"type":49,"tag":83,"props":323,"children":325},{"style":324},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[326],{"type":54,"value":327}," transaction",{"type":49,"tag":83,"props":329,"children":330},{"style":96},[331],{"type":54,"value":332},",",{"type":49,"tag":83,"props":334,"children":335},{"style":324},[336],{"type":54,"value":337}," idempotencyKey",{"type":49,"tag":83,"props":339,"children":340},{"style":96},[341],{"type":54,"value":342}," })",{"type":49,"tag":83,"props":344,"children":345},{"style":214},[346],{"type":54,"value":347}," =>",{"type":49,"tag":83,"props":349,"children":350},{"style":96},[351],{"type":54,"value":99},{"type":49,"tag":83,"props":353,"children":355},{"class":85,"line":354},11,[356,361,366,371,375,380,385,390,396],{"type":49,"tag":83,"props":357,"children":358},{"style":214},[359],{"type":54,"value":360},"      const",{"type":49,"tag":83,"props":362,"children":363},{"style":106},[364],{"type":54,"value":365}," mutation",{"type":49,"tag":83,"props":367,"children":368},{"style":96},[369],{"type":54,"value":370}," =",{"type":49,"tag":83,"props":372,"children":373},{"style":106},[374],{"type":54,"value":327},{"type":49,"tag":83,"props":376,"children":377},{"style":96},[378],{"type":54,"value":379},".",{"type":49,"tag":83,"props":381,"children":382},{"style":106},[383],{"type":54,"value":384},"mutations",{"type":49,"tag":83,"props":386,"children":387},{"style":250},[388],{"type":54,"value":389},"[",{"type":49,"tag":83,"props":391,"children":393},{"style":392},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[394],{"type":54,"value":395},"0",{"type":49,"tag":83,"props":397,"children":398},{"style":250},[399],{"type":54,"value":400},"]\n",{"type":49,"tag":83,"props":402,"children":404},{"class":85,"line":403},12,[405,410,415,419,424,428,433,437],{"type":49,"tag":83,"props":406,"children":407},{"style":90},[408],{"type":54,"value":409},"      await",{"type":49,"tag":83,"props":411,"children":412},{"style":106},[413],{"type":54,"value":414}," api",{"type":49,"tag":83,"props":416,"children":417},{"style":96},[418],{"type":54,"value":379},{"type":49,"tag":83,"props":420,"children":421},{"style":106},[422],{"type":54,"value":423},"todos",{"type":49,"tag":83,"props":425,"children":426},{"style":96},[427],{"type":54,"value":379},{"type":49,"tag":83,"props":429,"children":430},{"style":230},[431],{"type":54,"value":432},"create",{"type":49,"tag":83,"props":434,"children":435},{"style":250},[436],{"type":54,"value":238},{"type":49,"tag":83,"props":438,"children":439},{"style":96},[440],{"type":54,"value":243},{"type":49,"tag":83,"props":442,"children":444},{"class":85,"line":443},13,[445,450,455,459,464],{"type":49,"tag":83,"props":446,"children":447},{"style":96},[448],{"type":54,"value":449},"        ...",{"type":49,"tag":83,"props":451,"children":452},{"style":106},[453],{"type":54,"value":454},"mutation",{"type":49,"tag":83,"props":456,"children":457},{"style":96},[458],{"type":54,"value":379},{"type":49,"tag":83,"props":460,"children":461},{"style":106},[462],{"type":54,"value":463},"modified",{"type":49,"tag":83,"props":465,"children":466},{"style":96},[467],{"type":54,"value":114},{"type":49,"tag":83,"props":469,"children":471},{"class":85,"line":470},14,[472,477],{"type":49,"tag":83,"props":473,"children":474},{"style":106},[475],{"type":54,"value":476},"        idempotencyKey",{"type":49,"tag":83,"props":478,"children":479},{"style":96},[480],{"type":54,"value":114},{"type":49,"tag":83,"props":482,"children":484},{"class":85,"line":483},15,[485,490],{"type":49,"tag":83,"props":486,"children":487},{"style":96},[488],{"type":54,"value":489},"      }",{"type":49,"tag":83,"props":491,"children":492},{"style":250},[493],{"type":54,"value":494},")\n",{"type":49,"tag":83,"props":496,"children":498},{"class":85,"line":497},16,[499],{"type":49,"tag":83,"props":500,"children":501},{"style":96},[502],{"type":54,"value":503},"    },\n",{"type":49,"tag":83,"props":505,"children":507},{"class":85,"line":506},17,[508,513,517,521,525,529,533,537,541,545],{"type":49,"tag":83,"props":509,"children":510},{"style":230},[511],{"type":54,"value":512},"    updateTodo",{"type":49,"tag":83,"props":514,"children":515},{"style":96},[516],{"type":54,"value":258},{"type":49,"tag":83,"props":518,"children":519},{"style":214},[520],{"type":54,"value":316},{"type":49,"tag":83,"props":522,"children":523},{"style":96},[524],{"type":54,"value":321},{"type":49,"tag":83,"props":526,"children":527},{"style":324},[528],{"type":54,"value":327},{"type":49,"tag":83,"props":530,"children":531},{"style":96},[532],{"type":54,"value":332},{"type":49,"tag":83,"props":534,"children":535},{"style":324},[536],{"type":54,"value":337},{"type":49,"tag":83,"props":538,"children":539},{"style":96},[540],{"type":54,"value":342},{"type":49,"tag":83,"props":542,"children":543},{"style":214},[544],{"type":54,"value":347},{"type":49,"tag":83,"props":546,"children":547},{"style":96},[548],{"type":54,"value":99},{"type":49,"tag":83,"props":550,"children":552},{"class":85,"line":551},18,[553,557,561,565,569,573,577,581,585],{"type":49,"tag":83,"props":554,"children":555},{"style":214},[556],{"type":54,"value":360},{"type":49,"tag":83,"props":558,"children":559},{"style":106},[560],{"type":54,"value":365},{"type":49,"tag":83,"props":562,"children":563},{"style":96},[564],{"type":54,"value":370},{"type":49,"tag":83,"props":566,"children":567},{"style":106},[568],{"type":54,"value":327},{"type":49,"tag":83,"props":570,"children":571},{"style":96},[572],{"type":54,"value":379},{"type":49,"tag":83,"props":574,"children":575},{"style":106},[576],{"type":54,"value":384},{"type":49,"tag":83,"props":578,"children":579},{"style":250},[580],{"type":54,"value":389},{"type":49,"tag":83,"props":582,"children":583},{"style":392},[584],{"type":54,"value":395},{"type":49,"tag":83,"props":586,"children":587},{"style":250},[588],{"type":54,"value":400},{"type":49,"tag":83,"props":590,"children":592},{"class":85,"line":591},19,[593,597,601,605,609,613,618,622,626,630,635,639],{"type":49,"tag":83,"props":594,"children":595},{"style":90},[596],{"type":54,"value":409},{"type":49,"tag":83,"props":598,"children":599},{"style":106},[600],{"type":54,"value":414},{"type":49,"tag":83,"props":602,"children":603},{"style":96},[604],{"type":54,"value":379},{"type":49,"tag":83,"props":606,"children":607},{"style":106},[608],{"type":54,"value":423},{"type":49,"tag":83,"props":610,"children":611},{"style":96},[612],{"type":54,"value":379},{"type":49,"tag":83,"props":614,"children":615},{"style":230},[616],{"type":54,"value":617},"update",{"type":49,"tag":83,"props":619,"children":620},{"style":250},[621],{"type":54,"value":238},{"type":49,"tag":83,"props":623,"children":624},{"style":106},[625],{"type":54,"value":454},{"type":49,"tag":83,"props":627,"children":628},{"style":96},[629],{"type":54,"value":379},{"type":49,"tag":83,"props":631,"children":632},{"style":106},[633],{"type":54,"value":634},"key",{"type":49,"tag":83,"props":636,"children":637},{"style":96},[638],{"type":54,"value":332},{"type":49,"tag":83,"props":640,"children":641},{"style":96},[642],{"type":54,"value":99},{"type":49,"tag":83,"props":644,"children":646},{"class":85,"line":645},20,[647,651,655,659,664],{"type":49,"tag":83,"props":648,"children":649},{"style":96},[650],{"type":54,"value":449},{"type":49,"tag":83,"props":652,"children":653},{"style":106},[654],{"type":54,"value":454},{"type":49,"tag":83,"props":656,"children":657},{"style":96},[658],{"type":54,"value":379},{"type":49,"tag":83,"props":660,"children":661},{"style":106},[662],{"type":54,"value":663},"changes",{"type":49,"tag":83,"props":665,"children":666},{"style":96},[667],{"type":54,"value":114},{"type":49,"tag":83,"props":669,"children":671},{"class":85,"line":670},21,[672,676],{"type":49,"tag":83,"props":673,"children":674},{"style":106},[675],{"type":54,"value":476},{"type":49,"tag":83,"props":677,"children":678},{"style":96},[679],{"type":54,"value":114},{"type":49,"tag":83,"props":681,"children":683},{"class":85,"line":682},22,[684,688],{"type":49,"tag":83,"props":685,"children":686},{"style":96},[687],{"type":54,"value":489},{"type":49,"tag":83,"props":689,"children":690},{"style":250},[691],{"type":54,"value":494},{"type":49,"tag":83,"props":693,"children":695},{"class":85,"line":694},23,[696],{"type":49,"tag":83,"props":697,"children":698},{"style":96},[699],{"type":54,"value":503},{"type":49,"tag":83,"props":701,"children":703},{"class":85,"line":702},24,[704],{"type":49,"tag":83,"props":705,"children":706},{"style":96},[707],{"type":54,"value":708},"  },\n",{"type":49,"tag":83,"props":710,"children":712},{"class":85,"line":711},25,[713,717],{"type":49,"tag":83,"props":714,"children":715},{"style":96},[716],{"type":54,"value":136},{"type":49,"tag":83,"props":718,"children":719},{"style":106},[720],{"type":54,"value":494},{"type":49,"tag":83,"props":722,"children":724},{"class":85,"line":723},26,[725],{"type":49,"tag":83,"props":726,"children":727},{"emptyLinePlaceholder":204},[728],{"type":54,"value":207},{"type":49,"tag":83,"props":730,"children":732},{"class":85,"line":731},27,[733],{"type":49,"tag":83,"props":734,"children":736},{"style":735},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[737],{"type":54,"value":738},"\u002F\u002F Wait for initialization (storage probe, leader election, outbox replay)\n",{"type":49,"tag":83,"props":740,"children":742},{"class":85,"line":741},28,[743,748,753,757,762],{"type":49,"tag":83,"props":744,"children":745},{"style":90},[746],{"type":54,"value":747},"await",{"type":49,"tag":83,"props":749,"children":750},{"style":106},[751],{"type":54,"value":752}," executor",{"type":49,"tag":83,"props":754,"children":755},{"style":96},[756],{"type":54,"value":379},{"type":49,"tag":83,"props":758,"children":759},{"style":230},[760],{"type":54,"value":761},"waitForInit",{"type":49,"tag":83,"props":763,"children":764},{"style":106},[765],{"type":54,"value":766},"()\n",{"type":49,"tag":64,"props":768,"children":770},{"id":769},"core-api",[771],{"type":54,"value":772},"Core API",{"type":49,"tag":774,"props":775,"children":777},"h3",{"id":776},"createofflinetransaction",[778],{"type":54,"value":779},"createOfflineTransaction",{"type":49,"tag":71,"props":781,"children":783},{"className":73,"code":782,"language":75,"meta":76,"style":76},"const tx = executor.createOfflineTransaction({\n  mutationFnName: 'createTodo',\n})\n\n\u002F\u002F Mutations run inside tx.mutate() — uses ambient transaction context\ntx.mutate(() => {\n  todoCollection.insert({ id: crypto.randomUUID(), text: 'New todo' })\n})\ntx.commit()\n",[784],{"type":49,"tag":79,"props":785,"children":786},{"__ignoreMap":76},[787,823,853,864,871,879,913,1000,1011],{"type":49,"tag":83,"props":788,"children":789},{"class":85,"line":86},[790,794,799,803,807,811,815,819],{"type":49,"tag":83,"props":791,"children":792},{"style":214},[793],{"type":54,"value":217},{"type":49,"tag":83,"props":795,"children":796},{"style":106},[797],{"type":54,"value":798}," tx ",{"type":49,"tag":83,"props":800,"children":801},{"style":96},[802],{"type":54,"value":227},{"type":49,"tag":83,"props":804,"children":805},{"style":106},[806],{"type":54,"value":752},{"type":49,"tag":83,"props":808,"children":809},{"style":96},[810],{"type":54,"value":379},{"type":49,"tag":83,"props":812,"children":813},{"style":230},[814],{"type":54,"value":779},{"type":49,"tag":83,"props":816,"children":817},{"style":106},[818],{"type":54,"value":238},{"type":49,"tag":83,"props":820,"children":821},{"style":96},[822],{"type":54,"value":243},{"type":49,"tag":83,"props":824,"children":825},{"class":85,"line":102},[826,831,835,839,844,849],{"type":49,"tag":83,"props":827,"children":828},{"style":250},[829],{"type":54,"value":830},"  mutationFnName",{"type":49,"tag":83,"props":832,"children":833},{"style":96},[834],{"type":54,"value":258},{"type":49,"tag":83,"props":836,"children":837},{"style":96},[838],{"type":54,"value":146},{"type":49,"tag":83,"props":840,"children":841},{"style":149},[842],{"type":54,"value":843},"createTodo",{"type":49,"tag":83,"props":845,"children":846},{"style":96},[847],{"type":54,"value":848},"'",{"type":49,"tag":83,"props":850,"children":851},{"style":96},[852],{"type":54,"value":114},{"type":49,"tag":83,"props":854,"children":855},{"class":85,"line":117},[856,860],{"type":49,"tag":83,"props":857,"children":858},{"style":96},[859],{"type":54,"value":136},{"type":49,"tag":83,"props":861,"children":862},{"style":106},[863],{"type":54,"value":494},{"type":49,"tag":83,"props":865,"children":866},{"class":85,"line":130},[867],{"type":49,"tag":83,"props":868,"children":869},{"emptyLinePlaceholder":204},[870],{"type":54,"value":207},{"type":49,"tag":83,"props":872,"children":873},{"class":85,"line":160},[874],{"type":49,"tag":83,"props":875,"children":876},{"style":735},[877],{"type":54,"value":878},"\u002F\u002F Mutations run inside tx.mutate() — uses ambient transaction context\n",{"type":49,"tag":83,"props":880,"children":881},{"class":85,"line":200},[882,887,891,896,900,905,909],{"type":49,"tag":83,"props":883,"children":884},{"style":106},[885],{"type":54,"value":886},"tx",{"type":49,"tag":83,"props":888,"children":889},{"style":96},[890],{"type":54,"value":379},{"type":49,"tag":83,"props":892,"children":893},{"style":230},[894],{"type":54,"value":895},"mutate",{"type":49,"tag":83,"props":897,"children":898},{"style":106},[899],{"type":54,"value":238},{"type":49,"tag":83,"props":901,"children":902},{"style":96},[903],{"type":54,"value":904},"()",{"type":49,"tag":83,"props":906,"children":907},{"style":214},[908],{"type":54,"value":347},{"type":49,"tag":83,"props":910,"children":911},{"style":96},[912],{"type":54,"value":99},{"type":49,"tag":83,"props":914,"children":915},{"class":85,"line":210},[916,921,925,930,934,939,944,948,953,957,962,966,970,975,979,983,988,992,996],{"type":49,"tag":83,"props":917,"children":918},{"style":106},[919],{"type":54,"value":920},"  todoCollection",{"type":49,"tag":83,"props":922,"children":923},{"style":96},[924],{"type":54,"value":379},{"type":49,"tag":83,"props":926,"children":927},{"style":230},[928],{"type":54,"value":929},"insert",{"type":49,"tag":83,"props":931,"children":932},{"style":250},[933],{"type":54,"value":238},{"type":49,"tag":83,"props":935,"children":936},{"style":96},[937],{"type":54,"value":938},"{",{"type":49,"tag":83,"props":940,"children":941},{"style":250},[942],{"type":54,"value":943}," id",{"type":49,"tag":83,"props":945,"children":946},{"style":96},[947],{"type":54,"value":258},{"type":49,"tag":83,"props":949,"children":950},{"style":106},[951],{"type":54,"value":952}," crypto",{"type":49,"tag":83,"props":954,"children":955},{"style":96},[956],{"type":54,"value":379},{"type":49,"tag":83,"props":958,"children":959},{"style":230},[960],{"type":54,"value":961},"randomUUID",{"type":49,"tag":83,"props":963,"children":964},{"style":250},[965],{"type":54,"value":904},{"type":49,"tag":83,"props":967,"children":968},{"style":96},[969],{"type":54,"value":332},{"type":49,"tag":83,"props":971,"children":972},{"style":250},[973],{"type":54,"value":974}," text",{"type":49,"tag":83,"props":976,"children":977},{"style":96},[978],{"type":54,"value":258},{"type":49,"tag":83,"props":980,"children":981},{"style":96},[982],{"type":54,"value":146},{"type":49,"tag":83,"props":984,"children":985},{"style":149},[986],{"type":54,"value":987},"New todo",{"type":49,"tag":83,"props":989,"children":990},{"style":96},[991],{"type":54,"value":848},{"type":49,"tag":83,"props":993,"children":994},{"style":96},[995],{"type":54,"value":180},{"type":49,"tag":83,"props":997,"children":998},{"style":250},[999],{"type":54,"value":494},{"type":49,"tag":83,"props":1001,"children":1002},{"class":85,"line":246},[1003,1007],{"type":49,"tag":83,"props":1004,"children":1005},{"style":96},[1006],{"type":54,"value":136},{"type":49,"tag":83,"props":1008,"children":1009},{"style":106},[1010],{"type":54,"value":494},{"type":49,"tag":83,"props":1012,"children":1013},{"class":85,"line":284},[1014,1018,1022,1027],{"type":49,"tag":83,"props":1015,"children":1016},{"style":106},[1017],{"type":54,"value":886},{"type":49,"tag":83,"props":1019,"children":1020},{"style":96},[1021],{"type":54,"value":379},{"type":49,"tag":83,"props":1023,"children":1024},{"style":230},[1025],{"type":54,"value":1026},"commit",{"type":49,"tag":83,"props":1028,"children":1029},{"style":106},[1030],{"type":54,"value":766},{"type":49,"tag":50,"props":1032,"children":1033},{},[1034,1036,1042],{"type":54,"value":1035},"If the executor is not the leader tab, falls back to ",{"type":49,"tag":79,"props":1037,"children":1039},{"className":1038},[],[1040],{"type":54,"value":1041},"createTransaction",{"type":54,"value":1043}," directly (no offline persistence).",{"type":49,"tag":774,"props":1045,"children":1047},{"id":1046},"createofflineaction",[1048],{"type":54,"value":1049},"createOfflineAction",{"type":49,"tag":71,"props":1051,"children":1053},{"className":73,"code":1052,"language":75,"meta":76,"style":76},"const addTodo = executor.createOfflineAction({\n  mutationFnName: 'createTodo',\n  onMutate: (variables) => {\n    todoCollection.insert({\n      id: crypto.randomUUID(),\n      text: variables.text,\n    })\n  },\n})\n\n\u002F\u002F Call it\naddTodo({ text: 'Buy milk' })\n",[1054],{"type":49,"tag":79,"props":1055,"children":1056},{"__ignoreMap":76},[1057,1093,1120,1155,1179,1211,1240,1252,1259,1270,1277,1285],{"type":49,"tag":83,"props":1058,"children":1059},{"class":85,"line":86},[1060,1064,1069,1073,1077,1081,1085,1089],{"type":49,"tag":83,"props":1061,"children":1062},{"style":214},[1063],{"type":54,"value":217},{"type":49,"tag":83,"props":1065,"children":1066},{"style":106},[1067],{"type":54,"value":1068}," addTodo ",{"type":49,"tag":83,"props":1070,"children":1071},{"style":96},[1072],{"type":54,"value":227},{"type":49,"tag":83,"props":1074,"children":1075},{"style":106},[1076],{"type":54,"value":752},{"type":49,"tag":83,"props":1078,"children":1079},{"style":96},[1080],{"type":54,"value":379},{"type":49,"tag":83,"props":1082,"children":1083},{"style":230},[1084],{"type":54,"value":1049},{"type":49,"tag":83,"props":1086,"children":1087},{"style":106},[1088],{"type":54,"value":238},{"type":49,"tag":83,"props":1090,"children":1091},{"style":96},[1092],{"type":54,"value":243},{"type":49,"tag":83,"props":1094,"children":1095},{"class":85,"line":102},[1096,1100,1104,1108,1112,1116],{"type":49,"tag":83,"props":1097,"children":1098},{"style":250},[1099],{"type":54,"value":830},{"type":49,"tag":83,"props":1101,"children":1102},{"style":96},[1103],{"type":54,"value":258},{"type":49,"tag":83,"props":1105,"children":1106},{"style":96},[1107],{"type":54,"value":146},{"type":49,"tag":83,"props":1109,"children":1110},{"style":149},[1111],{"type":54,"value":843},{"type":49,"tag":83,"props":1113,"children":1114},{"style":96},[1115],{"type":54,"value":848},{"type":49,"tag":83,"props":1117,"children":1118},{"style":96},[1119],{"type":54,"value":114},{"type":49,"tag":83,"props":1121,"children":1122},{"class":85,"line":117},[1123,1128,1132,1137,1142,1147,1151],{"type":49,"tag":83,"props":1124,"children":1125},{"style":230},[1126],{"type":54,"value":1127},"  onMutate",{"type":49,"tag":83,"props":1129,"children":1130},{"style":96},[1131],{"type":54,"value":258},{"type":49,"tag":83,"props":1133,"children":1134},{"style":96},[1135],{"type":54,"value":1136}," (",{"type":49,"tag":83,"props":1138,"children":1139},{"style":324},[1140],{"type":54,"value":1141},"variables",{"type":49,"tag":83,"props":1143,"children":1144},{"style":96},[1145],{"type":54,"value":1146},")",{"type":49,"tag":83,"props":1148,"children":1149},{"style":214},[1150],{"type":54,"value":347},{"type":49,"tag":83,"props":1152,"children":1153},{"style":96},[1154],{"type":54,"value":99},{"type":49,"tag":83,"props":1156,"children":1157},{"class":85,"line":130},[1158,1163,1167,1171,1175],{"type":49,"tag":83,"props":1159,"children":1160},{"style":106},[1161],{"type":54,"value":1162},"    todoCollection",{"type":49,"tag":83,"props":1164,"children":1165},{"style":96},[1166],{"type":54,"value":379},{"type":49,"tag":83,"props":1168,"children":1169},{"style":230},[1170],{"type":54,"value":929},{"type":49,"tag":83,"props":1172,"children":1173},{"style":250},[1174],{"type":54,"value":238},{"type":49,"tag":83,"props":1176,"children":1177},{"style":96},[1178],{"type":54,"value":243},{"type":49,"tag":83,"props":1180,"children":1181},{"class":85,"line":160},[1182,1187,1191,1195,1199,1203,1207],{"type":49,"tag":83,"props":1183,"children":1184},{"style":250},[1185],{"type":54,"value":1186},"      id",{"type":49,"tag":83,"props":1188,"children":1189},{"style":96},[1190],{"type":54,"value":258},{"type":49,"tag":83,"props":1192,"children":1193},{"style":106},[1194],{"type":54,"value":952},{"type":49,"tag":83,"props":1196,"children":1197},{"style":96},[1198],{"type":54,"value":379},{"type":49,"tag":83,"props":1200,"children":1201},{"style":230},[1202],{"type":54,"value":961},{"type":49,"tag":83,"props":1204,"children":1205},{"style":250},[1206],{"type":54,"value":904},{"type":49,"tag":83,"props":1208,"children":1209},{"style":96},[1210],{"type":54,"value":114},{"type":49,"tag":83,"props":1212,"children":1213},{"class":85,"line":200},[1214,1219,1223,1228,1232,1236],{"type":49,"tag":83,"props":1215,"children":1216},{"style":250},[1217],{"type":54,"value":1218},"      text",{"type":49,"tag":83,"props":1220,"children":1221},{"style":96},[1222],{"type":54,"value":258},{"type":49,"tag":83,"props":1224,"children":1225},{"style":106},[1226],{"type":54,"value":1227}," variables",{"type":49,"tag":83,"props":1229,"children":1230},{"style":96},[1231],{"type":54,"value":379},{"type":49,"tag":83,"props":1233,"children":1234},{"style":106},[1235],{"type":54,"value":54},{"type":49,"tag":83,"props":1237,"children":1238},{"style":96},[1239],{"type":54,"value":114},{"type":49,"tag":83,"props":1241,"children":1242},{"class":85,"line":210},[1243,1248],{"type":49,"tag":83,"props":1244,"children":1245},{"style":96},[1246],{"type":54,"value":1247},"    }",{"type":49,"tag":83,"props":1249,"children":1250},{"style":250},[1251],{"type":54,"value":494},{"type":49,"tag":83,"props":1253,"children":1254},{"class":85,"line":246},[1255],{"type":49,"tag":83,"props":1256,"children":1257},{"style":96},[1258],{"type":54,"value":708},{"type":49,"tag":83,"props":1260,"children":1261},{"class":85,"line":284},[1262,1266],{"type":49,"tag":83,"props":1263,"children":1264},{"style":96},[1265],{"type":54,"value":136},{"type":49,"tag":83,"props":1267,"children":1268},{"style":106},[1269],{"type":54,"value":494},{"type":49,"tag":83,"props":1271,"children":1272},{"class":85,"line":301},[1273],{"type":49,"tag":83,"props":1274,"children":1275},{"emptyLinePlaceholder":204},[1276],{"type":54,"value":207},{"type":49,"tag":83,"props":1278,"children":1279},{"class":85,"line":354},[1280],{"type":49,"tag":83,"props":1281,"children":1282},{"style":735},[1283],{"type":54,"value":1284},"\u002F\u002F Call it\n",{"type":49,"tag":83,"props":1286,"children":1287},{"class":85,"line":403},[1288,1293,1297,1301,1305,1309,1313,1318,1322,1326],{"type":49,"tag":83,"props":1289,"children":1290},{"style":230},[1291],{"type":54,"value":1292},"addTodo",{"type":49,"tag":83,"props":1294,"children":1295},{"style":106},[1296],{"type":54,"value":238},{"type":49,"tag":83,"props":1298,"children":1299},{"style":96},[1300],{"type":54,"value":938},{"type":49,"tag":83,"props":1302,"children":1303},{"style":250},[1304],{"type":54,"value":974},{"type":49,"tag":83,"props":1306,"children":1307},{"style":96},[1308],{"type":54,"value":258},{"type":49,"tag":83,"props":1310,"children":1311},{"style":96},[1312],{"type":54,"value":146},{"type":49,"tag":83,"props":1314,"children":1315},{"style":149},[1316],{"type":54,"value":1317},"Buy milk",{"type":49,"tag":83,"props":1319,"children":1320},{"style":96},[1321],{"type":54,"value":848},{"type":49,"tag":83,"props":1323,"children":1324},{"style":96},[1325],{"type":54,"value":180},{"type":49,"tag":83,"props":1327,"children":1328},{"style":106},[1329],{"type":54,"value":494},{"type":49,"tag":50,"props":1331,"children":1332},{},[1333,1334,1340],{"type":54,"value":1035},{"type":49,"tag":79,"props":1335,"children":1337},{"className":1336},[],[1338],{"type":54,"value":1339},"createOptimisticAction",{"type":54,"value":1341}," directly.",{"type":49,"tag":64,"props":1343,"children":1345},{"id":1344},"architecture",[1346],{"type":54,"value":1347},"Architecture",{"type":49,"tag":774,"props":1349,"children":1351},{"id":1350},"components",[1352],{"type":54,"value":1353},"Components",{"type":49,"tag":1355,"props":1356,"children":1357},"table",{},[1358,1382],{"type":49,"tag":1359,"props":1360,"children":1361},"thead",{},[1362],{"type":49,"tag":1363,"props":1364,"children":1365},"tr",{},[1366,1372,1377],{"type":49,"tag":1367,"props":1368,"children":1369},"th",{},[1370],{"type":54,"value":1371},"Component",{"type":49,"tag":1367,"props":1373,"children":1374},{},[1375],{"type":54,"value":1376},"Purpose",{"type":49,"tag":1367,"props":1378,"children":1379},{},[1380],{"type":54,"value":1381},"Default",{"type":49,"tag":1383,"props":1384,"children":1385},"tbody",{},[1386,1409,1430,1450,1470,1491],{"type":49,"tag":1363,"props":1387,"children":1388},{},[1389,1399,1404],{"type":49,"tag":1390,"props":1391,"children":1392},"td",{},[1393],{"type":49,"tag":1394,"props":1395,"children":1396},"strong",{},[1397],{"type":54,"value":1398},"Storage",{"type":49,"tag":1390,"props":1400,"children":1401},{},[1402],{"type":54,"value":1403},"Persist transactions to survive page reload",{"type":49,"tag":1390,"props":1405,"children":1406},{},[1407],{"type":54,"value":1408},"IndexedDB → localStorage fallback",{"type":49,"tag":1363,"props":1410,"children":1411},{},[1412,1420,1425],{"type":49,"tag":1390,"props":1413,"children":1414},{},[1415],{"type":49,"tag":1394,"props":1416,"children":1417},{},[1418],{"type":54,"value":1419},"OutboxManager",{"type":49,"tag":1390,"props":1421,"children":1422},{},[1423],{"type":54,"value":1424},"FIFO queue of pending transactions",{"type":49,"tag":1390,"props":1426,"children":1427},{},[1428],{"type":54,"value":1429},"Automatic",{"type":49,"tag":1363,"props":1431,"children":1432},{},[1433,1441,1446],{"type":49,"tag":1390,"props":1434,"children":1435},{},[1436],{"type":49,"tag":1394,"props":1437,"children":1438},{},[1439],{"type":54,"value":1440},"KeyScheduler",{"type":49,"tag":1390,"props":1442,"children":1443},{},[1444],{"type":54,"value":1445},"Serialize transactions touching same keys",{"type":49,"tag":1390,"props":1447,"children":1448},{},[1449],{"type":54,"value":1429},{"type":49,"tag":1363,"props":1451,"children":1452},{},[1453,1461,1466],{"type":49,"tag":1390,"props":1454,"children":1455},{},[1456],{"type":49,"tag":1394,"props":1457,"children":1458},{},[1459],{"type":54,"value":1460},"TransactionExecutor",{"type":49,"tag":1390,"props":1462,"children":1463},{},[1464],{"type":54,"value":1465},"Execute with retry + backoff",{"type":49,"tag":1390,"props":1467,"children":1468},{},[1469],{"type":54,"value":1429},{"type":49,"tag":1363,"props":1471,"children":1472},{},[1473,1481,1486],{"type":49,"tag":1390,"props":1474,"children":1475},{},[1476],{"type":49,"tag":1394,"props":1477,"children":1478},{},[1479],{"type":54,"value":1480},"LeaderElection",{"type":49,"tag":1390,"props":1482,"children":1483},{},[1484],{"type":54,"value":1485},"Only one tab processes the outbox",{"type":49,"tag":1390,"props":1487,"children":1488},{},[1489],{"type":54,"value":1490},"WebLocks → BroadcastChannel",{"type":49,"tag":1363,"props":1492,"children":1493},{},[1494,1502,1507],{"type":49,"tag":1390,"props":1495,"children":1496},{},[1497],{"type":49,"tag":1394,"props":1498,"children":1499},{},[1500],{"type":54,"value":1501},"OnlineDetector",{"type":49,"tag":1390,"props":1503,"children":1504},{},[1505],{"type":54,"value":1506},"Pause\u002Fresume on connectivity changes",{"type":49,"tag":1390,"props":1508,"children":1509},{},[1510],{"type":54,"value":1511},"navigator.onLine + events",{"type":49,"tag":774,"props":1513,"children":1515},{"id":1514},"transaction-lifecycle",[1516],{"type":54,"value":1517},"Transaction lifecycle",{"type":49,"tag":1519,"props":1520,"children":1521},"ol",{},[1522,1528,1533,1544,1549,1554],{"type":49,"tag":1523,"props":1524,"children":1525},"li",{},[1526],{"type":54,"value":1527},"Mutation applied optimistically to collection (instant UI update)",{"type":49,"tag":1523,"props":1529,"children":1530},{},[1531],{"type":54,"value":1532},"Transaction serialized and persisted to storage (outbox)",{"type":49,"tag":1523,"props":1534,"children":1535},{},[1536,1538],{"type":54,"value":1537},"Leader tab picks up transaction and executes ",{"type":49,"tag":79,"props":1539,"children":1541},{"className":1540},[],[1542],{"type":54,"value":1543},"mutationFn",{"type":49,"tag":1523,"props":1545,"children":1546},{},[1547],{"type":54,"value":1548},"On success: removed from outbox, optimistic state resolved",{"type":49,"tag":1523,"props":1550,"children":1551},{},[1552],{"type":54,"value":1553},"On failure: retried with exponential backoff",{"type":49,"tag":1523,"props":1555,"children":1556},{},[1557],{"type":54,"value":1558},"On page reload: outbox replayed, optimistic state restored",{"type":49,"tag":774,"props":1560,"children":1562},{"id":1561},"leader-election",[1563],{"type":54,"value":1564},"Leader election",{"type":49,"tag":50,"props":1566,"children":1567},{},[1568,1570,1575,1577,1582],{"type":54,"value":1569},"Only one tab processes the outbox to prevent duplicate execution. Non-leader tabs use regular ",{"type":49,"tag":79,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":54,"value":1041},{"type":54,"value":1576},"\u002F",{"type":49,"tag":79,"props":1578,"children":1580},{"className":1579},[],[1581],{"type":54,"value":1339},{"type":54,"value":1583}," (online-only, no persistence).",{"type":49,"tag":71,"props":1585,"children":1587},{"className":73,"code":1586,"language":75,"meta":76,"style":76},"const executor = startOfflineExecutor({\n  \u002F\u002F ...\n  onLeadershipChange: (isLeader) => {\n    console.log(\n      isLeader\n        ? 'This tab is processing offline transactions'\n        : 'Another tab is leader',\n    )\n  },\n})\n\nexecutor.isOfflineEnabled \u002F\u002F true only if leader AND storage available\n",[1588],{"type":49,"tag":79,"props":1589,"children":1590},{"__ignoreMap":76},[1591,1618,1626,1659,1681,1689,1710,1735,1743,1750,1761,1768],{"type":49,"tag":83,"props":1592,"children":1593},{"class":85,"line":86},[1594,1598,1602,1606,1610,1614],{"type":49,"tag":83,"props":1595,"children":1596},{"style":214},[1597],{"type":54,"value":217},{"type":49,"tag":83,"props":1599,"children":1600},{"style":106},[1601],{"type":54,"value":222},{"type":49,"tag":83,"props":1603,"children":1604},{"style":96},[1605],{"type":54,"value":227},{"type":49,"tag":83,"props":1607,"children":1608},{"style":230},[1609],{"type":54,"value":233},{"type":49,"tag":83,"props":1611,"children":1612},{"style":106},[1613],{"type":54,"value":238},{"type":49,"tag":83,"props":1615,"children":1616},{"style":96},[1617],{"type":54,"value":243},{"type":49,"tag":83,"props":1619,"children":1620},{"class":85,"line":102},[1621],{"type":49,"tag":83,"props":1622,"children":1623},{"style":735},[1624],{"type":54,"value":1625},"  \u002F\u002F ...\n",{"type":49,"tag":83,"props":1627,"children":1628},{"class":85,"line":117},[1629,1634,1638,1642,1647,1651,1655],{"type":49,"tag":83,"props":1630,"children":1631},{"style":230},[1632],{"type":54,"value":1633},"  onLeadershipChange",{"type":49,"tag":83,"props":1635,"children":1636},{"style":96},[1637],{"type":54,"value":258},{"type":49,"tag":83,"props":1639,"children":1640},{"style":96},[1641],{"type":54,"value":1136},{"type":49,"tag":83,"props":1643,"children":1644},{"style":324},[1645],{"type":54,"value":1646},"isLeader",{"type":49,"tag":83,"props":1648,"children":1649},{"style":96},[1650],{"type":54,"value":1146},{"type":49,"tag":83,"props":1652,"children":1653},{"style":214},[1654],{"type":54,"value":347},{"type":49,"tag":83,"props":1656,"children":1657},{"style":96},[1658],{"type":54,"value":99},{"type":49,"tag":83,"props":1660,"children":1661},{"class":85,"line":130},[1662,1667,1671,1676],{"type":49,"tag":83,"props":1663,"children":1664},{"style":106},[1665],{"type":54,"value":1666},"    console",{"type":49,"tag":83,"props":1668,"children":1669},{"style":96},[1670],{"type":54,"value":379},{"type":49,"tag":83,"props":1672,"children":1673},{"style":230},[1674],{"type":54,"value":1675},"log",{"type":49,"tag":83,"props":1677,"children":1678},{"style":250},[1679],{"type":54,"value":1680},"(\n",{"type":49,"tag":83,"props":1682,"children":1683},{"class":85,"line":160},[1684],{"type":49,"tag":83,"props":1685,"children":1686},{"style":106},[1687],{"type":54,"value":1688},"      isLeader\n",{"type":49,"tag":83,"props":1690,"children":1691},{"class":85,"line":200},[1692,1697,1701,1706],{"type":49,"tag":83,"props":1693,"children":1694},{"style":96},[1695],{"type":54,"value":1696},"        ?",{"type":49,"tag":83,"props":1698,"children":1699},{"style":96},[1700],{"type":54,"value":146},{"type":49,"tag":83,"props":1702,"children":1703},{"style":149},[1704],{"type":54,"value":1705},"This tab is processing offline transactions",{"type":49,"tag":83,"props":1707,"children":1708},{"style":96},[1709],{"type":54,"value":157},{"type":49,"tag":83,"props":1711,"children":1712},{"class":85,"line":210},[1713,1718,1722,1727,1731],{"type":49,"tag":83,"props":1714,"children":1715},{"style":96},[1716],{"type":54,"value":1717},"        :",{"type":49,"tag":83,"props":1719,"children":1720},{"style":96},[1721],{"type":54,"value":146},{"type":49,"tag":83,"props":1723,"children":1724},{"style":149},[1725],{"type":54,"value":1726},"Another tab is leader",{"type":49,"tag":83,"props":1728,"children":1729},{"style":96},[1730],{"type":54,"value":848},{"type":49,"tag":83,"props":1732,"children":1733},{"style":96},[1734],{"type":54,"value":114},{"type":49,"tag":83,"props":1736,"children":1737},{"class":85,"line":246},[1738],{"type":49,"tag":83,"props":1739,"children":1740},{"style":250},[1741],{"type":54,"value":1742},"    )\n",{"type":49,"tag":83,"props":1744,"children":1745},{"class":85,"line":284},[1746],{"type":49,"tag":83,"props":1747,"children":1748},{"style":96},[1749],{"type":54,"value":708},{"type":49,"tag":83,"props":1751,"children":1752},{"class":85,"line":301},[1753,1757],{"type":49,"tag":83,"props":1754,"children":1755},{"style":96},[1756],{"type":54,"value":136},{"type":49,"tag":83,"props":1758,"children":1759},{"style":106},[1760],{"type":54,"value":494},{"type":49,"tag":83,"props":1762,"children":1763},{"class":85,"line":354},[1764],{"type":49,"tag":83,"props":1765,"children":1766},{"emptyLinePlaceholder":204},[1767],{"type":54,"value":207},{"type":49,"tag":83,"props":1769,"children":1770},{"class":85,"line":403},[1771,1776,1780,1785],{"type":49,"tag":83,"props":1772,"children":1773},{"style":106},[1774],{"type":54,"value":1775},"executor",{"type":49,"tag":83,"props":1777,"children":1778},{"style":96},[1779],{"type":54,"value":379},{"type":49,"tag":83,"props":1781,"children":1782},{"style":106},[1783],{"type":54,"value":1784},"isOfflineEnabled ",{"type":49,"tag":83,"props":1786,"children":1787},{"style":735},[1788],{"type":54,"value":1789},"\u002F\u002F true only if leader AND storage available\n",{"type":49,"tag":774,"props":1791,"children":1793},{"id":1792},"storage-degradation",[1794],{"type":54,"value":1795},"Storage degradation",{"type":49,"tag":50,"props":1797,"children":1798},{},[1799],{"type":54,"value":1800},"The executor probes storage availability on startup:",{"type":49,"tag":71,"props":1802,"children":1804},{"className":73,"code":1803,"language":75,"meta":76,"style":76},"const executor = startOfflineExecutor({\n  \u002F\u002F ...\n  onStorageFailure: (diagnostic) => {\n    \u002F\u002F diagnostic.code: 'STORAGE_BLOCKED' | 'QUOTA_EXCEEDED' | 'UNKNOWN_ERROR'\n    \u002F\u002F diagnostic.mode: 'online-only'\n    console.warn(diagnostic.message)\n  },\n})\n\nexecutor.mode \u002F\u002F 'offline' | 'online-only'\nexecutor.storageDiagnostic \u002F\u002F Full diagnostic info\n",[1805],{"type":49,"tag":79,"props":1806,"children":1807},{"__ignoreMap":76},[1808,1835,1842,1875,1883,1891,1928,1935,1946,1953,1974],{"type":49,"tag":83,"props":1809,"children":1810},{"class":85,"line":86},[1811,1815,1819,1823,1827,1831],{"type":49,"tag":83,"props":1812,"children":1813},{"style":214},[1814],{"type":54,"value":217},{"type":49,"tag":83,"props":1816,"children":1817},{"style":106},[1818],{"type":54,"value":222},{"type":49,"tag":83,"props":1820,"children":1821},{"style":96},[1822],{"type":54,"value":227},{"type":49,"tag":83,"props":1824,"children":1825},{"style":230},[1826],{"type":54,"value":233},{"type":49,"tag":83,"props":1828,"children":1829},{"style":106},[1830],{"type":54,"value":238},{"type":49,"tag":83,"props":1832,"children":1833},{"style":96},[1834],{"type":54,"value":243},{"type":49,"tag":83,"props":1836,"children":1837},{"class":85,"line":102},[1838],{"type":49,"tag":83,"props":1839,"children":1840},{"style":735},[1841],{"type":54,"value":1625},{"type":49,"tag":83,"props":1843,"children":1844},{"class":85,"line":117},[1845,1850,1854,1858,1863,1867,1871],{"type":49,"tag":83,"props":1846,"children":1847},{"style":230},[1848],{"type":54,"value":1849},"  onStorageFailure",{"type":49,"tag":83,"props":1851,"children":1852},{"style":96},[1853],{"type":54,"value":258},{"type":49,"tag":83,"props":1855,"children":1856},{"style":96},[1857],{"type":54,"value":1136},{"type":49,"tag":83,"props":1859,"children":1860},{"style":324},[1861],{"type":54,"value":1862},"diagnostic",{"type":49,"tag":83,"props":1864,"children":1865},{"style":96},[1866],{"type":54,"value":1146},{"type":49,"tag":83,"props":1868,"children":1869},{"style":214},[1870],{"type":54,"value":347},{"type":49,"tag":83,"props":1872,"children":1873},{"style":96},[1874],{"type":54,"value":99},{"type":49,"tag":83,"props":1876,"children":1877},{"class":85,"line":130},[1878],{"type":49,"tag":83,"props":1879,"children":1880},{"style":735},[1881],{"type":54,"value":1882},"    \u002F\u002F diagnostic.code: 'STORAGE_BLOCKED' | 'QUOTA_EXCEEDED' | 'UNKNOWN_ERROR'\n",{"type":49,"tag":83,"props":1884,"children":1885},{"class":85,"line":160},[1886],{"type":49,"tag":83,"props":1887,"children":1888},{"style":735},[1889],{"type":54,"value":1890},"    \u002F\u002F diagnostic.mode: 'online-only'\n",{"type":49,"tag":83,"props":1892,"children":1893},{"class":85,"line":200},[1894,1898,1902,1907,1911,1915,1919,1924],{"type":49,"tag":83,"props":1895,"children":1896},{"style":106},[1897],{"type":54,"value":1666},{"type":49,"tag":83,"props":1899,"children":1900},{"style":96},[1901],{"type":54,"value":379},{"type":49,"tag":83,"props":1903,"children":1904},{"style":230},[1905],{"type":54,"value":1906},"warn",{"type":49,"tag":83,"props":1908,"children":1909},{"style":250},[1910],{"type":54,"value":238},{"type":49,"tag":83,"props":1912,"children":1913},{"style":106},[1914],{"type":54,"value":1862},{"type":49,"tag":83,"props":1916,"children":1917},{"style":96},[1918],{"type":54,"value":379},{"type":49,"tag":83,"props":1920,"children":1921},{"style":106},[1922],{"type":54,"value":1923},"message",{"type":49,"tag":83,"props":1925,"children":1926},{"style":250},[1927],{"type":54,"value":494},{"type":49,"tag":83,"props":1929,"children":1930},{"class":85,"line":210},[1931],{"type":49,"tag":83,"props":1932,"children":1933},{"style":96},[1934],{"type":54,"value":708},{"type":49,"tag":83,"props":1936,"children":1937},{"class":85,"line":246},[1938,1942],{"type":49,"tag":83,"props":1939,"children":1940},{"style":96},[1941],{"type":54,"value":136},{"type":49,"tag":83,"props":1943,"children":1944},{"style":106},[1945],{"type":54,"value":494},{"type":49,"tag":83,"props":1947,"children":1948},{"class":85,"line":284},[1949],{"type":49,"tag":83,"props":1950,"children":1951},{"emptyLinePlaceholder":204},[1952],{"type":54,"value":207},{"type":49,"tag":83,"props":1954,"children":1955},{"class":85,"line":301},[1956,1960,1964,1969],{"type":49,"tag":83,"props":1957,"children":1958},{"style":106},[1959],{"type":54,"value":1775},{"type":49,"tag":83,"props":1961,"children":1962},{"style":96},[1963],{"type":54,"value":379},{"type":49,"tag":83,"props":1965,"children":1966},{"style":106},[1967],{"type":54,"value":1968},"mode ",{"type":49,"tag":83,"props":1970,"children":1971},{"style":735},[1972],{"type":54,"value":1973},"\u002F\u002F 'offline' | 'online-only'\n",{"type":49,"tag":83,"props":1975,"children":1976},{"class":85,"line":354},[1977,1981,1985,1990],{"type":49,"tag":83,"props":1978,"children":1979},{"style":106},[1980],{"type":54,"value":1775},{"type":49,"tag":83,"props":1982,"children":1983},{"style":96},[1984],{"type":54,"value":379},{"type":49,"tag":83,"props":1986,"children":1987},{"style":106},[1988],{"type":54,"value":1989},"storageDiagnostic ",{"type":49,"tag":83,"props":1991,"children":1992},{"style":735},[1993],{"type":54,"value":1994},"\u002F\u002F Full diagnostic info\n",{"type":49,"tag":50,"props":1996,"children":1997},{},[1998],{"type":54,"value":1999},"When storage is unavailable (private browsing, quota exceeded), the executor operates in online-only mode — mutations work normally but aren't persisted across page reloads.",{"type":49,"tag":64,"props":2001,"children":2003},{"id":2002},"configuration",[2004],{"type":54,"value":2005},"Configuration",{"type":49,"tag":71,"props":2007,"children":2009},{"className":73,"code":2008,"language":75,"meta":76,"style":76},"interface OfflineConfig {\n  collections: Record\u003Cstring, Collection> \u002F\u002F Collections for optimistic state restoration\n  mutationFns: Record\u003Cstring, OfflineMutationFn> \u002F\u002F Named mutation functions\n  storage?: StorageAdapter \u002F\u002F Custom storage (default: auto-detect)\n  maxConcurrency?: number \u002F\u002F Parallel execution limit\n  jitter?: boolean \u002F\u002F Add jitter to retry delays\n  beforeRetry?: (txs) => txs \u002F\u002F Transform\u002Ffilter before retry\n  onUnknownMutationFn?: (name, tx) => void \u002F\u002F Handle orphaned transactions\n  onLeadershipChange?: (isLeader) => void \u002F\u002F Leadership state callback\n  onStorageFailure?: (diagnostic) => void \u002F\u002F Storage probe failure callback\n  leaderElection?: LeaderElection \u002F\u002F Custom leader election\n  onlineDetector?: OnlineDetector \u002F\u002F Custom connectivity detection\n}\n",[2010],{"type":49,"tag":79,"props":2011,"children":2012},{"__ignoreMap":76},[2013,2031,2076,2117,2140,2162,2184,2223,2271,2307,2343,2365,2387],{"type":49,"tag":83,"props":2014,"children":2015},{"class":85,"line":86},[2016,2021,2027],{"type":49,"tag":83,"props":2017,"children":2018},{"style":214},[2019],{"type":54,"value":2020},"interface",{"type":49,"tag":83,"props":2022,"children":2024},{"style":2023},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[2025],{"type":54,"value":2026}," OfflineConfig",{"type":49,"tag":83,"props":2028,"children":2029},{"style":96},[2030],{"type":54,"value":99},{"type":49,"tag":83,"props":2032,"children":2033},{"class":85,"line":102},[2034,2038,2042,2047,2052,2057,2061,2066,2071],{"type":49,"tag":83,"props":2035,"children":2036},{"style":250},[2037],{"type":54,"value":253},{"type":49,"tag":83,"props":2039,"children":2040},{"style":96},[2041],{"type":54,"value":258},{"type":49,"tag":83,"props":2043,"children":2044},{"style":2023},[2045],{"type":54,"value":2046}," Record",{"type":49,"tag":83,"props":2048,"children":2049},{"style":96},[2050],{"type":54,"value":2051},"\u003C",{"type":49,"tag":83,"props":2053,"children":2054},{"style":2023},[2055],{"type":54,"value":2056},"string",{"type":49,"tag":83,"props":2058,"children":2059},{"style":96},[2060],{"type":54,"value":332},{"type":49,"tag":83,"props":2062,"children":2063},{"style":2023},[2064],{"type":54,"value":2065}," Collection",{"type":49,"tag":83,"props":2067,"children":2068},{"style":96},[2069],{"type":54,"value":2070},">",{"type":49,"tag":83,"props":2072,"children":2073},{"style":735},[2074],{"type":54,"value":2075}," \u002F\u002F Collections for optimistic state restoration\n",{"type":49,"tag":83,"props":2077,"children":2078},{"class":85,"line":117},[2079,2083,2087,2091,2095,2099,2103,2108,2112],{"type":49,"tag":83,"props":2080,"children":2081},{"style":250},[2082],{"type":54,"value":290},{"type":49,"tag":83,"props":2084,"children":2085},{"style":96},[2086],{"type":54,"value":258},{"type":49,"tag":83,"props":2088,"children":2089},{"style":2023},[2090],{"type":54,"value":2046},{"type":49,"tag":83,"props":2092,"children":2093},{"style":96},[2094],{"type":54,"value":2051},{"type":49,"tag":83,"props":2096,"children":2097},{"style":2023},[2098],{"type":54,"value":2056},{"type":49,"tag":83,"props":2100,"children":2101},{"style":96},[2102],{"type":54,"value":332},{"type":49,"tag":83,"props":2104,"children":2105},{"style":2023},[2106],{"type":54,"value":2107}," OfflineMutationFn",{"type":49,"tag":83,"props":2109,"children":2110},{"style":96},[2111],{"type":54,"value":2070},{"type":49,"tag":83,"props":2113,"children":2114},{"style":735},[2115],{"type":54,"value":2116}," \u002F\u002F Named mutation functions\n",{"type":49,"tag":83,"props":2118,"children":2119},{"class":85,"line":130},[2120,2125,2130,2135],{"type":49,"tag":83,"props":2121,"children":2122},{"style":250},[2123],{"type":54,"value":2124},"  storage",{"type":49,"tag":83,"props":2126,"children":2127},{"style":96},[2128],{"type":54,"value":2129},"?:",{"type":49,"tag":83,"props":2131,"children":2132},{"style":2023},[2133],{"type":54,"value":2134}," StorageAdapter",{"type":49,"tag":83,"props":2136,"children":2137},{"style":735},[2138],{"type":54,"value":2139}," \u002F\u002F Custom storage (default: auto-detect)\n",{"type":49,"tag":83,"props":2141,"children":2142},{"class":85,"line":160},[2143,2148,2152,2157],{"type":49,"tag":83,"props":2144,"children":2145},{"style":250},[2146],{"type":54,"value":2147},"  maxConcurrency",{"type":49,"tag":83,"props":2149,"children":2150},{"style":96},[2151],{"type":54,"value":2129},{"type":49,"tag":83,"props":2153,"children":2154},{"style":2023},[2155],{"type":54,"value":2156}," number",{"type":49,"tag":83,"props":2158,"children":2159},{"style":735},[2160],{"type":54,"value":2161}," \u002F\u002F Parallel execution limit\n",{"type":49,"tag":83,"props":2163,"children":2164},{"class":85,"line":200},[2165,2170,2174,2179],{"type":49,"tag":83,"props":2166,"children":2167},{"style":250},[2168],{"type":54,"value":2169},"  jitter",{"type":49,"tag":83,"props":2171,"children":2172},{"style":96},[2173],{"type":54,"value":2129},{"type":49,"tag":83,"props":2175,"children":2176},{"style":2023},[2177],{"type":54,"value":2178}," boolean",{"type":49,"tag":83,"props":2180,"children":2181},{"style":735},[2182],{"type":54,"value":2183}," \u002F\u002F Add jitter to retry delays\n",{"type":49,"tag":83,"props":2185,"children":2186},{"class":85,"line":210},[2187,2192,2196,2200,2205,2209,2213,2218],{"type":49,"tag":83,"props":2188,"children":2189},{"style":250},[2190],{"type":54,"value":2191},"  beforeRetry",{"type":49,"tag":83,"props":2193,"children":2194},{"style":96},[2195],{"type":54,"value":2129},{"type":49,"tag":83,"props":2197,"children":2198},{"style":96},[2199],{"type":54,"value":1136},{"type":49,"tag":83,"props":2201,"children":2202},{"style":324},[2203],{"type":54,"value":2204},"txs",{"type":49,"tag":83,"props":2206,"children":2207},{"style":96},[2208],{"type":54,"value":1146},{"type":49,"tag":83,"props":2210,"children":2211},{"style":214},[2212],{"type":54,"value":347},{"type":49,"tag":83,"props":2214,"children":2215},{"style":2023},[2216],{"type":54,"value":2217}," txs",{"type":49,"tag":83,"props":2219,"children":2220},{"style":735},[2221],{"type":54,"value":2222}," \u002F\u002F Transform\u002Ffilter before retry\n",{"type":49,"tag":83,"props":2224,"children":2225},{"class":85,"line":246},[2226,2231,2235,2239,2244,2248,2253,2257,2261,2266],{"type":49,"tag":83,"props":2227,"children":2228},{"style":250},[2229],{"type":54,"value":2230},"  onUnknownMutationFn",{"type":49,"tag":83,"props":2232,"children":2233},{"style":96},[2234],{"type":54,"value":2129},{"type":49,"tag":83,"props":2236,"children":2237},{"style":96},[2238],{"type":54,"value":1136},{"type":49,"tag":83,"props":2240,"children":2241},{"style":324},[2242],{"type":54,"value":2243},"name",{"type":49,"tag":83,"props":2245,"children":2246},{"style":96},[2247],{"type":54,"value":332},{"type":49,"tag":83,"props":2249,"children":2250},{"style":324},[2251],{"type":54,"value":2252}," tx",{"type":49,"tag":83,"props":2254,"children":2255},{"style":96},[2256],{"type":54,"value":1146},{"type":49,"tag":83,"props":2258,"children":2259},{"style":214},[2260],{"type":54,"value":347},{"type":49,"tag":83,"props":2262,"children":2263},{"style":2023},[2264],{"type":54,"value":2265}," void",{"type":49,"tag":83,"props":2267,"children":2268},{"style":735},[2269],{"type":54,"value":2270}," \u002F\u002F Handle orphaned transactions\n",{"type":49,"tag":83,"props":2272,"children":2273},{"class":85,"line":284},[2274,2278,2282,2286,2290,2294,2298,2302],{"type":49,"tag":83,"props":2275,"children":2276},{"style":250},[2277],{"type":54,"value":1633},{"type":49,"tag":83,"props":2279,"children":2280},{"style":96},[2281],{"type":54,"value":2129},{"type":49,"tag":83,"props":2283,"children":2284},{"style":96},[2285],{"type":54,"value":1136},{"type":49,"tag":83,"props":2287,"children":2288},{"style":324},[2289],{"type":54,"value":1646},{"type":49,"tag":83,"props":2291,"children":2292},{"style":96},[2293],{"type":54,"value":1146},{"type":49,"tag":83,"props":2295,"children":2296},{"style":214},[2297],{"type":54,"value":347},{"type":49,"tag":83,"props":2299,"children":2300},{"style":2023},[2301],{"type":54,"value":2265},{"type":49,"tag":83,"props":2303,"children":2304},{"style":735},[2305],{"type":54,"value":2306}," \u002F\u002F Leadership state callback\n",{"type":49,"tag":83,"props":2308,"children":2309},{"class":85,"line":301},[2310,2314,2318,2322,2326,2330,2334,2338],{"type":49,"tag":83,"props":2311,"children":2312},{"style":250},[2313],{"type":54,"value":1849},{"type":49,"tag":83,"props":2315,"children":2316},{"style":96},[2317],{"type":54,"value":2129},{"type":49,"tag":83,"props":2319,"children":2320},{"style":96},[2321],{"type":54,"value":1136},{"type":49,"tag":83,"props":2323,"children":2324},{"style":324},[2325],{"type":54,"value":1862},{"type":49,"tag":83,"props":2327,"children":2328},{"style":96},[2329],{"type":54,"value":1146},{"type":49,"tag":83,"props":2331,"children":2332},{"style":214},[2333],{"type":54,"value":347},{"type":49,"tag":83,"props":2335,"children":2336},{"style":2023},[2337],{"type":54,"value":2265},{"type":49,"tag":83,"props":2339,"children":2340},{"style":735},[2341],{"type":54,"value":2342}," \u002F\u002F Storage probe failure callback\n",{"type":49,"tag":83,"props":2344,"children":2345},{"class":85,"line":354},[2346,2351,2355,2360],{"type":49,"tag":83,"props":2347,"children":2348},{"style":250},[2349],{"type":54,"value":2350},"  leaderElection",{"type":49,"tag":83,"props":2352,"children":2353},{"style":96},[2354],{"type":54,"value":2129},{"type":49,"tag":83,"props":2356,"children":2357},{"style":2023},[2358],{"type":54,"value":2359}," LeaderElection",{"type":49,"tag":83,"props":2361,"children":2362},{"style":735},[2363],{"type":54,"value":2364}," \u002F\u002F Custom leader election\n",{"type":49,"tag":83,"props":2366,"children":2367},{"class":85,"line":403},[2368,2373,2377,2382],{"type":49,"tag":83,"props":2369,"children":2370},{"style":250},[2371],{"type":54,"value":2372},"  onlineDetector",{"type":49,"tag":83,"props":2374,"children":2375},{"style":96},[2376],{"type":54,"value":2129},{"type":49,"tag":83,"props":2378,"children":2379},{"style":2023},[2380],{"type":54,"value":2381}," OnlineDetector",{"type":49,"tag":83,"props":2383,"children":2384},{"style":735},[2385],{"type":54,"value":2386}," \u002F\u002F Custom connectivity detection\n",{"type":49,"tag":83,"props":2388,"children":2389},{"class":85,"line":443},[2390],{"type":49,"tag":83,"props":2391,"children":2392},{"style":96},[2393],{"type":54,"value":2394},"}\n",{"type":49,"tag":774,"props":2396,"children":2398},{"id":2397},"custom-storage-adapter",[2399],{"type":54,"value":2400},"Custom storage adapter",{"type":49,"tag":71,"props":2402,"children":2404},{"className":73,"code":2403,"language":75,"meta":76,"style":76},"interface StorageAdapter {\n  get: (key: string) => Promise\u003Cstring | null>\n  set: (key: string, value: string) => Promise\u003Cvoid>\n  delete: (key: string) => Promise\u003Cvoid>\n  keys: () => Promise\u003CArray\u003Cstring>>\n  clear: () => Promise\u003Cvoid>\n}\n",[2405],{"type":49,"tag":79,"props":2406,"children":2407},{"__ignoreMap":76},[2408,2423,2488,2558,2610,2657,2693],{"type":49,"tag":83,"props":2409,"children":2410},{"class":85,"line":86},[2411,2415,2419],{"type":49,"tag":83,"props":2412,"children":2413},{"style":214},[2414],{"type":54,"value":2020},{"type":49,"tag":83,"props":2416,"children":2417},{"style":2023},[2418],{"type":54,"value":2134},{"type":49,"tag":83,"props":2420,"children":2421},{"style":96},[2422],{"type":54,"value":99},{"type":49,"tag":83,"props":2424,"children":2425},{"class":85,"line":102},[2426,2431,2435,2439,2443,2447,2452,2456,2460,2465,2469,2473,2478,2483],{"type":49,"tag":83,"props":2427,"children":2428},{"style":250},[2429],{"type":54,"value":2430},"  get",{"type":49,"tag":83,"props":2432,"children":2433},{"style":96},[2434],{"type":54,"value":258},{"type":49,"tag":83,"props":2436,"children":2437},{"style":96},[2438],{"type":54,"value":1136},{"type":49,"tag":83,"props":2440,"children":2441},{"style":324},[2442],{"type":54,"value":634},{"type":49,"tag":83,"props":2444,"children":2445},{"style":96},[2446],{"type":54,"value":258},{"type":49,"tag":83,"props":2448,"children":2449},{"style":2023},[2450],{"type":54,"value":2451}," string",{"type":49,"tag":83,"props":2453,"children":2454},{"style":96},[2455],{"type":54,"value":1146},{"type":49,"tag":83,"props":2457,"children":2458},{"style":214},[2459],{"type":54,"value":347},{"type":49,"tag":83,"props":2461,"children":2462},{"style":2023},[2463],{"type":54,"value":2464}," Promise",{"type":49,"tag":83,"props":2466,"children":2467},{"style":96},[2468],{"type":54,"value":2051},{"type":49,"tag":83,"props":2470,"children":2471},{"style":2023},[2472],{"type":54,"value":2056},{"type":49,"tag":83,"props":2474,"children":2475},{"style":96},[2476],{"type":54,"value":2477}," |",{"type":49,"tag":83,"props":2479,"children":2480},{"style":2023},[2481],{"type":54,"value":2482}," null",{"type":49,"tag":83,"props":2484,"children":2485},{"style":96},[2486],{"type":54,"value":2487},">\n",{"type":49,"tag":83,"props":2489,"children":2490},{"class":85,"line":117},[2491,2496,2500,2504,2508,2512,2516,2520,2525,2529,2533,2537,2541,2545,2549,2554],{"type":49,"tag":83,"props":2492,"children":2493},{"style":250},[2494],{"type":54,"value":2495},"  set",{"type":49,"tag":83,"props":2497,"children":2498},{"style":96},[2499],{"type":54,"value":258},{"type":49,"tag":83,"props":2501,"children":2502},{"style":96},[2503],{"type":54,"value":1136},{"type":49,"tag":83,"props":2505,"children":2506},{"style":324},[2507],{"type":54,"value":634},{"type":49,"tag":83,"props":2509,"children":2510},{"style":96},[2511],{"type":54,"value":258},{"type":49,"tag":83,"props":2513,"children":2514},{"style":2023},[2515],{"type":54,"value":2451},{"type":49,"tag":83,"props":2517,"children":2518},{"style":96},[2519],{"type":54,"value":332},{"type":49,"tag":83,"props":2521,"children":2522},{"style":324},[2523],{"type":54,"value":2524}," value",{"type":49,"tag":83,"props":2526,"children":2527},{"style":96},[2528],{"type":54,"value":258},{"type":49,"tag":83,"props":2530,"children":2531},{"style":2023},[2532],{"type":54,"value":2451},{"type":49,"tag":83,"props":2534,"children":2535},{"style":96},[2536],{"type":54,"value":1146},{"type":49,"tag":83,"props":2538,"children":2539},{"style":214},[2540],{"type":54,"value":347},{"type":49,"tag":83,"props":2542,"children":2543},{"style":2023},[2544],{"type":54,"value":2464},{"type":49,"tag":83,"props":2546,"children":2547},{"style":96},[2548],{"type":54,"value":2051},{"type":49,"tag":83,"props":2550,"children":2551},{"style":2023},[2552],{"type":54,"value":2553},"void",{"type":49,"tag":83,"props":2555,"children":2556},{"style":96},[2557],{"type":54,"value":2487},{"type":49,"tag":83,"props":2559,"children":2560},{"class":85,"line":130},[2561,2566,2570,2574,2578,2582,2586,2590,2594,2598,2602,2606],{"type":49,"tag":83,"props":2562,"children":2563},{"style":250},[2564],{"type":54,"value":2565},"  delete",{"type":49,"tag":83,"props":2567,"children":2568},{"style":96},[2569],{"type":54,"value":258},{"type":49,"tag":83,"props":2571,"children":2572},{"style":96},[2573],{"type":54,"value":1136},{"type":49,"tag":83,"props":2575,"children":2576},{"style":324},[2577],{"type":54,"value":634},{"type":49,"tag":83,"props":2579,"children":2580},{"style":96},[2581],{"type":54,"value":258},{"type":49,"tag":83,"props":2583,"children":2584},{"style":2023},[2585],{"type":54,"value":2451},{"type":49,"tag":83,"props":2587,"children":2588},{"style":96},[2589],{"type":54,"value":1146},{"type":49,"tag":83,"props":2591,"children":2592},{"style":214},[2593],{"type":54,"value":347},{"type":49,"tag":83,"props":2595,"children":2596},{"style":2023},[2597],{"type":54,"value":2464},{"type":49,"tag":83,"props":2599,"children":2600},{"style":96},[2601],{"type":54,"value":2051},{"type":49,"tag":83,"props":2603,"children":2604},{"style":2023},[2605],{"type":54,"value":2553},{"type":49,"tag":83,"props":2607,"children":2608},{"style":96},[2609],{"type":54,"value":2487},{"type":49,"tag":83,"props":2611,"children":2612},{"class":85,"line":160},[2613,2618,2622,2627,2631,2635,2639,2644,2648,2652],{"type":49,"tag":83,"props":2614,"children":2615},{"style":250},[2616],{"type":54,"value":2617},"  keys",{"type":49,"tag":83,"props":2619,"children":2620},{"style":96},[2621],{"type":54,"value":258},{"type":49,"tag":83,"props":2623,"children":2624},{"style":96},[2625],{"type":54,"value":2626}," ()",{"type":49,"tag":83,"props":2628,"children":2629},{"style":214},[2630],{"type":54,"value":347},{"type":49,"tag":83,"props":2632,"children":2633},{"style":2023},[2634],{"type":54,"value":2464},{"type":49,"tag":83,"props":2636,"children":2637},{"style":96},[2638],{"type":54,"value":2051},{"type":49,"tag":83,"props":2640,"children":2641},{"style":2023},[2642],{"type":54,"value":2643},"Array",{"type":49,"tag":83,"props":2645,"children":2646},{"style":96},[2647],{"type":54,"value":2051},{"type":49,"tag":83,"props":2649,"children":2650},{"style":2023},[2651],{"type":54,"value":2056},{"type":49,"tag":83,"props":2653,"children":2654},{"style":96},[2655],{"type":54,"value":2656},">>\n",{"type":49,"tag":83,"props":2658,"children":2659},{"class":85,"line":200},[2660,2665,2669,2673,2677,2681,2685,2689],{"type":49,"tag":83,"props":2661,"children":2662},{"style":250},[2663],{"type":54,"value":2664},"  clear",{"type":49,"tag":83,"props":2666,"children":2667},{"style":96},[2668],{"type":54,"value":258},{"type":49,"tag":83,"props":2670,"children":2671},{"style":96},[2672],{"type":54,"value":2626},{"type":49,"tag":83,"props":2674,"children":2675},{"style":214},[2676],{"type":54,"value":347},{"type":49,"tag":83,"props":2678,"children":2679},{"style":2023},[2680],{"type":54,"value":2464},{"type":49,"tag":83,"props":2682,"children":2683},{"style":96},[2684],{"type":54,"value":2051},{"type":49,"tag":83,"props":2686,"children":2687},{"style":2023},[2688],{"type":54,"value":2553},{"type":49,"tag":83,"props":2690,"children":2691},{"style":96},[2692],{"type":54,"value":2487},{"type":49,"tag":83,"props":2694,"children":2695},{"class":85,"line":210},[2696],{"type":49,"tag":83,"props":2697,"children":2698},{"style":96},[2699],{"type":54,"value":2394},{"type":49,"tag":64,"props":2701,"children":2703},{"id":2702},"error-handling",[2704],{"type":54,"value":2705},"Error Handling",{"type":49,"tag":774,"props":2707,"children":2709},{"id":2708},"nonretriableerror",[2710],{"type":54,"value":2711},"NonRetriableError",{"type":49,"tag":71,"props":2713,"children":2715},{"className":73,"code":2714,"language":75,"meta":76,"style":76},"import { NonRetriableError } from '@tanstack\u002Foffline-transactions'\n\nconst executor = startOfflineExecutor({\n  mutationFns: {\n    createTodo: async ({ transaction, idempotencyKey }) => {\n      const res = await fetch('\u002Fapi\u002Ftodos', { method: 'POST', body: ... })\n      if (res.status === 409) {\n        throw new NonRetriableError('Duplicate detected')\n      }\n      if (!res.ok) throw new Error('Server error')\n    },\n  },\n})\n",[2716],{"type":49,"tag":79,"props":2717,"children":2718},{"__ignoreMap":76},[2719,2755,2762,2789,2804,2847,2946,2991,3029,3037,3105,3112,3119],{"type":49,"tag":83,"props":2720,"children":2721},{"class":85,"line":86},[2722,2726,2730,2735,2739,2743,2747,2751],{"type":49,"tag":83,"props":2723,"children":2724},{"style":90},[2725],{"type":54,"value":93},{"type":49,"tag":83,"props":2727,"children":2728},{"style":96},[2729],{"type":54,"value":170},{"type":49,"tag":83,"props":2731,"children":2732},{"style":106},[2733],{"type":54,"value":2734}," NonRetriableError",{"type":49,"tag":83,"props":2736,"children":2737},{"style":96},[2738],{"type":54,"value":180},{"type":49,"tag":83,"props":2740,"children":2741},{"style":90},[2742],{"type":54,"value":141},{"type":49,"tag":83,"props":2744,"children":2745},{"style":96},[2746],{"type":54,"value":146},{"type":49,"tag":83,"props":2748,"children":2749},{"style":149},[2750],{"type":54,"value":152},{"type":49,"tag":83,"props":2752,"children":2753},{"style":96},[2754],{"type":54,"value":157},{"type":49,"tag":83,"props":2756,"children":2757},{"class":85,"line":102},[2758],{"type":49,"tag":83,"props":2759,"children":2760},{"emptyLinePlaceholder":204},[2761],{"type":54,"value":207},{"type":49,"tag":83,"props":2763,"children":2764},{"class":85,"line":117},[2765,2769,2773,2777,2781,2785],{"type":49,"tag":83,"props":2766,"children":2767},{"style":214},[2768],{"type":54,"value":217},{"type":49,"tag":83,"props":2770,"children":2771},{"style":106},[2772],{"type":54,"value":222},{"type":49,"tag":83,"props":2774,"children":2775},{"style":96},[2776],{"type":54,"value":227},{"type":49,"tag":83,"props":2778,"children":2779},{"style":230},[2780],{"type":54,"value":233},{"type":49,"tag":83,"props":2782,"children":2783},{"style":106},[2784],{"type":54,"value":238},{"type":49,"tag":83,"props":2786,"children":2787},{"style":96},[2788],{"type":54,"value":243},{"type":49,"tag":83,"props":2790,"children":2791},{"class":85,"line":130},[2792,2796,2800],{"type":49,"tag":83,"props":2793,"children":2794},{"style":250},[2795],{"type":54,"value":290},{"type":49,"tag":83,"props":2797,"children":2798},{"style":96},[2799],{"type":54,"value":258},{"type":49,"tag":83,"props":2801,"children":2802},{"style":96},[2803],{"type":54,"value":99},{"type":49,"tag":83,"props":2805,"children":2806},{"class":85,"line":160},[2807,2811,2815,2819,2823,2827,2831,2835,2839,2843],{"type":49,"tag":83,"props":2808,"children":2809},{"style":230},[2810],{"type":54,"value":307},{"type":49,"tag":83,"props":2812,"children":2813},{"style":96},[2814],{"type":54,"value":258},{"type":49,"tag":83,"props":2816,"children":2817},{"style":214},[2818],{"type":54,"value":316},{"type":49,"tag":83,"props":2820,"children":2821},{"style":96},[2822],{"type":54,"value":321},{"type":49,"tag":83,"props":2824,"children":2825},{"style":324},[2826],{"type":54,"value":327},{"type":49,"tag":83,"props":2828,"children":2829},{"style":96},[2830],{"type":54,"value":332},{"type":49,"tag":83,"props":2832,"children":2833},{"style":324},[2834],{"type":54,"value":337},{"type":49,"tag":83,"props":2836,"children":2837},{"style":96},[2838],{"type":54,"value":342},{"type":49,"tag":83,"props":2840,"children":2841},{"style":214},[2842],{"type":54,"value":347},{"type":49,"tag":83,"props":2844,"children":2845},{"style":96},[2846],{"type":54,"value":99},{"type":49,"tag":83,"props":2848,"children":2849},{"class":85,"line":200},[2850,2854,2859,2863,2868,2873,2877,2881,2886,2890,2894,2898,2903,2907,2911,2916,2920,2924,2929,2933,2938,2942],{"type":49,"tag":83,"props":2851,"children":2852},{"style":214},[2853],{"type":54,"value":360},{"type":49,"tag":83,"props":2855,"children":2856},{"style":106},[2857],{"type":54,"value":2858}," res",{"type":49,"tag":83,"props":2860,"children":2861},{"style":96},[2862],{"type":54,"value":370},{"type":49,"tag":83,"props":2864,"children":2865},{"style":90},[2866],{"type":54,"value":2867}," await",{"type":49,"tag":83,"props":2869,"children":2870},{"style":230},[2871],{"type":54,"value":2872}," fetch",{"type":49,"tag":83,"props":2874,"children":2875},{"style":250},[2876],{"type":54,"value":238},{"type":49,"tag":83,"props":2878,"children":2879},{"style":96},[2880],{"type":54,"value":848},{"type":49,"tag":83,"props":2882,"children":2883},{"style":149},[2884],{"type":54,"value":2885},"\u002Fapi\u002Ftodos",{"type":49,"tag":83,"props":2887,"children":2888},{"style":96},[2889],{"type":54,"value":848},{"type":49,"tag":83,"props":2891,"children":2892},{"style":96},[2893],{"type":54,"value":332},{"type":49,"tag":83,"props":2895,"children":2896},{"style":96},[2897],{"type":54,"value":170},{"type":49,"tag":83,"props":2899,"children":2900},{"style":250},[2901],{"type":54,"value":2902}," method",{"type":49,"tag":83,"props":2904,"children":2905},{"style":96},[2906],{"type":54,"value":258},{"type":49,"tag":83,"props":2908,"children":2909},{"style":96},[2910],{"type":54,"value":146},{"type":49,"tag":83,"props":2912,"children":2913},{"style":149},[2914],{"type":54,"value":2915},"POST",{"type":49,"tag":83,"props":2917,"children":2918},{"style":96},[2919],{"type":54,"value":848},{"type":49,"tag":83,"props":2921,"children":2922},{"style":96},[2923],{"type":54,"value":332},{"type":49,"tag":83,"props":2925,"children":2926},{"style":250},[2927],{"type":54,"value":2928}," body",{"type":49,"tag":83,"props":2930,"children":2931},{"style":96},[2932],{"type":54,"value":258},{"type":49,"tag":83,"props":2934,"children":2935},{"style":96},[2936],{"type":54,"value":2937}," ...",{"type":49,"tag":83,"props":2939,"children":2940},{"style":96},[2941],{"type":54,"value":180},{"type":49,"tag":83,"props":2943,"children":2944},{"style":250},[2945],{"type":54,"value":494},{"type":49,"tag":83,"props":2947,"children":2948},{"class":85,"line":210},[2949,2954,2958,2963,2967,2972,2977,2982,2987],{"type":49,"tag":83,"props":2950,"children":2951},{"style":90},[2952],{"type":54,"value":2953},"      if",{"type":49,"tag":83,"props":2955,"children":2956},{"style":250},[2957],{"type":54,"value":1136},{"type":49,"tag":83,"props":2959,"children":2960},{"style":106},[2961],{"type":54,"value":2962},"res",{"type":49,"tag":83,"props":2964,"children":2965},{"style":96},[2966],{"type":54,"value":379},{"type":49,"tag":83,"props":2968,"children":2969},{"style":106},[2970],{"type":54,"value":2971},"status",{"type":49,"tag":83,"props":2973,"children":2974},{"style":96},[2975],{"type":54,"value":2976}," ===",{"type":49,"tag":83,"props":2978,"children":2979},{"style":392},[2980],{"type":54,"value":2981}," 409",{"type":49,"tag":83,"props":2983,"children":2984},{"style":250},[2985],{"type":54,"value":2986},") ",{"type":49,"tag":83,"props":2988,"children":2989},{"style":96},[2990],{"type":54,"value":243},{"type":49,"tag":83,"props":2992,"children":2993},{"class":85,"line":246},[2994,2999,3004,3008,3012,3016,3021,3025],{"type":49,"tag":83,"props":2995,"children":2996},{"style":90},[2997],{"type":54,"value":2998},"        throw",{"type":49,"tag":83,"props":3000,"children":3001},{"style":96},[3002],{"type":54,"value":3003}," new",{"type":49,"tag":83,"props":3005,"children":3006},{"style":230},[3007],{"type":54,"value":2734},{"type":49,"tag":83,"props":3009,"children":3010},{"style":250},[3011],{"type":54,"value":238},{"type":49,"tag":83,"props":3013,"children":3014},{"style":96},[3015],{"type":54,"value":848},{"type":49,"tag":83,"props":3017,"children":3018},{"style":149},[3019],{"type":54,"value":3020},"Duplicate detected",{"type":49,"tag":83,"props":3022,"children":3023},{"style":96},[3024],{"type":54,"value":848},{"type":49,"tag":83,"props":3026,"children":3027},{"style":250},[3028],{"type":54,"value":494},{"type":49,"tag":83,"props":3030,"children":3031},{"class":85,"line":284},[3032],{"type":49,"tag":83,"props":3033,"children":3034},{"style":96},[3035],{"type":54,"value":3036},"      }\n",{"type":49,"tag":83,"props":3038,"children":3039},{"class":85,"line":301},[3040,3044,3048,3053,3057,3061,3066,3070,3075,3079,3084,3088,3092,3097,3101],{"type":49,"tag":83,"props":3041,"children":3042},{"style":90},[3043],{"type":54,"value":2953},{"type":49,"tag":83,"props":3045,"children":3046},{"style":250},[3047],{"type":54,"value":1136},{"type":49,"tag":83,"props":3049,"children":3050},{"style":96},[3051],{"type":54,"value":3052},"!",{"type":49,"tag":83,"props":3054,"children":3055},{"style":106},[3056],{"type":54,"value":2962},{"type":49,"tag":83,"props":3058,"children":3059},{"style":96},[3060],{"type":54,"value":379},{"type":49,"tag":83,"props":3062,"children":3063},{"style":106},[3064],{"type":54,"value":3065},"ok",{"type":49,"tag":83,"props":3067,"children":3068},{"style":250},[3069],{"type":54,"value":2986},{"type":49,"tag":83,"props":3071,"children":3072},{"style":90},[3073],{"type":54,"value":3074},"throw",{"type":49,"tag":83,"props":3076,"children":3077},{"style":96},[3078],{"type":54,"value":3003},{"type":49,"tag":83,"props":3080,"children":3081},{"style":230},[3082],{"type":54,"value":3083}," Error",{"type":49,"tag":83,"props":3085,"children":3086},{"style":250},[3087],{"type":54,"value":238},{"type":49,"tag":83,"props":3089,"children":3090},{"style":96},[3091],{"type":54,"value":848},{"type":49,"tag":83,"props":3093,"children":3094},{"style":149},[3095],{"type":54,"value":3096},"Server error",{"type":49,"tag":83,"props":3098,"children":3099},{"style":96},[3100],{"type":54,"value":848},{"type":49,"tag":83,"props":3102,"children":3103},{"style":250},[3104],{"type":54,"value":494},{"type":49,"tag":83,"props":3106,"children":3107},{"class":85,"line":354},[3108],{"type":49,"tag":83,"props":3109,"children":3110},{"style":96},[3111],{"type":54,"value":503},{"type":49,"tag":83,"props":3113,"children":3114},{"class":85,"line":403},[3115],{"type":49,"tag":83,"props":3116,"children":3117},{"style":96},[3118],{"type":54,"value":708},{"type":49,"tag":83,"props":3120,"children":3121},{"class":85,"line":443},[3122,3126],{"type":49,"tag":83,"props":3123,"children":3124},{"style":96},[3125],{"type":54,"value":136},{"type":49,"tag":83,"props":3127,"children":3128},{"style":106},[3129],{"type":54,"value":494},{"type":49,"tag":50,"props":3131,"children":3132},{},[3133,3135,3140],{"type":54,"value":3134},"Throwing ",{"type":49,"tag":79,"props":3136,"children":3138},{"className":3137},[],[3139],{"type":54,"value":2711},{"type":54,"value":3141}," stops retry and removes the transaction from the outbox. Use for permanent failures (validation errors, conflicts, 4xx responses).",{"type":49,"tag":774,"props":3143,"children":3145},{"id":3144},"idempotency-keys",[3146],{"type":54,"value":3147},"Idempotency keys",{"type":49,"tag":50,"props":3149,"children":3150},{},[3151,3153,3159],{"type":54,"value":3152},"Every offline transaction includes an ",{"type":49,"tag":79,"props":3154,"children":3156},{"className":3155},[],[3157],{"type":54,"value":3158},"idempotencyKey",{"type":54,"value":3160},". Pass it to your API to prevent duplicate execution on retry:",{"type":49,"tag":71,"props":3162,"children":3164},{"className":73,"code":3163,"language":75,"meta":76,"style":76},"mutationFns: {\n  createTodo: async ({ transaction, idempotencyKey }) => {\n    await fetch('\u002Fapi\u002Ftodos', {\n      method: 'POST',\n      headers: { 'Idempotency-Key': idempotencyKey },\n      body: JSON.stringify(transaction.mutations[0].modified),\n    })\n  },\n}\n",[3165],{"type":49,"tag":79,"props":3166,"children":3167},{"__ignoreMap":76},[3168,3184,3228,3264,3292,3334,3406,3417,3424],{"type":49,"tag":83,"props":3169,"children":3170},{"class":85,"line":86},[3171,3176,3180],{"type":49,"tag":83,"props":3172,"children":3173},{"style":2023},[3174],{"type":54,"value":3175},"mutationFns",{"type":49,"tag":83,"props":3177,"children":3178},{"style":96},[3179],{"type":54,"value":258},{"type":49,"tag":83,"props":3181,"children":3182},{"style":96},[3183],{"type":54,"value":99},{"type":49,"tag":83,"props":3185,"children":3186},{"class":85,"line":102},[3187,3192,3196,3200,3204,3208,3212,3216,3220,3224],{"type":49,"tag":83,"props":3188,"children":3189},{"style":2023},[3190],{"type":54,"value":3191},"  createTodo",{"type":49,"tag":83,"props":3193,"children":3194},{"style":96},[3195],{"type":54,"value":258},{"type":49,"tag":83,"props":3197,"children":3198},{"style":214},[3199],{"type":54,"value":316},{"type":49,"tag":83,"props":3201,"children":3202},{"style":96},[3203],{"type":54,"value":321},{"type":49,"tag":83,"props":3205,"children":3206},{"style":324},[3207],{"type":54,"value":327},{"type":49,"tag":83,"props":3209,"children":3210},{"style":96},[3211],{"type":54,"value":332},{"type":49,"tag":83,"props":3213,"children":3214},{"style":324},[3215],{"type":54,"value":337},{"type":49,"tag":83,"props":3217,"children":3218},{"style":96},[3219],{"type":54,"value":342},{"type":49,"tag":83,"props":3221,"children":3222},{"style":214},[3223],{"type":54,"value":347},{"type":49,"tag":83,"props":3225,"children":3226},{"style":96},[3227],{"type":54,"value":99},{"type":49,"tag":83,"props":3229,"children":3230},{"class":85,"line":117},[3231,3236,3240,3244,3248,3252,3256,3260],{"type":49,"tag":83,"props":3232,"children":3233},{"style":90},[3234],{"type":54,"value":3235},"    await",{"type":49,"tag":83,"props":3237,"children":3238},{"style":230},[3239],{"type":54,"value":2872},{"type":49,"tag":83,"props":3241,"children":3242},{"style":250},[3243],{"type":54,"value":238},{"type":49,"tag":83,"props":3245,"children":3246},{"style":96},[3247],{"type":54,"value":848},{"type":49,"tag":83,"props":3249,"children":3250},{"style":149},[3251],{"type":54,"value":2885},{"type":49,"tag":83,"props":3253,"children":3254},{"style":96},[3255],{"type":54,"value":848},{"type":49,"tag":83,"props":3257,"children":3258},{"style":96},[3259],{"type":54,"value":332},{"type":49,"tag":83,"props":3261,"children":3262},{"style":96},[3263],{"type":54,"value":99},{"type":49,"tag":83,"props":3265,"children":3266},{"class":85,"line":130},[3267,3272,3276,3280,3284,3288],{"type":49,"tag":83,"props":3268,"children":3269},{"style":250},[3270],{"type":54,"value":3271},"      method",{"type":49,"tag":83,"props":3273,"children":3274},{"style":96},[3275],{"type":54,"value":258},{"type":49,"tag":83,"props":3277,"children":3278},{"style":96},[3279],{"type":54,"value":146},{"type":49,"tag":83,"props":3281,"children":3282},{"style":149},[3283],{"type":54,"value":2915},{"type":49,"tag":83,"props":3285,"children":3286},{"style":96},[3287],{"type":54,"value":848},{"type":49,"tag":83,"props":3289,"children":3290},{"style":96},[3291],{"type":54,"value":114},{"type":49,"tag":83,"props":3293,"children":3294},{"class":85,"line":160},[3295,3300,3304,3308,3312,3317,3321,3325,3329],{"type":49,"tag":83,"props":3296,"children":3297},{"style":250},[3298],{"type":54,"value":3299},"      headers",{"type":49,"tag":83,"props":3301,"children":3302},{"style":96},[3303],{"type":54,"value":258},{"type":49,"tag":83,"props":3305,"children":3306},{"style":96},[3307],{"type":54,"value":170},{"type":49,"tag":83,"props":3309,"children":3310},{"style":96},[3311],{"type":54,"value":146},{"type":49,"tag":83,"props":3313,"children":3314},{"style":250},[3315],{"type":54,"value":3316},"Idempotency-Key",{"type":49,"tag":83,"props":3318,"children":3319},{"style":96},[3320],{"type":54,"value":848},{"type":49,"tag":83,"props":3322,"children":3323},{"style":96},[3324],{"type":54,"value":258},{"type":49,"tag":83,"props":3326,"children":3327},{"style":106},[3328],{"type":54,"value":337},{"type":49,"tag":83,"props":3330,"children":3331},{"style":96},[3332],{"type":54,"value":3333}," },\n",{"type":49,"tag":83,"props":3335,"children":3336},{"class":85,"line":200},[3337,3342,3346,3351,3355,3360,3364,3369,3373,3377,3381,3385,3390,3394,3398,3402],{"type":49,"tag":83,"props":3338,"children":3339},{"style":250},[3340],{"type":54,"value":3341},"      body",{"type":49,"tag":83,"props":3343,"children":3344},{"style":96},[3345],{"type":54,"value":258},{"type":49,"tag":83,"props":3347,"children":3348},{"style":106},[3349],{"type":54,"value":3350}," JSON",{"type":49,"tag":83,"props":3352,"children":3353},{"style":96},[3354],{"type":54,"value":379},{"type":49,"tag":83,"props":3356,"children":3357},{"style":230},[3358],{"type":54,"value":3359},"stringify",{"type":49,"tag":83,"props":3361,"children":3362},{"style":250},[3363],{"type":54,"value":238},{"type":49,"tag":83,"props":3365,"children":3366},{"style":106},[3367],{"type":54,"value":3368},"transaction",{"type":49,"tag":83,"props":3370,"children":3371},{"style":96},[3372],{"type":54,"value":379},{"type":49,"tag":83,"props":3374,"children":3375},{"style":106},[3376],{"type":54,"value":384},{"type":49,"tag":83,"props":3378,"children":3379},{"style":250},[3380],{"type":54,"value":389},{"type":49,"tag":83,"props":3382,"children":3383},{"style":392},[3384],{"type":54,"value":395},{"type":49,"tag":83,"props":3386,"children":3387},{"style":250},[3388],{"type":54,"value":3389},"]",{"type":49,"tag":83,"props":3391,"children":3392},{"style":96},[3393],{"type":54,"value":379},{"type":49,"tag":83,"props":3395,"children":3396},{"style":106},[3397],{"type":54,"value":463},{"type":49,"tag":83,"props":3399,"children":3400},{"style":250},[3401],{"type":54,"value":1146},{"type":49,"tag":83,"props":3403,"children":3404},{"style":96},[3405],{"type":54,"value":114},{"type":49,"tag":83,"props":3407,"children":3408},{"class":85,"line":210},[3409,3413],{"type":49,"tag":83,"props":3410,"children":3411},{"style":96},[3412],{"type":54,"value":1247},{"type":49,"tag":83,"props":3414,"children":3415},{"style":250},[3416],{"type":54,"value":494},{"type":49,"tag":83,"props":3418,"children":3419},{"class":85,"line":246},[3420],{"type":49,"tag":83,"props":3421,"children":3422},{"style":96},[3423],{"type":54,"value":708},{"type":49,"tag":83,"props":3425,"children":3426},{"class":85,"line":284},[3427],{"type":49,"tag":83,"props":3428,"children":3429},{"style":96},[3430],{"type":54,"value":2394},{"type":49,"tag":64,"props":3432,"children":3434},{"id":3433},"react-native",[3435],{"type":54,"value":3436},"React Native",{"type":49,"tag":71,"props":3438,"children":3440},{"className":73,"code":3439,"language":75,"meta":76,"style":76},"import {\n  startOfflineExecutor,\n} from '@tanstack\u002Foffline-transactions\u002Freact-native'\n\n\u002F\u002F Uses ReactNativeOnlineDetector automatically\n\u002F\u002F Uses AsyncStorage-compatible storage\nconst executor = startOfflineExecutor({ ... })\n",[3441],{"type":49,"tag":79,"props":3442,"children":3443},{"__ignoreMap":76},[3444,3455,3466,3490,3497,3505,3513],{"type":49,"tag":83,"props":3445,"children":3446},{"class":85,"line":86},[3447,3451],{"type":49,"tag":83,"props":3448,"children":3449},{"style":90},[3450],{"type":54,"value":93},{"type":49,"tag":83,"props":3452,"children":3453},{"style":96},[3454],{"type":54,"value":99},{"type":49,"tag":83,"props":3456,"children":3457},{"class":85,"line":102},[3458,3462],{"type":49,"tag":83,"props":3459,"children":3460},{"style":106},[3461],{"type":54,"value":109},{"type":49,"tag":83,"props":3463,"children":3464},{"style":96},[3465],{"type":54,"value":114},{"type":49,"tag":83,"props":3467,"children":3468},{"class":85,"line":117},[3469,3473,3477,3481,3486],{"type":49,"tag":83,"props":3470,"children":3471},{"style":96},[3472],{"type":54,"value":136},{"type":49,"tag":83,"props":3474,"children":3475},{"style":90},[3476],{"type":54,"value":141},{"type":49,"tag":83,"props":3478,"children":3479},{"style":96},[3480],{"type":54,"value":146},{"type":49,"tag":83,"props":3482,"children":3483},{"style":149},[3484],{"type":54,"value":3485},"@tanstack\u002Foffline-transactions\u002Freact-native",{"type":49,"tag":83,"props":3487,"children":3488},{"style":96},[3489],{"type":54,"value":157},{"type":49,"tag":83,"props":3491,"children":3492},{"class":85,"line":130},[3493],{"type":49,"tag":83,"props":3494,"children":3495},{"emptyLinePlaceholder":204},[3496],{"type":54,"value":207},{"type":49,"tag":83,"props":3498,"children":3499},{"class":85,"line":160},[3500],{"type":49,"tag":83,"props":3501,"children":3502},{"style":735},[3503],{"type":54,"value":3504},"\u002F\u002F Uses ReactNativeOnlineDetector automatically\n",{"type":49,"tag":83,"props":3506,"children":3507},{"class":85,"line":200},[3508],{"type":49,"tag":83,"props":3509,"children":3510},{"style":735},[3511],{"type":54,"value":3512},"\u002F\u002F Uses AsyncStorage-compatible storage\n",{"type":49,"tag":83,"props":3514,"children":3515},{"class":85,"line":210},[3516,3520,3524,3528,3532,3536,3540,3544,3548],{"type":49,"tag":83,"props":3517,"children":3518},{"style":214},[3519],{"type":54,"value":217},{"type":49,"tag":83,"props":3521,"children":3522},{"style":106},[3523],{"type":54,"value":222},{"type":49,"tag":83,"props":3525,"children":3526},{"style":96},[3527],{"type":54,"value":227},{"type":49,"tag":83,"props":3529,"children":3530},{"style":230},[3531],{"type":54,"value":233},{"type":49,"tag":83,"props":3533,"children":3534},{"style":106},[3535],{"type":54,"value":238},{"type":49,"tag":83,"props":3537,"children":3538},{"style":96},[3539],{"type":54,"value":938},{"type":49,"tag":83,"props":3541,"children":3542},{"style":96},[3543],{"type":54,"value":2937},{"type":49,"tag":83,"props":3545,"children":3546},{"style":96},[3547],{"type":54,"value":180},{"type":49,"tag":83,"props":3549,"children":3550},{"style":106},[3551],{"type":54,"value":494},{"type":49,"tag":64,"props":3553,"children":3555},{"id":3554},"outbox-management",[3556],{"type":54,"value":3557},"Outbox Management",{"type":49,"tag":71,"props":3559,"children":3561},{"className":73,"code":3560,"language":75,"meta":76,"style":76},"\u002F\u002F Inspect pending transactions\nconst pending = await executor.peekOutbox()\n\n\u002F\u002F Get counts\nexecutor.getPendingCount() \u002F\u002F Queued transactions\nexecutor.getRunningCount() \u002F\u002F Currently executing\n\n\u002F\u002F Clear all pending transactions\nawait executor.clearOutbox()\n\n\u002F\u002F Cleanup\nexecutor.dispose()\n",[3562],{"type":49,"tag":79,"props":3563,"children":3564},{"__ignoreMap":76},[3565,3573,3610,3617,3625,3651,3676,3683,3691,3715,3722,3730],{"type":49,"tag":83,"props":3566,"children":3567},{"class":85,"line":86},[3568],{"type":49,"tag":83,"props":3569,"children":3570},{"style":735},[3571],{"type":54,"value":3572},"\u002F\u002F Inspect pending transactions\n",{"type":49,"tag":83,"props":3574,"children":3575},{"class":85,"line":102},[3576,3580,3585,3589,3593,3597,3601,3606],{"type":49,"tag":83,"props":3577,"children":3578},{"style":214},[3579],{"type":54,"value":217},{"type":49,"tag":83,"props":3581,"children":3582},{"style":106},[3583],{"type":54,"value":3584}," pending ",{"type":49,"tag":83,"props":3586,"children":3587},{"style":96},[3588],{"type":54,"value":227},{"type":49,"tag":83,"props":3590,"children":3591},{"style":90},[3592],{"type":54,"value":2867},{"type":49,"tag":83,"props":3594,"children":3595},{"style":106},[3596],{"type":54,"value":752},{"type":49,"tag":83,"props":3598,"children":3599},{"style":96},[3600],{"type":54,"value":379},{"type":49,"tag":83,"props":3602,"children":3603},{"style":230},[3604],{"type":54,"value":3605},"peekOutbox",{"type":49,"tag":83,"props":3607,"children":3608},{"style":106},[3609],{"type":54,"value":766},{"type":49,"tag":83,"props":3611,"children":3612},{"class":85,"line":117},[3613],{"type":49,"tag":83,"props":3614,"children":3615},{"emptyLinePlaceholder":204},[3616],{"type":54,"value":207},{"type":49,"tag":83,"props":3618,"children":3619},{"class":85,"line":130},[3620],{"type":49,"tag":83,"props":3621,"children":3622},{"style":735},[3623],{"type":54,"value":3624},"\u002F\u002F Get counts\n",{"type":49,"tag":83,"props":3626,"children":3627},{"class":85,"line":160},[3628,3632,3636,3641,3646],{"type":49,"tag":83,"props":3629,"children":3630},{"style":106},[3631],{"type":54,"value":1775},{"type":49,"tag":83,"props":3633,"children":3634},{"style":96},[3635],{"type":54,"value":379},{"type":49,"tag":83,"props":3637,"children":3638},{"style":230},[3639],{"type":54,"value":3640},"getPendingCount",{"type":49,"tag":83,"props":3642,"children":3643},{"style":106},[3644],{"type":54,"value":3645},"() ",{"type":49,"tag":83,"props":3647,"children":3648},{"style":735},[3649],{"type":54,"value":3650},"\u002F\u002F Queued transactions\n",{"type":49,"tag":83,"props":3652,"children":3653},{"class":85,"line":200},[3654,3658,3662,3667,3671],{"type":49,"tag":83,"props":3655,"children":3656},{"style":106},[3657],{"type":54,"value":1775},{"type":49,"tag":83,"props":3659,"children":3660},{"style":96},[3661],{"type":54,"value":379},{"type":49,"tag":83,"props":3663,"children":3664},{"style":230},[3665],{"type":54,"value":3666},"getRunningCount",{"type":49,"tag":83,"props":3668,"children":3669},{"style":106},[3670],{"type":54,"value":3645},{"type":49,"tag":83,"props":3672,"children":3673},{"style":735},[3674],{"type":54,"value":3675},"\u002F\u002F Currently executing\n",{"type":49,"tag":83,"props":3677,"children":3678},{"class":85,"line":210},[3679],{"type":49,"tag":83,"props":3680,"children":3681},{"emptyLinePlaceholder":204},[3682],{"type":54,"value":207},{"type":49,"tag":83,"props":3684,"children":3685},{"class":85,"line":246},[3686],{"type":49,"tag":83,"props":3687,"children":3688},{"style":735},[3689],{"type":54,"value":3690},"\u002F\u002F Clear all pending transactions\n",{"type":49,"tag":83,"props":3692,"children":3693},{"class":85,"line":284},[3694,3698,3702,3706,3711],{"type":49,"tag":83,"props":3695,"children":3696},{"style":90},[3697],{"type":54,"value":747},{"type":49,"tag":83,"props":3699,"children":3700},{"style":106},[3701],{"type":54,"value":752},{"type":49,"tag":83,"props":3703,"children":3704},{"style":96},[3705],{"type":54,"value":379},{"type":49,"tag":83,"props":3707,"children":3708},{"style":230},[3709],{"type":54,"value":3710},"clearOutbox",{"type":49,"tag":83,"props":3712,"children":3713},{"style":106},[3714],{"type":54,"value":766},{"type":49,"tag":83,"props":3716,"children":3717},{"class":85,"line":301},[3718],{"type":49,"tag":83,"props":3719,"children":3720},{"emptyLinePlaceholder":204},[3721],{"type":54,"value":207},{"type":49,"tag":83,"props":3723,"children":3724},{"class":85,"line":354},[3725],{"type":49,"tag":83,"props":3726,"children":3727},{"style":735},[3728],{"type":54,"value":3729},"\u002F\u002F Cleanup\n",{"type":49,"tag":83,"props":3731,"children":3732},{"class":85,"line":403},[3733,3737,3741,3746],{"type":49,"tag":83,"props":3734,"children":3735},{"style":106},[3736],{"type":54,"value":1775},{"type":49,"tag":83,"props":3738,"children":3739},{"style":96},[3740],{"type":54,"value":379},{"type":49,"tag":83,"props":3742,"children":3743},{"style":230},[3744],{"type":54,"value":3745},"dispose",{"type":49,"tag":83,"props":3747,"children":3748},{"style":106},[3749],{"type":54,"value":766},{"type":49,"tag":64,"props":3751,"children":3753},{"id":3752},"common-mistakes",[3754],{"type":54,"value":3755},"Common Mistakes",{"type":49,"tag":774,"props":3757,"children":3759},{"id":3758},"critical-not-passing-idempotencykey-to-the-api",[3760],{"type":54,"value":3761},"CRITICAL Not passing idempotencyKey to the API",{"type":49,"tag":50,"props":3763,"children":3764},{},[3765],{"type":54,"value":3766},"Wrong:",{"type":49,"tag":71,"props":3768,"children":3770},{"className":73,"code":3769,"language":75,"meta":76,"style":76},"mutationFns: {\n  createTodo: async ({ transaction }) => {\n    await api.todos.create(transaction.mutations[0].modified)\n  },\n}\n",[3771],{"type":49,"tag":79,"props":3772,"children":3773},{"__ignoreMap":76},[3774,3789,3824,3891,3898],{"type":49,"tag":83,"props":3775,"children":3776},{"class":85,"line":86},[3777,3781,3785],{"type":49,"tag":83,"props":3778,"children":3779},{"style":2023},[3780],{"type":54,"value":3175},{"type":49,"tag":83,"props":3782,"children":3783},{"style":96},[3784],{"type":54,"value":258},{"type":49,"tag":83,"props":3786,"children":3787},{"style":96},[3788],{"type":54,"value":99},{"type":49,"tag":83,"props":3790,"children":3791},{"class":85,"line":102},[3792,3796,3800,3804,3808,3812,3816,3820],{"type":49,"tag":83,"props":3793,"children":3794},{"style":2023},[3795],{"type":54,"value":3191},{"type":49,"tag":83,"props":3797,"children":3798},{"style":96},[3799],{"type":54,"value":258},{"type":49,"tag":83,"props":3801,"children":3802},{"style":214},[3803],{"type":54,"value":316},{"type":49,"tag":83,"props":3805,"children":3806},{"style":96},[3807],{"type":54,"value":321},{"type":49,"tag":83,"props":3809,"children":3810},{"style":324},[3811],{"type":54,"value":327},{"type":49,"tag":83,"props":3813,"children":3814},{"style":96},[3815],{"type":54,"value":342},{"type":49,"tag":83,"props":3817,"children":3818},{"style":214},[3819],{"type":54,"value":347},{"type":49,"tag":83,"props":3821,"children":3822},{"style":96},[3823],{"type":54,"value":99},{"type":49,"tag":83,"props":3825,"children":3826},{"class":85,"line":117},[3827,3831,3835,3839,3843,3847,3851,3855,3859,3863,3867,3871,3875,3879,3883,3887],{"type":49,"tag":83,"props":3828,"children":3829},{"style":90},[3830],{"type":54,"value":3235},{"type":49,"tag":83,"props":3832,"children":3833},{"style":106},[3834],{"type":54,"value":414},{"type":49,"tag":83,"props":3836,"children":3837},{"style":96},[3838],{"type":54,"value":379},{"type":49,"tag":83,"props":3840,"children":3841},{"style":106},[3842],{"type":54,"value":423},{"type":49,"tag":83,"props":3844,"children":3845},{"style":96},[3846],{"type":54,"value":379},{"type":49,"tag":83,"props":3848,"children":3849},{"style":230},[3850],{"type":54,"value":432},{"type":49,"tag":83,"props":3852,"children":3853},{"style":250},[3854],{"type":54,"value":238},{"type":49,"tag":83,"props":3856,"children":3857},{"style":106},[3858],{"type":54,"value":3368},{"type":49,"tag":83,"props":3860,"children":3861},{"style":96},[3862],{"type":54,"value":379},{"type":49,"tag":83,"props":3864,"children":3865},{"style":106},[3866],{"type":54,"value":384},{"type":49,"tag":83,"props":3868,"children":3869},{"style":250},[3870],{"type":54,"value":389},{"type":49,"tag":83,"props":3872,"children":3873},{"style":392},[3874],{"type":54,"value":395},{"type":49,"tag":83,"props":3876,"children":3877},{"style":250},[3878],{"type":54,"value":3389},{"type":49,"tag":83,"props":3880,"children":3881},{"style":96},[3882],{"type":54,"value":379},{"type":49,"tag":83,"props":3884,"children":3885},{"style":106},[3886],{"type":54,"value":463},{"type":49,"tag":83,"props":3888,"children":3889},{"style":250},[3890],{"type":54,"value":494},{"type":49,"tag":83,"props":3892,"children":3893},{"class":85,"line":130},[3894],{"type":49,"tag":83,"props":3895,"children":3896},{"style":96},[3897],{"type":54,"value":708},{"type":49,"tag":83,"props":3899,"children":3900},{"class":85,"line":160},[3901],{"type":49,"tag":83,"props":3902,"children":3903},{"style":96},[3904],{"type":54,"value":2394},{"type":49,"tag":50,"props":3906,"children":3907},{},[3908],{"type":54,"value":3909},"Correct:",{"type":49,"tag":71,"props":3911,"children":3913},{"className":73,"code":3912,"language":75,"meta":76,"style":76},"mutationFns: {\n  createTodo: async ({ transaction, idempotencyKey }) => {\n    await api.todos.create({\n      ...transaction.mutations[0].modified,\n      idempotencyKey,\n    })\n  },\n}\n",[3914],{"type":49,"tag":79,"props":3915,"children":3916},{"__ignoreMap":76},[3917,3932,3975,4010,4054,4066,4077,4084],{"type":49,"tag":83,"props":3918,"children":3919},{"class":85,"line":86},[3920,3924,3928],{"type":49,"tag":83,"props":3921,"children":3922},{"style":2023},[3923],{"type":54,"value":3175},{"type":49,"tag":83,"props":3925,"children":3926},{"style":96},[3927],{"type":54,"value":258},{"type":49,"tag":83,"props":3929,"children":3930},{"style":96},[3931],{"type":54,"value":99},{"type":49,"tag":83,"props":3933,"children":3934},{"class":85,"line":102},[3935,3939,3943,3947,3951,3955,3959,3963,3967,3971],{"type":49,"tag":83,"props":3936,"children":3937},{"style":2023},[3938],{"type":54,"value":3191},{"type":49,"tag":83,"props":3940,"children":3941},{"style":96},[3942],{"type":54,"value":258},{"type":49,"tag":83,"props":3944,"children":3945},{"style":214},[3946],{"type":54,"value":316},{"type":49,"tag":83,"props":3948,"children":3949},{"style":96},[3950],{"type":54,"value":321},{"type":49,"tag":83,"props":3952,"children":3953},{"style":324},[3954],{"type":54,"value":327},{"type":49,"tag":83,"props":3956,"children":3957},{"style":96},[3958],{"type":54,"value":332},{"type":49,"tag":83,"props":3960,"children":3961},{"style":324},[3962],{"type":54,"value":337},{"type":49,"tag":83,"props":3964,"children":3965},{"style":96},[3966],{"type":54,"value":342},{"type":49,"tag":83,"props":3968,"children":3969},{"style":214},[3970],{"type":54,"value":347},{"type":49,"tag":83,"props":3972,"children":3973},{"style":96},[3974],{"type":54,"value":99},{"type":49,"tag":83,"props":3976,"children":3977},{"class":85,"line":117},[3978,3982,3986,3990,3994,3998,4002,4006],{"type":49,"tag":83,"props":3979,"children":3980},{"style":90},[3981],{"type":54,"value":3235},{"type":49,"tag":83,"props":3983,"children":3984},{"style":106},[3985],{"type":54,"value":414},{"type":49,"tag":83,"props":3987,"children":3988},{"style":96},[3989],{"type":54,"value":379},{"type":49,"tag":83,"props":3991,"children":3992},{"style":106},[3993],{"type":54,"value":423},{"type":49,"tag":83,"props":3995,"children":3996},{"style":96},[3997],{"type":54,"value":379},{"type":49,"tag":83,"props":3999,"children":4000},{"style":230},[4001],{"type":54,"value":432},{"type":49,"tag":83,"props":4003,"children":4004},{"style":250},[4005],{"type":54,"value":238},{"type":49,"tag":83,"props":4007,"children":4008},{"style":96},[4009],{"type":54,"value":243},{"type":49,"tag":83,"props":4011,"children":4012},{"class":85,"line":130},[4013,4018,4022,4026,4030,4034,4038,4042,4046,4050],{"type":49,"tag":83,"props":4014,"children":4015},{"style":96},[4016],{"type":54,"value":4017},"      ...",{"type":49,"tag":83,"props":4019,"children":4020},{"style":106},[4021],{"type":54,"value":3368},{"type":49,"tag":83,"props":4023,"children":4024},{"style":96},[4025],{"type":54,"value":379},{"type":49,"tag":83,"props":4027,"children":4028},{"style":106},[4029],{"type":54,"value":384},{"type":49,"tag":83,"props":4031,"children":4032},{"style":250},[4033],{"type":54,"value":389},{"type":49,"tag":83,"props":4035,"children":4036},{"style":392},[4037],{"type":54,"value":395},{"type":49,"tag":83,"props":4039,"children":4040},{"style":250},[4041],{"type":54,"value":3389},{"type":49,"tag":83,"props":4043,"children":4044},{"style":96},[4045],{"type":54,"value":379},{"type":49,"tag":83,"props":4047,"children":4048},{"style":106},[4049],{"type":54,"value":463},{"type":49,"tag":83,"props":4051,"children":4052},{"style":96},[4053],{"type":54,"value":114},{"type":49,"tag":83,"props":4055,"children":4056},{"class":85,"line":160},[4057,4062],{"type":49,"tag":83,"props":4058,"children":4059},{"style":106},[4060],{"type":54,"value":4061},"      idempotencyKey",{"type":49,"tag":83,"props":4063,"children":4064},{"style":96},[4065],{"type":54,"value":114},{"type":49,"tag":83,"props":4067,"children":4068},{"class":85,"line":200},[4069,4073],{"type":49,"tag":83,"props":4070,"children":4071},{"style":96},[4072],{"type":54,"value":1247},{"type":49,"tag":83,"props":4074,"children":4075},{"style":250},[4076],{"type":54,"value":494},{"type":49,"tag":83,"props":4078,"children":4079},{"class":85,"line":210},[4080],{"type":49,"tag":83,"props":4081,"children":4082},{"style":96},[4083],{"type":54,"value":708},{"type":49,"tag":83,"props":4085,"children":4086},{"class":85,"line":246},[4087],{"type":49,"tag":83,"props":4088,"children":4089},{"style":96},[4090],{"type":54,"value":2394},{"type":49,"tag":50,"props":4092,"children":4093},{},[4094],{"type":54,"value":4095},"Offline transactions retry on failure. Without idempotency keys, retries can create duplicate records on the server.",{"type":49,"tag":774,"props":4097,"children":4099},{"id":4098},"high-not-waiting-for-initialization",[4100],{"type":54,"value":4101},"HIGH Not waiting for initialization",{"type":49,"tag":50,"props":4103,"children":4104},{},[4105],{"type":54,"value":3766},{"type":49,"tag":71,"props":4107,"children":4109},{"className":73,"code":4108,"language":75,"meta":76,"style":76},"const executor = startOfflineExecutor({ ... })\nconst tx = executor.createOfflineTransaction({ mutationFnName: 'createTodo' })\n",[4110],{"type":49,"tag":79,"props":4111,"children":4112},{"__ignoreMap":76},[4113,4152],{"type":49,"tag":83,"props":4114,"children":4115},{"class":85,"line":86},[4116,4120,4124,4128,4132,4136,4140,4144,4148],{"type":49,"tag":83,"props":4117,"children":4118},{"style":214},[4119],{"type":54,"value":217},{"type":49,"tag":83,"props":4121,"children":4122},{"style":106},[4123],{"type":54,"value":222},{"type":49,"tag":83,"props":4125,"children":4126},{"style":96},[4127],{"type":54,"value":227},{"type":49,"tag":83,"props":4129,"children":4130},{"style":230},[4131],{"type":54,"value":233},{"type":49,"tag":83,"props":4133,"children":4134},{"style":106},[4135],{"type":54,"value":238},{"type":49,"tag":83,"props":4137,"children":4138},{"style":96},[4139],{"type":54,"value":938},{"type":49,"tag":83,"props":4141,"children":4142},{"style":96},[4143],{"type":54,"value":2937},{"type":49,"tag":83,"props":4145,"children":4146},{"style":96},[4147],{"type":54,"value":180},{"type":49,"tag":83,"props":4149,"children":4150},{"style":106},[4151],{"type":54,"value":494},{"type":49,"tag":83,"props":4153,"children":4154},{"class":85,"line":102},[4155,4159,4163,4167,4171,4175,4179,4183,4187,4192,4196,4200,4204,4208,4212],{"type":49,"tag":83,"props":4156,"children":4157},{"style":214},[4158],{"type":54,"value":217},{"type":49,"tag":83,"props":4160,"children":4161},{"style":106},[4162],{"type":54,"value":798},{"type":49,"tag":83,"props":4164,"children":4165},{"style":96},[4166],{"type":54,"value":227},{"type":49,"tag":83,"props":4168,"children":4169},{"style":106},[4170],{"type":54,"value":752},{"type":49,"tag":83,"props":4172,"children":4173},{"style":96},[4174],{"type":54,"value":379},{"type":49,"tag":83,"props":4176,"children":4177},{"style":230},[4178],{"type":54,"value":779},{"type":49,"tag":83,"props":4180,"children":4181},{"style":106},[4182],{"type":54,"value":238},{"type":49,"tag":83,"props":4184,"children":4185},{"style":96},[4186],{"type":54,"value":938},{"type":49,"tag":83,"props":4188,"children":4189},{"style":250},[4190],{"type":54,"value":4191}," mutationFnName",{"type":49,"tag":83,"props":4193,"children":4194},{"style":96},[4195],{"type":54,"value":258},{"type":49,"tag":83,"props":4197,"children":4198},{"style":96},[4199],{"type":54,"value":146},{"type":49,"tag":83,"props":4201,"children":4202},{"style":149},[4203],{"type":54,"value":843},{"type":49,"tag":83,"props":4205,"children":4206},{"style":96},[4207],{"type":54,"value":848},{"type":49,"tag":83,"props":4209,"children":4210},{"style":96},[4211],{"type":54,"value":180},{"type":49,"tag":83,"props":4213,"children":4214},{"style":106},[4215],{"type":54,"value":494},{"type":49,"tag":50,"props":4217,"children":4218},{},[4219],{"type":54,"value":3909},{"type":49,"tag":71,"props":4221,"children":4223},{"className":73,"code":4222,"language":75,"meta":76,"style":76},"const executor = startOfflineExecutor({ ... })\nawait executor.waitForInit()\nconst tx = executor.createOfflineTransaction({ mutationFnName: 'createTodo' })\n",[4224],{"type":49,"tag":79,"props":4225,"children":4226},{"__ignoreMap":76},[4227,4266,4289],{"type":49,"tag":83,"props":4228,"children":4229},{"class":85,"line":86},[4230,4234,4238,4242,4246,4250,4254,4258,4262],{"type":49,"tag":83,"props":4231,"children":4232},{"style":214},[4233],{"type":54,"value":217},{"type":49,"tag":83,"props":4235,"children":4236},{"style":106},[4237],{"type":54,"value":222},{"type":49,"tag":83,"props":4239,"children":4240},{"style":96},[4241],{"type":54,"value":227},{"type":49,"tag":83,"props":4243,"children":4244},{"style":230},[4245],{"type":54,"value":233},{"type":49,"tag":83,"props":4247,"children":4248},{"style":106},[4249],{"type":54,"value":238},{"type":49,"tag":83,"props":4251,"children":4252},{"style":96},[4253],{"type":54,"value":938},{"type":49,"tag":83,"props":4255,"children":4256},{"style":96},[4257],{"type":54,"value":2937},{"type":49,"tag":83,"props":4259,"children":4260},{"style":96},[4261],{"type":54,"value":180},{"type":49,"tag":83,"props":4263,"children":4264},{"style":106},[4265],{"type":54,"value":494},{"type":49,"tag":83,"props":4267,"children":4268},{"class":85,"line":102},[4269,4273,4277,4281,4285],{"type":49,"tag":83,"props":4270,"children":4271},{"style":90},[4272],{"type":54,"value":747},{"type":49,"tag":83,"props":4274,"children":4275},{"style":106},[4276],{"type":54,"value":752},{"type":49,"tag":83,"props":4278,"children":4279},{"style":96},[4280],{"type":54,"value":379},{"type":49,"tag":83,"props":4282,"children":4283},{"style":230},[4284],{"type":54,"value":761},{"type":49,"tag":83,"props":4286,"children":4287},{"style":106},[4288],{"type":54,"value":766},{"type":49,"tag":83,"props":4290,"children":4291},{"class":85,"line":117},[4292,4296,4300,4304,4308,4312,4316,4320,4324,4328,4332,4336,4340,4344,4348],{"type":49,"tag":83,"props":4293,"children":4294},{"style":214},[4295],{"type":54,"value":217},{"type":49,"tag":83,"props":4297,"children":4298},{"style":106},[4299],{"type":54,"value":798},{"type":49,"tag":83,"props":4301,"children":4302},{"style":96},[4303],{"type":54,"value":227},{"type":49,"tag":83,"props":4305,"children":4306},{"style":106},[4307],{"type":54,"value":752},{"type":49,"tag":83,"props":4309,"children":4310},{"style":96},[4311],{"type":54,"value":379},{"type":49,"tag":83,"props":4313,"children":4314},{"style":230},[4315],{"type":54,"value":779},{"type":49,"tag":83,"props":4317,"children":4318},{"style":106},[4319],{"type":54,"value":238},{"type":49,"tag":83,"props":4321,"children":4322},{"style":96},[4323],{"type":54,"value":938},{"type":49,"tag":83,"props":4325,"children":4326},{"style":250},[4327],{"type":54,"value":4191},{"type":49,"tag":83,"props":4329,"children":4330},{"style":96},[4331],{"type":54,"value":258},{"type":49,"tag":83,"props":4333,"children":4334},{"style":96},[4335],{"type":54,"value":146},{"type":49,"tag":83,"props":4337,"children":4338},{"style":149},[4339],{"type":54,"value":843},{"type":49,"tag":83,"props":4341,"children":4342},{"style":96},[4343],{"type":54,"value":848},{"type":49,"tag":83,"props":4345,"children":4346},{"style":96},[4347],{"type":54,"value":180},{"type":49,"tag":83,"props":4349,"children":4350},{"style":106},[4351],{"type":54,"value":494},{"type":49,"tag":50,"props":4353,"children":4354},{},[4355,4361],{"type":49,"tag":79,"props":4356,"children":4358},{"className":4357},[],[4359],{"type":54,"value":4360},"startOfflineExecutor",{"type":54,"value":4362}," initializes asynchronously (probes storage, requests leadership, replays outbox). Creating transactions before initialization completes may miss the leader election result and use the wrong code path.",{"type":49,"tag":774,"props":4364,"children":4366},{"id":4365},"high-missing-collection-in-collections-map",[4367],{"type":54,"value":4368},"HIGH Missing collection in collections map",{"type":49,"tag":50,"props":4370,"children":4371},{},[4372],{"type":54,"value":3766},{"type":49,"tag":71,"props":4374,"children":4376},{"className":73,"code":4375,"language":75,"meta":76,"style":76},"const executor = startOfflineExecutor({\n  collections: {},\n  mutationFns: { createTodo: ... },\n})\n",[4377],{"type":49,"tag":79,"props":4378,"children":4379},{"__ignoreMap":76},[4380,4407,4423,4455],{"type":49,"tag":83,"props":4381,"children":4382},{"class":85,"line":86},[4383,4387,4391,4395,4399,4403],{"type":49,"tag":83,"props":4384,"children":4385},{"style":214},[4386],{"type":54,"value":217},{"type":49,"tag":83,"props":4388,"children":4389},{"style":106},[4390],{"type":54,"value":222},{"type":49,"tag":83,"props":4392,"children":4393},{"style":96},[4394],{"type":54,"value":227},{"type":49,"tag":83,"props":4396,"children":4397},{"style":230},[4398],{"type":54,"value":233},{"type":49,"tag":83,"props":4400,"children":4401},{"style":106},[4402],{"type":54,"value":238},{"type":49,"tag":83,"props":4404,"children":4405},{"style":96},[4406],{"type":54,"value":243},{"type":49,"tag":83,"props":4408,"children":4409},{"class":85,"line":102},[4410,4414,4418],{"type":49,"tag":83,"props":4411,"children":4412},{"style":250},[4413],{"type":54,"value":253},{"type":49,"tag":83,"props":4415,"children":4416},{"style":96},[4417],{"type":54,"value":258},{"type":49,"tag":83,"props":4419,"children":4420},{"style":96},[4421],{"type":54,"value":4422}," {},\n",{"type":49,"tag":83,"props":4424,"children":4425},{"class":85,"line":117},[4426,4430,4434,4438,4443,4447,4451],{"type":49,"tag":83,"props":4427,"children":4428},{"style":250},[4429],{"type":54,"value":290},{"type":49,"tag":83,"props":4431,"children":4432},{"style":96},[4433],{"type":54,"value":258},{"type":49,"tag":83,"props":4435,"children":4436},{"style":96},[4437],{"type":54,"value":170},{"type":49,"tag":83,"props":4439,"children":4440},{"style":250},[4441],{"type":54,"value":4442}," createTodo",{"type":49,"tag":83,"props":4444,"children":4445},{"style":96},[4446],{"type":54,"value":258},{"type":49,"tag":83,"props":4448,"children":4449},{"style":96},[4450],{"type":54,"value":2937},{"type":49,"tag":83,"props":4452,"children":4453},{"style":96},[4454],{"type":54,"value":3333},{"type":49,"tag":83,"props":4456,"children":4457},{"class":85,"line":130},[4458,4462],{"type":49,"tag":83,"props":4459,"children":4460},{"style":96},[4461],{"type":54,"value":136},{"type":49,"tag":83,"props":4463,"children":4464},{"style":106},[4465],{"type":54,"value":494},{"type":49,"tag":50,"props":4467,"children":4468},{},[4469],{"type":54,"value":3909},{"type":49,"tag":71,"props":4471,"children":4473},{"className":73,"code":4472,"language":75,"meta":76,"style":76},"const executor = startOfflineExecutor({\n  collections: { todos: todoCollection },\n  mutationFns: { createTodo: ... },\n})\n",[4474],{"type":49,"tag":79,"props":4475,"children":4476},{"__ignoreMap":76},[4477,4504,4535,4566],{"type":49,"tag":83,"props":4478,"children":4479},{"class":85,"line":86},[4480,4484,4488,4492,4496,4500],{"type":49,"tag":83,"props":4481,"children":4482},{"style":214},[4483],{"type":54,"value":217},{"type":49,"tag":83,"props":4485,"children":4486},{"style":106},[4487],{"type":54,"value":222},{"type":49,"tag":83,"props":4489,"children":4490},{"style":96},[4491],{"type":54,"value":227},{"type":49,"tag":83,"props":4493,"children":4494},{"style":230},[4495],{"type":54,"value":233},{"type":49,"tag":83,"props":4497,"children":4498},{"style":106},[4499],{"type":54,"value":238},{"type":49,"tag":83,"props":4501,"children":4502},{"style":96},[4503],{"type":54,"value":243},{"type":49,"tag":83,"props":4505,"children":4506},{"class":85,"line":102},[4507,4511,4515,4519,4523,4527,4531],{"type":49,"tag":83,"props":4508,"children":4509},{"style":250},[4510],{"type":54,"value":253},{"type":49,"tag":83,"props":4512,"children":4513},{"style":96},[4514],{"type":54,"value":258},{"type":49,"tag":83,"props":4516,"children":4517},{"style":96},[4518],{"type":54,"value":170},{"type":49,"tag":83,"props":4520,"children":4521},{"style":250},[4522],{"type":54,"value":267},{"type":49,"tag":83,"props":4524,"children":4525},{"style":96},[4526],{"type":54,"value":258},{"type":49,"tag":83,"props":4528,"children":4529},{"style":106},[4530],{"type":54,"value":276},{"type":49,"tag":83,"props":4532,"children":4533},{"style":96},[4534],{"type":54,"value":281},{"type":49,"tag":83,"props":4536,"children":4537},{"class":85,"line":117},[4538,4542,4546,4550,4554,4558,4562],{"type":49,"tag":83,"props":4539,"children":4540},{"style":250},[4541],{"type":54,"value":290},{"type":49,"tag":83,"props":4543,"children":4544},{"style":96},[4545],{"type":54,"value":258},{"type":49,"tag":83,"props":4547,"children":4548},{"style":96},[4549],{"type":54,"value":170},{"type":49,"tag":83,"props":4551,"children":4552},{"style":250},[4553],{"type":54,"value":4442},{"type":49,"tag":83,"props":4555,"children":4556},{"style":96},[4557],{"type":54,"value":258},{"type":49,"tag":83,"props":4559,"children":4560},{"style":96},[4561],{"type":54,"value":2937},{"type":49,"tag":83,"props":4563,"children":4564},{"style":96},[4565],{"type":54,"value":3333},{"type":49,"tag":83,"props":4567,"children":4568},{"class":85,"line":130},[4569,4573],{"type":49,"tag":83,"props":4570,"children":4571},{"style":96},[4572],{"type":54,"value":136},{"type":49,"tag":83,"props":4574,"children":4575},{"style":106},[4576],{"type":54,"value":494},{"type":49,"tag":50,"props":4578,"children":4579},{},[4580,4582,4588],{"type":54,"value":4581},"The ",{"type":49,"tag":79,"props":4583,"children":4585},{"className":4584},[],[4586],{"type":54,"value":4587},"collections",{"type":54,"value":4589}," map is used to restore optimistic state from the outbox on page reload. Without it, previously pending mutations won't show their optimistic state while being replayed.",{"type":49,"tag":774,"props":4591,"children":4593},{"id":4592},"medium-not-handling-nonretriableerror-for-permanent-failures",[4594],{"type":54,"value":4595},"MEDIUM Not handling NonRetriableError for permanent failures",{"type":49,"tag":50,"props":4597,"children":4598},{},[4599],{"type":54,"value":3766},{"type":49,"tag":71,"props":4601,"children":4603},{"className":73,"code":4602,"language":75,"meta":76,"style":76},"mutationFns: {\n  createTodo: async ({ transaction }) => {\n    const res = await fetch('\u002Fapi\u002Ftodos', { ... })\n    if (!res.ok) throw new Error('Failed')\n  },\n}\n",[4604],{"type":49,"tag":79,"props":4605,"children":4606},{"__ignoreMap":76},[4607,4622,4657,4717,4782,4789],{"type":49,"tag":83,"props":4608,"children":4609},{"class":85,"line":86},[4610,4614,4618],{"type":49,"tag":83,"props":4611,"children":4612},{"style":2023},[4613],{"type":54,"value":3175},{"type":49,"tag":83,"props":4615,"children":4616},{"style":96},[4617],{"type":54,"value":258},{"type":49,"tag":83,"props":4619,"children":4620},{"style":96},[4621],{"type":54,"value":99},{"type":49,"tag":83,"props":4623,"children":4624},{"class":85,"line":102},[4625,4629,4633,4637,4641,4645,4649,4653],{"type":49,"tag":83,"props":4626,"children":4627},{"style":2023},[4628],{"type":54,"value":3191},{"type":49,"tag":83,"props":4630,"children":4631},{"style":96},[4632],{"type":54,"value":258},{"type":49,"tag":83,"props":4634,"children":4635},{"style":214},[4636],{"type":54,"value":316},{"type":49,"tag":83,"props":4638,"children":4639},{"style":96},[4640],{"type":54,"value":321},{"type":49,"tag":83,"props":4642,"children":4643},{"style":324},[4644],{"type":54,"value":327},{"type":49,"tag":83,"props":4646,"children":4647},{"style":96},[4648],{"type":54,"value":342},{"type":49,"tag":83,"props":4650,"children":4651},{"style":214},[4652],{"type":54,"value":347},{"type":49,"tag":83,"props":4654,"children":4655},{"style":96},[4656],{"type":54,"value":99},{"type":49,"tag":83,"props":4658,"children":4659},{"class":85,"line":117},[4660,4665,4669,4673,4677,4681,4685,4689,4693,4697,4701,4705,4709,4713],{"type":49,"tag":83,"props":4661,"children":4662},{"style":214},[4663],{"type":54,"value":4664},"    const",{"type":49,"tag":83,"props":4666,"children":4667},{"style":106},[4668],{"type":54,"value":2858},{"type":49,"tag":83,"props":4670,"children":4671},{"style":96},[4672],{"type":54,"value":370},{"type":49,"tag":83,"props":4674,"children":4675},{"style":90},[4676],{"type":54,"value":2867},{"type":49,"tag":83,"props":4678,"children":4679},{"style":230},[4680],{"type":54,"value":2872},{"type":49,"tag":83,"props":4682,"children":4683},{"style":250},[4684],{"type":54,"value":238},{"type":49,"tag":83,"props":4686,"children":4687},{"style":96},[4688],{"type":54,"value":848},{"type":49,"tag":83,"props":4690,"children":4691},{"style":149},[4692],{"type":54,"value":2885},{"type":49,"tag":83,"props":4694,"children":4695},{"style":96},[4696],{"type":54,"value":848},{"type":49,"tag":83,"props":4698,"children":4699},{"style":96},[4700],{"type":54,"value":332},{"type":49,"tag":83,"props":4702,"children":4703},{"style":96},[4704],{"type":54,"value":170},{"type":49,"tag":83,"props":4706,"children":4707},{"style":96},[4708],{"type":54,"value":2937},{"type":49,"tag":83,"props":4710,"children":4711},{"style":96},[4712],{"type":54,"value":180},{"type":49,"tag":83,"props":4714,"children":4715},{"style":250},[4716],{"type":54,"value":494},{"type":49,"tag":83,"props":4718,"children":4719},{"class":85,"line":130},[4720,4725,4729,4733,4737,4741,4745,4749,4753,4757,4761,4765,4769,4774,4778],{"type":49,"tag":83,"props":4721,"children":4722},{"style":90},[4723],{"type":54,"value":4724},"    if",{"type":49,"tag":83,"props":4726,"children":4727},{"style":250},[4728],{"type":54,"value":1136},{"type":49,"tag":83,"props":4730,"children":4731},{"style":96},[4732],{"type":54,"value":3052},{"type":49,"tag":83,"props":4734,"children":4735},{"style":106},[4736],{"type":54,"value":2962},{"type":49,"tag":83,"props":4738,"children":4739},{"style":96},[4740],{"type":54,"value":379},{"type":49,"tag":83,"props":4742,"children":4743},{"style":106},[4744],{"type":54,"value":3065},{"type":49,"tag":83,"props":4746,"children":4747},{"style":250},[4748],{"type":54,"value":2986},{"type":49,"tag":83,"props":4750,"children":4751},{"style":90},[4752],{"type":54,"value":3074},{"type":49,"tag":83,"props":4754,"children":4755},{"style":96},[4756],{"type":54,"value":3003},{"type":49,"tag":83,"props":4758,"children":4759},{"style":230},[4760],{"type":54,"value":3083},{"type":49,"tag":83,"props":4762,"children":4763},{"style":250},[4764],{"type":54,"value":238},{"type":49,"tag":83,"props":4766,"children":4767},{"style":96},[4768],{"type":54,"value":848},{"type":49,"tag":83,"props":4770,"children":4771},{"style":149},[4772],{"type":54,"value":4773},"Failed",{"type":49,"tag":83,"props":4775,"children":4776},{"style":96},[4777],{"type":54,"value":848},{"type":49,"tag":83,"props":4779,"children":4780},{"style":250},[4781],{"type":54,"value":494},{"type":49,"tag":83,"props":4783,"children":4784},{"class":85,"line":160},[4785],{"type":49,"tag":83,"props":4786,"children":4787},{"style":96},[4788],{"type":54,"value":708},{"type":49,"tag":83,"props":4790,"children":4791},{"class":85,"line":200},[4792],{"type":49,"tag":83,"props":4793,"children":4794},{"style":96},[4795],{"type":54,"value":2394},{"type":49,"tag":50,"props":4797,"children":4798},{},[4799],{"type":54,"value":3909},{"type":49,"tag":71,"props":4801,"children":4803},{"className":73,"code":4802,"language":75,"meta":76,"style":76},"mutationFns: {\n  createTodo: async ({ transaction }) => {\n    const res = await fetch('\u002Fapi\u002Ftodos', { ... })\n    if (res.status >= 400 && res.status \u003C 500) {\n      throw new NonRetriableError(`Client error: ${res.status}`)\n    }\n    if (!res.ok) throw new Error('Server error')\n  },\n}\n",[4804],{"type":49,"tag":79,"props":4805,"children":4806},{"__ignoreMap":76},[4807,4822,4857,4916,4984,5040,5048,5111,5118],{"type":49,"tag":83,"props":4808,"children":4809},{"class":85,"line":86},[4810,4814,4818],{"type":49,"tag":83,"props":4811,"children":4812},{"style":2023},[4813],{"type":54,"value":3175},{"type":49,"tag":83,"props":4815,"children":4816},{"style":96},[4817],{"type":54,"value":258},{"type":49,"tag":83,"props":4819,"children":4820},{"style":96},[4821],{"type":54,"value":99},{"type":49,"tag":83,"props":4823,"children":4824},{"class":85,"line":102},[4825,4829,4833,4837,4841,4845,4849,4853],{"type":49,"tag":83,"props":4826,"children":4827},{"style":2023},[4828],{"type":54,"value":3191},{"type":49,"tag":83,"props":4830,"children":4831},{"style":96},[4832],{"type":54,"value":258},{"type":49,"tag":83,"props":4834,"children":4835},{"style":214},[4836],{"type":54,"value":316},{"type":49,"tag":83,"props":4838,"children":4839},{"style":96},[4840],{"type":54,"value":321},{"type":49,"tag":83,"props":4842,"children":4843},{"style":324},[4844],{"type":54,"value":327},{"type":49,"tag":83,"props":4846,"children":4847},{"style":96},[4848],{"type":54,"value":342},{"type":49,"tag":83,"props":4850,"children":4851},{"style":214},[4852],{"type":54,"value":347},{"type":49,"tag":83,"props":4854,"children":4855},{"style":96},[4856],{"type":54,"value":99},{"type":49,"tag":83,"props":4858,"children":4859},{"class":85,"line":117},[4860,4864,4868,4872,4876,4880,4884,4888,4892,4896,4900,4904,4908,4912],{"type":49,"tag":83,"props":4861,"children":4862},{"style":214},[4863],{"type":54,"value":4664},{"type":49,"tag":83,"props":4865,"children":4866},{"style":106},[4867],{"type":54,"value":2858},{"type":49,"tag":83,"props":4869,"children":4870},{"style":96},[4871],{"type":54,"value":370},{"type":49,"tag":83,"props":4873,"children":4874},{"style":90},[4875],{"type":54,"value":2867},{"type":49,"tag":83,"props":4877,"children":4878},{"style":230},[4879],{"type":54,"value":2872},{"type":49,"tag":83,"props":4881,"children":4882},{"style":250},[4883],{"type":54,"value":238},{"type":49,"tag":83,"props":4885,"children":4886},{"style":96},[4887],{"type":54,"value":848},{"type":49,"tag":83,"props":4889,"children":4890},{"style":149},[4891],{"type":54,"value":2885},{"type":49,"tag":83,"props":4893,"children":4894},{"style":96},[4895],{"type":54,"value":848},{"type":49,"tag":83,"props":4897,"children":4898},{"style":96},[4899],{"type":54,"value":332},{"type":49,"tag":83,"props":4901,"children":4902},{"style":96},[4903],{"type":54,"value":170},{"type":49,"tag":83,"props":4905,"children":4906},{"style":96},[4907],{"type":54,"value":2937},{"type":49,"tag":83,"props":4909,"children":4910},{"style":96},[4911],{"type":54,"value":180},{"type":49,"tag":83,"props":4913,"children":4914},{"style":250},[4915],{"type":54,"value":494},{"type":49,"tag":83,"props":4917,"children":4918},{"class":85,"line":130},[4919,4923,4927,4931,4935,4939,4944,4949,4954,4958,4962,4966,4971,4976,4980],{"type":49,"tag":83,"props":4920,"children":4921},{"style":90},[4922],{"type":54,"value":4724},{"type":49,"tag":83,"props":4924,"children":4925},{"style":250},[4926],{"type":54,"value":1136},{"type":49,"tag":83,"props":4928,"children":4929},{"style":106},[4930],{"type":54,"value":2962},{"type":49,"tag":83,"props":4932,"children":4933},{"style":96},[4934],{"type":54,"value":379},{"type":49,"tag":83,"props":4936,"children":4937},{"style":106},[4938],{"type":54,"value":2971},{"type":49,"tag":83,"props":4940,"children":4941},{"style":96},[4942],{"type":54,"value":4943}," >=",{"type":49,"tag":83,"props":4945,"children":4946},{"style":392},[4947],{"type":54,"value":4948}," 400",{"type":49,"tag":83,"props":4950,"children":4951},{"style":96},[4952],{"type":54,"value":4953}," &&",{"type":49,"tag":83,"props":4955,"children":4956},{"style":106},[4957],{"type":54,"value":2858},{"type":49,"tag":83,"props":4959,"children":4960},{"style":96},[4961],{"type":54,"value":379},{"type":49,"tag":83,"props":4963,"children":4964},{"style":106},[4965],{"type":54,"value":2971},{"type":49,"tag":83,"props":4967,"children":4968},{"style":96},[4969],{"type":54,"value":4970}," \u003C",{"type":49,"tag":83,"props":4972,"children":4973},{"style":392},[4974],{"type":54,"value":4975}," 500",{"type":49,"tag":83,"props":4977,"children":4978},{"style":250},[4979],{"type":54,"value":2986},{"type":49,"tag":83,"props":4981,"children":4982},{"style":96},[4983],{"type":54,"value":243},{"type":49,"tag":83,"props":4985,"children":4986},{"class":85,"line":160},[4987,4992,4996,5000,5004,5009,5014,5019,5023,5027,5031,5036],{"type":49,"tag":83,"props":4988,"children":4989},{"style":90},[4990],{"type":54,"value":4991},"      throw",{"type":49,"tag":83,"props":4993,"children":4994},{"style":96},[4995],{"type":54,"value":3003},{"type":49,"tag":83,"props":4997,"children":4998},{"style":230},[4999],{"type":54,"value":2734},{"type":49,"tag":83,"props":5001,"children":5002},{"style":250},[5003],{"type":54,"value":238},{"type":49,"tag":83,"props":5005,"children":5006},{"style":96},[5007],{"type":54,"value":5008},"`",{"type":49,"tag":83,"props":5010,"children":5011},{"style":149},[5012],{"type":54,"value":5013},"Client error: ",{"type":49,"tag":83,"props":5015,"children":5016},{"style":96},[5017],{"type":54,"value":5018},"${",{"type":49,"tag":83,"props":5020,"children":5021},{"style":106},[5022],{"type":54,"value":2962},{"type":49,"tag":83,"props":5024,"children":5025},{"style":96},[5026],{"type":54,"value":379},{"type":49,"tag":83,"props":5028,"children":5029},{"style":106},[5030],{"type":54,"value":2971},{"type":49,"tag":83,"props":5032,"children":5033},{"style":96},[5034],{"type":54,"value":5035},"}`",{"type":49,"tag":83,"props":5037,"children":5038},{"style":250},[5039],{"type":54,"value":494},{"type":49,"tag":83,"props":5041,"children":5042},{"class":85,"line":200},[5043],{"type":49,"tag":83,"props":5044,"children":5045},{"style":96},[5046],{"type":54,"value":5047},"    }\n",{"type":49,"tag":83,"props":5049,"children":5050},{"class":85,"line":210},[5051,5055,5059,5063,5067,5071,5075,5079,5083,5087,5091,5095,5099,5103,5107],{"type":49,"tag":83,"props":5052,"children":5053},{"style":90},[5054],{"type":54,"value":4724},{"type":49,"tag":83,"props":5056,"children":5057},{"style":250},[5058],{"type":54,"value":1136},{"type":49,"tag":83,"props":5060,"children":5061},{"style":96},[5062],{"type":54,"value":3052},{"type":49,"tag":83,"props":5064,"children":5065},{"style":106},[5066],{"type":54,"value":2962},{"type":49,"tag":83,"props":5068,"children":5069},{"style":96},[5070],{"type":54,"value":379},{"type":49,"tag":83,"props":5072,"children":5073},{"style":106},[5074],{"type":54,"value":3065},{"type":49,"tag":83,"props":5076,"children":5077},{"style":250},[5078],{"type":54,"value":2986},{"type":49,"tag":83,"props":5080,"children":5081},{"style":90},[5082],{"type":54,"value":3074},{"type":49,"tag":83,"props":5084,"children":5085},{"style":96},[5086],{"type":54,"value":3003},{"type":49,"tag":83,"props":5088,"children":5089},{"style":230},[5090],{"type":54,"value":3083},{"type":49,"tag":83,"props":5092,"children":5093},{"style":250},[5094],{"type":54,"value":238},{"type":49,"tag":83,"props":5096,"children":5097},{"style":96},[5098],{"type":54,"value":848},{"type":49,"tag":83,"props":5100,"children":5101},{"style":149},[5102],{"type":54,"value":3096},{"type":49,"tag":83,"props":5104,"children":5105},{"style":96},[5106],{"type":54,"value":848},{"type":49,"tag":83,"props":5108,"children":5109},{"style":250},[5110],{"type":54,"value":494},{"type":49,"tag":83,"props":5112,"children":5113},{"class":85,"line":246},[5114],{"type":49,"tag":83,"props":5115,"children":5116},{"style":96},[5117],{"type":54,"value":708},{"type":49,"tag":83,"props":5119,"children":5120},{"class":85,"line":284},[5121],{"type":49,"tag":83,"props":5122,"children":5123},{"style":96},[5124],{"type":54,"value":2394},{"type":49,"tag":50,"props":5126,"children":5127},{},[5128],{"type":54,"value":5129},"Without distinguishing retriable from permanent errors, 4xx responses (validation, auth, not found) will retry forever until max retries, wasting resources and filling logs.",{"type":49,"tag":50,"props":5131,"children":5132},{},[5133],{"type":54,"value":5134},"See also: db-core\u002Fmutations-optimistic\u002FSKILL.md — for the underlying mutation primitives.",{"type":49,"tag":50,"props":5136,"children":5137},{},[5138],{"type":54,"value":5139},"See also: db-core\u002Fcollection-setup\u002FSKILL.md — for setting up collections used with offline transactions.",{"type":49,"tag":5141,"props":5142,"children":5143},"style",{},[5144],{"type":54,"value":5145},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":5147,"total":5287},[5148,5164,5176,5188,5201,5213,5223,5233,5246,5256,5267,5277],{"slug":5149,"name":5149,"fn":5150,"description":5151,"org":5152,"tags":5153,"stars":5161,"repoUrl":5162,"updatedAt":5163},"aggregation","perform data aggregation in TanStack Table","Aggregate TanStack Table columns independently of grouping, including grand totals, caller-selected row totals, multiple keyed aggregations, custom context-based definitions, grouped merges, manual values, and worker constraints.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5154,5157,5160],{"name":5155,"slug":5156,"type":15},"Data Analysis","data-analysis",{"name":5158,"slug":5159,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},28175,"https:\u002F\u002Fgithub.com\u002FTanStack\u002Ftable","2026-07-30T05:25:59.429787",{"slug":5165,"name":5165,"fn":5166,"description":5167,"org":5168,"tags":5169,"stars":5161,"repoUrl":5162,"updatedAt":5175},"api-not-found","diagnose TanStack Table API errors","Diagnose missing TanStack Table v9 exports, options, state slices, and instance methods. Load before inventing an API when code sees a type error, undefined feature method, absent object key, adapter mismatch, or v8-shaped example.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5170,5173,5174],{"name":5171,"slug":5172,"type":15},"Debugging","debugging",{"name":5158,"slug":5159,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:26:05.418735",{"slug":5177,"name":5177,"fn":5178,"description":5179,"org":5180,"tags":5181,"stars":5161,"repoUrl":5162,"updatedAt":5187},"cell-selection","select rectangular cell ranges in tables","Select rectangular cell ranges with cellSelectionFeature: two-corner range state keyed by row and column id, mousedown\u002Fmouseenter handlers, selection edges, render-order resolution under pinning, and autoResetCellSelection. Load when ranges widen unexpectedly after sorting or column reordering, when a drag re-renders the whole table, or when building copy-to-clipboard from a selection.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5182,5183,5184],{"name":5155,"slug":5156,"type":15},{"name":9,"slug":8,"type":15},{"name":5185,"slug":5186,"type":15},"UI Components","ui-components","2026-07-30T05:25:38.403427",{"slug":5189,"name":5189,"fn":5190,"description":5191,"org":5192,"tags":5193,"stars":5161,"repoUrl":5162,"updatedAt":5200},"client-vs-server","manage TanStack Table data pipelines","Choose client or server ownership for filtering, grouping, sorting, expanding, and pagination in TanStack Table v9. Load for manual* flags, mixed pipelines, server counts, or deciding which dataset each row-model stage receives.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5194,5197,5198,5199],{"name":5195,"slug":5196,"type":15},"Data Pipeline","data-pipeline",{"name":5158,"slug":5159,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:45.400104",{"slug":5202,"name":5202,"fn":5203,"description":5204,"org":5205,"tags":5206,"stars":5161,"repoUrl":5162,"updatedAt":5212},"column-faceting","build faceted filter UIs","Build faceted filter UIs with columnFacetingFeature, facetedRowModel, facetedUniqueValues, and facetedMinMaxValues. Load for facet counts, numeric ranges, own-filter exclusion, or server-page facet completeness.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5207,5210,5211],{"name":5208,"slug":5209,"type":15},"Data Visualization","data-visualization",{"name":5158,"slug":5159,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:41.397257",{"slug":5214,"name":5214,"fn":5215,"description":5216,"org":5217,"tags":5218,"stars":5161,"repoUrl":5162,"updatedAt":5222},"column-filtering","implement column filtering in TanStack Table","Filter columns with columnFilteringFeature, filteredRowModel, filterFns, filterMeta, nested-row direction, and manualFiltering. Load for accessor compatibility, controlled filter updaters, fuzzy metadata, or client\u002Fserver ownership.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5219,5220,5221],{"name":5155,"slug":5156,"type":15},{"name":5158,"slug":5159,"type":15},{"name":9,"slug":8,"type":15},"2026-07-30T05:25:53.391632",{"slug":5224,"name":5224,"fn":5225,"description":5226,"org":5227,"tags":5228,"stars":5161,"repoUrl":5162,"updatedAt":5232},"column-ordering","manage TanStack Table column ordering","Control TanStack Table v9 leaf columnOrder with stable IDs while accounting for pinning regions, visibility, and groupedColumnMode precedence. Load for drag-and-drop columns or rendered order that differs from state.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5229,5230,5231],{"name":5158,"slug":5159,"type":15},{"name":9,"slug":8,"type":15},{"name":5185,"slug":5186,"type":15},"2026-07-30T05:26:03.37801",{"slug":5234,"name":5234,"fn":5235,"description":5236,"org":5237,"tags":5238,"stars":5161,"repoUrl":5162,"updatedAt":5245},"column-pinning","configure column pinning in TanStack Table","Pin columns into logical start, center, and end regions with columnPinningFeature and renderer-owned sticky CSS. Load for RTL offsets, z-index, backgrounds, overflow, widths, gaps, or overlaps.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5239,5242,5243,5244],{"name":5240,"slug":5241,"type":15},"CSS","css",{"name":5158,"slug":5159,"type":15},{"name":9,"slug":8,"type":15},{"name":5185,"slug":5186,"type":15},"2026-07-30T05:25:55.377366",{"slug":5247,"name":5247,"fn":5248,"description":5249,"org":5250,"tags":5251,"stars":5161,"repoUrl":5162,"updatedAt":5255},"column-resizing","implement column resizing in TanStack Table","Wire columnResizingFeature, header.getResizeHandler, resize mode and direction, pointer or touch events, and performant CSS-variable updates. Load when resize state changes but widths do not, or large tables resize slowly.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5252,5253,5254],{"name":5158,"slug":5159,"type":15},{"name":9,"slug":8,"type":15},{"name":5185,"slug":5186,"type":15},"2026-07-30T05:25:51.400011",{"slug":5257,"name":5257,"fn":5258,"description":5259,"org":5260,"tags":5261,"stars":5161,"repoUrl":5162,"updatedAt":5266},"column-sizing","configure column sizing in TanStack Table","Use columnSizingFeature numeric size, minSize, maxSize, getSize, getStart, getAfter, and total-size APIs in table, grid, or flex CSS. Load for auto or percentage misconceptions and sizing\u002Fpinning layout mismatch.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5262,5263,5264,5265],{"name":5240,"slug":5241,"type":15},{"name":5158,"slug":5159,"type":15},{"name":9,"slug":8,"type":15},{"name":5185,"slug":5186,"type":15},"2026-07-30T05:25:48.703799",{"slug":5268,"name":5268,"fn":5269,"description":5270,"org":5271,"tags":5272,"stars":5161,"repoUrl":5162,"updatedAt":5276},"column-visibility","manage column visibility in TanStack Table","Hide columns with columnVisibilityFeature while rendering visibility-aware header, column, and cell collections. Load when hidden columns remain in the DOM, false-versus-absent state is confused, or enableHiding is misunderstood.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5273,5274,5275],{"name":5158,"slug":5159,"type":15},{"name":9,"slug":8,"type":15},{"name":5185,"slug":5186,"type":15},"2026-07-30T05:25:47.367943",{"slug":5278,"name":5278,"fn":5279,"description":5280,"org":5281,"tags":5282,"stars":5161,"repoUrl":5162,"updatedAt":5286},"core","build data grids with TanStack Table","Use TanStack Table v9 as a headless data-grid state and row-processing engine. Load for first-table architecture, stable data and columns, row numbering with getDisplayIndex, semantic rendering, framework adapter choice, or deciding what Table owns versus the renderer.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5283,5284,5285],{"name":5155,"slug":5156,"type":15},{"name":5158,"slug":5159,"type":15},{"name":5185,"slug":5186,"type":15},"2026-07-30T05:25:52.366295",125,{"items":5289,"total":443},[5290,5304,5315,5326,5339,5352,5362],{"slug":5291,"name":5291,"fn":5292,"description":5293,"org":5294,"tags":5295,"stars":22,"repoUrl":23,"updatedAt":5303},"angular-db","integrate TanStack DB with Angular","Angular bindings for TanStack DB. injectLiveQuery inject function with Angular signals (Signal\u003CT>) for all return values. Reactive params pattern ({ params: () => T, query: ({ params, q }) => QueryBuilder }) for dynamic queries. Must be called in injection context. Angular 17+ control flow (@if, @for) and signal inputs supported. Import from @tanstack\u002Fangular-db (re-exports all of @tanstack\u002Fdb).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5296,5299,5300],{"name":5297,"slug":5298,"type":15},"Angular","angular",{"name":17,"slug":18,"type":15},{"name":5301,"slug":5302,"type":15},"TypeScript","typescript","2026-07-16T06:01:16.345046",{"slug":39,"name":39,"fn":5305,"description":5306,"org":5307,"tags":5308,"stars":22,"repoUrl":23,"updatedAt":5314},"manage database collections with TanStack DB","TanStack DB core concepts: createCollection with queryCollectionOptions, electricCollectionOptions, powerSyncCollectionOptions, rxdbCollectionOptions, trailbaseCollectionOptions, localOnlyCollectionOptions. Live queries via query builder (from, where, join, select, groupBy, orderBy, limit). Optimistic mutations with draft proxy (collection.insert, collection.update, collection.delete). createOptimisticAction, createTransaction, createPacedMutations. Entry point for all TanStack DB skills.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5309,5312,5313],{"name":5310,"slug":5311,"type":15},"Data Modeling","data-modeling",{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T06:06:40.214285",{"slug":5316,"name":5317,"fn":5318,"description":5319,"org":5320,"tags":5321,"stars":22,"repoUrl":23,"updatedAt":5325},"db-corecollection-setup","db-core\u002Fcollection-setup","set up typed collections in TanStack DB","Creating typed collections with createCollection. Adapter selection: queryCollectionOptions (REST\u002FTanStack Query), electricCollectionOptions (ElectricSQL real-time sync), powerSyncCollectionOptions (PowerSync SQLite), rxdbCollectionOptions (RxDB), trailbaseCollectionOptions (TrailBase), localOnlyCollectionOptions, localStorageCollectionOptions. CollectionConfig options: getKey, schema, sync, gcTime, autoIndex (default off), defaultIndexType, syncMode (eager\u002Fon-demand, plus progressive for Electric). StandardSchema validation with Zod\u002FValibot\u002FArkType. Collection lifecycle (idle\u002Floading\u002Fready\u002Ferror). Adapter-specific sync patterns including Electric txid tracking, Query direct writes, and PowerSync query-driven sync with onLoad\u002FonLoadSubset hooks.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5322,5323,5324],{"name":5310,"slug":5311,"type":15},{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},"2026-07-26T05:48:58.321777",{"slug":5327,"name":5328,"fn":5329,"description":5330,"org":5331,"tags":5332,"stars":22,"repoUrl":23,"updatedAt":5338},"db-corecustom-adapter","db-core\u002Fcustom-adapter","build custom TanStack collection adapters","Building custom collection adapters for new backends. SyncConfig interface: sync function receiving begin, write, commit, markReady, truncate, metadata primitives. ChangeMessage format (insert, update, delete). loadSubset for on-demand sync. LoadSubsetOptions (where, orderBy, limit, cursor). Expression parsing: parseWhereExpression, parseOrderByExpression, extractSimpleComparisons, parseLoadSubsetOptions. Collection options creator pattern. rowUpdateMode (partial vs full). Subscription lifecycle and cleanup functions. Persisted sync metadata API (metadata.row and metadata.collection) for storing per-row and per-collection adapter state.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5333,5334,5337],{"name":17,"slug":18,"type":15},{"name":5335,"slug":5336,"type":15},"Engineering","engineering",{"name":9,"slug":8,"type":15},"2026-07-16T06:04:06.862485",{"slug":5340,"name":5341,"fn":5342,"description":5343,"org":5344,"tags":5345,"stars":22,"repoUrl":23,"updatedAt":5351},"db-corelive-queries","db-core\u002Flive-queries","build live queries with TanStack DB","Query builder fluent API: from, where, join, leftJoin, rightJoin, innerJoin, fullJoin, select, fn.select, groupBy, having, orderBy, limit, offset, distinct, findOne. Operators: eq, gt, gte, lt, lte, like, ilike, inArray, isNull, isUndefined, and, or, not. Aggregates: count, sum, avg, min, max. String functions: upper, lower, length, concat. Utility: coalesce, caseWhen. Math: add. $selected namespace. createLiveQueryCollection. Derived collections. Predicate push-down. Incremental view maintenance via differential dataflow (d2ts). Virtual properties ($synced, $origin, $key, $collectionId). Includes subqueries for hierarchical data. toArray and concat(toArray(...)) scalar includes. queryOnce for one-shot queries. createEffect for reactive side effects (onEnter, onUpdate, onExit, onBatch).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5346,5347,5350],{"name":17,"slug":18,"type":15},{"name":5348,"slug":5349,"type":15},"SQL","sql",{"name":9,"slug":8,"type":15},"2026-07-16T06:04:08.757365",{"slug":5353,"name":40,"fn":5354,"description":5355,"org":5356,"tags":5357,"stars":22,"repoUrl":23,"updatedAt":5361},"db-coremutations-optimistic","manage optimistic mutations in TanStack DB","collection.insert, collection.update (Immer-style draft proxy), collection.delete. createOptimisticAction (onMutate + mutationFn). createPacedMutations with debounceStrategy, throttleStrategy, queueStrategy. createTransaction, getActiveTransaction, ambient transaction context. Transaction lifecycle (pending\u002Fpersisting\u002Fcompleted\u002Ffailed). Mutation merging. onInsert\u002FonUpdate\u002FonDelete handlers. PendingMutation type. Transaction.isPersisted.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5358,5359,5360],{"name":17,"slug":18,"type":15},{"name":5158,"slug":5159,"type":15},{"name":9,"slug":8,"type":15},"2026-07-26T05:48:57.301803",{"slug":5363,"name":5364,"fn":5365,"description":5366,"org":5367,"tags":5368,"stars":22,"repoUrl":23,"updatedAt":5377},"db-corepersistence","db-core\u002Fpersistence","implement SQLite-backed persistence for TanStack DB","SQLite-backed persistence for TanStack DB collections. persistedCollectionOptions wraps any adapter (Electric, Query, PowerSync, or local-only) with durable local storage. Platform adapters: browser (WA-SQLite OPFS), React Native (op-sqlite), Expo (expo-sqlite), Electron (IPC), Node (better-sqlite3), Capacitor, Tauri, Cloudflare Durable Objects. Multi-tab\u002Fmulti-process coordination via BrowserCollectionCoordinator \u002F ElectronCollectionCoordinator \u002F SingleProcessCoordinator. schemaVersion for migration resets. Local-only mode for offline-first without a server.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[5369,5370,5373,5376],{"name":17,"slug":18,"type":15},{"name":5371,"slug":5372,"type":15},"Persistence","persistence",{"name":5374,"slug":5375,"type":15},"SQLite","sqlite",{"name":9,"slug":8,"type":15},"2026-07-17T06:06:39.182084"]