@refrakt-md/types 0.9.0 → 0.9.2

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.
@@ -0,0 +1,36 @@
1
+ import type { SerializedTag } from './serialized.js';
2
+ /**
3
+ * Base props for all rune component overrides (ADR-008).
4
+ *
5
+ * Every component override receives:
6
+ * - `children` — anonymous content (not a property or named ref)
7
+ * - `tag` — the original serialized tag for escape-hatch access
8
+ *
9
+ * @typeParam R — framework-specific renderable type (`Snippet` in Svelte 5, `ReactNode` in React, etc.)
10
+ */
11
+ export interface BaseComponentProps<R = unknown> {
12
+ children?: R;
13
+ tag?: SerializedTag;
14
+ }
15
+ /**
16
+ * Page section slots commonly provided by runes that use `pageSectionProperties`.
17
+ *
18
+ * @typeParam R — framework-specific renderable type
19
+ */
20
+ export interface PageSectionSlots<R = unknown> {
21
+ eyebrow?: R;
22
+ headline?: R;
23
+ blurb?: R;
24
+ image?: R;
25
+ }
26
+ /**
27
+ * Properties common to runes with split/layout support.
28
+ */
29
+ export interface SplitLayoutProperties {
30
+ layout?: string;
31
+ ratio?: string;
32
+ valign?: string;
33
+ gap?: string;
34
+ collapse?: string;
35
+ }
36
+ //# sourceMappingURL=component-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-props.d.ts","sourceRoot":"","sources":["../src/component-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,OAAO;IAC9C,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,GAAG,CAAC,EAAE,aAAa,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,OAAO;IAC5C,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,KAAK,CAAC,EAAE,CAAC,CAAC;CACV;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=component-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-props.js","sourceRoot":"","sources":["../src/component-props.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -1,11 +1,9 @@
1
1
  export { Newable, NodeType, } from './interfaces.js';
2
- export { Type, TypeFactory, useSchema, } from './schema/index.js';
3
- export { Page, PageSection } from './schema/page.js';
4
- export { LinkItem, Command } from './schema/common.js';
5
2
  export type { DesignTokens } from './tokens.js';
6
3
  export type { RefraktConfig, ThemeManifest, LayoutDefinition, RouteRule, ComponentDefinition, } from './theme.js';
7
4
  export type { RunePackage, RunePackageEntry, RunePackageAttribute, RuneExtension, RunePackageThemeConfig, } from './package.js';
8
5
  export type { SerializedTag, RendererNode } from './serialized.js';
6
+ export type { BaseComponentProps, PageSectionSlots, SplitLayoutProperties, } from './component-props.js';
9
7
  export type { ContentFieldDefinition, SequenceModel, HeadingExtractField, HeadingExtract, SectionsModel, DelimitedZone, DelimitedModel, CustomModel, ItemFieldDefinition, ItemModel, AttributeInCondition, AttributeExistsCondition, HasChildCondition, ContentModelCondition, ConditionalContentModel, StructuralContentModel, ContentModel, ResolvedField, ResolvedContent, } from './content-model.js';
10
8
  export type { TransformedPage, PipelineHeadingInfo, EntityRegistration, EntityRegistry, AggregatedData, PipelineContext, PipelineWarning, PackagePipelineHooks, } from './pipeline.js';
11
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,IAAI,EACJ,WAAW,EACX,SAAS,GACV,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGvD,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,YAAY,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAGpB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGnE,YAAY,EACX,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,SAAS,EACT,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,eAAe,GACf,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACX,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,oBAAoB,GACpB,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAIzB,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,YAAY,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAGpB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGnE,YAAY,EACX,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GACrB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACX,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,SAAS,EACT,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,eAAe,GACf,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACX,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,oBAAoB,GACpB,MAAM,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,2 @@
1
- // Schema definition utilities
2
- export { Type, TypeFactory, useSchema, } from './schema/index.js';
3
- // Foundational schema data classes (shared across packages)
4
- export { Page, PageSection } from './schema/page.js';
5
- export { LinkItem, Command } from './schema/common.js';
1
+ export {};
6
2
  //# 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":"AAMA,8BAA8B;AAC9B,OAAO,EACL,IAAI,EACJ,WAAW,EACX,SAAS,GACV,MAAM,mBAAmB,CAAC;AAE3B,4DAA4D;AAC5D,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@refrakt-md/types",
3
3
  "description": "Shared type definitions for refrakt.md",
4
- "version": "0.9.0",
4
+ "version": "0.9.2",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -16,6 +16,12 @@
16
16
  },
17
17
  "main": "dist/index.js",
18
18
  "types": "dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.js"
23
+ }
24
+ },
19
25
  "files": [
20
26
  "dist"
21
27
  ],
@@ -1,8 +0,0 @@
1
- export declare class LinkItem {
2
- name: string;
3
- url: string;
4
- }
5
- export declare class Command {
6
- code: string;
7
- }
8
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/schema/common.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAQ;IACnB,IAAI,EAAE,MAAM,CAAM;IAClB,GAAG,EAAE,MAAM,CAAM;CAClB;AAED,qBAAa,OAAO;IAClB,IAAI,EAAE,MAAM,CAAM;CACnB"}
@@ -1,8 +0,0 @@
1
- export class LinkItem {
2
- name = '';
3
- url = '';
4
- }
5
- export class Command {
6
- code = '';
7
- }
8
- //# sourceMappingURL=common.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/schema/common.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,QAAQ;IACnB,IAAI,GAAW,EAAE,CAAC;IAClB,GAAG,GAAW,EAAE,CAAC;CAClB;AAED,MAAM,OAAO,OAAO;IAClB,IAAI,GAAW,EAAE,CAAC;CACnB"}
@@ -1,16 +0,0 @@
1
- import { Newable } from "../interfaces.js";
2
- export declare class Type<TSchema extends object = object> {
3
- readonly name: string;
4
- private schemaCtr;
5
- context: Record<string, string>;
6
- readonly schemaOrgType?: string | undefined;
7
- constructor(name: string, schemaCtr: Newable<TSchema>, context?: Record<string, string>, schemaOrgType?: string | undefined);
8
- create(): TSchema;
9
- }
10
- export declare class TypeFactory<TSchema extends object> {
11
- private schema;
12
- constructor(schema: Newable<TSchema>);
13
- defineType(name: string, context?: Record<string, string>, schemaOrgType?: string): Type<TSchema>;
14
- }
15
- export declare function useSchema<T extends object>(schema: Newable<T>): TypeFactory<T>;
16
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,qBAAa,IAAI,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;aAE7B,IAAI,EAAE,MAAM;IAC5B,OAAO,CAAC,SAAS;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;aACtB,aAAa,CAAC,EAAE,MAAM;gBAHtB,IAAI,EAAE,MAAM,EACpB,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,EAC5B,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAC3B,aAAa,CAAC,EAAE,MAAM,YAAA;IAGxC,MAAM;CAGP;AAED,qBAAa,WAAW,CAAC,OAAO,SAAS,MAAM;IACjC,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC;IAE5C,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAAE,aAAa,CAAC,EAAE,MAAM;CAGtF;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,kBAE7D"}
@@ -1,28 +0,0 @@
1
- export class Type {
2
- name;
3
- schemaCtr;
4
- context;
5
- schemaOrgType;
6
- constructor(name, schemaCtr, context = {}, schemaOrgType) {
7
- this.name = name;
8
- this.schemaCtr = schemaCtr;
9
- this.context = context;
10
- this.schemaOrgType = schemaOrgType;
11
- }
12
- create() {
13
- return new this.schemaCtr();
14
- }
15
- }
16
- export class TypeFactory {
17
- schema;
18
- constructor(schema) {
19
- this.schema = schema;
20
- }
21
- defineType(name, context = {}, schemaOrgType) {
22
- return new Type(name, this.schema, context, schemaOrgType);
23
- }
24
- }
25
- export function useSchema(schema) {
26
- return new TypeFactory(schema);
27
- }
28
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,IAAI;IAEG;IACR;IACD;IACS;IAJlB,YACkB,IAAY,EACpB,SAA2B,EAC5B,UAAkC,EAAE,EAC3B,aAAsB;QAHtB,SAAI,GAAJ,IAAI,CAAQ;QACpB,cAAS,GAAT,SAAS,CAAkB;QAC5B,YAAO,GAAP,OAAO,CAA6B;QAC3B,kBAAa,GAAb,aAAa,CAAS;IACrC,CAAC;IAEJ,MAAM;QACJ,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,WAAW;IACF;IAApB,YAAoB,MAAwB;QAAxB,WAAM,GAAN,MAAM,CAAkB;IAAG,CAAC;IAEhD,UAAU,CAAC,IAAY,EAAE,UAAkC,EAAE,EAAE,aAAsB;QACnF,OAAO,IAAI,IAAI,CAAU,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IACtE,CAAC;CACF;AAED,MAAM,UAAU,SAAS,CAAmB,MAAkB;IAC5D,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;AACjC,CAAC"}
@@ -1,11 +0,0 @@
1
- export declare class PageSection {
2
- eyebrow: string | undefined;
3
- headline: string | undefined;
4
- blurb: string | undefined;
5
- }
6
- export declare class Page {
7
- name: string;
8
- description: string;
9
- contentSection: PageSection[];
10
- }
11
- //# sourceMappingURL=page.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../src/schema/page.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW;IACtB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAa;IACxC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IACzC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAa;CACvC;AAED,qBAAa,IAAI;IACf,IAAI,EAAE,MAAM,CAAM;IAClB,WAAW,EAAE,MAAM,CAAM;IACzB,cAAc,EAAE,WAAW,EAAE,CAAM;CACpC"}
@@ -1,11 +0,0 @@
1
- export class PageSection {
2
- eyebrow = undefined;
3
- headline = undefined;
4
- blurb = undefined;
5
- }
6
- export class Page {
7
- name = '';
8
- description = '';
9
- contentSection = [];
10
- }
11
- //# sourceMappingURL=page.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/schema/page.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,WAAW;IACtB,OAAO,GAAuB,SAAS,CAAC;IACxC,QAAQ,GAAuB,SAAS,CAAC;IACzC,KAAK,GAAuB,SAAS,CAAC;CACvC;AAED,MAAM,OAAO,IAAI;IACf,IAAI,GAAW,EAAE,CAAC;IAClB,WAAW,GAAW,EAAE,CAAC;IACzB,cAAc,GAAkB,EAAE,CAAC;CACpC"}