@localess/react 3.0.5-dev.20260501212257 → 3.0.5-dev.20260502213523
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/core/models/client.d.ts +1 -1
- package/dist/core/models/content.d.ts +1 -1
- package/dist/core/models/sync.d.ts +1 -1
- package/dist/core/richtext.d.ts +1 -1
- package/dist/core/richtext.js +1 -1
- package/dist/core/richtext.mjs +29 -29
- package/dist/core/state.d.ts +2 -2
- package/dist/core/utils/index.d.ts +1 -1
- package/dist/rsc/index.d.ts +2 -2
- package/dist/rsc/localess-sync.js +1 -1
- package/dist/rsc/localess-sync.mjs +2 -2
- package/dist/ssr/index.d.ts +4 -4
- package/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { Content, ContentData,
|
|
1
|
+
export type { Content, ContentAsset, ContentData, ContentDataField, ContentDataSchema, ContentLink, ContentMetadata, ContentReference, ContentRichText, Links, References, } from '@localess/client';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { EventCallback, EventToApp, EventToAppType, LocalessSync } from '@localess/client';
|
package/dist/core/richtext.d.ts
CHANGED
package/dist/core/richtext.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=require(`@tiptap/
|
|
1
|
+
let e=require(`@tiptap/extension-bold`),t=require(`@tiptap/extension-bullet-list`),n=require(`@tiptap/extension-code`),r=require(`@tiptap/extension-code-block-lowlight`),i=require(`@tiptap/extension-document`),a=require(`@tiptap/extension-heading`),o=require(`@tiptap/extension-history`),s=require(`@tiptap/extension-italic`),c=require(`@tiptap/extension-link`),l=require(`@tiptap/extension-list-item`),u=require(`@tiptap/extension-ordered-list`),d=require(`@tiptap/extension-paragraph`),f=require(`@tiptap/extension-strike`),p=require(`@tiptap/extension-text`),m=require(`@tiptap/extension-underline`),h=require(`@tiptap/static-renderer/pm/react`);function g(g){return(0,h.renderToReactElement)({content:g,extensions:[i.Document,p.Text,d.Paragraph,a.Heading.configure({levels:[1,2,3,4,5,6]}),e.Bold,s.Italic,f.Strike,m.Underline,o.History,l.ListItem,u.OrderedList,t.BulletList,n.Code,r.CodeBlockLowlight,c.Link]})}exports.renderRichTextToReact=g;
|
package/dist/core/richtext.mjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
1
|
+
import { Bold as e } from "@tiptap/extension-bold";
|
|
2
|
+
import { BulletList as t } from "@tiptap/extension-bullet-list";
|
|
3
|
+
import { Code as n } from "@tiptap/extension-code";
|
|
4
|
+
import { CodeBlockLowlight as r } from "@tiptap/extension-code-block-lowlight";
|
|
5
|
+
import { Document as i } from "@tiptap/extension-document";
|
|
6
|
+
import { Heading as a } from "@tiptap/extension-heading";
|
|
7
|
+
import { History as o } from "@tiptap/extension-history";
|
|
8
|
+
import { Italic as s } from "@tiptap/extension-italic";
|
|
9
|
+
import { Link as c } from "@tiptap/extension-link";
|
|
10
|
+
import { ListItem as l } from "@tiptap/extension-list-item";
|
|
11
|
+
import { OrderedList as u } from "@tiptap/extension-ordered-list";
|
|
12
|
+
import { Paragraph as d } from "@tiptap/extension-paragraph";
|
|
13
|
+
import { Strike as f } from "@tiptap/extension-strike";
|
|
14
|
+
import { Text as p } from "@tiptap/extension-text";
|
|
15
|
+
import { Underline as m } from "@tiptap/extension-underline";
|
|
16
|
+
import { renderToReactElement as h } from "@tiptap/static-renderer/pm/react";
|
|
17
17
|
//#region src/core/richtext.ts
|
|
18
18
|
function g(g) {
|
|
19
|
-
return
|
|
19
|
+
return h({
|
|
20
20
|
content: g,
|
|
21
21
|
extensions: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
i,
|
|
23
|
+
p,
|
|
24
|
+
d,
|
|
25
|
+
a.configure({ levels: [
|
|
26
26
|
1,
|
|
27
27
|
2,
|
|
28
28
|
3,
|
|
@@ -30,17 +30,17 @@ function g(g) {
|
|
|
30
30
|
5,
|
|
31
31
|
6
|
|
32
32
|
] }),
|
|
33
|
-
|
|
34
|
-
o,
|
|
33
|
+
e,
|
|
35
34
|
s,
|
|
36
|
-
c,
|
|
37
|
-
l,
|
|
38
|
-
u,
|
|
39
|
-
d,
|
|
40
35
|
f,
|
|
41
|
-
p,
|
|
42
36
|
m,
|
|
43
|
-
|
|
37
|
+
o,
|
|
38
|
+
l,
|
|
39
|
+
u,
|
|
40
|
+
t,
|
|
41
|
+
n,
|
|
42
|
+
r,
|
|
43
|
+
c
|
|
44
44
|
]
|
|
45
45
|
});
|
|
46
46
|
}
|
package/dist/core/state.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { LocalessClient } from '@localess/client';
|
|
3
|
-
import {
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { ContentAsset, LocalessOptions } from './models';
|
|
4
4
|
/**
|
|
5
5
|
* Initialize the Localess SDK.
|
|
6
6
|
*
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
* Returns '/' + fullSlug for type:'content', raw uri for type:'url',
|
|
16
16
|
* '/not-found' when the link cannot be resolved.
|
|
17
17
|
*/
|
|
18
|
-
export { localessEditable, localessEditableField, isBrowser, isServer, isIframe } from '@localess/client';
|
|
19
18
|
export * from './link.util';
|
|
19
|
+
export { isBrowser, isIframe, isServer, localessEditable, localessEditableField } from '@localess/client';
|
package/dist/rsc/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*
|
|
25
25
|
* NOT compatible with Next.js `output: 'export'` — use `@localess/react/ssr` for static exports.
|
|
26
26
|
*/
|
|
27
|
-
export * from '../ssr';
|
|
28
27
|
export * from '../core/components/localess-component';
|
|
29
|
-
export * from './localess-document';
|
|
30
28
|
export { isSyncEnabled } from '../core/state';
|
|
29
|
+
export * from '../ssr';
|
|
30
|
+
export * from './localess-document';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";let e=require(`@localess/client`),t=require(`react`);var n=
|
|
1
|
+
"use client";let e=require(`@localess/client`),t=require(`react`);var n=n=>(console.info(`LocalessSync:init`),(0,t.useEffect)(()=>{async function t(){n.enableSync&&(0,e.isBrowser)()&&(0,e.isIframe)()&&(await(0,e.loadLocalessSync)(n.origin),window.localess?.on([`input`,`change`],e=>{console.info(`LocalessSync:change:`,e),(e.type===`change`||e.type===`input`)&&(n.document.data=e.data)}))}t()},[]),null);exports.LocalessSync=n;
|
|
@@ -3,13 +3,13 @@ import { isBrowser as e, isIframe as t } from "../core/utils/index.mjs";
|
|
|
3
3
|
import { loadLocalessSync as n } from "@localess/client";
|
|
4
4
|
import { useEffect as r } from "react";
|
|
5
5
|
//#region src/rsc/localess-sync.tsx
|
|
6
|
-
var i = (
|
|
6
|
+
var i = (i) => (console.info("LocalessSync:init"), r(() => {
|
|
7
7
|
async function r() {
|
|
8
8
|
i.enableSync && e() && t() && (await n(i.origin), window.localess?.on(["input", "change"], (e) => {
|
|
9
9
|
console.info("LocalessSync:change:", e), (e.type === "change" || e.type === "input") && (i.document.data = e.data);
|
|
10
10
|
}));
|
|
11
11
|
}
|
|
12
12
|
r();
|
|
13
|
-
}, []), null)
|
|
13
|
+
}, []), null);
|
|
14
14
|
//#endregion
|
|
15
15
|
export { i as LocalessSync };
|
package/dist/ssr/index.d.ts
CHANGED
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
* - isSyncEnabled (not meaningful without live editing)
|
|
26
26
|
* - Sync event types (LocalessSync, EventToApp, EventCallback, EventToAppType)
|
|
27
27
|
*/
|
|
28
|
-
export
|
|
29
|
-
export * from './localess-component';
|
|
30
|
-
export * from './localess-document';
|
|
28
|
+
export type * from '../core/models';
|
|
31
29
|
export { renderRichTextToReact } from '../core/richtext';
|
|
30
|
+
export { getComponent, getFallbackComponent, getLocalessClient, localessInit, registerComponent, resolveAsset, unregisterComponent, } from '../core/state';
|
|
32
31
|
export * from '../core/utils';
|
|
33
|
-
export
|
|
32
|
+
export * from './localess-component';
|
|
33
|
+
export * from './localess-document';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@localess/react",
|
|
3
|
-
"version": "3.0.5-dev.
|
|
3
|
+
"version": "3.0.5-dev.20260502213523",
|
|
4
4
|
"description": "ReactJS JavaScript/TypeScript SDK for Localess's API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"localess",
|
|
@@ -61,24 +61,24 @@
|
|
|
61
61
|
"react-dom": "^17 || ^18 || ^19"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@localess/client": "3.0.5-dev.
|
|
65
|
-
"@tiptap/extension-bold": "^3.
|
|
66
|
-
"@tiptap/extension-bullet-list": "^3.
|
|
67
|
-
"@tiptap/extension-code": "^3.
|
|
68
|
-
"@tiptap/extension-code-block-lowlight": "^3.
|
|
69
|
-
"@tiptap/extension-document": "^3.
|
|
70
|
-
"@tiptap/extension-heading": "^3.
|
|
71
|
-
"@tiptap/extension-history": "^3.
|
|
72
|
-
"@tiptap/extension-italic": "^3.
|
|
73
|
-
"@tiptap/extension-link": "^3.
|
|
74
|
-
"@tiptap/extension-list-item": "^3.
|
|
75
|
-
"@tiptap/extension-ordered-list": "^3.
|
|
76
|
-
"@tiptap/extension-paragraph": "^3.
|
|
77
|
-
"@tiptap/extension-strike": "^3.
|
|
78
|
-
"@tiptap/extension-text": "^3.
|
|
79
|
-
"@tiptap/extension-underline": "^3.
|
|
80
|
-
"@tiptap/html": "^3.
|
|
81
|
-
"@tiptap/static-renderer": "^3.
|
|
64
|
+
"@localess/client": "3.0.5-dev.20260502213523",
|
|
65
|
+
"@tiptap/extension-bold": "^3.22.5",
|
|
66
|
+
"@tiptap/extension-bullet-list": "^3.22.5",
|
|
67
|
+
"@tiptap/extension-code": "^3.22.5",
|
|
68
|
+
"@tiptap/extension-code-block-lowlight": "^3.22.5",
|
|
69
|
+
"@tiptap/extension-document": "^3.22.5",
|
|
70
|
+
"@tiptap/extension-heading": "^3.22.5",
|
|
71
|
+
"@tiptap/extension-history": "^3.22.5",
|
|
72
|
+
"@tiptap/extension-italic": "^3.22.5",
|
|
73
|
+
"@tiptap/extension-link": "^3.22.5",
|
|
74
|
+
"@tiptap/extension-list-item": "^3.22.5",
|
|
75
|
+
"@tiptap/extension-ordered-list": "^3.22.5",
|
|
76
|
+
"@tiptap/extension-paragraph": "^3.22.5",
|
|
77
|
+
"@tiptap/extension-strike": "^3.22.5",
|
|
78
|
+
"@tiptap/extension-text": "^3.22.5",
|
|
79
|
+
"@tiptap/extension-underline": "^3.22.5",
|
|
80
|
+
"@tiptap/html": "^3.22.5",
|
|
81
|
+
"@tiptap/static-renderer": "^3.22.5"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/node": "^20",
|