@happyvertical/smrt-content 0.38.26 → 0.39.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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "timestamp": 1783688113803,
3
+ "timestamp": 1783721937159,
4
4
  "packageName": "@happyvertical/smrt-content",
5
- "packageVersion": "0.38.26",
5
+ "packageVersion": "0.39.0",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-content:ContentAsset": {
8
8
  "name": "contentasset",
@@ -277,7 +277,7 @@ This preview module lives in \`src/svelte/playground.ts\`.
277
277
 
278
278
  - Package-owned previews stay close to the real components
279
279
  - The shared host simply discovers and renders them
280
- - Live entries can still point at the package's generated API routes`;
280
+ - Live entries can point at the package's generated API routes`;
281
281
  var loadArticleCard = () => import("./svelte/components/ArticleCard.svelte");
282
282
  var loadArticleList = () => import("./svelte/components/ArticleList.svelte");
283
283
  var loadContentEditor = () => import("./svelte/components/ContentEditor.svelte");
@@ -1 +1 @@
1
- {"version":3,"file":"playground.js","names":[],"sources":["../src/svelte/playground.ts"],"sourcesContent":["import type {\n ApiResponse,\n ContentGovernanceAssignmentData,\n ContentGovernanceDefinitionsData,\n ContentGovernanceProfileData,\n ContentReviewPolicyData,\n} from '../mock-smrt-client';\nimport { CONTENT_MODULE_META } from '../ui.js';\nimport type { ContentGovernanceManagerClient } from './governance-manager-client';\n\nconst DEFAULT_CONTENT_PLAYGROUND_API_BASE_URL = '/api/v1';\n\ntype ContentPlaygroundGlobal = typeof globalThis & {\n __SMRT_CONTENT_PLAYGROUND_API_BASE_URL__?: string;\n location?: {\n search: string;\n };\n};\n\nfunction resolveContentPlaygroundApiBaseUrl(): string {\n const configuredViaGlobal = (globalThis as ContentPlaygroundGlobal)\n .__SMRT_CONTENT_PLAYGROUND_API_BASE_URL__;\n if (configuredViaGlobal) {\n return configuredViaGlobal;\n }\n\n const browserLocation = (globalThis as ContentPlaygroundGlobal).location;\n if (browserLocation) {\n const configuredViaQuery = new URLSearchParams(browserLocation.search).get(\n 'smrtContentApiBaseUrl',\n );\n\n if (configuredViaQuery) {\n return configuredViaQuery;\n }\n }\n\n return DEFAULT_CONTENT_PLAYGROUND_API_BASE_URL;\n}\n\nconst sampleArticles = [\n {\n id: 'article-aurora-kitchen',\n slug: 'aurora-kitchen-notes',\n title: 'Aurora Kitchen Notes',\n description:\n 'A reference article card preview showing how editorial metadata lands in the package playground.',\n publish_date: '2026-03-14T12:00:00.000Z',\n author: 'Editorial Systems',\n tags: ['release', 'editorial', 'qa'],\n },\n {\n id: 'article-governance-habits',\n slug: 'governance-habits',\n title: 'Governance Habits That Scale',\n description:\n 'Teams can move fast when quality gates are visible, lightweight, and shared with contributors.',\n publish_date: '2026-03-19T09:30:00.000Z',\n author: 'Content Ops',\n tags: ['governance', 'quality', 'workflows'],\n },\n];\n\nconst sampleContributions = [\n {\n id: 'contribution-1',\n title: 'Spring buyer guide',\n contributionTypeKey: 'article',\n status: 'needs_changes',\n revisionCount: 2,\n editorNotes: 'Please tighten the sourcing notes in the opening section.',\n contributorName: 'Taylor Rowan',\n contributorEmail: 'taylor@example.com',\n intakeDecision: 'needs_changes',\n body: 'The spring buyer guide draft is attached, with sourcing notes for the opening section and the product comparison appendix.',\n updatedAt: '2026-03-20T15:18:00.000Z',\n },\n {\n id: 'contribution-2',\n title: 'Field report: Pacific logistics',\n contributionTypeKey: 'report',\n status: 'submitted',\n revisionCount: 1,\n contributorName: 'Jordan Lee',\n contributorEmail: 'jordan@example.com',\n intakeDecision: 'submitted',\n body: 'Field notes from the Pacific corridor include updated shipping windows, route constraints, and operator interviews.',\n updatedAt: '2026-03-18T10:40:00.000Z',\n },\n];\n\nconst sampleGovernanceDefinitions: ContentGovernanceDefinitionsData = {\n effective: {\n policies: [\n {\n id: 'policy-facts',\n key: 'facts',\n label: 'Facts review',\n kind: 'facts',\n instructions: 'Compare claims against linked facts before publication.',\n enabled: true,\n },\n {\n id: 'policy-style',\n key: 'style',\n label: 'Style review',\n kind: 'custom',\n instructions: 'Apply newsroom tone, structure, and clarity guidelines.',\n enabled: true,\n },\n ],\n profiles: [\n {\n id: 'profile-publication',\n key: 'publication',\n label: 'Publication',\n description: 'Required before governed content can be published.',\n enabled: true,\n requirements: [\n {\n policyKey: 'facts',\n label: 'Facts review',\n blocking: true,\n acceptedStatuses: ['passed'],\n },\n {\n policyKey: 'style',\n label: 'Style review',\n blocking: false,\n acceptedStatuses: ['passed', 'warning'],\n },\n ],\n },\n ],\n assignments: [\n {\n id: 'assignment-article',\n key: 'article',\n label: 'Articles',\n contentType: 'article',\n contentVariant: null,\n enabled: true,\n factLinkingEnabled: true,\n transparencyEnabled: true,\n publicationProfileKey: 'publication',\n correctionProfileKey: null,\n enforcePublishReadiness: true,\n defaultFactRelationship: 'supports',\n },\n ],\n },\n persisted: {\n policies: [\n {\n id: 'policy-style',\n key: 'style',\n label: 'Style review',\n kind: 'custom',\n instructions: 'Apply newsroom tone, structure, and clarity guidelines.',\n enabled: true,\n },\n ],\n profiles: [\n {\n id: 'profile-publication',\n key: 'publication',\n label: 'Publication',\n description: 'Required before governed content can be published.',\n enabled: true,\n requirements: [\n {\n policyKey: 'facts',\n label: 'Facts review',\n blocking: true,\n acceptedStatuses: ['passed'],\n },\n {\n policyKey: 'style',\n label: 'Style review',\n blocking: false,\n acceptedStatuses: ['passed', 'warning'],\n },\n ],\n },\n ],\n assignments: [\n {\n id: 'assignment-article',\n key: 'article',\n label: 'Articles',\n contentType: 'article',\n contentVariant: null,\n enabled: true,\n factLinkingEnabled: true,\n transparencyEnabled: true,\n publicationProfileKey: 'publication',\n correctionProfileKey: null,\n enforcePublishReadiness: true,\n defaultFactRelationship: 'supports',\n },\n ],\n },\n};\n\nconst sampleEditorContent = {\n id: 'content-playground-editor',\n slug: 'playground-editor-reference',\n title: 'Reference editorial draft',\n description:\n 'A working editor preview with copy, references, and assets already populated.',\n body: `# Editorial Draft\n\nThis preview is meant to feel like a real authoring surface.\n\n- tighten the lede\n- verify product claims\n- attach supporting references`,\n author: 'Editorial Systems',\n type: 'article',\n status: 'draft',\n state: 'active',\n source: 'manual',\n tags: ['editorial', 'playground'],\n referenceIds: ['fact-aurora', 'source-governance'],\n assetIds: [],\n assets: [],\n};\n\nconst noop = () => {};\n\nfunction cloneValue<T>(value: T): T {\n return JSON.parse(JSON.stringify(value)) as T;\n}\n\nfunction buildPlaygroundResponse<T>(data: T): ApiResponse<T> {\n return {\n data,\n success: true,\n };\n}\n\nfunction upsertByIdOrKey<\n T extends {\n id?: string;\n key?: string;\n },\n>(items: T[], value: Partial<T>, prefix: string): T[] {\n const id = value.id || `${prefix}-${value.key || items.length + 1}`;\n const nextValue = {\n ...value,\n id,\n } as T;\n\n const index = items.findIndex(\n (item) => item.id === id || (!!value.key && item.key === value.key),\n );\n\n if (index === -1) {\n return [...items, nextValue];\n }\n\n const nextItems = [...items];\n nextItems[index] = {\n ...nextItems[index],\n ...nextValue,\n };\n return nextItems;\n}\n\nfunction createGovernancePlaygroundClient(\n seed = sampleGovernanceDefinitions,\n): ContentGovernanceManagerClient {\n let policies = cloneValue(seed.effective.policies);\n let profiles = cloneValue(seed.effective.profiles);\n let assignments = cloneValue(seed.effective.assignments);\n\n const getDefinitions = (): ContentGovernanceDefinitionsData => ({\n effective: {\n policies: cloneValue(policies),\n profiles: cloneValue(profiles),\n assignments: cloneValue(assignments),\n },\n persisted: {\n policies: cloneValue(policies),\n profiles: cloneValue(profiles),\n assignments: cloneValue(assignments),\n },\n });\n\n return {\n contents: {\n getGovernanceDefinitions: async () =>\n buildPlaygroundResponse(getDefinitions()),\n },\n contentGovernancePolicies: {\n create: async (policy: Partial<ContentReviewPolicyData>) => {\n policies = upsertByIdOrKey(policies, policy, 'policy');\n return buildPlaygroundResponse(policies[policies.length - 1]);\n },\n update: async (id: string, policy: Partial<ContentReviewPolicyData>) => {\n policies = upsertByIdOrKey(policies, { ...policy, id }, 'policy');\n return buildPlaygroundResponse(\n policies.find((item) => item.id === id)!,\n );\n },\n delete: async (id: string) => {\n policies = policies.filter((item) => item.id !== id);\n return buildPlaygroundResponse(undefined);\n },\n },\n contentGovernanceProfiles: {\n create: async (profile: Partial<ContentGovernanceProfileData>) => {\n profiles = upsertByIdOrKey(profiles, profile, 'profile');\n return buildPlaygroundResponse(profiles[profiles.length - 1]);\n },\n update: async (\n id: string,\n profile: Partial<ContentGovernanceProfileData>,\n ) => {\n profiles = upsertByIdOrKey(profiles, { ...profile, id }, 'profile');\n return buildPlaygroundResponse(\n profiles.find((item) => item.id === id)!,\n );\n },\n delete: async (id: string) => {\n profiles = profiles.filter((item) => item.id !== id);\n return buildPlaygroundResponse(undefined);\n },\n },\n contentGovernanceAssignments: {\n create: async (assignment: Partial<ContentGovernanceAssignmentData>) => {\n assignments = upsertByIdOrKey(assignments, assignment, 'assignment');\n return buildPlaygroundResponse(assignments[assignments.length - 1]);\n },\n update: async (\n id: string,\n assignment: Partial<ContentGovernanceAssignmentData>,\n ) => {\n assignments = upsertByIdOrKey(\n assignments,\n { ...assignment, id },\n 'assignment',\n );\n return buildPlaygroundResponse(\n assignments.find((item) => item.id === id)!,\n );\n },\n delete: async (id: string) => {\n assignments = assignments.filter((item) => item.id !== id);\n return buildPlaygroundResponse(undefined);\n },\n },\n };\n}\n\nconst markdownExample = `# Content Playground\n\nThis preview module lives in \\`src/svelte/playground.ts\\`.\n\n- Package-owned previews stay close to the real components\n- The shared host simply discovers and renders them\n- Live entries can still point at the package's generated API routes`;\n\n// Keep the published playground module importable from Node so `smrt\n// playground list` can inspect entry metadata without needing a Svelte loader.\nconst loadArticleCard = () => import('./components/ArticleCard.svelte');\nconst loadArticleList = () => import('./components/ArticleList.svelte');\nconst loadContentEditor = () => import('./components/ContentEditor.svelte');\nconst loadContentContributionInbox = () =>\n import('./components/ContentContributionInbox.svelte');\nconst loadContentContributionPortal = () =>\n import('./components/ContentContributionPortal.svelte');\nconst loadContentGovernanceManager = () =>\n import('./components/ContentGovernanceManager.svelte');\nconst loadMarkdown = () => import('./components/Markdown.svelte');\nconst governancePlaygroundClient = createGovernancePlaygroundClient();\n\nexport default {\n packageName: '@happyvertical/smrt-content',\n displayName: 'Content',\n description: CONTENT_MODULE_META.description,\n moduleMeta: CONTENT_MODULE_META,\n entries: [\n {\n id: 'article-card',\n slotId: 'article-card',\n title: 'Article Card',\n description: 'Editorial teaser card with tags and metadata.',\n loadComponent: loadArticleCard,\n order: 1,\n props: {\n article: sampleArticles[0],\n showTags: true,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'article-list',\n slotId: 'article-list',\n title: 'Article List',\n description: 'Reference list/grid layout for published content.',\n loadComponent: loadArticleList,\n order: 2,\n props: {\n articles: sampleArticles,\n showTags: true,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'markdown',\n slotId: 'markdown',\n title: 'Markdown Renderer',\n description: 'Safe markdown rendering with a small editorial snippet.',\n loadComponent: loadMarkdown,\n order: 3,\n props: {\n content: markdownExample,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'content-editor',\n title: 'Content Editor',\n description: 'Authoring surface for body copy, references, and media.',\n loadComponent: loadContentEditor,\n order: 4,\n props: {\n apiBaseUrl: resolveContentPlaygroundApiBaseUrl(),\n content: sampleEditorContent,\n contentId: sampleEditorContent.id,\n agentChatEnabled: false,\n agentChatNotice:\n 'The shared playground keeps the editor preview local. Run the content package app when you want the live agent chat routes too.',\n onSave: noop,\n onCancel: noop,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'contribution-portal',\n title: 'Contribution Portal',\n description: 'Contributor-facing inbox and submission status view.',\n loadComponent: loadContentContributionPortal,\n order: 5,\n props: {\n contributions: sampleContributions,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'contribution-inbox',\n title: 'Contribution Inbox',\n description:\n 'Editorial review queue for approving, rejecting, or requesting changes.',\n loadComponent: loadContentContributionInbox,\n order: 6,\n props: {\n contributions: sampleContributions,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'governance-manager',\n title: 'Governance Manager',\n description:\n 'Administrative view with in-memory mock data and optional live package routes.',\n loadComponent: loadContentGovernanceManager,\n order: 7,\n modes: {\n mock: {\n label: 'Mock',\n description:\n 'Uses an in-memory governance client so the shared playground works without a package-local dev server.',\n props: {\n client: governancePlaygroundClient,\n },\n },\n live: {\n label: 'Live',\n description:\n 'Requires the content package dev server and generated routes. Override the base URL with ?smrtContentApiBaseUrl=... or window.__SMRT_CONTENT_PLAYGROUND_API_BASE_URL__ when needed.',\n props: {\n apiBaseUrl: resolveContentPlaygroundApiBaseUrl(),\n },\n },\n },\n },\n ],\n};\n"],"mappings":";;AAUA,IAAM,0CAA0C;AAShD,SAAS,qCAA6C;CACpD,MAAM,sBAAuB,WAC1B;CACH,IAAI,qBACF,OAAO;CAGT,MAAM,kBAAmB,WAAuC;CAChE,IAAI,iBAAiB;EACnB,MAAM,qBAAqB,IAAI,gBAAgB,gBAAgB,MAAM,CAAA,CAAE,IACrE,uBACF;EAEA,IAAI,oBACF,OAAO;CAEX;CAEA,OAAO;AACT;AAEA,IAAM,iBAAiB,CACrB;CACE,IAAI;CACJ,MAAM;CACN,OAAO;CACP,aACE;CACF,cAAc;CACd,QAAQ;CACR,MAAM;EAAC;EAAW;EAAa;CAAI;AACrC,GACA;CACE,IAAI;CACJ,MAAM;CACN,OAAO;CACP,aACE;CACF,cAAc;CACd,QAAQ;CACR,MAAM;EAAC;EAAc;EAAW;CAAW;AAC7C,CACF;AAEA,IAAM,sBAAsB,CAC1B;CACE,IAAI;CACJ,OAAO;CACP,qBAAqB;CACrB,QAAQ;CACR,eAAe;CACf,aAAa;CACb,iBAAiB;CACjB,kBAAkB;CAClB,gBAAgB;CAChB,MAAM;CACN,WAAW;AACb,GACA;CACE,IAAI;CACJ,OAAO;CACP,qBAAqB;CACrB,QAAQ;CACR,eAAe;CACf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aACE;GACF,eAAe;GACf,OAAO;GACP,OAAO,EACL,eAAe,oBACjB;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;EACA;GACE,IAAI;GACJ,OAAO;GACP,aACE;GACF,eAAe;GACf,OAAO;GACP,OAAO;IACL,MAAM;KACJ,OAAO;KACP,aACE;KACF,OAAO,EACL,QAAQ,2BACV;IACF;IACA,MAAM;KACJ,OAAO;KACP,aACE;KACF,OAAO,EACL,YAAY,mCAAmC,EACjD;IACF;GACF;EACF;CACF;AACF"}
1
+ {"version":3,"file":"playground.js","names":[],"sources":["../src/svelte/playground.ts"],"sourcesContent":["import type {\n ApiResponse,\n ContentGovernanceAssignmentData,\n ContentGovernanceDefinitionsData,\n ContentGovernanceProfileData,\n ContentReviewPolicyData,\n} from '../mock-smrt-client';\nimport { CONTENT_MODULE_META } from '../ui.js';\nimport type { ContentGovernanceManagerClient } from './governance-manager-client';\n\nconst DEFAULT_CONTENT_PLAYGROUND_API_BASE_URL = '/api/v1';\n\ntype ContentPlaygroundGlobal = typeof globalThis & {\n __SMRT_CONTENT_PLAYGROUND_API_BASE_URL__?: string;\n location?: {\n search: string;\n };\n};\n\nfunction resolveContentPlaygroundApiBaseUrl(): string {\n const configuredViaGlobal = (globalThis as ContentPlaygroundGlobal)\n .__SMRT_CONTENT_PLAYGROUND_API_BASE_URL__;\n if (configuredViaGlobal) {\n return configuredViaGlobal;\n }\n\n const browserLocation = (globalThis as ContentPlaygroundGlobal).location;\n if (browserLocation) {\n const configuredViaQuery = new URLSearchParams(browserLocation.search).get(\n 'smrtContentApiBaseUrl',\n );\n\n if (configuredViaQuery) {\n return configuredViaQuery;\n }\n }\n\n return DEFAULT_CONTENT_PLAYGROUND_API_BASE_URL;\n}\n\nconst sampleArticles = [\n {\n id: 'article-aurora-kitchen',\n slug: 'aurora-kitchen-notes',\n title: 'Aurora Kitchen Notes',\n description:\n 'A reference article card preview showing how editorial metadata lands in the package playground.',\n publish_date: '2026-03-14T12:00:00.000Z',\n author: 'Editorial Systems',\n tags: ['release', 'editorial', 'qa'],\n },\n {\n id: 'article-governance-habits',\n slug: 'governance-habits',\n title: 'Governance Habits That Scale',\n description:\n 'Teams can move fast when quality gates are visible, lightweight, and shared with contributors.',\n publish_date: '2026-03-19T09:30:00.000Z',\n author: 'Content Ops',\n tags: ['governance', 'quality', 'workflows'],\n },\n];\n\nconst sampleContributions = [\n {\n id: 'contribution-1',\n title: 'Spring buyer guide',\n contributionTypeKey: 'article',\n status: 'needs_changes',\n revisionCount: 2,\n editorNotes: 'Please tighten the sourcing notes in the opening section.',\n contributorName: 'Taylor Rowan',\n contributorEmail: 'taylor@example.com',\n intakeDecision: 'needs_changes',\n body: 'The spring buyer guide draft is attached, with sourcing notes for the opening section and the product comparison appendix.',\n updatedAt: '2026-03-20T15:18:00.000Z',\n },\n {\n id: 'contribution-2',\n title: 'Field report: Pacific logistics',\n contributionTypeKey: 'report',\n status: 'submitted',\n revisionCount: 1,\n contributorName: 'Jordan Lee',\n contributorEmail: 'jordan@example.com',\n intakeDecision: 'submitted',\n body: 'Field notes from the Pacific corridor include updated shipping windows, route constraints, and operator interviews.',\n updatedAt: '2026-03-18T10:40:00.000Z',\n },\n];\n\nconst sampleGovernanceDefinitions: ContentGovernanceDefinitionsData = {\n effective: {\n policies: [\n {\n id: 'policy-facts',\n key: 'facts',\n label: 'Facts review',\n kind: 'facts',\n instructions: 'Compare claims against linked facts before publication.',\n enabled: true,\n },\n {\n id: 'policy-style',\n key: 'style',\n label: 'Style review',\n kind: 'custom',\n instructions: 'Apply newsroom tone, structure, and clarity guidelines.',\n enabled: true,\n },\n ],\n profiles: [\n {\n id: 'profile-publication',\n key: 'publication',\n label: 'Publication',\n description: 'Required before governed content can be published.',\n enabled: true,\n requirements: [\n {\n policyKey: 'facts',\n label: 'Facts review',\n blocking: true,\n acceptedStatuses: ['passed'],\n },\n {\n policyKey: 'style',\n label: 'Style review',\n blocking: false,\n acceptedStatuses: ['passed', 'warning'],\n },\n ],\n },\n ],\n assignments: [\n {\n id: 'assignment-article',\n key: 'article',\n label: 'Articles',\n contentType: 'article',\n contentVariant: null,\n enabled: true,\n factLinkingEnabled: true,\n transparencyEnabled: true,\n publicationProfileKey: 'publication',\n correctionProfileKey: null,\n enforcePublishReadiness: true,\n defaultFactRelationship: 'supports',\n },\n ],\n },\n persisted: {\n policies: [\n {\n id: 'policy-style',\n key: 'style',\n label: 'Style review',\n kind: 'custom',\n instructions: 'Apply newsroom tone, structure, and clarity guidelines.',\n enabled: true,\n },\n ],\n profiles: [\n {\n id: 'profile-publication',\n key: 'publication',\n label: 'Publication',\n description: 'Required before governed content can be published.',\n enabled: true,\n requirements: [\n {\n policyKey: 'facts',\n label: 'Facts review',\n blocking: true,\n acceptedStatuses: ['passed'],\n },\n {\n policyKey: 'style',\n label: 'Style review',\n blocking: false,\n acceptedStatuses: ['passed', 'warning'],\n },\n ],\n },\n ],\n assignments: [\n {\n id: 'assignment-article',\n key: 'article',\n label: 'Articles',\n contentType: 'article',\n contentVariant: null,\n enabled: true,\n factLinkingEnabled: true,\n transparencyEnabled: true,\n publicationProfileKey: 'publication',\n correctionProfileKey: null,\n enforcePublishReadiness: true,\n defaultFactRelationship: 'supports',\n },\n ],\n },\n};\n\nconst sampleEditorContent = {\n id: 'content-playground-editor',\n slug: 'playground-editor-reference',\n title: 'Reference editorial draft',\n description:\n 'A working editor preview with copy, references, and assets already populated.',\n body: `# Editorial Draft\n\nThis preview is meant to feel like a real authoring surface.\n\n- tighten the lede\n- verify product claims\n- attach supporting references`,\n author: 'Editorial Systems',\n type: 'article',\n status: 'draft',\n state: 'active',\n source: 'manual',\n tags: ['editorial', 'playground'],\n referenceIds: ['fact-aurora', 'source-governance'],\n assetIds: [],\n assets: [],\n};\n\nconst noop = () => {};\n\nfunction cloneValue<T>(value: T): T {\n return JSON.parse(JSON.stringify(value)) as T;\n}\n\nfunction buildPlaygroundResponse<T>(data: T): ApiResponse<T> {\n return {\n data,\n success: true,\n };\n}\n\nfunction upsertByIdOrKey<\n T extends {\n id?: string;\n key?: string;\n },\n>(items: T[], value: Partial<T>, prefix: string): T[] {\n const id = value.id || `${prefix}-${value.key || items.length + 1}`;\n const nextValue = {\n ...value,\n id,\n } as T;\n\n const index = items.findIndex(\n (item) => item.id === id || (!!value.key && item.key === value.key),\n );\n\n if (index === -1) {\n return [...items, nextValue];\n }\n\n const nextItems = [...items];\n nextItems[index] = {\n ...nextItems[index],\n ...nextValue,\n };\n return nextItems;\n}\n\nfunction createGovernancePlaygroundClient(\n seed = sampleGovernanceDefinitions,\n): ContentGovernanceManagerClient {\n let policies = cloneValue(seed.effective.policies);\n let profiles = cloneValue(seed.effective.profiles);\n let assignments = cloneValue(seed.effective.assignments);\n\n const getDefinitions = (): ContentGovernanceDefinitionsData => ({\n effective: {\n policies: cloneValue(policies),\n profiles: cloneValue(profiles),\n assignments: cloneValue(assignments),\n },\n persisted: {\n policies: cloneValue(policies),\n profiles: cloneValue(profiles),\n assignments: cloneValue(assignments),\n },\n });\n\n return {\n contents: {\n getGovernanceDefinitions: async () =>\n buildPlaygroundResponse(getDefinitions()),\n },\n contentGovernancePolicies: {\n create: async (policy: Partial<ContentReviewPolicyData>) => {\n policies = upsertByIdOrKey(policies, policy, 'policy');\n return buildPlaygroundResponse(policies[policies.length - 1]);\n },\n update: async (id: string, policy: Partial<ContentReviewPolicyData>) => {\n policies = upsertByIdOrKey(policies, { ...policy, id }, 'policy');\n return buildPlaygroundResponse(\n policies.find((item) => item.id === id)!,\n );\n },\n delete: async (id: string) => {\n policies = policies.filter((item) => item.id !== id);\n return buildPlaygroundResponse(undefined);\n },\n },\n contentGovernanceProfiles: {\n create: async (profile: Partial<ContentGovernanceProfileData>) => {\n profiles = upsertByIdOrKey(profiles, profile, 'profile');\n return buildPlaygroundResponse(profiles[profiles.length - 1]);\n },\n update: async (\n id: string,\n profile: Partial<ContentGovernanceProfileData>,\n ) => {\n profiles = upsertByIdOrKey(profiles, { ...profile, id }, 'profile');\n return buildPlaygroundResponse(\n profiles.find((item) => item.id === id)!,\n );\n },\n delete: async (id: string) => {\n profiles = profiles.filter((item) => item.id !== id);\n return buildPlaygroundResponse(undefined);\n },\n },\n contentGovernanceAssignments: {\n create: async (assignment: Partial<ContentGovernanceAssignmentData>) => {\n assignments = upsertByIdOrKey(assignments, assignment, 'assignment');\n return buildPlaygroundResponse(assignments[assignments.length - 1]);\n },\n update: async (\n id: string,\n assignment: Partial<ContentGovernanceAssignmentData>,\n ) => {\n assignments = upsertByIdOrKey(\n assignments,\n { ...assignment, id },\n 'assignment',\n );\n return buildPlaygroundResponse(\n assignments.find((item) => item.id === id)!,\n );\n },\n delete: async (id: string) => {\n assignments = assignments.filter((item) => item.id !== id);\n return buildPlaygroundResponse(undefined);\n },\n },\n };\n}\n\nconst markdownExample = `# Content Playground\n\nThis preview module lives in \\`src/svelte/playground.ts\\`.\n\n- Package-owned previews stay close to the real components\n- The shared host simply discovers and renders them\n- Live entries can point at the package's generated API routes`;\n\n// Keep the published playground module importable from Node so `smrt\n// playground list` can inspect entry metadata without needing a Svelte loader.\nconst loadArticleCard = () => import('./components/ArticleCard.svelte');\nconst loadArticleList = () => import('./components/ArticleList.svelte');\nconst loadContentEditor = () => import('./components/ContentEditor.svelte');\nconst loadContentContributionInbox = () =>\n import('./components/ContentContributionInbox.svelte');\nconst loadContentContributionPortal = () =>\n import('./components/ContentContributionPortal.svelte');\nconst loadContentGovernanceManager = () =>\n import('./components/ContentGovernanceManager.svelte');\nconst loadMarkdown = () => import('./components/Markdown.svelte');\nconst governancePlaygroundClient = createGovernancePlaygroundClient();\n\nexport default {\n packageName: '@happyvertical/smrt-content',\n displayName: 'Content',\n description: CONTENT_MODULE_META.description,\n moduleMeta: CONTENT_MODULE_META,\n entries: [\n {\n id: 'article-card',\n slotId: 'article-card',\n title: 'Article Card',\n description: 'Editorial teaser card with tags and metadata.',\n loadComponent: loadArticleCard,\n order: 1,\n props: {\n article: sampleArticles[0],\n showTags: true,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'article-list',\n slotId: 'article-list',\n title: 'Article List',\n description: 'Reference list/grid layout for published content.',\n loadComponent: loadArticleList,\n order: 2,\n props: {\n articles: sampleArticles,\n showTags: true,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'markdown',\n slotId: 'markdown',\n title: 'Markdown Renderer',\n description: 'Safe markdown rendering with a small editorial snippet.',\n loadComponent: loadMarkdown,\n order: 3,\n props: {\n content: markdownExample,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'content-editor',\n title: 'Content Editor',\n description: 'Authoring surface for body copy, references, and media.',\n loadComponent: loadContentEditor,\n order: 4,\n props: {\n apiBaseUrl: resolveContentPlaygroundApiBaseUrl(),\n content: sampleEditorContent,\n contentId: sampleEditorContent.id,\n agentChatEnabled: false,\n agentChatNotice:\n 'The shared playground keeps the editor preview local. Run the content package app when you want the live agent chat routes too.',\n onSave: noop,\n onCancel: noop,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'contribution-portal',\n title: 'Contribution Portal',\n description: 'Contributor-facing inbox and submission status view.',\n loadComponent: loadContentContributionPortal,\n order: 5,\n props: {\n contributions: sampleContributions,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'contribution-inbox',\n title: 'Contribution Inbox',\n description:\n 'Editorial review queue for approving, rejecting, or requesting changes.',\n loadComponent: loadContentContributionInbox,\n order: 6,\n props: {\n contributions: sampleContributions,\n },\n modes: {\n mock: {\n label: 'Mock',\n },\n },\n },\n {\n id: 'governance-manager',\n title: 'Governance Manager',\n description:\n 'Administrative view with in-memory mock data and optional live package routes.',\n loadComponent: loadContentGovernanceManager,\n order: 7,\n modes: {\n mock: {\n label: 'Mock',\n description:\n 'Uses an in-memory governance client so the shared playground works without a package-local dev server.',\n props: {\n client: governancePlaygroundClient,\n },\n },\n live: {\n label: 'Live',\n description:\n 'Requires the content package dev server and generated routes. Override the base URL with ?smrtContentApiBaseUrl=... or window.__SMRT_CONTENT_PLAYGROUND_API_BASE_URL__ when needed.',\n props: {\n apiBaseUrl: resolveContentPlaygroundApiBaseUrl(),\n },\n },\n },\n },\n ],\n};\n"],"mappings":";;AAUA,IAAM,0CAA0C;AAShD,SAAS,qCAA6C;CACpD,MAAM,sBAAuB,WAC1B;CACH,IAAI,qBACF,OAAO;CAGT,MAAM,kBAAmB,WAAuC;CAChE,IAAI,iBAAiB;EACnB,MAAM,qBAAqB,IAAI,gBAAgB,gBAAgB,MAAM,CAAA,CAAE,IACrE,uBACF;EAEA,IAAI,oBACF,OAAO;CAEX;CAEA,OAAO;AACT;AAEA,IAAM,iBAAiB,CACrB;CACE,IAAI;CACJ,MAAM;CACN,OAAO;CACP,aACE;CACF,cAAc;CACd,QAAQ;CACR,MAAM;EAAC;EAAW;EAAa;CAAI;AACrC,GACA;CACE,IAAI;CACJ,MAAM;CACN,OAAO;CACP,aACE;CACF,cAAc;CACd,QAAQ;CACR,MAAM;EAAC;EAAc;EAAW;CAAW;AAC7C,CACF;AAEA,IAAM,sBAAsB,CAC1B;CACE,IAAI;CACJ,OAAO;CACP,qBAAqB;CACrB,QAAQ;CACR,eAAe;CACf,aAAa;CACb,iBAAiB;CACjB,kBAAkB;CAClB,gBAAgB;CAChB,MAAM;CACN,WAAW;AACb,GACA;CACE,IAAI;CACJ,OAAO;CACP,qBAAqB;CACrB,QAAQ;CACR,eAAe;CACf,iBAAiB;CACjB,kBAAkB;CAClB,gBAAgB;CAChB,MAAM;CACN,WAAW;AACb,CACF;AAEA,IAAM,8BAAgE;CACpE,WAAW;EACT,UAAU,CACR;GACE,IAAI;GACJ,KAAK;GACL,OAAO;GACP,MAAM;GACN,cAAc;GACd,SAAS;EACX,GACA;GACE,IAAI;GACJ,KAAK;GACL,OAAO;GACP,MAAM;GACN,cAAc;GACd,SAAS;EACX,CACF;EACA,UAAU,CACR;GACE,IAAI;GACJ,KAAK;GACL,O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Aa;CACb,aAAa,oBAAoB;CACjC,YAAY;CACZ,SAAS;EACP;GACE,IAAI;GACJ,QAAQ;GACR,OAAO;GACP,aAAa;GACb,eAAe;GACf,OAAO;GACP,OAAO;IACL,SAAS,eAAe;IACxB,UAAU;GACZ;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;EACA;GACE,IAAI;GACJ,QAAQ;GACR,OAAO;GACP,aAAa;GACb,eAAe;GACf,OAAO;GACP,OAAO;IACL,UAAU;IACV,UAAU;GACZ;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;EACA;GACE,IAAI;GACJ,QAAQ;GACR,OAAO;GACP,aAAa;GACb,eAAe;GACf,OAAO;GACP,OAAO,EACL,SAAS,gBACX;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;EACA;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,eAAe;GACf,OAAO;GACP,OAAO;IACL,YAAY,mCAAmC;IAC/C,SAAS;IACT,WAAW,oBAAoB;IAC/B,kBAAkB;IAClB,iBACE;IACF,QAAQ;IACR,UAAU;GACZ;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;EACA;GACE,IAAI;GACJ,OAAO;GACP,aAAa;GACb,eAAe;GACf,OAAO;GACP,OAAO,EACL,eAAe,oBACjB;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;EACA;GACE,IAAI;GACJ,OAAO;GACP,aACE;GACF,eAAe;GACf,OAAO;GACP,OAAO,EACL,eAAe,oBACjB;GACA,OAAO,EACL,MAAM,EACJ,OAAO,OACT,EACF;EACF;EACA;GACE,IAAI;GACJ,OAAO;GACP,aACE;GACF,eAAe;GACf,OAAO;GACP,OAAO;IACL,MAAM;KACJ,OAAO;KACP,aACE;KACF,OAAO,EACL,QAAQ,2BACV;IACF;IACA,MAAM;KACJ,OAAO;KACP,aACE;KACF,OAAO,EACL,YAAY,mCAAmC,EACjD;IACF;GACF;EACF;CACF;AACF"}
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-07-10T12:55:14.272Z",
3
+ "generatedAt": "2026-07-10T22:18:59.071Z",
4
4
  "packageName": "@happyvertical/smrt-content",
5
- "packageVersion": "0.38.26",
5
+ "packageVersion": "0.39.0",
6
6
  "sourceManifestPath": "dist/manifest.json",
7
7
  "agentDocPath": "AGENTS.md",
8
8
  "sourceHashes": {
9
- "manifest": "31168bade36fe9005bb799a3577d70bdcee1db9361e5f9af714dbd64e2ae3767",
10
- "packageJson": "754a4df25b38811a0d8de28f74fa9aa2de9acd638efd5c9dfead39aeb40f1bf4",
9
+ "manifest": "ec4d2521dfbec2aad077316eeb4993c7a7290ae5f0c00a2a841e8f7230d6a0c7",
10
+ "packageJson": "ef1c7f491e3d9611a842a258277d9b44a32561e53ee33237cd3a5d0ce021023a",
11
11
  "agents": "d3e1fdba8cf8c8f393e682616c56fefcc789c44018407bbdf7332d5f06cfbb5c"
12
12
  },
13
13
  "exports": [
@@ -293,7 +293,7 @@ This preview module lives in \`src/svelte/playground.ts\`.
293
293
 
294
294
  - Package-owned previews stay close to the real components
295
295
  - The shared host simply discovers and renders them
296
- - Live entries can still point at the package's generated API routes`;
296
+ - Live entries can point at the package's generated API routes`;
297
297
  // Keep the published playground module importable from Node so `smrt
298
298
  // playground list` can inspect entry metadata without needing a Svelte loader.
299
299
  const loadArticleCard = () => import('./components/ArticleCard.svelte');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-content",
3
- "version": "0.38.26",
3
+ "version": "0.39.0",
4
4
  "description": "Content processing module for SMRT framework - handles documents, web content, and media",
5
5
  "type": "module",
6
6
  "smrtRawPrimitives": "strict",
@@ -36,31 +36,46 @@
36
36
  "import": "./dist/playground.js"
37
37
  }
38
38
  },
39
+ "scripts": {
40
+ "build": "SMRT_PACKAGE_BUILD=1 npm run build:package",
41
+ "build:package": "svelte-kit sync && vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json && node ../../scripts/prune-svelte-package-artifacts.js dist/svelte",
42
+ "build:watch": "vite build --mode library --watch",
43
+ "clean": "rm -rf dist",
44
+ "dev": "vite dev",
45
+ "prepack": "node ../../scripts/prepack-package.js",
46
+ "test": "svelte-kit sync && vitest run",
47
+ "test:watch": "svelte-kit sync && vitest",
48
+ "test:e2e": "pnpm exec playwright test -c playwright.config.ts",
49
+ "test:e2e:headed": "pnpm exec playwright test -c playwright.config.ts --headed",
50
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.kit.json",
51
+ "typecheck": "svelte-kit sync && tsc -p tsconfig.typecheck.json && node ../../scripts/svelte-check-a11y.mjs --tsconfig ./tsconfig.kit.json",
52
+ "verify:pack": "node ../../scripts/verify-package-types-exports.js ."
53
+ },
39
54
  "dependencies": {
40
- "@happyvertical/ai": "^0.78.0",
41
- "@happyvertical/documents": "^0.78.0",
42
- "@happyvertical/files": "^0.78.0",
43
- "@happyvertical/geo": "^0.78.0",
44
- "@happyvertical/images": "^0.78.0",
45
- "@happyvertical/logger": "^0.78.0",
46
- "@happyvertical/ocr": "^0.60.55",
47
- "@happyvertical/pdf": "^0.65.3",
48
- "@happyvertical/spider": "^1.1.10",
49
- "@happyvertical/sql": "^0.78.0",
50
- "@happyvertical/utils": "^0.78.0",
55
+ "@happyvertical/ai": "catalog:",
56
+ "@happyvertical/documents": "catalog:",
57
+ "@happyvertical/files": "catalog:",
58
+ "@happyvertical/geo": "catalog:",
59
+ "@happyvertical/images": "catalog:",
60
+ "@happyvertical/logger": "catalog:",
61
+ "@happyvertical/ocr": "catalog:",
62
+ "@happyvertical/pdf": "catalog:",
63
+ "@happyvertical/smrt-assets": "workspace:*",
64
+ "@happyvertical/smrt-chat": "workspace:*",
65
+ "@happyvertical/smrt-core": "workspace:*",
66
+ "@happyvertical/smrt-facts": "workspace:*",
67
+ "@happyvertical/smrt-images": "workspace:*",
68
+ "@happyvertical/smrt-messages": "workspace:*",
69
+ "@happyvertical/smrt-prompts": "workspace:*",
70
+ "@happyvertical/smrt-profiles": "workspace:*",
71
+ "@happyvertical/smrt-tenancy": "workspace:*",
72
+ "@happyvertical/smrt-types": "workspace:*",
73
+ "@happyvertical/smrt-ui": "workspace:*",
74
+ "@happyvertical/spider": "catalog:",
75
+ "@happyvertical/sql": "catalog:",
76
+ "@happyvertical/utils": "catalog:",
51
77
  "fast-xml-parser": "^5.9.3",
52
- "yaml": "^2.9.0",
53
- "@happyvertical/smrt-assets": "0.38.26",
54
- "@happyvertical/smrt-core": "0.38.26",
55
- "@happyvertical/smrt-chat": "0.38.26",
56
- "@happyvertical/smrt-facts": "0.38.26",
57
- "@happyvertical/smrt-images": "0.38.26",
58
- "@happyvertical/smrt-messages": "0.38.26",
59
- "@happyvertical/smrt-prompts": "0.38.26",
60
- "@happyvertical/smrt-ui": "0.38.26",
61
- "@happyvertical/smrt-profiles": "0.38.26",
62
- "@happyvertical/smrt-tenancy": "0.38.26",
63
- "@happyvertical/smrt-types": "0.38.26"
78
+ "yaml": "^2.9.0"
64
79
  },
65
80
  "peerDependencies": {
66
81
  "svelte": "^5.56.4"
@@ -72,6 +87,8 @@
72
87
  },
73
88
  "devDependencies": {
74
89
  "@faker-js/faker": "^10.5.0",
90
+ "@happyvertical/smrt-playground": "workspace:*",
91
+ "@happyvertical/smrt-vitest": "workspace:*",
75
92
  "@sveltejs/kit": "^2.69.1",
76
93
  "@sveltejs/package": "^2.5.8",
77
94
  "@sveltejs/vite-plugin-svelte": "^7.1.2",
@@ -80,9 +97,7 @@
80
97
  "svelte-check": "^4.7.1",
81
98
  "typescript": "^5.9.3",
82
99
  "vite": "^8.1.3",
83
- "vitest": "^4.1.9",
84
- "@happyvertical/smrt-playground": "0.38.26",
85
- "@happyvertical/smrt-vitest": "0.38.26"
100
+ "vitest": "^4.1.9"
86
101
  },
87
102
  "keywords": [
88
103
  "ai",
@@ -102,19 +117,5 @@
102
117
  "type": "git",
103
118
  "url": "https://github.com/happyvertical/smrt.git",
104
119
  "directory": "packages/content"
105
- },
106
- "scripts": {
107
- "build": "SMRT_PACKAGE_BUILD=1 npm run build:package",
108
- "build:package": "svelte-kit sync && vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json && node ../../scripts/prune-svelte-package-artifacts.js dist/svelte",
109
- "build:watch": "vite build --mode library --watch",
110
- "clean": "rm -rf dist",
111
- "dev": "vite dev",
112
- "test": "svelte-kit sync && vitest run",
113
- "test:watch": "svelte-kit sync && vitest",
114
- "test:e2e": "pnpm exec playwright test -c playwright.config.ts",
115
- "test:e2e:headed": "pnpm exec playwright test -c playwright.config.ts --headed",
116
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.kit.json",
117
- "typecheck": "svelte-kit sync && tsc -p tsconfig.typecheck.json && node ../../scripts/svelte-check-a11y.mjs --tsconfig ./tsconfig.kit.json",
118
- "verify:pack": "node ../../scripts/verify-package-types-exports.js ."
119
120
  }
120
- }
121
+ }
package/LICENSE DELETED
@@ -1,7 +0,0 @@
1
- Copyright <2025> <Happy Vertical Corporation>
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.