Skip to content

cloudcreate-ai/cloudcreate-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@cloudcreate/core

Core processing utilities shared by the web UI and future CLI entry points.

Live site: https://cloudcreate.ai Package: https://www.npmjs.com/package/@cloudcreate/core

This package intentionally avoids Svelte, routing, local storage, and DOM download helpers. Browser-only behavior stays in src/lib adapters or route components.

Current modules:

  • ./css: CSS minify and beautify helpers.
  • ./browser: CloudCreate.ai tool URL builders shared by CLI/browser entry points.
  • ./archive: ZIP, GZIP, TAR.GZ, and Brotli helpers with byte-oriented APIs for CLI use and Blob convenience APIs for the browser.
  • ./image: JPEG, PNG, WebP, and AVIF decode/encode helpers plus image compression/format conversion helpers.
  • ./table: CSV, TSV, XLSX, and JSON parsing/conversion helpers.
  • ./markdown: Markdown to HTML rendering with optional caller-provided sanitization.
  • ./pdf: PDF document info helpers for page counts, page sizes, and basic metadata.

Migration

This package was previously published as @cloudcreate/cloudcreate-core.

  • New package name: @cloudcreate/core
  • Old package is deprecated with migration guidance

Import migration examples:

// before
import { minifyAggressive } from '@cloudcreate/cloudcreate-core/css';

// after
import { minifyAggressive } from '@cloudcreate/core/css';

Release docs

  • Changelog: CHANGELOG.md
  • Release checklist: RELEASE.md

Example:

import { minifyAggressive } from '@cloudcreate/core/css';
import { archive } from '@cloudcreate/core';

const css = minifyAggressive('.demo { color: red; }');
const zipBytes = await archive.compressZipBytes([
  { name: 'style.css', data: new TextEncoder().encode(css) },
]);

PDF info example:

import { getPdfInfo } from '@cloudcreate/core/pdf';

const info = await getPdfInfo(pdfBytes, { maxPages: 3 });
console.log(info.numPages, info.pages[0]);

PDF extract example:

import { extractPdfPages } from '@cloudcreate/core/pdf';

const result = await extractPdfPages(pdfBytes, { pages: '1,3-5' });
console.log(result.extractedPages, result.extractedPageCount);

PDF merge example:

import { mergePdfDocuments } from '@cloudcreate/core/pdf';

const result = await mergePdfDocuments([
  { name: 'part-a.pdf', buffer: pdfABytes },
  { name: 'part-b.pdf', buffer: pdfBBytes },
]);
console.log(result.sourceCount, result.mergedPageCount);

PDF split example:

import { splitPdfPages } from '@cloudcreate/core/pdf';

const result = await splitPdfPages(pdfBytes, { pages: '1,3-4', prefix: 'report' });
console.log(result.splitCount, result.documents[0].name);

About

Core processing utilities shared by the web UI (https://cloudcreate.ai) and CLI entry points.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors