@opinly/vue 0.0.0-alpha-20260707133941

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 ADDED
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ OpinlyContent: () => OpinlyContent
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+ var import_vue = require("vue");
27
+ var import_shared = require("@opinly/shared");
28
+ var OpinlyContent = (0, import_vue.defineComponent)({
29
+ name: "OpinlyContent",
30
+ props: {
31
+ content: { type: Object, required: true },
32
+ config: { type: Object, required: true },
33
+ classNames: { type: Object, required: false }
34
+ },
35
+ setup(props) {
36
+ const render = (0, import_shared.createRenderer)({
37
+ config: props.config,
38
+ classNames: props.classNames,
39
+ renderFn: (type, elementProps, children) => (0, import_vue.h)(type, elementProps, children),
40
+ textFn: (value) => (0, import_vue.createTextVNode)(value)
41
+ });
42
+ return () => render(props.content);
43
+ }
44
+ });
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ OpinlyContent
48
+ });
49
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +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":[]}
@@ -0,0 +1,42 @@
1
+ import * as vue from 'vue';
2
+ import { PropType, VNode } from 'vue';
3
+ import { OpinlyNode, OpinlyConfig, ClassNames } from '@opinly/shared';
4
+ export { ClassNames, OpinlyConfig, OpinlyNode } from '@opinly/shared';
5
+
6
+ /**
7
+ * Renders Opinly content as Vue vnodes. Content-only — no page layout.
8
+ *
9
+ * Wraps @opinly/shared's framework-agnostic walker with Vue's `h` + text vnodes.
10
+ * Vue uses `class` natively, so no className remap is needed.
11
+ */
12
+ declare const OpinlyContent: vue.DefineComponent<vue.ExtractPropTypes<{
13
+ content: {
14
+ type: PropType<OpinlyNode>;
15
+ required: true;
16
+ };
17
+ config: {
18
+ type: PropType<OpinlyConfig>;
19
+ required: true;
20
+ };
21
+ classNames: {
22
+ type: PropType<ClassNames>;
23
+ required: false;
24
+ };
25
+ }>, () => VNode<vue.RendererNode, vue.RendererElement, {
26
+ [key: string]: any;
27
+ }>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
28
+ content: {
29
+ type: PropType<OpinlyNode>;
30
+ required: true;
31
+ };
32
+ config: {
33
+ type: PropType<OpinlyConfig>;
34
+ required: true;
35
+ };
36
+ classNames: {
37
+ type: PropType<ClassNames>;
38
+ required: false;
39
+ };
40
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
41
+
42
+ export { OpinlyContent };
@@ -0,0 +1,42 @@
1
+ import * as vue from 'vue';
2
+ import { PropType, VNode } from 'vue';
3
+ import { OpinlyNode, OpinlyConfig, ClassNames } from '@opinly/shared';
4
+ export { ClassNames, OpinlyConfig, OpinlyNode } from '@opinly/shared';
5
+
6
+ /**
7
+ * Renders Opinly content as Vue vnodes. Content-only — no page layout.
8
+ *
9
+ * Wraps @opinly/shared's framework-agnostic walker with Vue's `h` + text vnodes.
10
+ * Vue uses `class` natively, so no className remap is needed.
11
+ */
12
+ declare const OpinlyContent: vue.DefineComponent<vue.ExtractPropTypes<{
13
+ content: {
14
+ type: PropType<OpinlyNode>;
15
+ required: true;
16
+ };
17
+ config: {
18
+ type: PropType<OpinlyConfig>;
19
+ required: true;
20
+ };
21
+ classNames: {
22
+ type: PropType<ClassNames>;
23
+ required: false;
24
+ };
25
+ }>, () => VNode<vue.RendererNode, vue.RendererElement, {
26
+ [key: string]: any;
27
+ }>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
28
+ content: {
29
+ type: PropType<OpinlyNode>;
30
+ required: true;
31
+ };
32
+ config: {
33
+ type: PropType<OpinlyConfig>;
34
+ required: true;
35
+ };
36
+ classNames: {
37
+ type: PropType<ClassNames>;
38
+ required: false;
39
+ };
40
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
41
+
42
+ export { OpinlyContent };
package/dist/index.js ADDED
@@ -0,0 +1,30 @@
1
+ // src/index.ts
2
+ import {
3
+ defineComponent,
4
+ h,
5
+ createTextVNode
6
+ } from "vue";
7
+ import {
8
+ createRenderer
9
+ } from "@opinly/shared";
10
+ var OpinlyContent = defineComponent({
11
+ name: "OpinlyContent",
12
+ props: {
13
+ content: { type: Object, required: true },
14
+ config: { type: Object, required: true },
15
+ classNames: { type: Object, required: false }
16
+ },
17
+ setup(props) {
18
+ const render = createRenderer({
19
+ config: props.config,
20
+ classNames: props.classNames,
21
+ renderFn: (type, elementProps, children) => h(type, elementProps, children),
22
+ textFn: (value) => createTextVNode(value)
23
+ });
24
+ return () => render(props.content);
25
+ }
26
+ });
27
+ export {
28
+ OpinlyContent
29
+ };
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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":[]}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@opinly/vue",
3
+ "description": "Vue renderer for Opinly content (Tiptap JSON). Content-only — works in Nuxt & Vue.",
4
+ "version": "0.0.0-alpha-20260707133941",
5
+ "private": false,
6
+ "type": "module",
7
+ "main": "dist/index.cjs",
8
+ "module": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "require": "./dist/index.cjs"
15
+ }
16
+ },
17
+ "dependencies": {
18
+ "@opinly/shared": "0.0.0-alpha-20260707133941"
19
+ },
20
+ "peerDependencies": {
21
+ "vue": "^3.3.0"
22
+ },
23
+ "devDependencies": {
24
+ "tsup": "^8.5.0",
25
+ "typescript": "^5.3.3",
26
+ "vue": "^3.5.0"
27
+ },
28
+ "engines": {
29
+ "node": ">=16"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "files": [
35
+ "dist/**"
36
+ ],
37
+ "sideEffects": false,
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/opinly/opinly-sdk.git",
41
+ "directory": "packages/vue"
42
+ },
43
+ "scripts": {
44
+ "build": "tsup",
45
+ "packages-dev": "tsup --config tsup.config.ts --watch",
46
+ "check-types": "tsc --noEmit",
47
+ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
48
+ }
49
+ }