nodoku-core 0.2.5 → 0.3.0
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/README.md +57 -0
- package/esm/content/nd-content.js +0 -8
- package/esm/core/dummy-comp.jsx +18 -16
- package/esm/index.js +6 -4
- package/esm/providers/content/content-markdown-provider.js +51 -21
- package/esm/providers/skin/skin-yaml-provider.js +1 -0
- package/esm/tailwind/index.js +10 -0
- package/package.json +6 -1
- package/tailwind/cjs/index.js +15 -0
- package/tailwind/types/index.d.ts +3 -0
- package/types/content/nd-content.d.ts +2 -7
- package/types/index.d.ts +2 -2
- package/types/tailwind/index.d.ts +3 -0
package/README.md
CHANGED
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
* [Schema for Nodoku skin Yaml file](#schema-for-nodoku-skin-yaml-file)
|
|
24
24
|
* [Customizing Nodoku page appearance](#customizing-nodoku-page-appearance)
|
|
25
25
|
* [Nodoku generation scripts](#nodoku-generation-scripts)
|
|
26
|
+
* [Nodoku license](#nodoku-license)
|
|
27
|
+
* [Use for private, educational or commercial needs, excluding applications for webpage or website building tools](#use-for-private-educational-or-commercial-needs-excluding-applications-for-webpage-or-website-building-tools)
|
|
28
|
+
* [Use as part of website or webpage builders](#use-as-part-of-website-or-webpage-builders)
|
|
29
|
+
* [Examples](#examples)
|
|
30
|
+
* [Proper use, free of charge, under the MIT License](#proper-use-free-of-charge-under-the-mit-license)
|
|
31
|
+
* [Prohibited use](#prohibited-use)
|
|
26
32
|
<!-- TOC -->
|
|
27
33
|
|
|
28
34
|
GitHub link: https://github.com/nodoku/nodoku-core
|
|
@@ -901,3 +907,54 @@ To simplify the use of these script it is recommended to add them in the project
|
|
|
901
907
|
}
|
|
902
908
|
```
|
|
903
909
|
|
|
910
|
+
|
|
911
|
+
# Nodoku license
|
|
912
|
+
|
|
913
|
+
The Nodoku License to be used depends on the use case you plan to use Nodoku for:
|
|
914
|
+
|
|
915
|
+
- using Nodoku to build an End Product, which is a webpage or a website for private or commercial use
|
|
916
|
+
- in short, in this case Nodoku **_is free_** to use under the MIT License (see below for more details)
|
|
917
|
+
- using Nodoku to build an End Product, which is a webpage or a website builder (online or offline)
|
|
918
|
+
- in short, in this case the use of Nodoku **_is prohibited_**
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
Note, that
|
|
922
|
+
> in any case of the allowed, free-of-charge use of Nodoku, **_the present Nodoku license should be included in all copies of the Software, using Nodoku_**.
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
## Use for private, educational or commercial needs, excluding applications for webpage or website building tools
|
|
927
|
+
|
|
928
|
+
Any use of Nodoku, **_except for webpage and website builder applications_**, is allowed free of charge, under the **_MIT license_** ( see the [LICENSE](./blob/main/LICENSE) )
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
## Use as part of website or webpage builders
|
|
933
|
+
|
|
934
|
+
The use of Nodoku for the purposes to provide a solution for online (or offline) website or webpage builders is **_prohibited_**.
|
|
935
|
+
|
|
936
|
+
This prohibition includes the direct or indirect use of the Nodoku library as part of webpage builder solution.
|
|
937
|
+
|
|
938
|
+
Indirect use of Nodoku library would include building a software or a framework that would then be used as part of webpage or website builder.
|
|
939
|
+
|
|
940
|
+
Webpage or Website builder application is any tool, online or offline, that would allow the End User to build a publishable webpage or website, using no code or low amount of code.
|
|
941
|
+
|
|
942
|
+
This is prohibited under this license term since that would constitute a direct competition to Nodoku lo-code site builder.
|
|
943
|
+
|
|
944
|
+
# Examples
|
|
945
|
+
|
|
946
|
+
## Proper use, free of charge, under the MIT License
|
|
947
|
+
|
|
948
|
+
- building a webpage or a website for a private non-commercial project
|
|
949
|
+
- building a webpage or a website for a private commercial project
|
|
950
|
+
- building a webpage or a website for a public commercial or non-commercial blog
|
|
951
|
+
- building a webpage or a website for a client, that would use it for commercial or non-commercial purposes
|
|
952
|
+
- creating and distributing non-commercially (free of charge) custom Nodoku components
|
|
953
|
+
- creating and distributing commercially custom Nodoku components (developing and selling out new Nodoku-compatible UI components)
|
|
954
|
+
- developing new UI components and selling them out either as a Nodoku component, or a standalone component, or a component compatible with another website builder
|
|
955
|
+
|
|
956
|
+
## Prohibited use
|
|
957
|
+
|
|
958
|
+
- building a website builder, that would use the Nodoku engine to provide the End User with a tool, that would allow them building their own webpages or websites
|
|
959
|
+
- using Nodoku engine to provide the End User with an automatic, semi-automatic or manual framework, that would allow them building their own webpages or websites
|
|
960
|
+
- using Nodoku libraries to use it as part of the solution that would allow the End User to build a webpage or a website
|
package/esm/core/dummy-comp.jsx
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NdCode, NdTranslatableText } from "../content/nd-content";
|
|
2
|
-
import { NdLink } from "../content/nd-content";
|
|
3
2
|
export async function DummyComp(props) {
|
|
4
3
|
// console.log("content dummy comp", props.theme)
|
|
5
4
|
const { content, i18nextTrustedHtmlProvider, lng, rowIndex, componentIndex } = props;
|
|
@@ -75,18 +74,20 @@ async function render(rowIndex, componentIndex, block, t) {
|
|
|
75
74
|
<code lang={code.lang} className={"hljs"} dangerouslySetInnerHTML={{ __html: code.code }}/>
|
|
76
75
|
</pre>
|
|
77
76
|
</div>);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
link
|
|
83
|
-
<div key={ip} className={"mb-3 font-normal text-gray-700 dark:text-gray-400"}>
|
|
84
|
-
urlText: {link.urlText && showTranslatableText(link.urlText)}
|
|
85
|
-
url: {showTranslatableText(link.url)}
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
</div>
|
|
89
|
-
|
|
77
|
+
} /*else if (p instanceof NdLink) {
|
|
78
|
+
const link: NdLink = p as NdLink
|
|
79
|
+
return (
|
|
80
|
+
<div>
|
|
81
|
+
link
|
|
82
|
+
<div key={ip} className={"mb-3 font-normal text-gray-700 dark:text-gray-400"}>
|
|
83
|
+
urlText: {link.urlText && showTranslatableText(link.urlText)}
|
|
84
|
+
url: {showTranslatableText(link.url)}
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
)
|
|
90
|
+
} */
|
|
90
91
|
else {
|
|
91
92
|
const list = p;
|
|
92
93
|
if (list.ordered) {
|
|
@@ -112,7 +113,8 @@ function showTranslatableText(text) {
|
|
|
112
113
|
return <span>{text.text} <small>(<i>{text.key}</i>)</small></span>;
|
|
113
114
|
}
|
|
114
115
|
function showListItem(i) {
|
|
115
|
-
return i.text instanceof NdTranslatableText ?
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
// return i.text instanceof NdTranslatableText ?
|
|
117
|
+
// showTranslatableText(i.text) :
|
|
118
|
+
// <span>link item {(i.text.urlText ? showTranslatableText(i.text.urlText) : "link text n/a")} : {showTranslatableText(i.text.url)}</span>;
|
|
119
|
+
return showTranslatableText(i.text);
|
|
118
120
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { NdContentImage, NdTranslatableText, NdList,
|
|
1
|
+
import { NdContentImage, NdTranslatableText, NdList, NdCode, NdCallToAction, NdContentBlock } from "./content/nd-content";
|
|
2
2
|
import { NdSkinComponent, NdRow, NdPageSkin, NdSkinComponentProps, NdContentSelector, NdComponentDefinition, NdThemeHierarchy } from "./skin/nd-skin";
|
|
3
3
|
import { RenderingPageProps, RenderingPriority } from "./core/rendering-page-props";
|
|
4
4
|
import { RenderingPage } from "./core/rendering-page";
|
|
5
5
|
import { mergeTheme } from "./theme-utils/theme-merger";
|
|
6
6
|
import { defaultRowThemeImpl } from "./theme-utils/row-style";
|
|
7
|
-
export { NdContentImage, NdTranslatableText, NdList,
|
|
7
|
+
export { NdContentImage, NdTranslatableText, NdList,
|
|
8
|
+
// NdLink,
|
|
9
|
+
NdCode, NdCallToAction, NdContentBlock, NdSkinComponent, NdRow, NdPageSkin, NdSkinComponentProps, NdContentSelector, NdComponentDefinition, NdThemeHierarchy };
|
|
8
10
|
export { RenderingPageProps, RenderingPriority, RenderingPage };
|
|
9
11
|
export { mergeTheme };
|
|
10
12
|
export { DummyComp } from "./core/dummy-comp";
|
|
@@ -23,14 +25,14 @@ export const tsi = function (t, key, i) {
|
|
|
23
25
|
const obj = t[key];
|
|
24
26
|
const themeStyle = obj[i % len];
|
|
25
27
|
const k = key;
|
|
26
|
-
return k + `[${i}]` + themeStyle?.base + " " + themeStyle?.decoration;
|
|
28
|
+
return k + `[${i}] ` + themeStyle?.base + " " + themeStyle?.decoration;
|
|
27
29
|
}
|
|
28
30
|
else if (Array.isArray(t[key])) {
|
|
29
31
|
// console.log("this is tsi array", key)
|
|
30
32
|
const len = t[key].length;
|
|
31
33
|
const themeStyle = t[key][i % len];
|
|
32
34
|
const k = key;
|
|
33
|
-
return k + `[${i}]` + themeStyle?.base + " " + themeStyle?.decoration;
|
|
35
|
+
return k + `[${i}] ` + themeStyle?.base + " " + themeStyle?.decoration;
|
|
34
36
|
}
|
|
35
37
|
else {
|
|
36
38
|
return ts(t, key);
|
|
@@ -3,7 +3,6 @@ import { Marked } from '@ts-stack/markdown';
|
|
|
3
3
|
import { parse, TextNode } from 'node-html-parser';
|
|
4
4
|
import yaml from "js-yaml";
|
|
5
5
|
import { NdCallToAction } from "../../content/nd-content";
|
|
6
|
-
import { NdLink } from "../../content/nd-content";
|
|
7
6
|
const nsRegex = /.*\/(.*)\.md/;
|
|
8
7
|
export async function contentMarkdownProvider(mdFileUrl, contentLng, ns = undefined) {
|
|
9
8
|
return await fetch(mdFileUrl)
|
|
@@ -224,7 +223,12 @@ class BlockHolder {
|
|
|
224
223
|
img = new NdContentImage();
|
|
225
224
|
img.url = new NdTranslatableText(this.ns, `${blockId}.images.${imi}.url`, imgHtmlElem.attributes["src"], true);
|
|
226
225
|
img.alt = new NdTranslatableText(this.ns, `${blockId}.images.${imi}.alt`, imgHtmlElem.attributes["alt"]);
|
|
227
|
-
|
|
226
|
+
if (imgHtmlElem.attributes["title"] && imgHtmlElem.attributes["title"].length > 0) {
|
|
227
|
+
img.title = new NdTranslatableText(this.ns, `${blockId}.images.${imi}.title`, imgHtmlElem.attributes["title"]);
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
img.title = new NdTranslatableText(this.ns, `${blockId}.images.${imi}.title`, imgHtmlElem.attributes["alt"]);
|
|
231
|
+
}
|
|
228
232
|
}
|
|
229
233
|
});
|
|
230
234
|
if (img) {
|
|
@@ -243,7 +247,12 @@ class BlockHolder {
|
|
|
243
247
|
img = new NdContentImage();
|
|
244
248
|
img.url = new NdTranslatableText(this.ns, `${blockId}.images.${imi}.url`, htmlElem.attributes["src"], true);
|
|
245
249
|
img.alt = new NdTranslatableText(this.ns, `${blockId}.images.${imi}.alt`, htmlElem.attributes["alt"]);
|
|
246
|
-
|
|
250
|
+
if (htmlElem.attributes["title"] && htmlElem.attributes["title"].length > 0) {
|
|
251
|
+
img.title = new NdTranslatableText(this.ns, `${blockId}.images.${imi}.title`, htmlElem.attributes["title"]);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
img.title = new NdTranslatableText(this.ns, `${blockId}.images.${imi}.title`, htmlElem.attributes["alt"]);
|
|
255
|
+
}
|
|
247
256
|
}
|
|
248
257
|
if (img) {
|
|
249
258
|
newBlock.images.push(img);
|
|
@@ -290,20 +299,22 @@ class BlockHolder {
|
|
|
290
299
|
if (!cn) {
|
|
291
300
|
return undefined;
|
|
292
301
|
}
|
|
293
|
-
if (cn instanceof TextNode) {
|
|
302
|
+
if (cn instanceof TextNode && cn.text.length > 0) {
|
|
294
303
|
return new NdTranslatableText(this.ns, `${idPrefix}`, cn.text);
|
|
295
304
|
}
|
|
296
305
|
const p = cn;
|
|
297
306
|
if (!p.rawTagName) {
|
|
298
307
|
return undefined;
|
|
299
308
|
}
|
|
300
|
-
console.log("parsing paragraph", p.innerHTML);
|
|
309
|
+
// console.log("parsing paragraph", p.rawTagName, p.innerHTML);
|
|
301
310
|
if (p.rawTagName === "p" || p.rawTagName === "blockquote") {
|
|
302
311
|
return new NdTranslatableText(this.ns, `${idPrefix}`, p.innerHTML);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
312
|
+
} /*else if (p.rawTagName === "a") {
|
|
313
|
+
return new NdLink(
|
|
314
|
+
new NdTranslatableText(this.ns, `${idPrefix}.urlText`, p.innerHTML),
|
|
315
|
+
new NdTranslatableText(this.ns, `${idPrefix}.url`, p.attributes["href"], true)
|
|
316
|
+
);
|
|
317
|
+
} */
|
|
307
318
|
else if (p.rawTagName === "pre") {
|
|
308
319
|
const codeHtml = p.childNodes[0];
|
|
309
320
|
const rawText = codeHtml.text;
|
|
@@ -320,40 +331,59 @@ class BlockHolder {
|
|
|
320
331
|
}
|
|
321
332
|
else if (p.rawTagName === "ul") {
|
|
322
333
|
return NdList.createUnOrdered(this.parseListItems(idPrefix, p));
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
// const pItems: NdTranslatableText[] = []
|
|
337
|
+
// pItems.push(new NdTranslatableText(this.ns, idPrefix, p.innerHTML))
|
|
338
|
+
// p.childNodes
|
|
339
|
+
// .filter(cn => cn.textContent.length > 0)
|
|
340
|
+
// .forEach(cn => pItems.push(new NdTranslatableText(this.ns, idPrefix, cn.rawText)))
|
|
341
|
+
// console.log("reducing inner nodes of paragraph", pItems)
|
|
342
|
+
// return pItems.reduce((prev, current) => new NdTranslatableText(this.ns, prev.key, prev.text + "\n" + current.text) )
|
|
343
|
+
return new NdTranslatableText(this.ns, idPrefix, p.toString());
|
|
344
|
+
}
|
|
345
|
+
// console.log("couldn't parse paragraph: ", p.innerHTML)
|
|
346
|
+
//
|
|
347
|
+
// return undefined;
|
|
328
348
|
}
|
|
329
349
|
parseListItems(idPrefix, p) {
|
|
350
|
+
// console.log("parsing list items ", p)
|
|
330
351
|
return p.childNodes
|
|
331
352
|
.filter(lin => lin.innerText && lin.innerText.trim().length > 0)
|
|
332
353
|
.map((lin, k) => {
|
|
333
354
|
const li = lin;
|
|
334
355
|
let innerList = undefined;
|
|
335
|
-
let liText; //TextNode | undefined;
|
|
356
|
+
let liText = []; // /*| NdLink*/ | undefined;//TextNode | undefined;
|
|
357
|
+
if (li.innerHTML && li.innerHTML.length > 0) {
|
|
358
|
+
liText?.push(new NdTranslatableText(this.ns, `${idPrefix}.items.${k}`, li.innerHTML));
|
|
359
|
+
}
|
|
336
360
|
if (li.childNodes.length > 0) {
|
|
337
|
-
console.log("found inner item", li.childNodes.length, (li.childNodes.map(i => i)
|
|
338
|
-
|
|
339
|
-
|
|
361
|
+
// console.log("found inner item", li.childNodes.length, (li.childNodes.map(i => i as HTMLElement)
|
|
362
|
+
// .map((i1: HTMLElement) => i1.rawTagName ? i1.rawTagName : "N.A")), "<<<");
|
|
363
|
+
//
|
|
364
|
+
// console.log("found inner list", li.childNodes[0].innerText)
|
|
340
365
|
innerList = li.childNodes
|
|
341
366
|
.map(cn => this.parseParagraph(`${idPrefix}.items.${k}.subList`, cn))
|
|
342
367
|
.find((p) => p != undefined && p instanceof NdList);
|
|
343
368
|
liText = li.childNodes
|
|
344
369
|
.map(cn => this.parseParagraph(`${idPrefix}.items.${k}.text`, cn))
|
|
345
|
-
.
|
|
370
|
+
.filter((p) => p != undefined && ( /*p instanceof NdLink || */p instanceof NdTranslatableText));
|
|
346
371
|
// innerList = innerNodes.find((p: NdParagraph | undefined) => p != undefined && p instanceof NdList)
|
|
347
372
|
// if (li.childNodes[0].rawTagName in ["ol", "ul"]) {
|
|
348
373
|
// }
|
|
349
374
|
// liText = li.childNodes.filter(cn => cn instanceof TextNode).find(t => t && t.text.length > 0);
|
|
350
375
|
// liText = innerNodes.find((p: NdParagraph | undefined) => p != undefined && (p instanceof NdLink || p instanceof NdTranslatableText))
|
|
351
376
|
}
|
|
377
|
+
let itemText = new NdTranslatableText(this.ns, `${idPrefix}.items.${k}`, "n/a");
|
|
378
|
+
if (liText.length > 0) {
|
|
379
|
+
// console.log("reducing inner item", liText)
|
|
380
|
+
itemText = liText.reduce((prev, current) => new NdTranslatableText(this.ns, prev.key, prev.text + "\n" + current.text));
|
|
381
|
+
}
|
|
352
382
|
// type l = keyof HTMLElement
|
|
353
383
|
// console.log("found list", li.childNodes.filter(cn => Object.keys(cn).map(k => k == "parentNode" ? "parent" : (cn as HTMLElement)[k as l])), "<<", lin.innerText, "<<")
|
|
354
384
|
// const foundList = {text: new NdTranslatableText(this.ns, `${idPrefix}.items.${k}`, liText)/*liText*/, subList: innerList};
|
|
355
|
-
const foundList = { text:
|
|
356
|
-
console.log("found list", ">>", foundList, "<<")
|
|
385
|
+
const foundList = { text: itemText, subList: innerList };
|
|
386
|
+
// console.log("found list", ">>", foundList, "<<")
|
|
357
387
|
return foundList;
|
|
358
388
|
// const listItem = this.parseParagraph(`${idPrefix}.items.${k}`, li)
|
|
359
389
|
// return listItem ? listItem : new NdTranslatableText(this.ns, `${idPrefix}.items.${k}`, "undefined list item" + li.innerHTML);
|
|
@@ -40,6 +40,7 @@ export function parseYamlContentAsSkin(fileContents) {
|
|
|
40
40
|
lbVisualComponent.themeHierarchy.componentThemes = componentTheme ? componentTheme[vcName]?.themes?.slice() : undefined;
|
|
41
41
|
lbVisualComponent.themeHierarchy.theme = vb.theme;
|
|
42
42
|
lbVisualComponent.themeHierarchy.themes = vb.themes?.slice();
|
|
43
|
+
lbVisualComponent.themeHierarchy.options = vb.options;
|
|
43
44
|
lbVisualComponent.componentName = vcName;
|
|
44
45
|
const attributes = vb.selector.attributes ?
|
|
45
46
|
Object.keys(vb.selector.attributes).map(a => { return { key: a, value: vb.selector.attributes[a] }; }) :
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var NodokuCoreTailwind;
|
|
2
|
+
(function (NodokuCoreTailwind) {
|
|
3
|
+
function tailwindConfig(nodeModules = "./node_modules") {
|
|
4
|
+
return [
|
|
5
|
+
`./${nodeModules}/nodoku-core/esm/**/*.js`,
|
|
6
|
+
`./${nodeModules}/nodoku-core/esm/**/*.jsx`,
|
|
7
|
+
];
|
|
8
|
+
}
|
|
9
|
+
NodokuCoreTailwind.tailwindConfig = tailwindConfig;
|
|
10
|
+
})(NodokuCoreTailwind || (NodokuCoreTailwind = {}));
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodoku-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "basic foundation for nodoku static site generator",
|
|
5
|
+
"license": "MIT for the use not related to website builders, commercial otherwise, contact for details",
|
|
5
6
|
"exports": {
|
|
6
7
|
".": {
|
|
7
8
|
"types": "./types/index.d.ts",
|
|
8
9
|
"import": "./esm/index.js"
|
|
9
10
|
},
|
|
11
|
+
"./tailwind": {
|
|
12
|
+
"types": "./types/tailwind/index.d.ts",
|
|
13
|
+
"require": "./esm/tailwind/index.js"
|
|
14
|
+
},
|
|
10
15
|
"./package.json": "./package.json"
|
|
11
16
|
},
|
|
12
17
|
"module": "esm/index.js",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodokuCoreTailwind = void 0;
|
|
4
|
+
var NodokuCoreTailwind;
|
|
5
|
+
(function (NodokuCoreTailwind) {
|
|
6
|
+
function tailwindConfig(nodeModules) {
|
|
7
|
+
if (nodeModules === void 0) { nodeModules = "./node_modules"; }
|
|
8
|
+
return [
|
|
9
|
+
"./".concat(nodeModules, "/nodoku-core/esm/**/*.js"),
|
|
10
|
+
"./".concat(nodeModules, "/nodoku-core/esm/**/*.jsx"),
|
|
11
|
+
];
|
|
12
|
+
}
|
|
13
|
+
NodokuCoreTailwind.tailwindConfig = tailwindConfig;
|
|
14
|
+
})(NodokuCoreTailwind || (exports.NodokuCoreTailwind = NodokuCoreTailwind = {}));
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdGFpbHdpbmQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBaUIsa0JBQWtCLENBUWxDO0FBUkQsV0FBaUIsa0JBQWtCO0lBQy9CLFNBQWdCLGNBQWMsQ0FBQyxXQUFzQztRQUF0Qyw0QkFBQSxFQUFBLDhCQUFzQztRQUNqRSxPQUFPO1lBQ0gsWUFBSyxXQUFXLDZCQUEwQjtZQUMxQyxZQUFLLFdBQVcsOEJBQTJCO1NBQzlDLENBQUE7SUFDTCxDQUFDO0lBTGUsaUNBQWMsaUJBSzdCLENBQUE7QUFFTCxDQUFDLEVBUmdCLGtCQUFrQixrQ0FBbEIsa0JBQWtCLFFBUWxDIn0=
|
|
@@ -16,7 +16,7 @@ export declare class NdTranslatableText {
|
|
|
16
16
|
constructor(ns: string, key?: string, text?: string, excludeFromTranslation?: boolean);
|
|
17
17
|
}
|
|
18
18
|
export type NdListItem = {
|
|
19
|
-
text: NdTranslatableText
|
|
19
|
+
text: NdTranslatableText;
|
|
20
20
|
subList: NdParagraph | undefined;
|
|
21
21
|
};
|
|
22
22
|
export declare class NdList {
|
|
@@ -31,12 +31,7 @@ export declare class NdCode {
|
|
|
31
31
|
code: string;
|
|
32
32
|
constructor(lang: string, code: string);
|
|
33
33
|
}
|
|
34
|
-
export
|
|
35
|
-
urlText: NdTranslatableText | undefined;
|
|
36
|
-
url: NdTranslatableText;
|
|
37
|
-
constructor(text: NdTranslatableText, url: NdTranslatableText);
|
|
38
|
-
}
|
|
39
|
-
export type NdParagraph = NdTranslatableText | NdList | NdCode | NdLink;
|
|
34
|
+
export type NdParagraph = NdTranslatableText | NdList | NdCode;
|
|
40
35
|
export declare class NdContentBlock {
|
|
41
36
|
id: string;
|
|
42
37
|
lng: string;
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NdContentImage, NdTranslatableText, NdList, NdLink, NdListItem, NdCode, NdCallToAction, NdParagraph, NdContentBlock } from "./content/nd-content";
|
|
1
|
+
import { NdContentImage, NdTranslatableText, NdList, /*NdLink, */ NdListItem, NdCode, NdCallToAction, NdParagraph, NdContentBlock } from "./content/nd-content";
|
|
2
2
|
import { NdSkinComponent, NdRow, NdPageSkin, NdSkinComponentProps, NdContentSelector, NdComponentDefinition, NdThemeHierarchy, NdDefaultThemeName } from "./skin/nd-skin";
|
|
3
3
|
import { RenderingPageProps, RenderingPriority } from "./core/rendering-page-props";
|
|
4
4
|
import { RenderingPage } from "./core/rendering-page";
|
|
@@ -8,7 +8,7 @@ import { ThemeStyle } from "./theme-utils/theme-style";
|
|
|
8
8
|
import { ExtendedThemeStyle } from "./theme-utils/extended-theme-style";
|
|
9
9
|
import { ImageStyle } from "./theme-utils/image-style";
|
|
10
10
|
import { RowStyle } from "./theme-utils/row-style";
|
|
11
|
-
export { NdContentImage, NdTranslatableText, NdList, type NdListItem,
|
|
11
|
+
export { NdContentImage, NdTranslatableText, NdList, type NdListItem, NdCode, NdCallToAction, NdContentBlock, NdSkinComponent, NdRow, NdPageSkin, NdSkinComponentProps, NdContentSelector, NdComponentDefinition, NdThemeHierarchy, type NdParagraph, type NdDefaultThemeName, type NdImageProps, type NdI18nextTrustedHtmlProvider, type NdHtmlSanitizer, type NdTrustedHtml, type NdI18NextPostProcessor };
|
|
12
12
|
export { RenderingPageProps, RenderingPriority, RenderingPage };
|
|
13
13
|
export { mergeTheme, type ThemeStyle, type ExtendedThemeStyle, type ImageStyle };
|
|
14
14
|
export type { NdI18nextProvider, AsyncFunctionComponent, NdImageProvider };
|