New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jbroll/jscad-fluent

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jbroll/jscad-fluent - npm Package Compare versions

Comparing version

to
0.3.0

dist/FluentGeom2.js

0

dist/FluentGeom2.d.ts

@@ -0,0 +0,0 @@ import type { Centroid, Geom2, Vec2, Vec3, Mat4, RGB, RGBA, BoundingBox, CenterOptions, ExpandOptions, ExtrudeLinearOptions, ExtrudeRotateOptions, MirrorOptions, OffsetOptions } from './types';

@@ -0,0 +0,0 @@ import type { Geom2, ExtrudeLinearOptions, ExtrudeRotateOptions } from './types';

@@ -0,0 +0,0 @@ import type { Centroid, ExpandOptions, Geom3, Vec3, Mat4, RGB, RGBA, BoundingBox, CenterOptions, MirrorOptions } from './types';

@@ -0,0 +0,0 @@ import type { Geom3 } from './types';

@@ -0,0 +0,0 @@ import type { Geometry, Vec3, Mat4, RGB, RGBA, CenterOptions, MirrorOptions } from './types';

@@ -0,0 +0,0 @@ import { FluentGeom2 } from './FluentGeom2';

@@ -1,8 +0,59 @@

'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./jscad-fluent.cjs.production.min.js')
} else {
module.exports = require('./jscad-fluent.cjs.development.js')
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FluentGeom3Array = exports.FluentGeom2Array = exports.FluentGeom3 = exports.FluentGeom2 = exports.jscadFluent = void 0;
const modeling_1 = require("@jscad/modeling");
const FluentGeom2_1 = require("./FluentGeom2");
const FluentGeom3_1 = require("./FluentGeom3");
/**
* Main entry point for the JSCAD Fluent API.
* Provides factory functions for creating fluent geometry objects.
*/
exports.jscadFluent = {
// 2D Primitives
rectangle(options) {
return new FluentGeom2_1.FluentGeom2(modeling_1.primitives.rectangle(options));
},
circle(options) {
return new FluentGeom2_1.FluentGeom2(modeling_1.primitives.circle(options));
},
ellipse(options) {
return new FluentGeom2_1.FluentGeom2(modeling_1.primitives.ellipse(options));
},
polygon(points) {
return new FluentGeom2_1.FluentGeom2(modeling_1.primitives.polygon({ points }));
},
square(options) {
return new FluentGeom2_1.FluentGeom2(modeling_1.primitives.square(options));
},
star(options) {
return new FluentGeom2_1.FluentGeom2(modeling_1.primitives.star(options));
},
// 3D Primitives
cube(options) {
return new FluentGeom3_1.FluentGeom3(modeling_1.primitives.cube(options));
},
sphere(options) {
return new FluentGeom3_1.FluentGeom3(modeling_1.primitives.sphere(options));
},
cylinder(options) {
return new FluentGeom3_1.FluentGeom3(modeling_1.primitives.cylinder(options));
},
cylinderElliptic(options) {
return new FluentGeom3_1.FluentGeom3(modeling_1.primitives.cylinderElliptic(options));
},
torus(options) {
return new FluentGeom3_1.FluentGeom3(modeling_1.primitives.torus(options));
},
polyhedron({ points, faces }) {
return new FluentGeom3_1.FluentGeom3(modeling_1.primitives.polyhedron({ points, faces }));
}
};
// Export classes for advanced usage
var FluentGeom2_2 = require("./FluentGeom2");
Object.defineProperty(exports, "FluentGeom2", { enumerable: true, get: function () { return FluentGeom2_2.FluentGeom2; } });
var FluentGeom3_2 = require("./FluentGeom3");
Object.defineProperty(exports, "FluentGeom3", { enumerable: true, get: function () { return FluentGeom3_2.FluentGeom3; } });
var FluentGeom2Array_1 = require("./FluentGeom2Array");
Object.defineProperty(exports, "FluentGeom2Array", { enumerable: true, get: function () { return FluentGeom2Array_1.FluentGeom2Array; } });
var FluentGeom3Array_1 = require("./FluentGeom3Array");
Object.defineProperty(exports, "FluentGeom3Array", { enumerable: true, get: function () { return FluentGeom3Array_1.FluentGeom3Array; } });

22

dist/types.d.ts

@@ -9,14 +9,14 @@ import { maths } from '@jscad/modeling';

import { ExpandOptions, OffsetOptions } from '@jscad/modeling/src/operations/expansions';
import mat4 from '@jscad/modeling/src/maths/mat4';
import { mat4 } from '@jscad/modeling/src/maths';
export { mat4 };
export type { Geometry, Geom2, Geom3, Path2, BoundingBox, CenterOptions, CircleOptions, CubeOptions, CylinderOptions, CylinderEllipticOptions, EllipseOptions, ExpandOptions, ExtrudeLinearOptions, ExtrudeRotateOptions, MirrorOptions, OffsetOptions, RectangleOptions, SphereOptions, SquareOptions, StarOptions, TorusOptions };
export declare type Vec2 = maths.vec2.Vec2;
export declare type Vec3 = maths.vec3.Vec3;
export declare type Mat4 = maths.mat4.Mat4;
export declare type Point2 = [number, number];
export declare type Point3 = [number, number, number];
export declare type RGB = [number, number, number];
export declare type RGBA = [number, number, number, number];
export declare type Centroid = Point3;
export declare type Corners = 'edge' | 'chamfer' | 'round';
export declare type GeometryArray<T extends Geometry> = T[];
export type Vec2 = maths.vec2.Vec2;
export type Vec3 = maths.vec3.Vec3;
export type Mat4 = maths.mat4.Mat4;
export type Point2 = [number, number];
export type Point3 = [number, number, number];
export type RGB = [number, number, number];
export type RGBA = [number, number, number, number];
export type Centroid = Point3;
export type Corners = 'edge' | 'chamfer' | 'round';
export type GeometryArray<T extends Geometry> = T[];
{
"name": "@jbroll/jscad-fluent",
"author": "John Roll",
"version": "0.2.0",
"version": "0.3.0",
"license": "MIT",

@@ -16,15 +16,8 @@ "main": "dist/index.js",

"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test",
"lint": "tsdx lint",
"prepare": "tsdx build",
"size": "size-limit",
"analyze": "size-limit --why"
"build": "tsc",
"lint": "tslint src/*.ts tests/*.ts",
"lint-fix": "npm run lint -- --fix",
"prepublish": "npm run test",
"test": "npm run build && mocha -R tap dist/tests"
},
"husky": {
"hooks": {
"pre-commit": "tsdx lint"
}
},
"prettier": {

@@ -49,10 +42,6 @@ "printWidth": 80,

"@jbroll/mustache": "^4.3.1",
"@size-limit/preset-small-lib": "^11.1.6",
"@typescript-eslint/eslint-plugin": "^8.23.0",
"@typescript-eslint/parser": "^8.23.0",
"husky": "^9.1.7",
"npm-check-updates": "^17.1.14",
"size-limit": "^11.1.6",
"tsdx": "^0.14.1",
"tslib": "^2.8.1",
"@types/mocha": "^7.0.2",
"mocha": "^7.1.1",
"should": "^13.2.3",
"tslint": "^6.1.1",
"typescript": "^5.7.3"

@@ -59,0 +48,0 @@ },

@@ -21,3 +21,3 @@ import { maths } from '@jscad/modeling';

import mat4 from '@jscad/modeling/src/maths/mat4';
import { mat4 } from '@jscad/modeling/src/maths';
export { mat4 };

@@ -24,0 +24,0 @@