palistor 0.0.26 → 0.0.27

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.
Files changed (3) hide show
  1. package/README.md +37 -2
  2. package/README.ru.md +38 -2
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Palistor
2
2
 
3
- > Reactive form state manager for React with granular re-renders
3
+ > A declarative framework for data-driven React interfaces behavior, data and view as three separate layers
4
4
 
5
5
  **English** | [Русский](./README.ru.md)
6
6
 
@@ -8,7 +8,7 @@
8
8
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
9
9
  [![react](https://img.shields.io/badge/react-%5E19-61dafb.svg)](https://react.dev)
10
10
 
11
- Palistor is a form state management library built on a two-layer proxy architecture: a framework-agnostic core plus a React binding with per-field subscription tracking. A component re-renders **only** when a field it actually read during render changes.
11
+ **Palistor is a declarative framework for stateful, data-driven React interfaces.** It treats a screen as three independent layers — **configuration** (how it behaves), **data** (where its values come from) and **view** (how it renders) — and keeps them from leaking into each other. A two-layer proxy is the seam that binds them: reads become fine-grained subscriptions, writes run the behavior you declared. A component re-renders **only** for the exact fields it read.
12
12
 
13
13
  ```tsx
14
14
  const store = new Palistor({
@@ -31,6 +31,41 @@ function Form() {
31
31
 
32
32
  ---
33
33
 
34
+ ## The idea — three layers, not one store
35
+
36
+ Most React screens tangle three unrelated concerns inside components: how the screen **behaves** (validation, conditional fields, cross-field rules), where its **data** comes from (loading, caching, mutation) and how it **looks** (JSX). As the screen grows, the three braid together until every change touches everything.
37
+
38
+ Palistor pulls them apart:
39
+
40
+ ```
41
+ ┌── Configuration — behavior ──────────────┐ declarative · framework-agnostic
42
+ │ fields · validation · visibility · │ isVisible / isRequired / validate
43
+ │ cross-field rules · dependencies · │ formatter / setter / onSubmit
44
+ │ lifecycle │ fully testable without React
45
+ └─────────────────────┬────────────────────┘
46
+ │ proxy — the seam:
47
+ │ read → subscribe to a field
48
+ │ write → run the declared pipeline
49
+ ┌── Data — values & entities ──────────────┐ normalized entity registry
50
+ │ values cache · normalized registry · │ resolvers with auto-tracked deps
51
+ │ async resolvers │ retry · optimistic · Suspense
52
+ └─────────────────────┬────────────────────┘
53
+
54
+ ┌── View — rendering ──────────────────────┐ useForm(store) → tracking proxy
55
+ │ read state · assign values · no logic │ granular, per-field re-renders
56
+ └──────────────────────────────────────────┘
57
+ ```
58
+
59
+ - **Configuration — behavior.** One declarative tree describes fields, validation, visibility, cross-field rules, dependencies and lifecycle (`onSubmit`, `resolve`). Pure and framework-agnostic — fully testable without React.
60
+ - **Data — values & entities.** Values flow through a normalized entity registry and async resolvers with automatically tracked dependencies, retry, optimistic updates and Suspense.
61
+ - **View — rendering.** Components only read reactive state and assign values. They carry no logic and re-render only for the fields they actually read.
62
+
63
+ The proxy is the seam between the layers: a **read** (`form.email.value`) subscribes the component to that field; a **write** (`form.email.value = x`) runs the pipeline you declared in the config — formatter → setter → recompute → notify. Nothing is wired by hand.
64
+
65
+ The payoff is that complexity grows **per layer**, not per component. A form, a wizard, a data table and an admin panel are the same three layers at different scale — which is why async loading, normalized lists, multi-step flows, persistence and i18n are part of the framework, not add-ons you bolt on later.
66
+
67
+ ---
68
+
34
69
  ## Table of contents
35
70
 
36
71
  - [Features](#features)
package/README.ru.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Palistor
2
2
 
3
- > Реактивный state manager для форм в React с гранулярными ре-рендерами
3
+ > Декларативный фреймворк для data-driven интерфейсов на React поведение, данные и отображение как три отдельных слоя
4
4
 
5
5
  [English](./README.md) | **Русский**
6
6
 
@@ -8,7 +8,7 @@
8
8
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
9
9
  [![react](https://img.shields.io/badge/react-%5E19-61dafb.svg)](https://react.dev)
10
10
 
11
- Palistor — библиотека управления состоянием форм, построенная на двухслойной proxy-архитектуре: framework-agnostic ядро плюс React-интеграция с точечным трекингом подписок. Компонент перерендеривается **только** при изменении тех полей, которые он реально читал во время рендера.
11
+ **Palistor — декларативный фреймворк для stateful, data-driven интерфейсов на React.** Он рассматривает экран как три независимых слоя — **конфигурация** (как он себя ведёт), **данные** (откуда берутся значения) и **отображение** (как он рендерится) — и не даёт им протекать друг в друга. Двухслойный proxy это шов, который их связывает: чтения становятся точечными подписками, записи запускают объявленное вами поведение. Компонент перерендеривается **только** для тех полей, которые он реально читал.
12
12
 
13
13
  ```tsx
14
14
  const store = new Palistor({
@@ -31,6 +31,42 @@ function Form() {
31
31
 
32
32
  ---
33
33
 
34
+ ## Идея — три слоя, а не ещё один store
35
+
36
+ Большинство React-экранов сплетают внутри компонентов три несвязанные заботы: как экран **себя ведёт** (валидация, условные поля, кросс-полевые правила), откуда берутся его **данные** (загрузка, кэширование, мутации) и как он **выглядит** (JSX). По мере роста экрана эти три сплетаются так, что любое изменение задевает всё.
37
+
38
+ Palistor их разделяет:
39
+
40
+ ```
41
+ ┌── Конфигурация — поведение ──────────────┐ декларативно · framework-agnostic
42
+ │ поля · валидация · видимость · │ isVisible / isRequired / validate
43
+ │ кросс-полевые правила · зависимости · │ formatter / setter / onSubmit
44
+ │ жизненный цикл │ полностью тестируемо без React
45
+ └─────────────────────┬────────────────────┘
46
+ │ proxy — шов:
47
+ │ чтение → подписка на поле
48
+ │ запись → запуск объявленного пайплайна
49
+ ┌── Данные — значения и сущности ──────────┐ нормализованный реестр сущностей
50
+ │ кэш значений · нормализованный реестр · │ резолверы с авто-трекингом зависимостей
51
+ │ async-резолверы │ retry · оптимистичные · Suspense
52
+ └─────────────────────┬────────────────────┘
53
+
54
+ ┌── Отображение — рендеринг ───────────────┐ useForm(store) → tracking proxy
55
+ │ читать состояние · присваивать │ гранулярные, по-полевые ре-рендеры
56
+ │ значения · без логики │
57
+ └──────────────────────────────────────────┘
58
+ ```
59
+
60
+ - **Конфигурация — поведение.** Одно декларативное дерево описывает поля, валидацию, видимость, кросс-полевые правила, зависимости и жизненный цикл (`onSubmit`, `resolve`). Чистое и framework-agnostic — полностью тестируемо без React.
61
+ - **Данные — значения и сущности.** Значения текут через нормализованный реестр сущностей и async-резолверы с автоматически отслеживаемыми зависимостями, retry, оптимистичными обновлениями и Suspense.
62
+ - **Отображение — рендеринг.** Компоненты только читают реактивное состояние и присваивают значения. Они не несут логики и перерендериваются только для тех полей, которые реально прочитали.
63
+
64
+ Proxy — это шов между слоями: **чтение** (`form.email.value`) подписывает компонент на это поле; **запись** (`form.email.value = x`) запускает пайплайн, который вы объявили в конфиге — formatter → setter → recompute → notify. Ничего не связывается руками.
65
+
66
+ Выигрыш в том, что сложность растёт **по слоям**, а не по компонентам. Форма, мастер, таблица данных и админ-панель — это одни и те же три слоя в разном масштабе; именно поэтому async-загрузка, нормализованные списки, пошаговые flow, персист и i18n — часть фреймворка, а не аддоны, которые прикручиваешь потом.
67
+
68
+ ---
69
+
34
70
  ## Содержание
35
71
 
36
72
  - [Возможности](#возможности)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "palistor",
3
- "version": "0.0.26",
4
- "description": "Reactive form state manager for React with granular re-renders",
3
+ "version": "0.0.27",
4
+ "description": "Declarative framework for data-driven React UIs — splits behavior, data and view into three layers; forms, wizards, async lists, granular per-field re-renders",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",