@superbuilders/primer-tives 0.0.3 → 0.0.5

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/content.js DELETED
@@ -1,27 +0,0 @@
1
- // src/content.ts
2
- function inlinesToPlainText(nodes) {
3
- const parts = [];
4
- for (const node of nodes) {
5
- switch (node.type) {
6
- case "text":
7
- parts.push(node.value);
8
- break;
9
- case "italic":
10
- parts.push(inlinesToPlainText(node.children));
11
- break;
12
- }
13
- }
14
- return parts.join("");
15
- }
16
- function blocksToPlainText(blocks) {
17
- return blocks.map(function blockText(block) {
18
- return inlinesToPlainText(block.children);
19
- }).join(`
20
- `);
21
- }
22
- export {
23
- inlinesToPlainText,
24
- blocksToPlainText
25
- };
26
-
27
- //# debugId=B2FEC3DAAEEB30A564756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/content.ts"],
4
- "sourcesContent": [
5
- "type ContentInline = { type: \"text\"; value: string } | { type: \"italic\"; children: ContentInline[] }\n\ntype ContentBlock = { type: \"paragraph\"; children: ContentInline[] }\n\nfunction inlinesToPlainText(nodes: ContentInline[]): string {\n\tconst parts: string[] = []\n\tfor (const node of nodes) {\n\t\tswitch (node.type) {\n\t\t\tcase \"text\":\n\t\t\t\tparts.push(node.value)\n\t\t\t\tbreak\n\t\t\tcase \"italic\":\n\t\t\t\tparts.push(inlinesToPlainText(node.children))\n\t\t\t\tbreak\n\t\t}\n\t}\n\treturn parts.join(\"\")\n}\n\nfunction blocksToPlainText(blocks: ContentBlock[]): string {\n\treturn blocks\n\t\t.map(function blockText(block) {\n\t\t\treturn inlinesToPlainText(block.children)\n\t\t})\n\t\t.join(\"\\n\")\n}\n\nexport type { ContentBlock, ContentInline }\nexport { blocksToPlainText, inlinesToPlainText }\n"
6
- ],
7
- "mappings": ";AAIA,SAAS,kBAAkB,CAAC,OAAgC;AAAA,EAC3D,MAAM,QAAkB,CAAC;AAAA,EACzB,WAAW,QAAQ,OAAO;AAAA,IACzB,QAAQ,KAAK;AAAA,WACP;AAAA,QACJ,MAAM,KAAK,KAAK,KAAK;AAAA,QACrB;AAAA,WACI;AAAA,QACJ,MAAM,KAAK,mBAAmB,KAAK,QAAQ,CAAC;AAAA,QAC5C;AAAA;AAAA,EAEH;AAAA,EACA,OAAO,MAAM,KAAK,EAAE;AAAA;AAGrB,SAAS,iBAAiB,CAAC,QAAgC;AAAA,EAC1D,OAAO,OACL,IAAI,SAAS,SAAS,CAAC,OAAO;AAAA,IAC9B,OAAO,mBAAmB,MAAM,QAAQ;AAAA,GACxC,EACA,KAAK;AAAA,CAAI;AAAA;",
8
- "debugId": "B2FEC3DAAEEB30A564756E2164756E21",
9
- "names": []
10
- }
package/dist/errors.js DELETED
@@ -1,36 +0,0 @@
1
- // src/errors.ts
2
- import * as errors from "@superbuilders/errors";
3
- var ErrNetwork = errors.new("network");
4
- var ErrJsonParse = errors.new("json parse");
5
- var ErrUnsupportedPci = errors.new("unsupported pci");
6
- var ErrInvalidPublishableKey = errors.new("invalid publishable key");
7
- var ErrBadRequest = errors.new("bad request");
8
- var ErrServerError = errors.new("server error");
9
- var ErrTimeout = errors.new("timeout");
10
- var ErrForbidden = errors.new("forbidden");
11
- var ErrNotFound = errors.new("not found");
12
- var ErrConflict = errors.new("conflict");
13
- var ErrRateLimited = errors.new("rate limited");
14
- var ErrServiceUnavailable = errors.new("service unavailable");
15
- var ErrNotSerializable = errors.new("PrimerState is live in-memory state and must not be serialized or stored");
16
- var ErrInvalidSubmission = errors.new("invalid submission");
17
- var ErrMalformedPublishableKey = errors.new("malformed publishable key");
18
- export {
19
- ErrUnsupportedPci,
20
- ErrTimeout,
21
- ErrServiceUnavailable,
22
- ErrServerError,
23
- ErrRateLimited,
24
- ErrNotSerializable,
25
- ErrNotFound,
26
- ErrNetwork,
27
- ErrMalformedPublishableKey,
28
- ErrJsonParse,
29
- ErrInvalidSubmission,
30
- ErrInvalidPublishableKey,
31
- ErrForbidden,
32
- ErrConflict,
33
- ErrBadRequest
34
- };
35
-
36
- //# debugId=DC88F476D6E45CE664756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/errors.ts"],
4
- "sourcesContent": [
5
- "import * as errors from \"@superbuilders/errors\"\n\nconst ErrNetwork = errors.new(\"network\")\nconst ErrJsonParse = errors.new(\"json parse\")\nconst ErrUnsupportedPci = errors.new(\"unsupported pci\")\nconst ErrInvalidPublishableKey = errors.new(\"invalid publishable key\")\nconst ErrBadRequest = errors.new(\"bad request\")\nconst ErrServerError = errors.new(\"server error\")\nconst ErrTimeout = errors.new(\"timeout\")\nconst ErrForbidden = errors.new(\"forbidden\")\nconst ErrNotFound = errors.new(\"not found\")\nconst ErrConflict = errors.new(\"conflict\")\nconst ErrRateLimited = errors.new(\"rate limited\")\nconst ErrServiceUnavailable = errors.new(\"service unavailable\")\nconst ErrNotSerializable = errors.new(\n\t\"PrimerState is live in-memory state and must not be serialized or stored\"\n)\nconst ErrInvalidSubmission = errors.new(\"invalid submission\")\nconst ErrMalformedPublishableKey = errors.new(\"malformed publishable key\")\n\nexport {\n\tErrBadRequest,\n\tErrConflict,\n\tErrForbidden,\n\tErrInvalidPublishableKey,\n\tErrInvalidSubmission,\n\tErrMalformedPublishableKey,\n\tErrJsonParse,\n\tErrNetwork,\n\tErrNotFound,\n\tErrNotSerializable,\n\tErrRateLimited,\n\tErrServerError,\n\tErrServiceUnavailable,\n\tErrTimeout,\n\tErrUnsupportedPci\n}\n"
6
- ],
7
- "mappings": ";AAAA;AAEA,IAAM,aAAoB,WAAI,SAAS;AACvC,IAAM,eAAsB,WAAI,YAAY;AAC5C,IAAM,oBAA2B,WAAI,iBAAiB;AACtD,IAAM,2BAAkC,WAAI,yBAAyB;AACrE,IAAM,gBAAuB,WAAI,aAAa;AAC9C,IAAM,iBAAwB,WAAI,cAAc;AAChD,IAAM,aAAoB,WAAI,SAAS;AACvC,IAAM,eAAsB,WAAI,WAAW;AAC3C,IAAM,cAAqB,WAAI,WAAW;AAC1C,IAAM,cAAqB,WAAI,UAAU;AACzC,IAAM,iBAAwB,WAAI,cAAc;AAChD,IAAM,wBAA+B,WAAI,qBAAqB;AAC9D,IAAM,qBAA4B,WACjC,0EACD;AACA,IAAM,uBAA8B,WAAI,oBAAoB;AAC5D,IAAM,6BAAoC,WAAI,2BAA2B;",
8
- "debugId": "DC88F476D6E45CE664756E2164756E21",
9
- "names": []
10
- }
package/dist/pci.js DELETED
@@ -1,2 +0,0 @@
1
-
2
- //# debugId=A38864BFD31DF2F664756E2164756E21
package/dist/pci.js.map DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "A38864BFD31DF2F664756E2164756E21",
8
- "names": []
9
- }
package/dist/types.js DELETED
@@ -1,2 +0,0 @@
1
-
2
- //# debugId=9FCB033A2878230664756E2164756E21
package/dist/types.js.map DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "9FCB033A2878230664756E2164756E21",
8
- "names": []
9
- }