nodoku-core 0.2.5 → 0.2.6

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/esm/index.js CHANGED
@@ -23,14 +23,14 @@ export const tsi = function (t, key, i) {
23
23
  const obj = t[key];
24
24
  const themeStyle = obj[i % len];
25
25
  const k = key;
26
- return k + `[${i}]` + themeStyle?.base + " " + themeStyle?.decoration;
26
+ return k + `[${i}] ` + themeStyle?.base + " " + themeStyle?.decoration;
27
27
  }
28
28
  else if (Array.isArray(t[key])) {
29
29
  // console.log("this is tsi array", key)
30
30
  const len = t[key].length;
31
31
  const themeStyle = t[key][i % len];
32
32
  const k = key;
33
- return k + `[${i}]` + themeStyle?.base + " " + themeStyle?.decoration;
33
+ return k + `[${i}] ` + themeStyle?.base + " " + themeStyle?.decoration;
34
34
  }
35
35
  else {
36
36
  return ts(t, key);
@@ -297,7 +297,7 @@ class BlockHolder {
297
297
  if (!p.rawTagName) {
298
298
  return undefined;
299
299
  }
300
- console.log("parsing paragraph", p.innerHTML);
300
+ // console.log("parsing paragraph", p.innerHTML);
301
301
  if (p.rawTagName === "p" || p.rawTagName === "blockquote") {
302
302
  return new NdTranslatableText(this.ns, `${idPrefix}`, p.innerHTML);
303
303
  }
@@ -334,9 +334,10 @@ class BlockHolder {
334
334
  let innerList = undefined;
335
335
  let liText; //TextNode | undefined;
336
336
  if (li.childNodes.length > 0) {
337
- console.log("found inner item", li.childNodes.length, (li.childNodes.map(i => i)
338
- .map((i1) => i1.rawTagName ? i1.rawTagName : "N.A")), "<<<");
339
- console.log("found inner list", li.childNodes[0].innerText);
337
+ // console.log("found inner item", li.childNodes.length, (li.childNodes.map(i => i as HTMLElement)
338
+ // .map((i1: HTMLElement) => i1.rawTagName ? i1.rawTagName : "N.A")), "<<<");
339
+ //
340
+ // console.log("found inner list", li.childNodes[0].innerText)
340
341
  innerList = li.childNodes
341
342
  .map(cn => this.parseParagraph(`${idPrefix}.items.${k}.subList`, cn))
342
343
  .find((p) => p != undefined && p instanceof NdList);
@@ -353,7 +354,7 @@ class BlockHolder {
353
354
  // 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
355
  // const foundList = {text: new NdTranslatableText(this.ns, `${idPrefix}.items.${k}`, liText)/*liText*/, subList: innerList};
355
356
  const foundList = { text: liText ? liText : new NdTranslatableText(this.ns, `${idPrefix}.items.${k}`, "n/a"), subList: innerList };
356
- console.log("found list", ">>", foundList, "<<");
357
+ // console.log("found list", ">>", foundList, "<<")
357
358
  return foundList;
358
359
  // const listItem = this.parseParagraph(`${idPrefix}.items.${k}`, li)
359
360
  // 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,16 @@
1
1
  {
2
2
  "name": "nodoku-core",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "basic foundation for nodoku static site generator",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./types/index.d.ts",
8
8
  "import": "./esm/index.js"
9
9
  },
10
+ "./tailwind": {
11
+ "types": "./types/tailwind/index.d.ts",
12
+ "require": "./esm/tailwind/index.js"
13
+ },
10
14
  "./package.json": "./package.json"
11
15
  },
12
16
  "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=
@@ -0,0 +1,3 @@
1
+ export declare namespace NodokuCoreTailwind {
2
+ function tailwindConfig(nodeModules?: string): string[];
3
+ }
@@ -0,0 +1,3 @@
1
+ export declare namespace NodokuCoreTailwind {
2
+ function tailwindConfig(nodeModules?: string): string[];
3
+ }