@nubisco/cms-vue 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nubisco
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # @nubisco/cms-vue
2
+
3
+ The shared kit for the Nubisco CMS. Framework-agnostic content model plus the
4
+ tools to render and gate it. Consumed by both the CMS editor and the sites it
5
+ edits, so the two never drift.
6
+
7
+ Status: early. This package currently ships the **contract** and the
8
+ **evaluator**; the Vue **render kit** (a `CmsZone` resolver and field primitives
9
+ with in-context edit hooks) follows.
10
+
11
+ ## What's here
12
+
13
+ - **Content contract** (`content`): `Field`, `Block` (composed or coded), `Zone`,
14
+ `PageDocument`. Localized strings are stored by reference (`{ $t }`) so
15
+ translations stay in the app's i18n / Verba, not inlined.
16
+ - **Logic** (`logic`): a `Condition` (simple predicate, boolean tree, or a
17
+ reference to a visual graph) and an extensible logic-input registry
18
+ (`featureFlag`, `environment`, `auth`, `region`, ...). `resolveAt` marks whether
19
+ a condition can be evaluated at build time or must run at the edge.
20
+ - **Evaluator** (`evaluate`, `graph`): evaluates a condition to a visibility
21
+ boolean, including logic graphs, given a host-provided environment.
22
+
23
+ ## Usage
24
+
25
+ ```ts
26
+ import { evaluate, type Condition, type LogicEnv } from '@nubisco/cms-vue'
27
+
28
+ const env: LogicEnv = {
29
+ featureFlag: (params) => flags[String(params?.flag)] === true,
30
+ environment: (_p, op, value) => (op === 'not' ? currentEnv !== value : currentEnv === value),
31
+ }
32
+
33
+ const visible = evaluate(block.when, env)
34
+ ```
35
+
36
+ ## Develop
37
+
38
+ ```
39
+ pnpm install
40
+ pnpm build # tsc -> dist (js + d.ts)
41
+ pnpm types:check
42
+ ```
43
+
44
+ Published to npm when ready; linked locally (`link:`) during development.
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Content contract: the framework-agnostic shape of Nubisco CMS content.
3
+ *
4
+ * This is the crown jewel of the system. The CMS edits documents of this shape,
5
+ * and any renderer (Vue first, others later) is just a function from these types
6
+ * to a rendered page. Nothing here mentions Vue on purpose.
7
+ *
8
+ * Vocabulary: Fields (primitives) compose into Blocks (placeable units), which
9
+ * are ordered inside Zones on a Page.
10
+ */
11
+ export type FieldType = 'text' | 'richtext' | 'number' | 'boolean' | 'image' | 'link' | 'color' | 'date' | 'select';
12
+ /** A field's schema: what a Block declares it accepts. */
13
+ export interface FieldSchema {
14
+ type: FieldType;
15
+ /** Editor-facing label. */
16
+ label: string;
17
+ help?: string;
18
+ required?: boolean;
19
+ /**
20
+ * Whether the value is per-locale. Text/richtext default to true and are
21
+ * stored by reference (see TRef) so Verba owns the translations. Media,
22
+ * numbers, and booleans default to false.
23
+ */
24
+ localized?: boolean;
25
+ /** Allowed values for `select`. */
26
+ options?: string[];
27
+ default?: unknown;
28
+ /** Max length for text, or max value for number. */
29
+ max?: number;
30
+ }
31
+ /**
32
+ * A reference to an i18n key. Localized strings are never inlined into content;
33
+ * they resolve from Verba / the site's locale JSON at render time. This keeps
34
+ * Verba authoritative and the content documents small, and it matches how the
35
+ * existing sites already use vue-i18n keys.
36
+ */
37
+ export interface TRef {
38
+ $t: string;
39
+ }
40
+ export interface ImageValue {
41
+ src: string;
42
+ alt?: TRef;
43
+ /** Intrinsic size, when known, to avoid layout shift. */
44
+ w?: number;
45
+ h?: number;
46
+ }
47
+ export interface LinkValue {
48
+ href: string;
49
+ label?: TRef;
50
+ external?: boolean;
51
+ }
52
+ export type FieldValue = TRef | string | number | boolean | ImageValue | LinkValue;
53
+ export type BlockKind =
54
+ /** Fields only, assembled in the CMS. No app code required. */
55
+ 'composed'
56
+ /** Backed by an app component (anything with behavior, e.g. a form). */
57
+ | 'coded';
58
+ export type BlockCategory = 'content' | 'media' | 'form' | 'layout';
59
+ export interface BlockVariation {
60
+ id: string;
61
+ label: string;
62
+ /** Field values this variation presets (a footer subscribe vs a hero one). */
63
+ presets?: Record<string, FieldValue>;
64
+ }
65
+ /** A named region inside a composed block that nests other blocks. */
66
+ export interface SlotSchema {
67
+ label: string;
68
+ /** Block types allowed in this slot. Omit to allow any. */
69
+ allow?: string[];
70
+ }
71
+ /**
72
+ * A block type definition, registered once. The editor catalog, the inspector
73
+ * fields, validation, and serialization all derive from this, mirroring how the
74
+ * NubiscoUI Blueprint system derives everything from a NodeDefinition.
75
+ *
76
+ * Coded blocks map `type` to a real component through a per-framework registry
77
+ * that lives in the renderer package, not in this contract.
78
+ */
79
+ export interface BlockDefinition {
80
+ type: string;
81
+ label: string;
82
+ kind: BlockKind;
83
+ category?: BlockCategory;
84
+ icon?: string;
85
+ fields: Record<string, FieldSchema>;
86
+ variations?: BlockVariation[];
87
+ slots?: Record<string, SlotSchema>;
88
+ }
89
+ /** A block as it appears in a content document. */
90
+ export interface BlockInstance {
91
+ /** Stable id: survives reorder, used for deep links and in-place edit targeting. */
92
+ id: string;
93
+ type: string;
94
+ variation?: string;
95
+ fields: Record<string, FieldValue>;
96
+ /** Visibility logic. Absent means always visible. */
97
+ when?: import('./logic').Condition;
98
+ /** Nested blocks for composed blocks with slots. */
99
+ slots?: Record<string, BlockInstance[]>;
100
+ }
101
+ /** An ordered list of blocks. Array order is render order and reorder order. */
102
+ export interface Zone {
103
+ blocks: BlockInstance[];
104
+ }
105
+ export interface PageDocument {
106
+ route: string;
107
+ meta?: {
108
+ title?: TRef;
109
+ description?: TRef;
110
+ /** Page renders its own newsletter, so the footer one is suppressed. */
111
+ ownNewsletter?: boolean;
112
+ };
113
+ /** Named zones, usually just `main`. */
114
+ zones: Record<string, Zone>;
115
+ /** Whole-page gate, e.g. a product feature flag. */
116
+ when?: import('./logic').Condition;
117
+ /** Logic graphs referenced by block/page conditions via { kind: 'graph', graphId }. */
118
+ graphs?: Record<string, import('./logic').LogicGraph>;
119
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Content contract: the framework-agnostic shape of Nubisco CMS content.
3
+ *
4
+ * This is the crown jewel of the system. The CMS edits documents of this shape,
5
+ * and any renderer (Vue first, others later) is just a function from these types
6
+ * to a rendered page. Nothing here mentions Vue on purpose.
7
+ *
8
+ * Vocabulary: Fields (primitives) compose into Blocks (placeable units), which
9
+ * are ordered inside Zones on a Page.
10
+ */
11
+ export {};
@@ -0,0 +1,3 @@
1
+ /** The Nubisco CMS content contract. Framework-agnostic; renderers depend on this. */
2
+ export * from './content';
3
+ export * from './logic';
@@ -0,0 +1,3 @@
1
+ /** The Nubisco CMS content contract. Framework-agnostic; renderers depend on this. */
2
+ export * from './content';
3
+ export * from './logic';
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Logic contract: visibility and variation conditions.
3
+ *
4
+ * A Condition gates whether a Block or Page renders. It is either a simple
5
+ * predicate, a boolean tree, or a reference to a NubiscoUI Blueprint graph for
6
+ * the genuinely compound cases. Most content uses a simple predicate; the graph
7
+ * is the escape hatch, not the default.
8
+ *
9
+ * Logic inputs are a registry. Adding a new input type (e.g. campaign source)
10
+ * later is one LogicInputDefinition plus one Blueprint NodeDefinition. Nothing
11
+ * in the engine or the content schema changes.
12
+ */
13
+ export type Op = 'is' | 'not' | 'in' | 'gte' | 'lte' | 'between';
14
+ export type Condition = {
15
+ kind: 'always';
16
+ } | {
17
+ kind: 'simple';
18
+ /** A registered LogicInputDefinition id. */
19
+ input: string;
20
+ /** Input parameters, e.g. { flag: 'stagewright' } for featureFlag. */
21
+ params?: Record<string, unknown>;
22
+ /** Comparison for enum/number/date inputs. Boolean inputs need none. */
23
+ op?: Op;
24
+ value?: unknown;
25
+ } | {
26
+ kind: 'all';
27
+ of: Condition[];
28
+ } | {
29
+ kind: 'any';
30
+ of: Condition[];
31
+ } | {
32
+ kind: 'not';
33
+ of: Condition;
34
+ }
35
+ /** Reference to a serialized Blueprint graph stored alongside the content. */
36
+ | {
37
+ kind: 'graph';
38
+ graphId: string;
39
+ };
40
+ /**
41
+ * Where a logic input can be evaluated. This is load-bearing for delivery:
42
+ * - `build` inputs (flag, environment, locale) let a gated block prerender.
43
+ * - `request` inputs (auth, region) force the block to be resolved at the edge
44
+ * (a Worker) or revealed client-side. It cannot be baked.
45
+ * A block whose condition mixes both is resolved at the most dynamic site.
46
+ */
47
+ export type ResolveAt = 'build' | 'request';
48
+ export type LogicValueType = 'boolean' | 'enum' | 'number' | 'date';
49
+ /**
50
+ * A logic input type, registered once. The value is resolved by a host-provided
51
+ * resolver keyed by `id`; this definition only declares the shape and where it
52
+ * can run, so the visual editor and the evaluator are fully data-driven.
53
+ */
54
+ export type LogicKind = 'featureFlag' | 'environment' | 'auth' | 'region' | 'and' | 'or' | 'not' | 'visible';
55
+ export interface LogicNode {
56
+ id: string;
57
+ kind: LogicKind;
58
+ x: number;
59
+ y: number;
60
+ /** Flag key / environment value / region code, for the input nodes. */
61
+ param?: string;
62
+ }
63
+ export interface GraphConnection {
64
+ fromNode: string;
65
+ fromPort: string;
66
+ toNode: string;
67
+ toPort: string;
68
+ }
69
+ export interface LogicGraph {
70
+ nodes: LogicNode[];
71
+ connections: GraphConnection[];
72
+ }
73
+ export interface LogicInputDefinition {
74
+ id: string;
75
+ label: string;
76
+ valueType: LogicValueType;
77
+ /** Parameters the author fills in, e.g. featureFlag needs a `flag`. */
78
+ params?: Record<string, import('./content').FieldSchema>;
79
+ resolveAt: ResolveAt;
80
+ /** Allowed values for enum inputs (environment, region, locale). */
81
+ enumValues?: string[];
82
+ }
83
+ /**
84
+ * The initial catalog. Extend by appending a definition (and, for the visual
85
+ * editor, a matching Blueprint NodeDefinition). `campaignSource` is the worked
86
+ * example of a future input: append one entry with resolveAt: 'request'.
87
+ */
88
+ export declare const CORE_LOGIC_INPUTS: LogicInputDefinition[];
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Logic contract: visibility and variation conditions.
3
+ *
4
+ * A Condition gates whether a Block or Page renders. It is either a simple
5
+ * predicate, a boolean tree, or a reference to a NubiscoUI Blueprint graph for
6
+ * the genuinely compound cases. Most content uses a simple predicate; the graph
7
+ * is the escape hatch, not the default.
8
+ *
9
+ * Logic inputs are a registry. Adding a new input type (e.g. campaign source)
10
+ * later is one LogicInputDefinition plus one Blueprint NodeDefinition. Nothing
11
+ * in the engine or the content schema changes.
12
+ */
13
+ /**
14
+ * The initial catalog. Extend by appending a definition (and, for the visual
15
+ * editor, a matching Blueprint NodeDefinition). `campaignSource` is the worked
16
+ * example of a future input: append one entry with resolveAt: 'request'.
17
+ */
18
+ export const CORE_LOGIC_INPUTS = [
19
+ {
20
+ id: 'featureFlag',
21
+ label: 'Feature flag',
22
+ valueType: 'boolean',
23
+ params: { flag: { type: 'text', label: 'Flag key', required: true } },
24
+ resolveAt: 'build',
25
+ },
26
+ {
27
+ id: 'environment',
28
+ label: 'Environment',
29
+ valueType: 'enum',
30
+ enumValues: ['staging', 'production'],
31
+ resolveAt: 'build',
32
+ },
33
+ {
34
+ id: 'locale',
35
+ label: 'Locale',
36
+ valueType: 'enum',
37
+ enumValues: ['en', 'pt', 'es', 'fr'],
38
+ resolveAt: 'build',
39
+ },
40
+ {
41
+ id: 'schedule',
42
+ label: 'Schedule window',
43
+ valueType: 'date',
44
+ params: {
45
+ from: { type: 'date', label: 'From' },
46
+ to: { type: 'date', label: 'To' },
47
+ },
48
+ resolveAt: 'build',
49
+ },
50
+ {
51
+ id: 'auth',
52
+ label: 'Signed in',
53
+ valueType: 'boolean',
54
+ resolveAt: 'request',
55
+ },
56
+ {
57
+ id: 'region',
58
+ label: 'Region',
59
+ valueType: 'enum',
60
+ enumValues: ['EU', 'NA', 'SA', 'AS', 'AF', 'OC'],
61
+ resolveAt: 'request',
62
+ },
63
+ ];
@@ -0,0 +1,15 @@
1
+ import type { Condition, LogicGraph, Op } from './contract';
2
+ /**
3
+ * Resolves one logic input to a boolean, given the author's params/op/value.
4
+ * The host provides one resolver per registered input id (featureFlag,
5
+ * environment, auth, region, ...). This is where build-time vs request-time
6
+ * resolution actually happens; the contract only declares which is which.
7
+ */
8
+ export type InputResolver = (params: Record<string, unknown> | undefined, op: Op | undefined, value: unknown) => boolean;
9
+ export type LogicEnv = Record<string, InputResolver>;
10
+ /**
11
+ * Evaluates a Condition tree to a visibility boolean. `graphs` supplies the
12
+ * logic graphs referenced by { kind: 'graph' } conditions (stored on the page
13
+ * document); a graph condition with no matching graph defaults to visible.
14
+ */
15
+ export declare function evaluate(condition: Condition | undefined, env: LogicEnv, graphs?: Record<string, LogicGraph>): boolean;
@@ -0,0 +1,26 @@
1
+ import { evaluateGraph } from './graph';
2
+ /**
3
+ * Evaluates a Condition tree to a visibility boolean. `graphs` supplies the
4
+ * logic graphs referenced by { kind: 'graph' } conditions (stored on the page
5
+ * document); a graph condition with no matching graph defaults to visible.
6
+ */
7
+ export function evaluate(condition, env, graphs) {
8
+ if (!condition || condition.kind === 'always')
9
+ return true;
10
+ switch (condition.kind) {
11
+ case 'simple': {
12
+ const resolve = env[condition.input];
13
+ return resolve ? resolve(condition.params, condition.op, condition.value) : false;
14
+ }
15
+ case 'all':
16
+ return condition.of.every((c) => evaluate(c, env, graphs));
17
+ case 'any':
18
+ return condition.of.some((c) => evaluate(c, env, graphs));
19
+ case 'not':
20
+ return !evaluate(condition.of, env, graphs);
21
+ case 'graph': {
22
+ const graph = graphs?.[condition.graphId];
23
+ return graph ? evaluateGraph(graph, env).visible : true;
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,45 @@
1
+ import type { LogicGraph, LogicKind } from './contract';
2
+ import type { LogicEnv } from './evaluate';
3
+ /**
4
+ * App-side logic for the graph form of a Condition (the data shapes live in the
5
+ * contract). The node catalog, Blueprint card mapping, and evaluator are here.
6
+ * Inputs (feature flag, environment, ...) feed gates (AND/OR/NOT) that feed a
7
+ * single Visible sink; graphs are referenced from a condition as
8
+ * { kind: 'graph', graphId }.
9
+ */
10
+ interface NodePort {
11
+ id: string;
12
+ label: string;
13
+ type: 'input' | 'output';
14
+ }
15
+ interface NodeSpec {
16
+ label: string;
17
+ color: string;
18
+ category: string;
19
+ ports: NodePort[];
20
+ /** Which parameter this node carries, if any. */
21
+ param?: 'flag' | 'environment' | 'region';
22
+ }
23
+ export declare const NODE_SPECS: Record<LogicKind, NodeSpec>;
24
+ export interface BlueprintCard {
25
+ id: string;
26
+ x: number;
27
+ y: number;
28
+ width: number;
29
+ height: number;
30
+ paint: {
31
+ title: string;
32
+ color: string;
33
+ category: string;
34
+ ports: NodePort[];
35
+ };
36
+ }
37
+ /** Maps the logic graph to Blueprint card geometry + paint. */
38
+ export declare function toCards(graph: LogicGraph): BlueprintCard[];
39
+ export interface GraphResult {
40
+ visible: boolean;
41
+ nodeOut: Record<string, boolean>;
42
+ }
43
+ /** Evaluates the graph to the Visible sink's value, plus each node's output. */
44
+ export declare function evaluateGraph(graph: LogicGraph, env: LogicEnv): GraphResult;
45
+ export {};
package/dist/graph.js ADDED
@@ -0,0 +1,130 @@
1
+ export const NODE_SPECS = {
2
+ featureFlag: {
3
+ label: 'Feature flag',
4
+ color: '#6e6bd6',
5
+ category: 'input',
6
+ ports: [{ id: 'out', label: 'on', type: 'output' }],
7
+ param: 'flag',
8
+ },
9
+ environment: {
10
+ label: 'Environment',
11
+ color: '#b9781e',
12
+ category: 'input',
13
+ ports: [{ id: 'out', label: 'is', type: 'output' }],
14
+ param: 'environment',
15
+ },
16
+ auth: {
17
+ label: 'Signed in',
18
+ color: '#2c9560',
19
+ category: 'input',
20
+ ports: [{ id: 'out', label: 'yes', type: 'output' }],
21
+ },
22
+ region: {
23
+ label: 'Region',
24
+ color: '#3a86c8',
25
+ category: 'input',
26
+ ports: [{ id: 'out', label: 'in', type: 'output' }],
27
+ param: 'region',
28
+ },
29
+ and: {
30
+ label: 'AND',
31
+ color: '#5a5a6a',
32
+ category: 'gate',
33
+ ports: [
34
+ { id: 'a', label: 'a', type: 'input' },
35
+ { id: 'b', label: 'b', type: 'input' },
36
+ { id: 'out', label: 'out', type: 'output' },
37
+ ],
38
+ },
39
+ or: {
40
+ label: 'OR',
41
+ color: '#5a5a6a',
42
+ category: 'gate',
43
+ ports: [
44
+ { id: 'a', label: 'a', type: 'input' },
45
+ { id: 'b', label: 'b', type: 'input' },
46
+ { id: 'out', label: 'out', type: 'output' },
47
+ ],
48
+ },
49
+ not: {
50
+ label: 'NOT',
51
+ color: '#5a5a6a',
52
+ category: 'gate',
53
+ ports: [
54
+ { id: 'in', label: 'in', type: 'input' },
55
+ { id: 'out', label: 'out', type: 'output' },
56
+ ],
57
+ },
58
+ visible: {
59
+ label: 'Visible',
60
+ color: '#c0392b',
61
+ category: 'output',
62
+ ports: [{ id: 'in', label: 'show', type: 'input' }],
63
+ },
64
+ };
65
+ /** Maps the logic graph to Blueprint card geometry + paint. */
66
+ export function toCards(graph) {
67
+ return graph.nodes.map((n) => {
68
+ const spec = NODE_SPECS[n.kind];
69
+ const title = n.param ? `${spec.label}: ${n.param}` : spec.label;
70
+ return {
71
+ id: n.id,
72
+ x: n.x,
73
+ y: n.y,
74
+ width: 160,
75
+ height: 52 + spec.ports.length * 8,
76
+ paint: { title, color: spec.color, category: spec.category, ports: spec.ports },
77
+ };
78
+ });
79
+ }
80
+ /** Evaluates the graph to the Visible sink's value, plus each node's output. */
81
+ export function evaluateGraph(graph, env) {
82
+ const memo = {};
83
+ const sourceOf = (nodeId, port) => graph.connections.find((c) => c.toNode === nodeId && c.toPort === port)?.fromNode;
84
+ const inVal = (nodeId, port) => {
85
+ const src = sourceOf(nodeId, port);
86
+ return src ? out(src) : false;
87
+ };
88
+ function out(nodeId) {
89
+ if (nodeId in memo)
90
+ return memo[nodeId];
91
+ memo[nodeId] = false; // break cycles defensively
92
+ const node = graph.nodes.find((n) => n.id === nodeId);
93
+ if (!node)
94
+ return false;
95
+ let v = false;
96
+ switch (node.kind) {
97
+ case 'featureFlag':
98
+ v = env.featureFlag?.({ flag: node.param ?? '' }, undefined, undefined) ?? false;
99
+ break;
100
+ case 'environment':
101
+ v = env.environment?.(undefined, 'is', node.param ?? 'staging') ?? false;
102
+ break;
103
+ case 'auth':
104
+ v = env.auth?.(undefined, undefined, undefined) ?? false;
105
+ break;
106
+ case 'region':
107
+ v = env.region?.(undefined, 'in', [node.param ?? '']) ?? false;
108
+ break;
109
+ case 'and':
110
+ v = inVal(nodeId, 'a') && inVal(nodeId, 'b');
111
+ break;
112
+ case 'or':
113
+ v = inVal(nodeId, 'a') || inVal(nodeId, 'b');
114
+ break;
115
+ case 'not':
116
+ v = !inVal(nodeId, 'in');
117
+ break;
118
+ case 'visible':
119
+ v = inVal(nodeId, 'in');
120
+ break;
121
+ }
122
+ memo[nodeId] = v;
123
+ return v;
124
+ }
125
+ const sink = graph.nodes.find((n) => n.kind === 'visible');
126
+ const nodeOut = {};
127
+ for (const n of graph.nodes)
128
+ nodeOut[n.id] = out(n.id);
129
+ return { visible: sink ? out(sink.id) : false, nodeOut };
130
+ }
@@ -0,0 +1,3 @@
1
+ export * from './contract';
2
+ export * from './evaluate';
3
+ export * from './graph';
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './contract';
2
+ export * from './evaluate';
3
+ export * from './graph';
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@nubisco/cms-vue",
3
+ "version": "0.0.0",
4
+ "description": "Nubisco CMS content contract and evaluator. The Vue render kit follows.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/nubisco/cms-vue.git"
9
+ },
10
+ "type": "module",
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "files": ["dist"],
20
+ "scripts": {
21
+ "build": "tsc -p tsconfig.json",
22
+ "types:check": "tsc --noEmit",
23
+ "prepublishOnly": "pnpm run build"
24
+ },
25
+ "devDependencies": {
26
+ "@semantic-release/changelog": "^6.0.3",
27
+ "@semantic-release/git": "^10.0.1",
28
+ "semantic-release": "^25.0.3",
29
+ "typescript": "^5.9.3"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "release": {
35
+ "branches": ["master"],
36
+ "plugins": [
37
+ "@semantic-release/commit-analyzer",
38
+ "@semantic-release/release-notes-generator",
39
+ "@semantic-release/changelog",
40
+ "@semantic-release/npm",
41
+ "@semantic-release/github",
42
+ [
43
+ "@semantic-release/git",
44
+ {
45
+ "assets": ["package.json", "CHANGELOG.md"],
46
+ "message": "chore(release): ${nextRelease.version} [skip ci]"
47
+ }
48
+ ]
49
+ ]
50
+ }
51
+ }