@opinly/vue 1.1.0 → 1.3.0

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/index.cjs CHANGED
@@ -20,11 +20,26 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
- OpinlyContent: () => OpinlyContent
23
+ OpinlyContent: () => OpinlyContent,
24
+ OpinlyPixel: () => OpinlyPixel,
25
+ useOpinly: () => useOpinly
24
26
  });
25
27
  module.exports = __toCommonJS(index_exports);
26
28
  var import_vue = require("vue");
27
29
  var import_shared = require("@opinly/shared");
30
+
31
+ // src/pixel.ts
32
+ var import_pixel = require("@opinly/shared/pixel");
33
+ var OpinlyPixel = {
34
+ install(_app, config) {
35
+ (0, import_pixel.loadOpinlyPixel)(config);
36
+ }
37
+ };
38
+ function useOpinly() {
39
+ return (0, import_pixel.getOpinlyPixel)();
40
+ }
41
+
42
+ // src/index.ts
28
43
  var OpinlyContent = (0, import_vue.defineComponent)({
29
44
  name: "OpinlyContent",
30
45
  props: {
@@ -44,6 +59,8 @@ var OpinlyContent = (0, import_vue.defineComponent)({
44
59
  });
45
60
  // Annotate the CommonJS export names for ESM import in node:
46
61
  0 && (module.exports = {
47
- OpinlyContent
62
+ OpinlyContent,
63
+ OpinlyPixel,
64
+ useOpinly
48
65
  });
49
66
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n createTextVNode,\n type PropType,\n type VNode,\n} from \"vue\";\nimport {\n createRenderer,\n type OpinlyNode,\n type OpinlyConfig,\n type ClassNames,\n} from \"@opinly/shared\";\n\n/**\n * Renders Opinly content as Vue vnodes. Content-only — no page layout.\n *\n * Wraps @opinly/shared's framework-agnostic walker with Vue's `h` + text vnodes.\n * Vue uses `class` natively, so no className remap is needed.\n */\nexport const OpinlyContent = defineComponent({\n name: \"OpinlyContent\",\n props: {\n content: { type: Object as PropType<OpinlyNode>, required: true },\n config: { type: Object as PropType<OpinlyConfig>, required: true },\n classNames: { type: Object as PropType<ClassNames>, required: false },\n },\n setup(props) {\n const render = createRenderer<VNode>({\n config: props.config,\n classNames: props.classNames,\n renderFn: (type, elementProps, children) =>\n h(type as never, elementProps as never, children),\n textFn: (value) => createTextVNode(value),\n });\n\n return () => render(props.content);\n },\n});\n\nexport type { OpinlyNode, OpinlyConfig, ClassNames } from \"@opinly/shared\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMO;AACP,oBAKO;AAQA,IAAM,oBAAgB,4BAAgB;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,IACL,SAAS,EAAE,MAAM,QAAgC,UAAU,KAAK;AAAA,IAChE,QAAQ,EAAE,MAAM,QAAkC,UAAU,KAAK;AAAA,IACjE,YAAY,EAAE,MAAM,QAAgC,UAAU,MAAM;AAAA,EACtE;AAAA,EACA,MAAM,OAAO;AACX,UAAM,aAAS,8BAAsB;AAAA,MACnC,QAAQ,MAAM;AAAA,MACd,YAAY,MAAM;AAAA,MAClB,UAAU,CAAC,MAAM,cAAc,iBAC7B,cAAE,MAAe,cAAuB,QAAQ;AAAA,MAClD,QAAQ,CAAC,cAAU,4BAAgB,KAAK;AAAA,IAC1C,CAAC;AAED,WAAO,MAAM,OAAO,MAAM,OAAO;AAAA,EACnC;AACF,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/pixel.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n createTextVNode,\n type PropType,\n type VNode,\n} from \"vue\";\nimport {\n createRenderer,\n type OpinlyNode,\n type OpinlyConfig,\n type ClassNames,\n} from \"@opinly/shared\";\n\n/**\n * Renders Opinly content as Vue vnodes. Content-only — no page layout.\n *\n * Wraps @opinly/shared's framework-agnostic walker with Vue's `h` + text vnodes.\n * Vue uses `class` natively, so no className remap is needed.\n */\nexport const OpinlyContent = defineComponent({\n name: \"OpinlyContent\",\n props: {\n content: { type: Object as PropType<OpinlyNode>, required: true },\n config: { type: Object as PropType<OpinlyConfig>, required: true },\n classNames: { type: Object as PropType<ClassNames>, required: false },\n },\n setup(props) {\n const render = createRenderer<VNode>({\n config: props.config,\n classNames: props.classNames,\n renderFn: (type, elementProps, children) =>\n h(type as never, elementProps as never, children),\n textFn: (value) => createTextVNode(value),\n });\n\n return () => render(props.content);\n },\n});\n\nexport type { OpinlyNode, OpinlyConfig, ClassNames } from \"@opinly/shared\";\nexport * from \"./pixel\";\n","import type { App } from \"vue\";\nimport {\n loadOpinlyPixel,\n getOpinlyPixel,\n type Opinly,\n type OpinlyPixelConfig,\n} from \"@opinly/shared/pixel\";\n\nexport type { Opinly, OpinlyPixelConfig } from \"@opinly/shared/pixel\";\n\nexport const OpinlyPixel = {\n install(_app: App, config: OpinlyPixelConfig) {\n loadOpinlyPixel(config);\n },\n};\n\nexport function useOpinly(): Opinly {\n return getOpinlyPixel();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMO;AACP,oBAKO;;;ACXP,mBAKO;AAIA,IAAM,cAAc;AAAA,EACzB,QAAQ,MAAW,QAA2B;AAC5C,sCAAgB,MAAM;AAAA,EACxB;AACF;AAEO,SAAS,YAAoB;AAClC,aAAO,6BAAe;AACxB;;;ADEO,IAAM,oBAAgB,4BAAgB;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,IACL,SAAS,EAAE,MAAM,QAAgC,UAAU,KAAK;AAAA,IAChE,QAAQ,EAAE,MAAM,QAAkC,UAAU,KAAK;AAAA,IACjE,YAAY,EAAE,MAAM,QAAgC,UAAU,MAAM;AAAA,EACtE;AAAA,EACA,MAAM,OAAO;AACX,UAAM,aAAS,8BAAsB;AAAA,MACnC,QAAQ,MAAM;AAAA,MACd,YAAY,MAAM;AAAA,MAClB,UAAU,CAAC,MAAM,cAAc,iBAC7B,cAAE,MAAe,cAAuB,QAAQ;AAAA,MAClD,QAAQ,CAAC,cAAU,4BAAgB,KAAK;AAAA,IAC1C,CAAC;AAED,WAAO,MAAM,OAAO,MAAM,OAAO;AAAA,EACnC;AACF,CAAC;","names":[]}
package/dist/index.d.cts CHANGED
@@ -1,7 +1,14 @@
1
1
  import * as vue from 'vue';
2
- import { PropType, VNode } from 'vue';
2
+ import { App, PropType, VNode } from 'vue';
3
3
  import { OpinlyNode, OpinlyConfig, ClassNames } from '@opinly/shared';
4
4
  export { ClassNames, OpinlyConfig, OpinlyNode } from '@opinly/shared';
5
+ import { OpinlyPixelConfig, Opinly } from '@opinly/shared/pixel';
6
+ export { Opinly, OpinlyPixelConfig } from '@opinly/shared/pixel';
7
+
8
+ declare const OpinlyPixel: {
9
+ install(_app: App, config: OpinlyPixelConfig): void;
10
+ };
11
+ declare function useOpinly(): Opinly;
5
12
 
6
13
  /**
7
14
  * Renders Opinly content as Vue vnodes. Content-only — no page layout.
@@ -39,4 +46,4 @@ declare const OpinlyContent: vue.DefineComponent<vue.ExtractPropTypes<{
39
46
  };
40
47
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
41
48
 
42
- export { OpinlyContent };
49
+ export { OpinlyContent, OpinlyPixel, useOpinly };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,14 @@
1
1
  import * as vue from 'vue';
2
- import { PropType, VNode } from 'vue';
2
+ import { App, PropType, VNode } from 'vue';
3
3
  import { OpinlyNode, OpinlyConfig, ClassNames } from '@opinly/shared';
4
4
  export { ClassNames, OpinlyConfig, OpinlyNode } from '@opinly/shared';
5
+ import { OpinlyPixelConfig, Opinly } from '@opinly/shared/pixel';
6
+ export { Opinly, OpinlyPixelConfig } from '@opinly/shared/pixel';
7
+
8
+ declare const OpinlyPixel: {
9
+ install(_app: App, config: OpinlyPixelConfig): void;
10
+ };
11
+ declare function useOpinly(): Opinly;
5
12
 
6
13
  /**
7
14
  * Renders Opinly content as Vue vnodes. Content-only — no page layout.
@@ -39,4 +46,4 @@ declare const OpinlyContent: vue.DefineComponent<vue.ExtractPropTypes<{
39
46
  };
40
47
  }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
41
48
 
42
- export { OpinlyContent };
49
+ export { OpinlyContent, OpinlyPixel, useOpinly };
package/dist/index.js CHANGED
@@ -7,6 +7,22 @@ import {
7
7
  import {
8
8
  createRenderer
9
9
  } from "@opinly/shared";
10
+
11
+ // src/pixel.ts
12
+ import {
13
+ loadOpinlyPixel,
14
+ getOpinlyPixel
15
+ } from "@opinly/shared/pixel";
16
+ var OpinlyPixel = {
17
+ install(_app, config) {
18
+ loadOpinlyPixel(config);
19
+ }
20
+ };
21
+ function useOpinly() {
22
+ return getOpinlyPixel();
23
+ }
24
+
25
+ // src/index.ts
10
26
  var OpinlyContent = defineComponent({
11
27
  name: "OpinlyContent",
12
28
  props: {
@@ -25,6 +41,8 @@ var OpinlyContent = defineComponent({
25
41
  }
26
42
  });
27
43
  export {
28
- OpinlyContent
44
+ OpinlyContent,
45
+ OpinlyPixel,
46
+ useOpinly
29
47
  };
30
48
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n createTextVNode,\n type PropType,\n type VNode,\n} from \"vue\";\nimport {\n createRenderer,\n type OpinlyNode,\n type OpinlyConfig,\n type ClassNames,\n} from \"@opinly/shared\";\n\n/**\n * Renders Opinly content as Vue vnodes. Content-only — no page layout.\n *\n * Wraps @opinly/shared's framework-agnostic walker with Vue's `h` + text vnodes.\n * Vue uses `class` natively, so no className remap is needed.\n */\nexport const OpinlyContent = defineComponent({\n name: \"OpinlyContent\",\n props: {\n content: { type: Object as PropType<OpinlyNode>, required: true },\n config: { type: Object as PropType<OpinlyConfig>, required: true },\n classNames: { type: Object as PropType<ClassNames>, required: false },\n },\n setup(props) {\n const render = createRenderer<VNode>({\n config: props.config,\n classNames: props.classNames,\n renderFn: (type, elementProps, children) =>\n h(type as never, elementProps as never, children),\n textFn: (value) => createTextVNode(value),\n });\n\n return () => render(props.content);\n },\n});\n\nexport type { OpinlyNode, OpinlyConfig, ClassNames } from \"@opinly/shared\";\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAIK;AAQA,IAAM,gBAAgB,gBAAgB;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,IACL,SAAS,EAAE,MAAM,QAAgC,UAAU,KAAK;AAAA,IAChE,QAAQ,EAAE,MAAM,QAAkC,UAAU,KAAK;AAAA,IACjE,YAAY,EAAE,MAAM,QAAgC,UAAU,MAAM;AAAA,EACtE;AAAA,EACA,MAAM,OAAO;AACX,UAAM,SAAS,eAAsB;AAAA,MACnC,QAAQ,MAAM;AAAA,MACd,YAAY,MAAM;AAAA,MAClB,UAAU,CAAC,MAAM,cAAc,aAC7B,EAAE,MAAe,cAAuB,QAAQ;AAAA,MAClD,QAAQ,CAAC,UAAU,gBAAgB,KAAK;AAAA,IAC1C,CAAC;AAED,WAAO,MAAM,OAAO,MAAM,OAAO;AAAA,EACnC;AACF,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/pixel.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n createTextVNode,\n type PropType,\n type VNode,\n} from \"vue\";\nimport {\n createRenderer,\n type OpinlyNode,\n type OpinlyConfig,\n type ClassNames,\n} from \"@opinly/shared\";\n\n/**\n * Renders Opinly content as Vue vnodes. Content-only — no page layout.\n *\n * Wraps @opinly/shared's framework-agnostic walker with Vue's `h` + text vnodes.\n * Vue uses `class` natively, so no className remap is needed.\n */\nexport const OpinlyContent = defineComponent({\n name: \"OpinlyContent\",\n props: {\n content: { type: Object as PropType<OpinlyNode>, required: true },\n config: { type: Object as PropType<OpinlyConfig>, required: true },\n classNames: { type: Object as PropType<ClassNames>, required: false },\n },\n setup(props) {\n const render = createRenderer<VNode>({\n config: props.config,\n classNames: props.classNames,\n renderFn: (type, elementProps, children) =>\n h(type as never, elementProps as never, children),\n textFn: (value) => createTextVNode(value),\n });\n\n return () => render(props.content);\n },\n});\n\nexport type { OpinlyNode, OpinlyConfig, ClassNames } from \"@opinly/shared\";\nexport * from \"./pixel\";\n","import type { App } from \"vue\";\nimport {\n loadOpinlyPixel,\n getOpinlyPixel,\n type Opinly,\n type OpinlyPixelConfig,\n} from \"@opinly/shared/pixel\";\n\nexport type { Opinly, OpinlyPixelConfig } from \"@opinly/shared/pixel\";\n\nexport const OpinlyPixel = {\n install(_app: App, config: OpinlyPixelConfig) {\n loadOpinlyPixel(config);\n },\n};\n\nexport function useOpinly(): Opinly {\n return getOpinlyPixel();\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAIK;;;ACXP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAIA,IAAM,cAAc;AAAA,EACzB,QAAQ,MAAW,QAA2B;AAC5C,oBAAgB,MAAM;AAAA,EACxB;AACF;AAEO,SAAS,YAAoB;AAClC,SAAO,eAAe;AACxB;;;ADEO,IAAM,gBAAgB,gBAAgB;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,IACL,SAAS,EAAE,MAAM,QAAgC,UAAU,KAAK;AAAA,IAChE,QAAQ,EAAE,MAAM,QAAkC,UAAU,KAAK;AAAA,IACjE,YAAY,EAAE,MAAM,QAAgC,UAAU,MAAM;AAAA,EACtE;AAAA,EACA,MAAM,OAAO;AACX,UAAM,SAAS,eAAsB;AAAA,MACnC,QAAQ,MAAM;AAAA,MACd,YAAY,MAAM;AAAA,MAClB,UAAU,CAAC,MAAM,cAAc,aAC7B,EAAE,MAAe,cAAuB,QAAQ;AAAA,MAClD,QAAQ,CAAC,UAAU,gBAAgB,KAAK;AAAA,IAC1C,CAAC;AAED,WAAO,MAAM,OAAO,MAAM,OAAO;AAAA,EACnC;AACF,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opinly/vue",
3
3
  "description": "Vue renderer for Opinly content (Tiptap JSON). Content-only — works in Nuxt & Vue.",
4
- "version": "1.1.0",
4
+ "version": "1.3.0",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "main": "dist/index.cjs",
@@ -15,7 +15,7 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@opinly/shared": "1.1.0"
18
+ "@opinly/shared": "1.3.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "vue": "^3.3.0"