@panneau/core 5.0.0-alpha.7 → 5.0.0-alpha.8
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/dist/definition/resource.d.ts +2 -2
- package/dist/form/form.d.ts +3 -3
- package/dist/form/problem.d.ts +1 -1
- package/dist/form/selectors.d.ts +1 -1
- package/dist/form/store.d.ts +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/list/list.d.ts +2 -2
- package/dist/plugins.d.ts +1 -1
- package/dist/react/provider.d.ts +4 -4
- package/dist/react/useForm.d.ts +1 -1
- package/dist/react/useList.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Definition, Resource } from '@panneau/protocol';
|
|
2
|
-
import { type ResolveFormOptions, type ResolvedForm } from './form';
|
|
3
|
-
import { type ResolvedList } from './list';
|
|
2
|
+
import { type ResolveFormOptions, type ResolvedForm } from './form.js';
|
|
3
|
+
import { type ResolvedList } from './list.js';
|
|
4
4
|
/** What the current user can do with a resource as a whole. */
|
|
5
5
|
export interface ResourceAbilities {
|
|
6
6
|
viewAny: boolean;
|
package/dist/form/form.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Condition, Field, Item, RuleFailure } from '@panneau/protocol';
|
|
2
|
-
import type { FormMode } from '../definition/form';
|
|
3
|
-
import { type Values } from '../values';
|
|
4
|
-
import { type FormStore } from './store';
|
|
2
|
+
import type { FormMode } from '../definition/form.js';
|
|
3
|
+
import { type Values } from '../values.js';
|
|
4
|
+
import { type FormStore } from './store.js';
|
|
5
5
|
/**
|
|
6
6
|
* - `idle`: nothing submitted yet, or after a reset;
|
|
7
7
|
* - `submitting`: waiting for `onSubmit`;
|
package/dist/form/problem.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Item, Problem } from '@panneau/protocol';
|
|
2
|
-
import type { Values } from '../values';
|
|
2
|
+
import type { Values } from '../values.js';
|
|
3
3
|
/**
|
|
4
4
|
* The problem details carried by an error: the error itself when it is a problem, or its
|
|
5
5
|
* `problem` property, as on the errors of `@panneau/data`. A custom adapter only needs to throw
|
package/dist/form/selectors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Condition } from '@panneau/protocol';
|
|
2
|
-
import type { FormState, GetErrorsOptions } from './form';
|
|
2
|
+
import type { FormState, GetErrorsOptions } from './form.js';
|
|
3
3
|
/** The value at a dot path (`title.fr`). */
|
|
4
4
|
export declare function selectValue(state: FormState, path: string): unknown;
|
|
5
5
|
/** Errors at a path, and with `nested` at the paths inside it (`title.fr` for `title`). */
|
package/dist/form/store.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Values } from '../values';
|
|
1
|
+
import { type Values } from '../values.js';
|
|
2
2
|
/**
|
|
3
3
|
* Where the values of a form live. The form only reads and writes values through this interface,
|
|
4
4
|
* so a shared store (Yjs, in `@panneau/collab`) can replace the local one. Errors, touched fields
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { can, canRunAction, getActionPlacements, isActionAllowedOn, partitionByAction, } from './definition/abilities';
|
|
2
|
-
export { type FormMode, type ResolveFormOptions, type ResolvedForm, getLayoutFieldNames, resolveFields, resolveForm, } from './definition/form';
|
|
3
|
-
export { DEFAULT_PER_PAGE, type ResolvedColumn, type ResolvedList, groupActions, resolveList, } from './definition/list';
|
|
4
|
-
export { type ResolvedResource, type ResourceAbilities, findResource, resolveResource, } from './definition/resource';
|
|
5
|
-
export { type Form, type FormConflict, type FormOptions, type FormState, type FormStatus, type GetErrorsOptions, type SubmitContext, type SubmitResult, type UpdatableFormOptions, createForm, getDefaultValues, } from './form/form';
|
|
6
|
-
export { formatRuleFailure } from './form/messages';
|
|
7
|
-
export { getItemValues, getProblem, isItem } from './form/problem';
|
|
8
|
-
export { selectErrorCount, selectErrors, selectValue, selectVisible } from './form/selectors';
|
|
9
|
-
export { type FormStore, createLocalStore } from './form/store';
|
|
10
|
-
export { type List, type ListDefaults, type ListOptions, type ListSelection, type ListState, createList, } from './list/list';
|
|
11
|
-
export { type MemoryRouter, type Router, createHistoryRouter, createMemoryRouter, } from './list/router';
|
|
12
|
-
export { type Messages, type MessagesLoader, type PanneauPlugin, type PluginComponent, type PluginComponentKind, type PluginRegistry, type Theme, createPluginRegistry, definePlugin, loadMessages, resolveTheme, } from './plugins';
|
|
13
|
-
export { type Command, type CommandContext, type CommandSource, getCommands, getSearchableResources, isSearchable, } from './commands';
|
|
14
|
-
export { type PreviewProps } from './preview';
|
|
15
|
-
export { type LeaveGuard, type LeaveGuards, LeaveGuardsProvider, type LeaveGuardsProviderProps, createLeaveGuards, useLeaveGuard, useLeaveGuards, } from './react/leaveGuards';
|
|
16
|
-
export { PanneauProvider, type PanneauContextValue, type PanneauProviderProps, usePanneau, usePlugins, useResource, } from './react/provider';
|
|
17
|
-
export { type UseFormFieldResult, type UseFormResult, useForm, useFormField, } from './react/useForm';
|
|
18
|
-
export { type UseListResult, useList } from './react/useList';
|
|
19
|
-
export { type Values, isEqual, setValue } from './values';
|
|
1
|
+
export { can, canRunAction, getActionPlacements, isActionAllowedOn, partitionByAction, } from './definition/abilities.js';
|
|
2
|
+
export { type FormMode, type ResolveFormOptions, type ResolvedForm, getLayoutFieldNames, resolveFields, resolveForm, } from './definition/form.js';
|
|
3
|
+
export { DEFAULT_PER_PAGE, type ResolvedColumn, type ResolvedList, groupActions, resolveList, } from './definition/list.js';
|
|
4
|
+
export { type ResolvedResource, type ResourceAbilities, findResource, resolveResource, } from './definition/resource.js';
|
|
5
|
+
export { type Form, type FormConflict, type FormOptions, type FormState, type FormStatus, type GetErrorsOptions, type SubmitContext, type SubmitResult, type UpdatableFormOptions, createForm, getDefaultValues, } from './form/form.js';
|
|
6
|
+
export { formatRuleFailure } from './form/messages.js';
|
|
7
|
+
export { getItemValues, getProblem, isItem } from './form/problem.js';
|
|
8
|
+
export { selectErrorCount, selectErrors, selectValue, selectVisible } from './form/selectors.js';
|
|
9
|
+
export { type FormStore, createLocalStore } from './form/store.js';
|
|
10
|
+
export { type List, type ListDefaults, type ListOptions, type ListSelection, type ListState, createList, } from './list/list.js';
|
|
11
|
+
export { type MemoryRouter, type Router, createHistoryRouter, createMemoryRouter, } from './list/router.js';
|
|
12
|
+
export { type Messages, type MessagesLoader, type PanneauPlugin, type PluginComponent, type PluginComponentKind, type PluginRegistry, type Theme, createPluginRegistry, definePlugin, loadMessages, resolveTheme, } from './plugins.js';
|
|
13
|
+
export { type Command, type CommandContext, type CommandSource, getCommands, getSearchableResources, isSearchable, } from './commands.js';
|
|
14
|
+
export { type PreviewProps } from './preview.js';
|
|
15
|
+
export { type LeaveGuard, type LeaveGuards, LeaveGuardsProvider, type LeaveGuardsProviderProps, createLeaveGuards, useLeaveGuard, useLeaveGuards, } from './react/leaveGuards.js';
|
|
16
|
+
export { PanneauProvider, type PanneauContextValue, type PanneauProviderProps, usePanneau, usePlugins, useResource, } from './react/provider.js';
|
|
17
|
+
export { type UseFormFieldResult, type UseFormResult, useForm, useFormField, } from './react/useForm.js';
|
|
18
|
+
export { type UseListResult, useList } from './react/useList.js';
|
|
19
|
+
export { type Values, isEqual, setValue } from './values.js';
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/list/list.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FilterValue, ListQuery, Selection } from '@panneau/protocol';
|
|
2
|
-
import type { ResolvedList } from '../definition/list';
|
|
3
|
-
import type { Router } from './router';
|
|
2
|
+
import type { ResolvedList } from '../definition/list.js';
|
|
3
|
+
import type { Router } from './router.js';
|
|
4
4
|
/**
|
|
5
5
|
* Selected items: some ids, or every item matching the list query (filters and search) except
|
|
6
6
|
* some ids. "All matching" covers the items of every page.
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
import type { DefinitionTheme, Theme } from '@panneau/protocol';
|
|
3
|
-
import type { CommandSource } from './commands';
|
|
3
|
+
import type { CommandSource } from './commands.js';
|
|
4
4
|
/** A theme of `@panneau/ui`, as plain data: what plugins register (decision 0024). */
|
|
5
5
|
export type { Theme };
|
|
6
6
|
/**
|
package/dist/react/provider.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { Definition } from '@panneau/protocol';
|
|
3
|
-
import { type ResolveFormOptions } from '../definition/form';
|
|
4
|
-
import { type ResolvedResource } from '../definition/resource';
|
|
5
|
-
import type { Router } from '../list/router';
|
|
6
|
-
import { type PanneauPlugin, type PluginRegistry } from '../plugins';
|
|
3
|
+
import { type ResolveFormOptions } from '../definition/form.js';
|
|
4
|
+
import { type ResolvedResource } from '../definition/resource.js';
|
|
5
|
+
import type { Router } from '../list/router.js';
|
|
6
|
+
import { type PanneauPlugin, type PluginRegistry } from '../plugins.js';
|
|
7
7
|
/** What `PanneauProvider` gives to the hooks below it. */
|
|
8
8
|
export interface PanneauContextValue {
|
|
9
9
|
plugins: PluginRegistry;
|
package/dist/react/useForm.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Form, type FormOptions, type FormState } from '../form/form';
|
|
1
|
+
import { type Form, type FormOptions, type FormState } from '../form/form.js';
|
|
2
2
|
export interface UseFormResult extends FormState {
|
|
3
3
|
/** The form, to change values, submit, reset or resolve a conflict. */
|
|
4
4
|
form: Form;
|
package/dist/react/useList.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type List, type ListOptions, type ListState } from '../list/list';
|
|
1
|
+
import { type List, type ListOptions, type ListState } from '../list/list.js';
|
|
2
2
|
export interface UseListResult extends ListState {
|
|
3
3
|
/** The list, to change the query and the selection. */
|
|
4
4
|
list: List;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/core",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.8",
|
|
4
4
|
"description": "The engine of Panneau: plugin registry, definition to forms and lists, form and list state, with React hooks. No UI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"build": "vite build &&
|
|
25
|
+
"build": "vite build && node ../../scripts/declarations.js",
|
|
26
26
|
"typecheck": "tsc --noEmit",
|
|
27
|
-
"api": "
|
|
27
|
+
"api": "node ../../scripts/declarations.js && node ../../scripts/api-report.js"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
@@ -33,6 +33,6 @@
|
|
|
33
33
|
"react": "^19.2.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@panneau/protocol": "5.0.0-alpha.
|
|
36
|
+
"@panneau/protocol": "5.0.0-alpha.8"
|
|
37
37
|
}
|
|
38
38
|
}
|