@elmethis/core 0.10.0 → 0.12.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/dist/index.d.cts CHANGED
@@ -3234,4 +3234,131 @@ declare function assembleCatalog(envelope: CatalogEnvelope, components: readonly
3234
3234
  declare const BLOCK_CATALOG_ID = "https://46ki75.github.io/elmethis/a2ui/v0_9/block_catalog.json";
3235
3235
  declare const blockCatalogJson: AssembledCatalog;
3236
3236
  //#endregion
3237
- export { type AssembledCatalog, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, type CatalogEnvelope, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, HeadingApi, IconApi, KatexApi, LinkTextApi, ListApi, ListItemApi, MermaidApi, ParagraphApi, RichTextApi, RowApi, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, assembleCatalog, blockCatalogJson };
3237
+ //#region src/icon/languages/types.d.ts
3238
+ /**
3239
+ * Framework-agnostic description of a language glyph's SVG artwork.
3240
+ *
3241
+ * Each {@link LanguageIcon} is authored once here and rendered by a thin,
3242
+ * per-framework component that walks the node tree into that framework's JSX.
3243
+ * The geometry (path data, gradients, brand colors) lives in exactly one place
3244
+ * so the `qwik`/`react`/`vue` libraries no longer duplicate it.
3245
+ */
3246
+ /** A single SVG element node: a tag, its literal attributes, and children. */
3247
+ interface SvgNode {
3248
+ tag: string;
3249
+ attrs?: Record<string, string>;
3250
+ /**
3251
+ * Inline style. Used for theme-aware fills that can't be a static
3252
+ * presentation attribute (e.g. `fill: light-dark(...)`).
3253
+ */
3254
+ style?: Record<string, string>;
3255
+ children?: SvgNode[];
3256
+ }
3257
+ /** A complete language glyph: the root `<svg>` payload minus sizing props. */
3258
+ interface LanguageIcon {
3259
+ /** The `viewBox` of the root `<svg>`. */
3260
+ viewBox: string;
3261
+ /** Literal attributes carried on the root `<svg>` (e.g. a shared `fill`). */
3262
+ attrs?: Record<string, string>;
3263
+ /** The glyph's child elements. */
3264
+ children: SvgNode[];
3265
+ }
3266
+ //#endregion
3267
+ //#region src/icon/languages/registry.d.ts
3268
+ /**
3269
+ * The single source of truth for every language. {@link LANGUAGES},
3270
+ * {@link normalizeLanguage}, and {@link languageIcons} are all derived from
3271
+ * this array, so a language is declared in exactly one place.
3272
+ */
3273
+ declare const LANGUAGE_REGISTRY: readonly [{
3274
+ readonly key: "rust";
3275
+ readonly aliases: readonly ["rs"];
3276
+ readonly icon: LanguageIcon;
3277
+ }, {
3278
+ readonly key: "javascript";
3279
+ readonly aliases: readonly ["js"];
3280
+ readonly icon: LanguageIcon;
3281
+ }, {
3282
+ readonly key: "typescript";
3283
+ readonly aliases: readonly ["ts"];
3284
+ readonly icon: LanguageIcon;
3285
+ }, {
3286
+ readonly key: "shell";
3287
+ readonly aliases: readonly ["bash", "sh"];
3288
+ readonly icon: LanguageIcon;
3289
+ }, {
3290
+ readonly key: "terraform";
3291
+ readonly aliases: readonly ["tf", "hcl"];
3292
+ readonly icon: LanguageIcon;
3293
+ }, {
3294
+ readonly key: "html";
3295
+ readonly aliases: readonly ["html5"];
3296
+ readonly icon: LanguageIcon;
3297
+ }, {
3298
+ readonly key: "css";
3299
+ readonly aliases: readonly ["css3"];
3300
+ readonly icon: LanguageIcon;
3301
+ }, {
3302
+ readonly key: "npm";
3303
+ readonly aliases: readonly [];
3304
+ readonly icon: LanguageIcon;
3305
+ }, {
3306
+ readonly key: "java";
3307
+ readonly aliases: readonly [];
3308
+ readonly icon: LanguageIcon;
3309
+ }, {
3310
+ readonly key: "kotlin";
3311
+ readonly aliases: readonly ["kt"];
3312
+ readonly icon: LanguageIcon;
3313
+ }, {
3314
+ readonly key: "go";
3315
+ readonly aliases: readonly ["golang"];
3316
+ readonly icon: LanguageIcon;
3317
+ }, {
3318
+ readonly key: "python";
3319
+ readonly aliases: readonly ["py"];
3320
+ readonly icon: LanguageIcon;
3321
+ }, {
3322
+ readonly key: "sql";
3323
+ readonly aliases: readonly [];
3324
+ readonly icon: LanguageIcon;
3325
+ }, {
3326
+ readonly key: "json";
3327
+ readonly aliases: readonly [];
3328
+ readonly icon: LanguageIcon;
3329
+ }, {
3330
+ readonly key: "lua";
3331
+ readonly aliases: readonly [];
3332
+ readonly icon: LanguageIcon;
3333
+ }, {
3334
+ readonly key: "csharp";
3335
+ readonly aliases: readonly ["cs", "c#"];
3336
+ readonly icon: LanguageIcon;
3337
+ }, {
3338
+ readonly key: "cpp";
3339
+ readonly aliases: readonly ["c++"];
3340
+ readonly icon: LanguageIcon;
3341
+ }, {
3342
+ readonly key: "c";
3343
+ readonly aliases: readonly ["clang"];
3344
+ readonly icon: LanguageIcon;
3345
+ }, {
3346
+ readonly key: "file";
3347
+ readonly aliases: readonly [];
3348
+ readonly icon: null;
3349
+ }];
3350
+ /**
3351
+ * Canonical language keys. `"file"` is the generic fallback and has no glyph
3352
+ * here — consumers render it with their own code-tags icon.
3353
+ */
3354
+ type Language = (typeof LANGUAGE_REGISTRY)[number]["key"];
3355
+ /** Languages that have an authored glyph (every {@link Language} except `file`). */
3356
+ type GlyphLanguage = Exclude<Language, "file">;
3357
+ /** Canonical language keys, in registry order. */
3358
+ declare const LANGUAGES: readonly Language[];
3359
+ /** Maps an arbitrary language hint (alias, extension) onto a {@link Language}. */
3360
+ declare const normalizeLanguage: (language: string) => Language;
3361
+ /** The authored glyph artwork for every {@link GlyphLanguage}. */
3362
+ declare const languageIcons: Record<GlyphLanguage, LanguageIcon>;
3363
+ //#endregion
3364
+ export { type AssembledCatalog, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, type CatalogEnvelope, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, type GlyphLanguage, HeadingApi, IconApi, KatexApi, LANGUAGES, type Language, type LanguageIcon, LinkTextApi, ListApi, ListItemApi, MermaidApi, ParagraphApi, RichTextApi, RowApi, type SvgNode, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };
package/dist/index.d.mts CHANGED
@@ -3234,4 +3234,131 @@ declare function assembleCatalog(envelope: CatalogEnvelope, components: readonly
3234
3234
  declare const BLOCK_CATALOG_ID = "https://46ki75.github.io/elmethis/a2ui/v0_9/block_catalog.json";
3235
3235
  declare const blockCatalogJson: AssembledCatalog;
3236
3236
  //#endregion
3237
- export { type AssembledCatalog, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, type CatalogEnvelope, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, HeadingApi, IconApi, KatexApi, LinkTextApi, ListApi, ListItemApi, MermaidApi, ParagraphApi, RichTextApi, RowApi, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, assembleCatalog, blockCatalogJson };
3237
+ //#region src/icon/languages/types.d.ts
3238
+ /**
3239
+ * Framework-agnostic description of a language glyph's SVG artwork.
3240
+ *
3241
+ * Each {@link LanguageIcon} is authored once here and rendered by a thin,
3242
+ * per-framework component that walks the node tree into that framework's JSX.
3243
+ * The geometry (path data, gradients, brand colors) lives in exactly one place
3244
+ * so the `qwik`/`react`/`vue` libraries no longer duplicate it.
3245
+ */
3246
+ /** A single SVG element node: a tag, its literal attributes, and children. */
3247
+ interface SvgNode {
3248
+ tag: string;
3249
+ attrs?: Record<string, string>;
3250
+ /**
3251
+ * Inline style. Used for theme-aware fills that can't be a static
3252
+ * presentation attribute (e.g. `fill: light-dark(...)`).
3253
+ */
3254
+ style?: Record<string, string>;
3255
+ children?: SvgNode[];
3256
+ }
3257
+ /** A complete language glyph: the root `<svg>` payload minus sizing props. */
3258
+ interface LanguageIcon {
3259
+ /** The `viewBox` of the root `<svg>`. */
3260
+ viewBox: string;
3261
+ /** Literal attributes carried on the root `<svg>` (e.g. a shared `fill`). */
3262
+ attrs?: Record<string, string>;
3263
+ /** The glyph's child elements. */
3264
+ children: SvgNode[];
3265
+ }
3266
+ //#endregion
3267
+ //#region src/icon/languages/registry.d.ts
3268
+ /**
3269
+ * The single source of truth for every language. {@link LANGUAGES},
3270
+ * {@link normalizeLanguage}, and {@link languageIcons} are all derived from
3271
+ * this array, so a language is declared in exactly one place.
3272
+ */
3273
+ declare const LANGUAGE_REGISTRY: readonly [{
3274
+ readonly key: "rust";
3275
+ readonly aliases: readonly ["rs"];
3276
+ readonly icon: LanguageIcon;
3277
+ }, {
3278
+ readonly key: "javascript";
3279
+ readonly aliases: readonly ["js"];
3280
+ readonly icon: LanguageIcon;
3281
+ }, {
3282
+ readonly key: "typescript";
3283
+ readonly aliases: readonly ["ts"];
3284
+ readonly icon: LanguageIcon;
3285
+ }, {
3286
+ readonly key: "shell";
3287
+ readonly aliases: readonly ["bash", "sh"];
3288
+ readonly icon: LanguageIcon;
3289
+ }, {
3290
+ readonly key: "terraform";
3291
+ readonly aliases: readonly ["tf", "hcl"];
3292
+ readonly icon: LanguageIcon;
3293
+ }, {
3294
+ readonly key: "html";
3295
+ readonly aliases: readonly ["html5"];
3296
+ readonly icon: LanguageIcon;
3297
+ }, {
3298
+ readonly key: "css";
3299
+ readonly aliases: readonly ["css3"];
3300
+ readonly icon: LanguageIcon;
3301
+ }, {
3302
+ readonly key: "npm";
3303
+ readonly aliases: readonly [];
3304
+ readonly icon: LanguageIcon;
3305
+ }, {
3306
+ readonly key: "java";
3307
+ readonly aliases: readonly [];
3308
+ readonly icon: LanguageIcon;
3309
+ }, {
3310
+ readonly key: "kotlin";
3311
+ readonly aliases: readonly ["kt"];
3312
+ readonly icon: LanguageIcon;
3313
+ }, {
3314
+ readonly key: "go";
3315
+ readonly aliases: readonly ["golang"];
3316
+ readonly icon: LanguageIcon;
3317
+ }, {
3318
+ readonly key: "python";
3319
+ readonly aliases: readonly ["py"];
3320
+ readonly icon: LanguageIcon;
3321
+ }, {
3322
+ readonly key: "sql";
3323
+ readonly aliases: readonly [];
3324
+ readonly icon: LanguageIcon;
3325
+ }, {
3326
+ readonly key: "json";
3327
+ readonly aliases: readonly [];
3328
+ readonly icon: LanguageIcon;
3329
+ }, {
3330
+ readonly key: "lua";
3331
+ readonly aliases: readonly [];
3332
+ readonly icon: LanguageIcon;
3333
+ }, {
3334
+ readonly key: "csharp";
3335
+ readonly aliases: readonly ["cs", "c#"];
3336
+ readonly icon: LanguageIcon;
3337
+ }, {
3338
+ readonly key: "cpp";
3339
+ readonly aliases: readonly ["c++"];
3340
+ readonly icon: LanguageIcon;
3341
+ }, {
3342
+ readonly key: "c";
3343
+ readonly aliases: readonly ["clang"];
3344
+ readonly icon: LanguageIcon;
3345
+ }, {
3346
+ readonly key: "file";
3347
+ readonly aliases: readonly [];
3348
+ readonly icon: null;
3349
+ }];
3350
+ /**
3351
+ * Canonical language keys. `"file"` is the generic fallback and has no glyph
3352
+ * here — consumers render it with their own code-tags icon.
3353
+ */
3354
+ type Language = (typeof LANGUAGE_REGISTRY)[number]["key"];
3355
+ /** Languages that have an authored glyph (every {@link Language} except `file`). */
3356
+ type GlyphLanguage = Exclude<Language, "file">;
3357
+ /** Canonical language keys, in registry order. */
3358
+ declare const LANGUAGES: readonly Language[];
3359
+ /** Maps an arbitrary language hint (alias, extension) onto a {@link Language}. */
3360
+ declare const normalizeLanguage: (language: string) => Language;
3361
+ /** The authored glyph artwork for every {@link GlyphLanguage}. */
3362
+ declare const languageIcons: Record<GlyphLanguage, LanguageIcon>;
3363
+ //#endregion
3364
+ export { type AssembledCatalog, BLOCK_CATALOG_ID, BlockImageApi, BlockQuoteApi, BookmarkApi, CalloutApi, type CatalogEnvelope, CodeBlockApi, ColumnApi, ColumnListApi, ContentTabApi, ContentTabsApi, DividerApi, FileApi, type GlyphLanguage, HeadingApi, IconApi, KatexApi, LANGUAGES, type Language, type LanguageIcon, LinkTextApi, ListApi, ListItemApi, MermaidApi, ParagraphApi, RichTextApi, RowApi, type SvgNode, TableApi, TableCellApi, TableRowApi, ToggleApi, UnsupportedApi, assembleCatalog, blockCatalogJson, languageIcons, normalizeLanguage };