@refrakt-md/vue 0.9.3 → 0.9.4

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.
@@ -1,10 +1,6 @@
1
1
  import type { Component } from 'vue';
2
2
  export type ElementOverrides = Record<string, Component>;
3
- /**
4
- * Default element overrides for the Vue renderer.
5
- *
6
- * - `table`: Wraps in scrollable container
7
- * - `pre`: Wraps code blocks in rf-codeblock structure for behaviors
8
- */
3
+ /** Base element overrides — empty by default. User-defined overrides can be
4
+ * passed to the Renderer. */
9
5
  export declare const elements: ElementOverrides;
10
6
  //# sourceMappingURL=elements.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAIrC,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,gBAGtB,CAAC"}
1
+ {"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEzD;8BAC8B;AAC9B,eAAO,MAAM,QAAQ,EAAE,gBAAqB,CAAC"}
package/dist/elements.js CHANGED
@@ -1,13 +1,4 @@
1
- import { Table } from './elements/Table.js';
2
- import { Pre } from './elements/Pre.js';
3
- /**
4
- * Default element overrides for the Vue renderer.
5
- *
6
- * - `table`: Wraps in scrollable container
7
- * - `pre`: Wraps code blocks in rf-codeblock structure for behaviors
8
- */
9
- export const elements = {
10
- table: Table,
11
- pre: Pre,
12
- };
1
+ /** Base element overrides empty by default. User-defined overrides can be
2
+ * passed to the Renderer. */
3
+ export const elements = {};
13
4
  //# sourceMappingURL=elements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAqB;IACzC,KAAK,EAAE,KAAK;IACZ,GAAG,EAAE,GAAG;CACR,CAAC"}
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../src/elements.ts"],"names":[],"mappings":"AAIA;8BAC8B;AAC9B,MAAM,CAAC,MAAM,QAAQ,GAAqB,EAAE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,4 @@ export { registry } from './registry.js';
4
4
  export type { ComponentRegistry } from './registry.js';
5
5
  export { elements } from './elements.js';
6
6
  export type { ElementOverrides } from './elements.js';
7
- export { Table } from './elements/Table.js';
8
- export { Pre } from './elements/Pre.js';
9
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -4,7 +4,4 @@ export { Renderer } from './Renderer.js';
4
4
  export { registry } from './registry.js';
5
5
  // Element overrides
6
6
  export { elements } from './elements.js';
7
- // Element override components
8
- export { Table } from './elements/Table.js';
9
- export { Pre } from './elements/Pre.js';
10
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,qBAAqB;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,oBAAoB;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,8BAA8B;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAKzC,qBAAqB;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,oBAAoB;AACpB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@refrakt-md/vue",
3
3
  "description": "Vue renderer for refrakt.md content — ADR-008 component interface with props and named slots",
4
- "version": "0.9.3",
4
+ "version": "0.9.4",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -29,8 +29,8 @@
29
29
  "build": "tsc"
30
30
  },
31
31
  "dependencies": {
32
- "@refrakt-md/transform": "0.9.3",
33
- "@refrakt-md/types": "0.9.3"
32
+ "@refrakt-md/transform": "0.9.4",
33
+ "@refrakt-md/types": "0.9.4"
34
34
  },
35
35
  "devDependencies": {
36
36
  "vue": "^3.5.0"
@@ -1,19 +0,0 @@
1
- import type { SerializedTag } from '@refrakt-md/types';
2
- /**
3
- * Pre element override — wraps code blocks in the rf-codeblock structure
4
- * that @refrakt-md/behaviors enhances with a copy button.
5
- */
6
- export declare const Pre: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
- tag: {
8
- type: () => SerializedTag;
9
- required: true;
10
- };
11
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
- [key: string]: any;
13
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
- tag: {
15
- type: () => SerializedTag;
16
- required: true;
17
- };
18
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
- //# sourceMappingURL=Pre.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Pre.d.ts","sourceRoot":"","sources":["../../src/elements/Pre.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,GAAG;;cAGS,MAAM,aAAa;;;;;;;cAAnB,MAAM,aAAa;;;iGAgB1C,CAAC"}
@@ -1,31 +0,0 @@
1
- import { defineComponent, h } from 'vue';
2
- /**
3
- * Pre element override — wraps code blocks in the rf-codeblock structure
4
- * that @refrakt-md/behaviors enhances with a copy button.
5
- */
6
- export const Pre = defineComponent({
7
- name: 'RfPre',
8
- props: {
9
- tag: { type: Object, required: true },
10
- },
11
- setup(props, { slots }) {
12
- return () => {
13
- const isCodeBlock = 'data-language' in (props.tag.attributes || {});
14
- const attrs = filterAttrs(props.tag.attributes);
15
- if (isCodeBlock) {
16
- return h('div', { class: 'rf-codeblock' }, h('pre', attrs, slots.default?.()));
17
- }
18
- return h('pre', attrs, slots.default?.());
19
- };
20
- },
21
- });
22
- function filterAttrs(attrs) {
23
- const result = {};
24
- for (const [k, v] of Object.entries(attrs)) {
25
- if (k === '$$mdtype' || v === undefined || v === null || v === false)
26
- continue;
27
- result[k] = v === true ? '' : v;
28
- }
29
- return result;
30
- }
31
- //# sourceMappingURL=Pre.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Pre.js","sourceRoot":"","sources":["../../src/elements/Pre.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGzC;;;GAGG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,eAAe,CAAC;IAClC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACN,GAAG,EAAE,EAAE,IAAI,EAAE,MAA6B,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC5D;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE;QACrB,OAAO,GAAG,EAAE;YACX,MAAM,WAAW,GAAG,eAAe,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;YACpE,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAEhD,IAAI,WAAW,EAAE,CAAC;gBACjB,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,EACxC,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAClC,CAAC;YACH,CAAC;YAED,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC3C,CAAC,CAAC;IACH,CAAC;CACD,CAAC,CAAC;AAEH,SAAS,WAAW,CAAC,KAA0B;IAC9C,MAAM,MAAM,GAAwB,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5C,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK;YAAE,SAAS;QAC/E,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { SerializedTag } from '@refrakt-md/types';
2
- /**
3
- * Table element override — wraps <table> in a scrollable container.
4
- */
5
- export declare const Table: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
- tag: {
7
- type: () => SerializedTag;
8
- required: true;
9
- };
10
- }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
11
- [key: string]: any;
12
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
- tag: {
14
- type: () => SerializedTag;
15
- required: true;
16
- };
17
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
- //# sourceMappingURL=Table.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/elements/Table.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,KAAK;;cAGO,MAAM,aAAa;;;;;;;cAAnB,MAAM,aAAa;;;iGAO1C,CAAC"}
@@ -1,23 +0,0 @@
1
- import { defineComponent, h } from 'vue';
2
- /**
3
- * Table element override — wraps <table> in a scrollable container.
4
- */
5
- export const Table = defineComponent({
6
- name: 'RfTable',
7
- props: {
8
- tag: { type: Object, required: true },
9
- },
10
- setup(props, { slots }) {
11
- return () => h('div', { class: 'rf-table-wrapper' }, h('table', filterAttrs(props.tag.attributes), slots.default?.()));
12
- },
13
- });
14
- function filterAttrs(attrs) {
15
- const result = {};
16
- for (const [k, v] of Object.entries(attrs)) {
17
- if (k === '$$mdtype' || v === undefined || v === null || v === false)
18
- continue;
19
- result[k] = v === true ? '' : v;
20
- }
21
- return result;
22
- }
23
- //# sourceMappingURL=Table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../src/elements/Table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGzC;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;IACpC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE;QACN,GAAG,EAAE,EAAE,IAAI,EAAE,MAA6B,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC5D;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE;QACrB,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAClD,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAChE,CAAC;IACH,CAAC;CACD,CAAC,CAAC;AAEH,SAAS,WAAW,CAAC,KAA0B;IAC9C,MAAM,MAAM,GAAwB,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5C,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK;YAAE,SAAS;QAC/E,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC"}