@lunora/db 1.0.0-alpha.2 → 1.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -103,3 +103,9 @@ Unless required by applicable law or agreed to in writing, software distributed
103
103
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
104
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
105
  specific language governing permissions and limitations under the License.
106
+
107
+ <!-- DEPENDENCIES -->
108
+ <!-- /DEPENDENCIES -->
109
+
110
+ <!-- TYPE_DEPENDENCIES -->
111
+ <!-- /TYPE_DEPENDENCIES -->
package/README.md CHANGED
@@ -85,6 +85,18 @@ export const createCollections = (client: LunoraClient) =>
85
85
 
86
86
  > `vis generate lunora-collections` scaffolds this from your `schema.ts` + functions.
87
87
 
88
+ ### Local-first sync engine
89
+
90
+ Beyond whole-table collections, the `@lunora/db/collections` and
91
+ `@lunora/db/mutators` subpaths expose the local-first sync engine:
92
+ `lunoraCollectionOptions({ shape })` syncs a **partial replication shape** (only
93
+ the rows a client needs, scoped by a server-resolved predicate) over the poke
94
+ diff protocol, and `defineMutator` + `bindMutators` run **optimistic custom
95
+ mutators** (a local body first, a server-authoritative impl second, rebased on
96
+ every sync tick). The framework adapters add a `useMutator` / `createMutator` /
97
+ `mutator` hook over a bound handle. See the
98
+ **[local-first guide](https://lunora.sh/docs/concepts/local-first)**.
99
+
88
100
  > This README covers the basics. For the full API, options, and guides, see the **[documentation](https://lunora.sh/docs/addons/db)**.
89
101
 
90
102
  ## Related