Skip to content
Merged

Dev #153

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .documentation/SchemaUpdates.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
these are the files you must change from the duc repo of the @scopture-monolith/scopture-monolith.code-workspace :
these are the files you must change from the duc repo:

on the typescript side:
@duc/packages/ducjs/src/types/index.ts
Expand Down
15 changes: 15 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"recommendations": [
"rust-lang.rust-analyzer",
"streetsidesoftware.code-spell-checker",
"gaborv.flatbuffers",
"PKief.material-icon-theme",
"bradlc.vscode-tailwindcss",
"ducflair.duc",
"tamasfe.even-better-toml",
"ms-toolsai.jupyter",
"ms-python.python",
"ms-python.vscode-pylance",
"jock.svg",
]
}
15 changes: 1 addition & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ members = [
"packages/ducpdf/src/duc2pdf"
]

[workspace.dependencies]
duc = { version = "1" }

[profile.release]
lto = true
opt-level = "s"

[patch.crates-io]
duc = { path = "packages/ducrs" }
opt-level = "s"
14 changes: 8 additions & 6 deletions apps/web/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={robotoMono.className} suppressHydrationWarning>
<body className="flex flex-col min-h-screen">
<Script
defer
src="https://duc-analytics.vercel.app/script.js"
data-website-id="dbb88890-f4f6-45b1-8970-cb5d7d7b02b6"
data-domains="duc.ducflair.com,"
/>
{process.env.NODE_ENV === 'production' && (
<Script
defer
src="https://umami-liart-kappa.vercel.app/script.js"
data-website-id="dbb88890-f4f6-45b1-8970-cb5d7d7b02b6"
data-domains="duc.ducflair.com,"
/>
)}
<RootProvider
search={{
links: [
Expand Down
5 changes: 1 addition & 4 deletions apps/web/content/docs/roadmap/y1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ authors: [jorgedanisc]
- Expand the library’s toolset to include more advanced CAD functionalities.
- **Achieve `90% completion` of the file base format**
- Finalize the `duc` file format, ensuring it can handle a wide range of CAD use cases and is robust enough for production use.
- Conduct `extensive testing` to validate the format’s performance and reliability.
- **Assess the `costs of maintaining` an `open-source` project**
- Analyze the financial and operational implications of releasing the project as open-source.
- Develop a sustainability plan that includes potential funding sources, community engagement strategies, and long-term maintenance plans.
- Conduct `extensive testing` to validate the format’s performance and reliability.
6 changes: 1 addition & 5 deletions apps/web/content/docs/roadmap/y2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ authors: [jorgedanisc]
- Determine if there is significant interest and demand from the broader community for an `open-source 2D CAD library` and `file format`.
- **Quality and readiness of the file and library**
- Ensure that the `duc` file format and the `associated libraries` are mature, stable, and feature-complete.
- Gather feedback from initial users to refine and improve the library and file format.
- **Affordability and sustainability**
- Assess Ducflair’s financial capacity to support an open-source initiative, including potential costs for infrastructure, core maintainers, managers, reviewers, and continuous development.
- Explore how `Vercel` manages to sustain a project like `Next.js` efficiently and consider similar models for `Ducflair`.
- By this time pool the `developer audience` captured and evaluate whether the project is `ready` to be open-sourced.
- Gather feedback from initial users to refine and improve the library and file format.
822 changes: 653 additions & 169 deletions bun.lock

Large diffs are not rendered by default.

55 changes: 29 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,41 @@
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/exec": "^7.1.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.3",
"@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^14.0.3",
"@semantic-release/github": "^11.0.6",
"@semantic-release/npm": "^12.0.2",
"@semantic-release/release-notes-generator": "^14.1.0",
"@types/node": "22.14.1",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"autoprefixer": "^10.4.21",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"autoprefixer": "^10.4.22",
"conventional-changelog-conventionalcommits": "^9.1.0",
"del-cli": "^6.0.0",
"postcss": "^8.5.5",
"semantic-release": "^24.2.5",
"tailwindcss": "^4.1.10",
"turbo": "^2.5.5",
"typescript": "^5.8.3"
"postcss": "^8.5.6",
"semantic-release": "^24.2.9",
"tailwindcss": "^4.1.17",
"turbo": "^2.6.3",
"typescript": "^5.9.3"
},
"dependencies": {
"@fumadocs/mdx-remote": "^1.3.3",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-slot": "^1.2.3",
"@tailwindcss/postcss": "^4.1.10",
"@fumadocs/mdx-remote": "^1.4.3",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-slot": "^1.2.4",
"@tailwindcss/postcss": "^4.1.17",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"fumadocs-core": "15.2.8",
"fumadocs-mdx": "11.6.0",
"fumadocs-ui": "15.2.8",
"lucide-react": "^0.501.0",
"next": "^15.3.1",
"next": "^15.5.7",
"next-themes": "^0.4.6",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react": "^19.2.1",
"react-dom": "^19.2.1",
"remark-smartypants": "^3.0.2",
"sst": "^3.13.14",
"tailwind-merge": "^3.3.1",
"tw-animate-css": "^1.3.4",
"zod": "^3.25.64"
"sst": "^3.17.25",
"tailwind-merge": "^3.4.0",
"tw-animate-css": "^1.4.0",
"zod": "^3.25.76"
},
"engines": {
"node": ">=20"
Expand All @@ -49,6 +49,9 @@
"packageManager": "bun@1.1.24",
"private": true,
"scripts": {
"build": "turbo build",
"build:packages": "turbo build --filter=ducjs --filter=ducpy --filter=ducrs --filter=ducsvg --filter=ducpdf",
"sst:wrap": "bash -c 'CMD=\"$1\"; shift; [ -n \"$1\" ] && [ \"$1\" != \"_\" ] && export SST_STAGE=\"$1\"; eval \"$CMD\"' _",
"flatc:gen": "bun run flatc:gen:duc",
"flatc:gen:duc": "cd schema && bash flatc-duc-generate.sh",
"clean": "bun del-cli \"**/dist\" \".turbo\" \"**/node_modules\" \"**/package-lock.json\" \"**/tsconfig.tsbuildinfo\" \"**/tsconfig.node.tsbuildinfo\" \"**/vite.config.js\"",
Expand All @@ -65,14 +68,14 @@
"ducpdf:build": "turbo build --filter=ducpdf",
"ducpdf:test": "turbo run test --filter=ducpdf",
"semantic-release": "turbo run semantic-release",
"sst:build": "bash -c 'bun run sst:clean && sst unlock ${1:+--stage $1} && sst refresh ${1:+--stage $1} && sst deploy ${1:+--stage $1}' --",
"sst:deploy": "bun sst:wrap 'bun run sst:clean && sst unlock && sst refresh && sst deploy'",
"sst:clean": "bun del-cli \".sst\" \"**/sst-env.d.ts\" \"**/sst.pyi\"",
"sst:dev": "bun run sst dev",
"knip:deps": "bash -c 'bun run sst unlock ${1:+--stage $1} && bun sst shell ${1:+--stage $1} -- bunx knip --dependencies' --",
"knip": "bash -c 'bun run sst unlock ${1:+--stage $1} && bun sst shell ${1:+--stage $1} -- bunx knip' --"
"knip:deps": "bun sst:wrap 'bun run sst unlock && sst shell -- bunx knip --dependencies'",
"knip": "bun sst:wrap 'bun run sst unlock && sst shell -- bunx knip'"
},
"workspaces": [
"apps/*",
"packages/*"
]
}
}
7 changes: 0 additions & 7 deletions packages/ducjs/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,13 @@ function main() {

// Clean previous build artifacts
const distDir = path.join(manifestDir, '..', 'dist');
const tsbuildinfo = path.join(manifestDir, '..', 'tsconfig.tsbuildinfo');

try {
fs.rmSync(distDir, { recursive: true, force: true });
} catch (error) {
console.log('No dist directory to clean or error:', error.message);
}

try {
fs.unlinkSync(tsbuildinfo);
} catch (error) {
console.log('No tsconfig.tsbuildinfo to remove or error:', error.message);
}

// Set environment variable and run TypeScript compiler
const env = { ...process.env, DUC_SCHEMA_VERSION: version };

Expand Down
4 changes: 4 additions & 0 deletions packages/ducjs/src/flatbuffers/duc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ export { DucArrowElement } from './duc/duc-arrow-element';
export { DucBlock } from './duc/duc-block';
export { DucBlockAttributeDefinition } from './duc/duc-block-attribute-definition';
export { DucBlockAttributeDefinitionEntry } from './duc/duc-block-attribute-definition-entry';
export { DucBlockCollection } from './duc/duc-block-collection';
export { DucBlockCollectionEntry } from './duc/duc-block-collection-entry';
export { DucBlockDuplicationArray } from './duc/duc-block-duplication-array';
export { DucBlockInstance } from './duc/duc-block-instance';
export { DucBlockInstanceElement } from './duc/duc-block-instance-element';
export { DucBlockMetadata } from './duc/duc-block-metadata';
export { DucCommonStyle } from './duc/duc-common-style';
export { DucDimensionElement } from './duc/duc-dimension-element';
export { DucDimensionStyle } from './duc/duc-dimension-style';
Expand Down
60 changes: 60 additions & 0 deletions packages/ducjs/src/flatbuffers/duc/duc-block-collection-entry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// automatically generated by the FlatBuffers compiler, do not modify

/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */

import * as flatbuffers from 'flatbuffers';

export class DucBlockCollectionEntry {
bb: flatbuffers.ByteBuffer|null = null;
bb_pos = 0;
__init(i:number, bb:flatbuffers.ByteBuffer):DucBlockCollectionEntry {
this.bb_pos = i;
this.bb = bb;
return this;
}

static getRootAsDucBlockCollectionEntry(bb:flatbuffers.ByteBuffer, obj?:DucBlockCollectionEntry):DucBlockCollectionEntry {
return (obj || new DucBlockCollectionEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

static getSizePrefixedRootAsDucBlockCollectionEntry(bb:flatbuffers.ByteBuffer, obj?:DucBlockCollectionEntry):DucBlockCollectionEntry {
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
return (obj || new DucBlockCollectionEntry()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
}

id():string|null
id(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
id(optionalEncoding?:any):string|Uint8Array|null {
const offset = this.bb!.__offset(this.bb_pos, 4);
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
}

isCollection():boolean {
const offset = this.bb!.__offset(this.bb_pos, 6);
return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false;
}

static startDucBlockCollectionEntry(builder:flatbuffers.Builder) {
builder.startObject(2);
}

static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) {
builder.addFieldOffset(0, idOffset, 0);
}

static addIsCollection(builder:flatbuffers.Builder, isCollection:boolean) {
builder.addFieldInt8(1, +isCollection, +false);
}

static endDucBlockCollectionEntry(builder:flatbuffers.Builder):flatbuffers.Offset {
const offset = builder.endObject();
return offset;
}

static createDucBlockCollectionEntry(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset, isCollection:boolean):flatbuffers.Offset {
DucBlockCollectionEntry.startDucBlockCollectionEntry(builder);
DucBlockCollectionEntry.addId(builder, idOffset);
DucBlockCollectionEntry.addIsCollection(builder, isCollection);
return DucBlockCollectionEntry.endDucBlockCollectionEntry(builder);
}
}
Loading