5 Commits

Author SHA1 Message Date
Alex Dunmow
13d741979a fix: rename module path from ninja/core to block/core
Matches the actual Gitea repo location at block/core.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-01 09:39:10 +08:00
Alex Dunmow
71d3416304 feat: WO-PS-010 SDK HTMLBlock with MediaResolver interface
HTMLBlock uses MediaResolver interface instead of db.Queries for
media metadata enrichment. Includes shared ButtonConfig, MediaValue,
TemplateRenderer interface, and block helper utilities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-01 09:17:50 +08:00
Alex Dunmow
79c558a968 fix: replace any with typed context accessors in SDK
- Define PageContext, PostContext, AuthorContext, CategoryContext,
  MasterPageContext structs for typed context passing
- Define EmbedResolver interface
- Make GetQueries generic: GetQueries[T](ctx) (T, bool)
- Fix Content.BlockNoteToHTML to take map[string]any, not any

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 22:39:34 +08:00
Alex Dunmow
99fc63ddfd feat: WO-PS-002–008 SDK type packages
- rbac/: Role type, constants, HasPermission, RoleFromString
- blocks/: BlockFunc, BlockMeta, BlockContext, context accessors, BlockRegistry interface
- templates/: TemplateFunc, meta types, TemplateRegistry interface
- auth/: Claims, PublicClaims, context extractors
- content/: Content interface, AuthorProfile/PageInfo/PostInfo types
- settings/: Settings interface, map accessor helpers
- gating/: AccessRule, AccessResult, EvaluateAccess, Gating interface
- crypto/: Crypto interface (Encrypt/Decrypt)
- render/: BlockNoteToHTML standalone renderer
- video/: ParseEmbedURL, EmbedIframeURL
- ai/: ToolDefinition, ToolResult, ToolRegistry interface

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 22:32:29 +08:00
Alex Dunmow
0991b791b1 feat: WO-PS-001 initialize SDK repo
Initialize git.dev.alexdunmow.com/ninja/core with Go 1.26 module,
package directory structure, and README.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-30 22:25:52 +08:00