@sealcode/jdd 0.8.5 → 0.8.7
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/.nyc_output/72b82abb-85e3-46bf-99cd-7e0bc0a6a145.json +1 -0
- package/.nyc_output/processinfo/72b82abb-85e3-46bf-99cd-7e0bc0a6a145.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/.xunit +14 -14
- package/@types/component-arguments/code-with-custom-language.d.ts +14 -0
- package/@types/component-arguments/component-arguments.d.ts +1 -0
- package/@types/component.d.ts +3 -1
- package/@types/registry.d.ts +1 -1
- package/coverage/clover.xml +83 -88
- package/lib/component-arguments/code-with-custom-language.js +26 -0
- package/lib/component-arguments/code-with-custom-language.js.map +1 -0
- package/lib/component-arguments/component-arguments.js +1 -0
- package/lib/component-arguments/component-arguments.js.map +1 -1
- package/lib/component-arguments/component-arguments.test.js +1 -1
- package/lib/component-arguments/component-arguments.test.js.map +1 -1
- package/lib/component.js +3 -0
- package/lib/component.js.map +1 -1
- package/lib/component.test.js +2 -2
- package/lib/component.test.js.map +1 -1
- package/lib/components/markdown.test.js +2 -2
- package/lib/components/markdown.test.js.map +1 -1
- package/lib/registry.js +2 -2
- package/lib/registry.js.map +1 -1
- package/package.json +1 -1
- package/.nyc_output/5e04dab5-853d-4723-8330-e33ecbca8dcb.json +0 -1
- package/.nyc_output/processinfo/5e04dab5-853d-4723-8330-e33ecbca8dcb.json +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"parent":null,"pid":1118146,"argv":["/home/kuba/.local/share/fnm/node-versions/v21.7.3/installation/bin/node","/home/kuba/projects/sealcode/superseal/repos/jdd/node_modules/.bin/mocha","--recursive","--timeout=10000","--require","source-map-support/register","--reporter","xunit","--reporter-option","output=.xunit","lib-instrumented/**/*.test.js"],"execArgv":[],"cwd":"/home/kuba/projects/sealcode/superseal/repos/jdd","time":1770320270874,"ppid":1118134,"coverageFilename":"/home/kuba/projects/sealcode/superseal/repos/jdd/.nyc_output/72b82abb-85e3-46bf-99cd-7e0bc0a6a145.json","externalId":"","uuid":"72b82abb-85e3-46bf-99cd-7e0bc0a6a145","files":["/home/kuba/projects/sealcode/superseal/repos/jdd/lib/api.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/component-argument.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/string-based-argument.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/color.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/utils/insert_nbsp.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/hyphenation.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/registry.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/jdd-context.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/color.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/container-argument.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/list.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/file.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/utils/module-dirname.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/image.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/short-text.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/structured.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/number.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/enum.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/markdown.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/url.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/component-arguments.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/enum.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/file.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/list.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/structured.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/table.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/table.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/single-reference.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/clumps.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/nested-component.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/link.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/code.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/collection-name.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/code-with-custom-language.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/component-arguments.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/document.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/jdd.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/index.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/components/markdown.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/test-utils/prettier.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/test-utils/simplest-context.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/components/markdown.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/document.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/jdd.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/markdown.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/render.test.js","/home/kuba/projects/sealcode/superseal/repos/jdd/lib/utils/insert_nbsp.test.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"processes":{"
|
|
1
|
+
{"processes":{"72b82abb-85e3-46bf-99cd-7e0bc0a6a145":{"parent":null,"children":[]}},"files":{"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/api.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/component-argument.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/string-based-argument.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/color.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/utils/insert_nbsp.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/hyphenation.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/registry.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/jdd-context.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/color.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/container-argument.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/list.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/file.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/utils/module-dirname.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/image.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/short-text.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/structured.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/number.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/enum.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/markdown.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/url.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/component-arguments.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/enum.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/file.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/list.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/structured.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/table.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/table.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/single-reference.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/clumps.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/nested-component.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/link.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/code.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/collection-name.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/code-with-custom-language.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component-arguments/component-arguments.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/document.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/jdd.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/index.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/component.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/components/markdown.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/test-utils/prettier.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/test-utils/simplest-context.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/components/markdown.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/document.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/jdd.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/markdown.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/render.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"],"/home/kuba/projects/sealcode/superseal/repos/jdd/lib/utils/insert_nbsp.test.js":["72b82abb-85e3-46bf-99cd-7e0bc0a6a145"]},"externalIds":{}}
|
package/.xunit
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<testsuite name="Mocha Tests" tests="46" failures="0" errors="0" skipped="0" timestamp="
|
|
1
|
+
<testsuite name="Mocha Tests" tests="46" failures="0" errors="0" skipped="0" timestamp="Thu, 05 Feb 2026 19:37:51 GMT" time="0.236">
|
|
2
2
|
<testcase classname="color argument" name="properly parses arguments of length 4" time="0.001"/>
|
|
3
3
|
<testcase classname="color argument" name="properly parses arguments of length 7" time="0"/>
|
|
4
4
|
<testcase classname="color argument" name="does not allow arguments with different length" time="0"/>
|
|
@@ -13,36 +13,36 @@
|
|
|
13
13
|
<testcase classname="component arguments Word counting" name="ShortText argument" time="0"/>
|
|
14
14
|
<testcase classname="component arguments Word counting" name="MarkdownArgument argument" time="0"/>
|
|
15
15
|
<testcase classname="component arguments Word counting" name="List argument" time="0"/>
|
|
16
|
-
<testcase classname="component arguments Word counting" name="Structured argument" time="0"/>
|
|
16
|
+
<testcase classname="component arguments Word counting" name="Structured argument" time="0.001"/>
|
|
17
17
|
<testcase classname="component arguments List argument" name="Generates example values from provided examples, if they are provided" time="0"/>
|
|
18
18
|
<testcase classname="component arguments test URL component argument class" name="allows for chaining methods when setting example values" time="0"/>
|
|
19
19
|
<testcase classname="component arguments test URL component argument class" name="returns example url of type based on specyfic urlType argument" time="0"/>
|
|
20
20
|
<testcase classname="component arguments test URL component argument class" name="returns correct component argument type" time="0"/>
|
|
21
|
-
<testcase classname="component arguments test Number component argument" name="Generates example values from provided values, if they are provided" time="0
|
|
21
|
+
<testcase classname="component arguments test Number component argument" name="Generates example values from provided values, if they are provided" time="0"/>
|
|
22
22
|
<testcase classname="component arguments test Number component argument" name="Generates example value in compliance with given min, max and range constrains" time="0"/>
|
|
23
23
|
<testcase classname="component arguments test Number component argument" name="Returns expected type, empty value and count words number" time="0"/>
|
|
24
24
|
<testcase classname="enum argument" name="uses only the example values if provided when running getExampleValues" time="0"/>
|
|
25
25
|
<testcase classname="File field" name="Properly describes the parsed value" time="0"/>
|
|
26
26
|
<testcase classname="list" name="allows for creating a list of images" time="0"/>
|
|
27
27
|
<testcase classname="list" name="properly parses list arguments" time="0"/>
|
|
28
|
-
<testcase classname="list" name="handles undefined value" time="0"/>
|
|
28
|
+
<testcase classname="list" name="handles undefined value" time="0.001"/>
|
|
29
29
|
<testcase classname="structured argument" name="properly extracts parsed type" time="0"/>
|
|
30
30
|
<testcase classname="structured argument" name="properly extracts parsed type within a list" time="0"/>
|
|
31
|
-
<testcase classname="structured argument" name="uses the provided object as an example value if set" time="0
|
|
31
|
+
<testcase classname="structured argument" name="uses the provided object as an example value if set" time="0"/>
|
|
32
32
|
<testcase classname="table argument" name="properly parses type value" time="0"/>
|
|
33
|
-
<testcase classname="table argument" name="properly respects custom set example value" time="0"/>
|
|
33
|
+
<testcase classname="table argument" name="properly respects custom set example value" time="0.001"/>
|
|
34
34
|
<testcase classname="component class" name="Doesn't fail if provided with unknown arguments" time="0"/>
|
|
35
|
-
<testcase classname="component class getSubArgument" name="traverses argument path that includes a table" time="0
|
|
36
|
-
<testcase classname="markdown component" name="renders as a part of a JDD" time="0.
|
|
37
|
-
<testcase classname="markdown component" name="properly returns the headings" time="0.
|
|
38
|
-
<testcase classname="markdown component" name="allows for nbsp in headings" time="0.
|
|
39
|
-
<testcase classname="markdown component" name="doesn't add nbsp to code blocks" time="0.
|
|
35
|
+
<testcase classname="component class getSubArgument" name="traverses argument path that includes a table" time="0"/>
|
|
36
|
+
<testcase classname="markdown component" name="renders as a part of a JDD" time="0.058"/>
|
|
37
|
+
<testcase classname="markdown component" name="properly returns the headings" time="0.004"/>
|
|
38
|
+
<testcase classname="markdown component" name="allows for nbsp in headings" time="0.008"/>
|
|
39
|
+
<testcase classname="markdown component" name="doesn't add nbsp to code blocks" time="0.003"/>
|
|
40
40
|
<testcase classname="document" name="converts from parsed to storage" time="0.001"/>
|
|
41
|
-
<testcase classname="jdd" name="properly extracts headings from multiple components" time="0"/>
|
|
41
|
+
<testcase classname="jdd" name="properly extracts headings from multiple components" time="0.001"/>
|
|
42
42
|
<testcase classname="jdd" name="properly extracts css clumps" time="0"/>
|
|
43
43
|
<testcase classname="markdown" name="does not insert soft hyphens into links" time="0.001"/>
|
|
44
|
-
<testcase classname="render method renderFromStorage" name="renders from a raw document" time="0.
|
|
45
|
-
<testcase classname="create non braking space util" name="should replace space for one letter word with non braking space" time="0
|
|
44
|
+
<testcase classname="render method renderFromStorage" name="renders from a raw document" time="0.151"/>
|
|
45
|
+
<testcase classname="create non braking space util" name="should replace space for one letter word with non braking space" time="0"/>
|
|
46
46
|
<testcase classname="create non braking space util" name="should keep original copy if there isn't any one letter word" time="0"/>
|
|
47
47
|
<testcase classname="create non braking space util" name="shold find one letter word on first position" time="0"/>
|
|
48
48
|
</testsuite>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MaybePromise } from "tempstream";
|
|
2
|
+
import { JDDContext } from "../jdd-context.js";
|
|
3
|
+
import { Structured } from "./structured.js";
|
|
4
|
+
import { ShortText } from "./short-text.js";
|
|
5
|
+
import { Code } from "./code.js";
|
|
6
|
+
export declare class CodeWithCustomLanguage extends Structured<{
|
|
7
|
+
language: ShortText;
|
|
8
|
+
code: Code;
|
|
9
|
+
}> {
|
|
10
|
+
readonly language: string;
|
|
11
|
+
constructor();
|
|
12
|
+
getTypeName(): string;
|
|
13
|
+
parseFormInput(_: JDDContext, input: unknown): MaybePromise<string | null>;
|
|
14
|
+
}
|
package/@types/component.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FlatTemplatable } from "tempstream";
|
|
2
2
|
import { ComponentArgument, ExtractStructuredComponentArgumentsParsed, ExtractStructuredComponentArgumentsReceived, ExtractStructuredComponentArgumentsStorage, JDDContext } from "./index.js";
|
|
3
3
|
export interface ComponentConstructor<A extends Record<string, ComponentArgument<unknown>> = Record<string, ComponentArgument<unknown>>> {
|
|
4
|
-
new (): Component<A>;
|
|
4
|
+
new (name: string): Component<A>;
|
|
5
5
|
}
|
|
6
6
|
export type EarlyAsset = ({
|
|
7
7
|
type: "script" | "style";
|
|
@@ -25,6 +25,8 @@ export type ComponentToHTMLArgs<T extends Record<string, ComponentArgument<unkno
|
|
|
25
25
|
index: number;
|
|
26
26
|
};
|
|
27
27
|
export declare abstract class Component<ArgumentsT extends Record<string, ComponentArgument<unknown>> = Record<string, ComponentArgument<unknown>>> {
|
|
28
|
+
name: string;
|
|
29
|
+
constructor(name?: string);
|
|
28
30
|
abstract getArguments(): ArgumentsT;
|
|
29
31
|
abstract toHTML(params: ComponentToHTMLArgs<ArgumentsT>): FlatTemplatable | Promise<FlatTemplatable>;
|
|
30
32
|
getTitle(_context: JDDContext, _args: ExtractStructuredComponentArgumentsParsed<ArgumentsT>): string | null;
|
package/@types/registry.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, ComponentConstructor } from "./component.js";
|
|
2
2
|
export declare class Registry {
|
|
3
3
|
map: Map<string, Component>;
|
|
4
|
-
add(
|
|
4
|
+
add(name: string, component: ComponentConstructor<any>): void;
|
|
5
5
|
get(type: string): Component | null;
|
|
6
6
|
getAll(): Record<string, Component>;
|
|
7
7
|
}
|
package/coverage/clover.xml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
4
|
-
<metrics statements="
|
|
2
|
+
<coverage generated="1770320271662" clover="3.2.0">
|
|
3
|
+
<project timestamp="1770320271662" name="All files">
|
|
4
|
+
<metrics statements="803" coveredstatements="404" conditionals="273" coveredconditionals="73" methods="313" coveredmethods="160" elements="1389" coveredelements="637" complexity="0" loc="803" ncloc="803" packages="5" files="46" classes="46"/>
|
|
5
5
|
<package name="src">
|
|
6
|
-
<metrics statements="
|
|
6
|
+
<metrics statements="209" coveredstatements="129" conditionals="69" coveredconditionals="28" methods="87" coveredmethods="55"/>
|
|
7
7
|
<file name="clumps.ts" path="/home/kuba/projects/sealcode/superseal/repos/jdd/src/clumps.ts">
|
|
8
8
|
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="1"/>
|
|
9
9
|
<line num="2" count="1" type="stmt"/>
|
|
@@ -29,44 +29,45 @@
|
|
|
29
29
|
<line num="79" count="1" type="stmt"/>
|
|
30
30
|
</file>
|
|
31
31
|
<file name="component.ts" path="/home/kuba/projects/sealcode/superseal/repos/jdd/src/component.ts">
|
|
32
|
-
<metrics statements="
|
|
33
|
-
<line num="
|
|
34
|
-
<line num="
|
|
35
|
-
<line num="59" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
32
|
+
<metrics statements="38" coveredstatements="21" conditionals="12" coveredconditionals="6" methods="16" coveredmethods="9"/>
|
|
33
|
+
<line num="42" count="10" type="stmt"/>
|
|
34
|
+
<line num="53" count="0" type="stmt"/>
|
|
36
35
|
<line num="60" count="0" type="stmt"/>
|
|
36
|
+
<line num="61" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
37
37
|
<line num="62" count="0" type="stmt"/>
|
|
38
|
-
<line num="
|
|
39
|
-
<line num="
|
|
40
|
-
<line num="
|
|
41
|
-
<line num="
|
|
42
|
-
<line num="83" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
38
|
+
<line num="64" count="0" type="stmt"/>
|
|
39
|
+
<line num="72" count="1" type="stmt"/>
|
|
40
|
+
<line num="79" count="0" type="stmt"/>
|
|
41
|
+
<line num="83" count="0" type="stmt"/>
|
|
43
42
|
<line num="84" count="0" type="stmt"/>
|
|
44
|
-
<line num="
|
|
43
|
+
<line num="85" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
44
|
+
<line num="86" count="0" type="stmt"/>
|
|
45
45
|
<line num="89" count="0" type="stmt"/>
|
|
46
|
-
<line num="
|
|
47
|
-
<line num="
|
|
48
|
-
<line num="
|
|
46
|
+
<line num="91" count="0" type="stmt"/>
|
|
47
|
+
<line num="98" count="1" type="stmt"/>
|
|
48
|
+
<line num="101" count="2" type="stmt"/>
|
|
49
49
|
<line num="114" count="0" type="stmt"/>
|
|
50
|
-
<line num="
|
|
51
|
-
<line num="
|
|
50
|
+
<line num="116" count="0" type="stmt"/>
|
|
51
|
+
<line num="119" count="0" type="stmt"/>
|
|
52
52
|
<line num="132" count="3" type="stmt"/>
|
|
53
|
-
<line num="
|
|
54
|
-
<line num="
|
|
53
|
+
<line num="134" count="3" type="stmt"/>
|
|
54
|
+
<line num="137" count="3" type="stmt"/>
|
|
55
55
|
<line num="150" count="2" type="stmt"/>
|
|
56
|
-
<line num="
|
|
57
|
-
<line num="
|
|
56
|
+
<line num="152" count="2" type="stmt"/>
|
|
57
|
+
<line num="155" count="2" type="cond" truecount="2" falsecount="0"/>
|
|
58
58
|
<line num="156" count="1" type="stmt"/>
|
|
59
|
-
<line num="
|
|
60
|
-
<line num="
|
|
61
|
-
<line num="
|
|
62
|
-
<line num="175" count="
|
|
59
|
+
<line num="158" count="1" type="stmt"/>
|
|
60
|
+
<line num="173" count="1" type="stmt"/>
|
|
61
|
+
<line num="174" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
62
|
+
<line num="175" count="0" type="stmt"/>
|
|
63
63
|
<line num="177" count="1" type="stmt"/>
|
|
64
64
|
<line num="179" count="1" type="stmt"/>
|
|
65
|
-
<line num="
|
|
66
|
-
<line num="
|
|
67
|
-
<line num="
|
|
68
|
-
<line num="
|
|
69
|
-
<line num="
|
|
65
|
+
<line num="181" count="1" type="stmt"/>
|
|
66
|
+
<line num="182" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
67
|
+
<line num="183" count="0" type="stmt"/>
|
|
68
|
+
<line num="186" count="1" type="stmt"/>
|
|
69
|
+
<line num="189" count="2" type="stmt"/>
|
|
70
|
+
<line num="195" count="1" type="stmt"/>
|
|
70
71
|
</file>
|
|
71
72
|
<file name="document.test.ts" path="/home/kuba/projects/sealcode/superseal/repos/jdd/src/document.test.ts">
|
|
72
73
|
<metrics statements="17" coveredstatements="10" conditionals="0" coveredconditionals="0" methods="11" coveredmethods="4"/>
|
|
@@ -156,7 +157,7 @@
|
|
|
156
157
|
<line num="52" count="1" type="stmt"/>
|
|
157
158
|
</file>
|
|
158
159
|
<file name="jdd.ts" path="/home/kuba/projects/sealcode/superseal/repos/jdd/src/jdd.ts">
|
|
159
|
-
<metrics statements="
|
|
160
|
+
<metrics statements="63" coveredstatements="22" conditionals="29" coveredconditionals="5" methods="20" coveredmethods="10"/>
|
|
160
161
|
<line num="18" count="4" type="stmt"/>
|
|
161
162
|
<line num="19" count="4" type="stmt"/>
|
|
162
163
|
<line num="20" count="4" type="stmt"/>
|
|
@@ -173,52 +174,53 @@
|
|
|
173
174
|
<line num="64" count="3" type="cond" truecount="1" falsecount="1"/>
|
|
174
175
|
<line num="65" count="0" type="stmt"/>
|
|
175
176
|
<line num="70" count="3" type="stmt"/>
|
|
176
|
-
<line num="
|
|
177
|
-
<line num="82" count="0" type="
|
|
178
|
-
<line num="
|
|
179
|
-
<line num="
|
|
180
|
-
<line num="
|
|
181
|
-
<line num="
|
|
182
|
-
<line num="
|
|
183
|
-
<line num="
|
|
184
|
-
<line num="
|
|
185
|
-
<line num="124" count="0" type="
|
|
186
|
-
<line num="125" count="0" type="
|
|
187
|
-
<line num="
|
|
188
|
-
<line num="
|
|
189
|
-
<line num="132" count="0" type="
|
|
190
|
-
<line num="
|
|
191
|
-
<line num="
|
|
192
|
-
<line num="
|
|
177
|
+
<line num="71" count="3" type="stmt"/>
|
|
178
|
+
<line num="82" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
179
|
+
<line num="83" count="0" type="stmt"/>
|
|
180
|
+
<line num="92" count="0" type="stmt"/>
|
|
181
|
+
<line num="97" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
182
|
+
<line num="99" count="0" type="cond" truecount="0" falsecount="3"/>
|
|
183
|
+
<line num="103" count="0" type="stmt"/>
|
|
184
|
+
<line num="114" count="0" type="stmt"/>
|
|
185
|
+
<line num="121" count="0" type="stmt"/>
|
|
186
|
+
<line num="124" count="0" type="stmt"/>
|
|
187
|
+
<line num="125" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
188
|
+
<line num="126" count="0" type="stmt"/>
|
|
189
|
+
<line num="130" count="0" type="stmt"/>
|
|
190
|
+
<line num="132" count="0" type="stmt"/>
|
|
191
|
+
<line num="133" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
192
|
+
<line num="139" count="0" type="stmt"/>
|
|
193
|
+
<line num="144" count="0" type="stmt"/>
|
|
193
194
|
<line num="151" count="0" type="stmt"/>
|
|
194
195
|
<line num="152" count="0" type="stmt"/>
|
|
195
|
-
<line num="
|
|
196
|
-
<line num="
|
|
197
|
-
<line num="157" count="0" type="
|
|
198
|
-
<line num="158" count="0" type="
|
|
199
|
-
<line num="159" count="0" type="
|
|
200
|
-
<line num="
|
|
196
|
+
<line num="153" count="0" type="stmt"/>
|
|
197
|
+
<line num="155" count="0" type="stmt"/>
|
|
198
|
+
<line num="157" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
199
|
+
<line num="158" count="0" type="stmt"/>
|
|
200
|
+
<line num="159" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
201
|
+
<line num="160" count="0" type="stmt"/>
|
|
201
202
|
<line num="167" count="0" type="stmt"/>
|
|
202
|
-
<line num="168" count="0" type="
|
|
203
|
-
<line num="169" count="0" type="
|
|
204
|
-
<line num="
|
|
205
|
-
<line num="
|
|
206
|
-
<line num="
|
|
207
|
-
<line num="
|
|
208
|
-
<line num="183" count="2" type="
|
|
209
|
-
<line num="184" count="
|
|
210
|
-
<line num="
|
|
211
|
-
<line num="
|
|
212
|
-
<line num="
|
|
213
|
-
<line num="197" count="1" type="
|
|
214
|
-
<line num="198" count="
|
|
215
|
-
<line num="
|
|
216
|
-
<line num="
|
|
203
|
+
<line num="168" count="0" type="stmt"/>
|
|
204
|
+
<line num="169" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
205
|
+
<line num="170" count="0" type="stmt"/>
|
|
206
|
+
<line num="173" count="0" type="stmt"/>
|
|
207
|
+
<line num="176" count="0" type="stmt"/>
|
|
208
|
+
<line num="181" count="1" type="stmt"/>
|
|
209
|
+
<line num="183" count="2" type="stmt"/>
|
|
210
|
+
<line num="184" count="2" type="cond" truecount="1" falsecount="1"/>
|
|
211
|
+
<line num="185" count="0" type="stmt"/>
|
|
212
|
+
<line num="187" count="2" type="stmt"/>
|
|
213
|
+
<line num="193" count="1" type="stmt"/>
|
|
214
|
+
<line num="197" count="1" type="stmt"/>
|
|
215
|
+
<line num="198" count="1" type="cond" truecount="1" falsecount="1"/>
|
|
216
|
+
<line num="199" count="0" type="stmt"/>
|
|
217
|
+
<line num="201" count="1" type="stmt"/>
|
|
217
218
|
<line num="216" count="0" type="stmt"/>
|
|
218
|
-
<line num="
|
|
219
|
+
<line num="217" count="0" type="stmt"/>
|
|
219
220
|
<line num="225" count="0" type="stmt"/>
|
|
220
|
-
<line num="
|
|
221
|
+
<line num="226" count="0" type="stmt"/>
|
|
221
222
|
<line num="234" count="0" type="stmt"/>
|
|
223
|
+
<line num="235" count="0" type="stmt"/>
|
|
222
224
|
</file>
|
|
223
225
|
<file name="markdown.test.ts" path="/home/kuba/projects/sealcode/superseal/repos/jdd/src/markdown.test.ts">
|
|
224
226
|
<metrics statements="6" coveredstatements="6" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/>
|
|
@@ -249,21 +251,14 @@
|
|
|
249
251
|
</file>
|
|
250
252
|
</package>
|
|
251
253
|
<package name="src.component-arguments">
|
|
252
|
-
<metrics statements="
|
|
253
|
-
<file name="
|
|
254
|
-
<metrics statements="
|
|
255
|
-
<line num="
|
|
256
|
-
<line num="
|
|
257
|
-
<line num="
|
|
258
|
-
<line num="
|
|
259
|
-
<line num="
|
|
260
|
-
<line num="29" count="0" type="stmt"/>
|
|
261
|
-
<line num="31" count="0" type="stmt"/>
|
|
262
|
-
<line num="37" count="0" type="stmt"/>
|
|
263
|
-
<line num="43" count="0" type="stmt"/>
|
|
264
|
-
<line num="45" count="0" type="stmt"/>
|
|
265
|
-
<line num="48" count="0" type="stmt"/>
|
|
266
|
-
<line num="52" count="0" type="stmt"/>
|
|
254
|
+
<metrics statements="554" coveredstatements="235" conditionals="201" coveredconditionals="43" methods="210" coveredmethods="89"/>
|
|
255
|
+
<file name="code-with-custom-language.ts" path="/home/kuba/projects/sealcode/superseal/repos/jdd/src/component-arguments/code-with-custom-language.ts">
|
|
256
|
+
<metrics statements="5" coveredstatements="0" conditionals="2" coveredconditionals="0" methods="3" coveredmethods="0"/>
|
|
257
|
+
<line num="16" count="0" type="stmt"/>
|
|
258
|
+
<line num="25" count="0" type="stmt"/>
|
|
259
|
+
<line num="29" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
260
|
+
<line num="30" count="0" type="stmt"/>
|
|
261
|
+
<line num="32" count="0" type="stmt"/>
|
|
267
262
|
</file>
|
|
268
263
|
<file name="code.ts" path="/home/kuba/projects/sealcode/superseal/repos/jdd/src/component-arguments/code.ts">
|
|
269
264
|
<metrics statements="9" coveredstatements="0" conditionals="2" coveredconditionals="0" methods="6" coveredmethods="0"/>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { is, predicates } from "@sealcode/ts-predicates";
|
|
2
|
+
import { Structured } from "./structured.js";
|
|
3
|
+
import { ShortText } from "./short-text.js";
|
|
4
|
+
import { Code } from "./code.js";
|
|
5
|
+
export class CodeWithCustomLanguage extends Structured {
|
|
6
|
+
constructor() {
|
|
7
|
+
super({
|
|
8
|
+
language: new ShortText().setExampleValues(["javascript"]),
|
|
9
|
+
code: new Code({
|
|
10
|
+
language: "js",
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
getTypeName() {
|
|
15
|
+
return "code-with-custom-language";
|
|
16
|
+
}
|
|
17
|
+
parseFormInput(_, input) {
|
|
18
|
+
if (is(input, predicates.string)) {
|
|
19
|
+
return input;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=code-with-custom-language.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-with-custom-language.js","sourceRoot":"","sources":["../../src/component-arguments/code-with-custom-language.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,OAAO,sBAAuB,SAAQ,UAG1C;IAGD;QACC,KAAK,CAAC;YACL,QAAQ,EAAE,IAAI,SAAS,EAAE,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,CAAC;YAC1D,IAAI,EAAE,IAAI,IAAI,CAAC;gBACd,QAAQ,EAAE,IAAI;aACd,CAAC;SACF,CAAC,CAAC;IACJ,CAAC;IAED,WAAW;QACV,OAAO,2BAA2B,CAAC;IACpC,CAAC;IAED,cAAc,CAAC,CAAa,EAAE,KAAc;QAC3C,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE;YACjC,OAAO,KAAK,CAAC;SACb;aAAM;YACN,OAAO,IAAI,CAAC;SACZ;IACF,CAAC;CACD"}
|
|
@@ -15,4 +15,5 @@ export { Link } from "./link.js";
|
|
|
15
15
|
export { Code } from "./code.js";
|
|
16
16
|
export { BooleanArgument as Boolean } from "./boolean.js";
|
|
17
17
|
export { CollectionName } from "./collection-name.js";
|
|
18
|
+
export { CodeWithCustomLanguage } from "./code-with-custom-language.js";
|
|
18
19
|
//# sourceMappingURL=component-arguments.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-arguments.js","sourceRoot":"","sources":["../../src/component-arguments/component-arguments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"component-arguments.js","sourceRoot":"","sources":["../../src/component-arguments/component-arguments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -31,7 +31,7 @@ describe("component arguments", () => {
|
|
|
31
31
|
toHTML() {
|
|
32
32
|
return "";
|
|
33
33
|
}
|
|
34
|
-
})();
|
|
34
|
+
})("component");
|
|
35
35
|
const example = await component.getExampleValues(makeSimpleEnglishJDDContext());
|
|
36
36
|
assert(example.text.length > 0);
|
|
37
37
|
assert(example.markdown.length > 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-arguments.test.js","sourceRoot":"","sources":["../../src/component-arguments/component-arguments.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC7C,IAAI,IAAI,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;QAC1B,IAAI,IAAI,CACP,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,SAAS,EAAE,EAAE,CAAC,CACnE,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,eAAe,EAAE,GAAG,EAAE;QACxB,IAAI,IAAI,CAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,IAAI,gBAAgB,EAAE,CAAC,eAAe,CAC3C,2BAA2B,EAAE,CAC7B,CAAC;QACF,MAAM,IAAI,GAAU;YACnB,IAAI,EAAE,IAAI,SAAS,EAAE;YACrB,QAAQ,EAAE,IAAI,gBAAgB,EAAE;SAChC,CAAC;QACF,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,aAAc,SAAQ,SAElD;YACA,YAAY;gBACX,OAAO,IAAI,CAAC;YACb,CAAC;YAED,MAAM;gBACL,OAAO,EAAE,CAAC;YACX,CAAC;SACD,CAAC,
|
|
1
|
+
{"version":3,"file":"component-arguments.test.js","sourceRoot":"","sources":["../../src/component-arguments/component-arguments.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QA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AAM,GAAG,GAAG,EAAE,CAAC;YACf,MAAM,IAAI,GAAG,CAAC,CAAC;YACf,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;YAC9C,MAAM,CAAC,MAAM,YAAY,iBAAiB,CAAC,CAAC;YAC5C,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;YAC/C,MAAM,CAAC,EAAE,CACR,YAAY,IAAI,GAAG;gBAClB,YAAY,IAAI,GAAG;gBACnB,YAAY,GAAG,IAAI,KAAK,CAAC,CAC1B,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;YACpE,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;YAC/C,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,QAAQ,CAAC,CAAC;YACnD,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC;YAC9C,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/lib/component.js
CHANGED
package/lib/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAQA,OAAO,IAAI,MAAM,MAAM,CAAC;AA2BxB,MAAM,OAAgB,SAAS;
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../src/component.ts"],"names":[],"mappings":"AAQA,OAAO,IAAI,MAAM,MAAM,CAAC;AA2BxB,MAAM,OAAgB,SAAS;IAM9B,YAAmB,OAAe,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,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;CACD"}
|
package/lib/component.test.js
CHANGED
|
@@ -16,7 +16,7 @@ describe("component class", () => {
|
|
|
16
16
|
toHTML() {
|
|
17
17
|
return "";
|
|
18
18
|
}
|
|
19
|
-
})();
|
|
19
|
+
})("component");
|
|
20
20
|
const [arg, _, values] = component.getArgumentAtPath(makeSimpleEnglishJDDContext({
|
|
21
21
|
file_manager: new FileManager("/tmp", "/uploaded_files"),
|
|
22
22
|
}), "table/rows/2/cells/0/tags".split("/"), {
|
|
@@ -52,7 +52,7 @@ describe("component class", () => {
|
|
|
52
52
|
toHTML() {
|
|
53
53
|
return "";
|
|
54
54
|
}
|
|
55
|
-
})();
|
|
55
|
+
})("component");
|
|
56
56
|
await component.convertStorageToParsed(makeSimpleEnglishJDDContext({
|
|
57
57
|
file_manager: new FileManager("/tmp", "/uploaded_files"),
|
|
58
58
|
}), { title2: "string" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.test.js","sourceRoot":"","sources":["../src/component.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACN,IAAI,EACJ,SAAS,EACT,UAAU,EACV,2BAA2B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAChC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;QAC/B,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACxD,MAAM,IAAI,GAAG;gBACZ,KAAK,EAAE,IAAI,KAAK,CACf,IAAI,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,SAAS,EAAE,EAAE,CAAC,EAC1C,I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,sBAAsB,CACrC,2BAA2B,CAAC;YAC3B,YAAY,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC;SACxD,CAAC,EACF,EAAE,MAAM,EAAE,QAAQ,EAAS,CAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -36,7 +36,7 @@ describe("markdown component", () => {
|
|
|
36
36
|
</section>`, "html"));
|
|
37
37
|
});
|
|
38
38
|
it("properly returns the headings", () => {
|
|
39
|
-
const headings = new Markdown().getHeadings(makeSimpleEnglishJDDContext({
|
|
39
|
+
const headings = new Markdown("markdown").getHeadings(makeSimpleEnglishJDDContext({
|
|
40
40
|
file_manager: new FileManager("/tmp", "/uploaded_files"),
|
|
41
41
|
}), {
|
|
42
42
|
markdown: `# Heading level 1
|
|
@@ -61,7 +61,7 @@ some content as well
|
|
|
61
61
|
});
|
|
62
62
|
it("allows for nbsp in headings", async () => {
|
|
63
63
|
const jdd_context = simplestContext();
|
|
64
|
-
const headings = new Markdown().getHeadings(jdd_context, {
|
|
64
|
+
const headings = new Markdown("markdown").getHeadings(jdd_context, {
|
|
65
65
|
markdown: `# Cała prawda o fokach w Sopocie`,
|
|
66
66
|
});
|
|
67
67
|
const html = await jdd_context.render_markdown("pl", `# Cała prawda o fokach w Sopocie`);
|