@jotx-labs/standard-lib 2.2.0 → 2.4.82
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/blocks/Attachment.d.ts +1 -1
- package/dist/blocks/BlockRef.d.ts +1 -1
- package/dist/blocks/Button.d.ts +2 -0
- package/dist/blocks/Button.js +32 -0
- package/dist/blocks/Callout.d.ts +1 -1
- package/dist/blocks/Card.d.ts +2 -0
- package/dist/blocks/Card.js +28 -0
- package/dist/blocks/Cell.d.ts +1 -1
- package/dist/blocks/Chart.d.ts +1 -1
- package/dist/blocks/Chart.js +1 -0
- package/dist/blocks/Checklist.d.ts +1 -1
- package/dist/blocks/Code.d.ts +1 -1
- package/dist/blocks/CodeReference.d.ts +1 -1
- package/dist/blocks/DateTime.d.ts +1 -1
- package/dist/blocks/Divider.d.ts +1 -1
- package/dist/blocks/FloatImage.d.ts +1 -1
- package/dist/blocks/GridCard.d.ts +2 -0
- package/dist/blocks/GridCard.js +24 -0
- package/dist/blocks/Header.d.ts +1 -1
- package/dist/blocks/Heading.d.ts +1 -1
- package/dist/blocks/Image.d.ts +1 -1
- package/dist/blocks/JotxLink.d.ts +11 -1
- package/dist/blocks/JotxLink.js +16 -7
- package/dist/blocks/Link.d.ts +1 -1
- package/dist/blocks/LinkCard.d.ts +1 -1
- package/dist/blocks/List.d.ts +1 -1
- package/dist/blocks/Math.d.ts +1 -1
- package/dist/blocks/Math.js +1 -0
- package/dist/blocks/Mermaid.d.ts +1 -1
- package/dist/blocks/Mermaid.js +1 -0
- package/dist/blocks/Paragraph.d.ts +1 -1
- package/dist/blocks/Properties.d.ts +1 -1
- package/dist/blocks/Properties.js +3 -1
- package/dist/blocks/Property.d.ts +1 -1
- package/dist/blocks/Quote.d.ts +1 -1
- package/dist/blocks/Row.d.ts +1 -1
- package/dist/blocks/Section.d.ts +1 -1
- package/dist/blocks/Table.d.ts +1 -1
- package/dist/blocks/Table.js +1 -0
- package/dist/blocks/Toggle.d.ts +1 -1
- package/dist/blocks/Video.d.ts +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +13 -1
- package/dist/verify-stdlib.js +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const AttachmentBlock: BlockDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const BlockRefBlock: BlockDefinition;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ButtonBlock = void 0;
|
|
4
|
+
exports.ButtonBlock = {
|
|
5
|
+
type: 'button',
|
|
6
|
+
syntax: {
|
|
7
|
+
keyword: 'button',
|
|
8
|
+
hasText: false
|
|
9
|
+
},
|
|
10
|
+
schema: {
|
|
11
|
+
properties: {
|
|
12
|
+
label: { type: 'string', required: true, description: 'Button text' },
|
|
13
|
+
link: { type: 'string', required: true, description: 'File path to navigate' },
|
|
14
|
+
style: {
|
|
15
|
+
type: 'enum',
|
|
16
|
+
required: false,
|
|
17
|
+
default: 'primary',
|
|
18
|
+
options: ['primary', 'secondary', 'outline', 'ghost']
|
|
19
|
+
},
|
|
20
|
+
align: {
|
|
21
|
+
type: 'enum',
|
|
22
|
+
required: false,
|
|
23
|
+
default: 'left',
|
|
24
|
+
options: ['left', 'center', 'right']
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
ui: {
|
|
29
|
+
label: 'Button',
|
|
30
|
+
icon: 'play'
|
|
31
|
+
}
|
|
32
|
+
};
|
package/dist/blocks/Callout.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const CalloutBlock: BlockDefinition;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CardBlock = void 0;
|
|
4
|
+
exports.CardBlock = {
|
|
5
|
+
type: 'card',
|
|
6
|
+
syntax: {
|
|
7
|
+
keyword: 'card',
|
|
8
|
+
hasText: false
|
|
9
|
+
},
|
|
10
|
+
schema: {
|
|
11
|
+
properties: {
|
|
12
|
+
title: { type: 'string', required: true, description: 'Card title' },
|
|
13
|
+
value: { type: 'string', required: false, description: 'Stat value' },
|
|
14
|
+
icon: { type: 'string', required: false, description: 'Emoji icon' },
|
|
15
|
+
color: {
|
|
16
|
+
type: 'enum',
|
|
17
|
+
required: false,
|
|
18
|
+
default: 'teal',
|
|
19
|
+
options: ['blue', 'green', 'red', 'yellow', 'purple', 'teal', 'gray']
|
|
20
|
+
},
|
|
21
|
+
link: { type: 'string', required: false, description: 'File path to navigate' }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
ui: {
|
|
25
|
+
label: 'Card',
|
|
26
|
+
icon: 'credit-card'
|
|
27
|
+
}
|
|
28
|
+
};
|
package/dist/blocks/Cell.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const CellBlock: BlockDefinition;
|
package/dist/blocks/Chart.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const ChartBlock: BlockDefinition;
|
package/dist/blocks/Chart.js
CHANGED
package/dist/blocks/Code.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const CodeBlock: BlockDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const CodeReferenceBlock: BlockDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const DateTimeBlock: BlockDefinition;
|
package/dist/blocks/Divider.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const DividerBlock: BlockDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const FloatImageBlock: BlockDefinition;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GridCardBlock = void 0;
|
|
4
|
+
exports.GridCardBlock = {
|
|
5
|
+
type: 'gridcard',
|
|
6
|
+
syntax: {
|
|
7
|
+
keyword: 'gridcard',
|
|
8
|
+
hasText: false
|
|
9
|
+
},
|
|
10
|
+
schema: {
|
|
11
|
+
properties: {
|
|
12
|
+
layout: {
|
|
13
|
+
type: 'enum',
|
|
14
|
+
required: false,
|
|
15
|
+
default: '2x2',
|
|
16
|
+
options: ['1x1', '1x2', '2x1', '2x2', '2x3', '3x2', '3x3']
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
ui: {
|
|
21
|
+
label: 'Grid Card',
|
|
22
|
+
icon: 'grid'
|
|
23
|
+
}
|
|
24
|
+
};
|
package/dist/blocks/Header.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const HeaderBlock: BlockDefinition;
|
package/dist/blocks/Heading.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const HeadingBlock: BlockDefinition;
|
package/dist/blocks/Image.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const ImageBlock: BlockDefinition;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
|
+
/**
|
|
3
|
+
* JotxLink Block - Reference to another block or document
|
|
4
|
+
* Syntax: def jotxlink abc123
|
|
5
|
+
* ref TYPE ID
|
|
6
|
+
*
|
|
7
|
+
* Examples:
|
|
8
|
+
* ref mermaid xyz789 - Reference to mermaid block
|
|
9
|
+
* ref def abc123 - Reference to def block
|
|
10
|
+
* ref jotx doc_id - Reference to document (hdef)
|
|
11
|
+
*/
|
|
2
12
|
export declare const JotxLinkBlock: BlockDefinition;
|
package/dist/blocks/JotxLink.js
CHANGED
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.JotxLinkBlock = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* JotxLink Block - Reference to another block or document
|
|
6
|
+
* Syntax: def jotxlink abc123
|
|
7
|
+
* ref TYPE ID
|
|
8
|
+
*
|
|
9
|
+
* Examples:
|
|
10
|
+
* ref mermaid xyz789 - Reference to mermaid block
|
|
11
|
+
* ref def abc123 - Reference to def block
|
|
12
|
+
* ref jotx doc_id - Reference to document (hdef)
|
|
13
|
+
*/
|
|
4
14
|
exports.JotxLinkBlock = {
|
|
5
15
|
type: 'jotxlink',
|
|
6
16
|
syntax: {
|
|
7
17
|
keyword: 'jotxlink',
|
|
8
|
-
hasText: false
|
|
9
|
-
// Spec: def jotxlink jl1 { target "doc-id"; text "Display Text" }
|
|
10
|
-
// Markdown: [[target]]
|
|
18
|
+
hasText: false
|
|
11
19
|
},
|
|
12
20
|
schema: {
|
|
13
21
|
properties: {
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
reftype: { type: 'identifier', required: true, description: 'Type of referenced block (def, mermaid, code, jotx, etc.)' },
|
|
23
|
+
refid: { type: 'identifier', required: true, description: 'ShortUUID of referenced block or document' }
|
|
16
24
|
}
|
|
17
25
|
},
|
|
18
26
|
ui: {
|
|
19
|
-
label: '
|
|
20
|
-
icon: 'link-2' // Lucide icon
|
|
27
|
+
label: 'Reference Link',
|
|
28
|
+
icon: 'link-2', // Lucide icon
|
|
29
|
+
description: 'Link to another block or document'
|
|
21
30
|
}
|
|
22
31
|
};
|
package/dist/blocks/Link.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const LinkBlock: BlockDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const LinkCardBlock: BlockDefinition;
|
package/dist/blocks/List.d.ts
CHANGED
package/dist/blocks/Math.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const MathBlock: BlockDefinition;
|
package/dist/blocks/Math.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.MathBlock = {
|
|
|
9
9
|
},
|
|
10
10
|
schema: {
|
|
11
11
|
properties: {
|
|
12
|
+
title: { type: 'string', required: false, description: 'Equation title' },
|
|
12
13
|
src: { type: 'string', required: true },
|
|
13
14
|
display: { type: 'enum', options: ['block', 'inline'], default: 'block' },
|
|
14
15
|
showsource: { type: 'boolean', default: false }
|
package/dist/blocks/Mermaid.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const MermaidBlock: BlockDefinition;
|
package/dist/blocks/Mermaid.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const ParagraphBlock: BlockDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const PropertiesBlock: BlockDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const PropertyBlock: BlockDefinition;
|
package/dist/blocks/Quote.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const QuoteBlock: BlockDefinition;
|
package/dist/blocks/Row.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const RowBlock: BlockDefinition;
|
package/dist/blocks/Section.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const SectionBlock: BlockDefinition;
|
package/dist/blocks/Table.d.ts
CHANGED
package/dist/blocks/Table.js
CHANGED
package/dist/blocks/Toggle.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const ToggleBlock: BlockDefinition;
|
package/dist/blocks/Video.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BlockDefinition } from '@jotx/registry';
|
|
1
|
+
import { BlockDefinition } from '@jotx-labs/registry';
|
|
2
2
|
export declare const VideoBlock: BlockDefinition;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.registerStandardBlocks = registerStandardBlocks;
|
|
18
|
-
const registry_1 = require("@jotx/registry");
|
|
18
|
+
const registry_1 = require("@jotx-labs/registry");
|
|
19
19
|
// Import all blocks
|
|
20
20
|
const Paragraph_1 = require("./blocks/Paragraph");
|
|
21
21
|
const Heading_1 = require("./blocks/Heading");
|
|
@@ -46,6 +46,9 @@ const BlockRef_1 = require("./blocks/BlockRef");
|
|
|
46
46
|
const Row_1 = require("./blocks/Row");
|
|
47
47
|
const Cell_1 = require("./blocks/Cell");
|
|
48
48
|
const Header_1 = require("./blocks/Header");
|
|
49
|
+
const GridCard_1 = require("./blocks/GridCard");
|
|
50
|
+
const Card_1 = require("./blocks/Card");
|
|
51
|
+
const Button_1 = require("./blocks/Button");
|
|
49
52
|
function registerStandardBlocks() {
|
|
50
53
|
// Text blocks
|
|
51
54
|
registry_1.registry.register(Paragraph_1.ParagraphBlock);
|
|
@@ -88,6 +91,12 @@ function registerStandardBlocks() {
|
|
|
88
91
|
registry_1.registry.register(Row_1.RowBlock);
|
|
89
92
|
registry_1.registry.register(Cell_1.CellBlock);
|
|
90
93
|
registry_1.registry.register(Header_1.HeaderBlock);
|
|
94
|
+
// Navigation blocks
|
|
95
|
+
registry_1.registry.register(GridCard_1.GridCardBlock);
|
|
96
|
+
registry_1.registry.register(Card_1.CardBlock);
|
|
97
|
+
registry_1.registry.register(Button_1.ButtonBlock);
|
|
98
|
+
// DEBUG: Log registry state
|
|
99
|
+
console.log('[StandardLib] Registered standard blocks. Registry keys:', registry_1.registry.getAll().map(b => b.type).join(', '));
|
|
91
100
|
}
|
|
92
101
|
// Export all blocks
|
|
93
102
|
__exportStar(require("./blocks/Paragraph"), exports);
|
|
@@ -119,3 +128,6 @@ __exportStar(require("./blocks/BlockRef"), exports);
|
|
|
119
128
|
__exportStar(require("./blocks/Row"), exports);
|
|
120
129
|
__exportStar(require("./blocks/Cell"), exports);
|
|
121
130
|
__exportStar(require("./blocks/Header"), exports);
|
|
131
|
+
__exportStar(require("./blocks/GridCard"), exports);
|
|
132
|
+
__exportStar(require("./blocks/Card"), exports);
|
|
133
|
+
__exportStar(require("./blocks/Button"), exports);
|
package/dist/verify-stdlib.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const index_1 = require("./index");
|
|
4
|
-
const registry_1 = require("@jotx/registry");
|
|
4
|
+
const registry_1 = require("@jotx-labs/registry");
|
|
5
5
|
console.log('🚀 Verifying Standard Library...');
|
|
6
6
|
registry_1.registry.clear();
|
|
7
7
|
(0, index_1.registerStandardBlocks)();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jotx-labs/standard-lib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.82",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"author": "balajiboominathan",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@jotx/registry": "file:../registry"
|
|
22
|
+
"@jotx-labs/registry": "file:../registry"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"typescript": "^5.0.0"
|
|
26
26
|
}
|
|
27
|
-
}
|
|
27
|
+
}
|