Compare commits

..

1 Commits

Author SHA1 Message Date
0c2f63b399 Fix yarn lint to use all files recursively 2025-01-12 15:47:33 -05:00
1476 changed files with 281962 additions and 500698 deletions

View File

@ -1,3 +1,3 @@
[codespell] [codespell]
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall,ser ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall
skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/kcl/*.md,.yarn.lock,**/yarn.lock,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,tsconfig.tsbuildinfo skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/kcl/*.md,.yarn.lock,**/yarn.lock,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,tsconfig.tsbuildinfo

View File

@ -2,8 +2,8 @@ NODE_ENV=development
DEV=true DEV=true
VITE_KC_API_WS_MODELING_URL=wss://api.dev.zoo.dev/ws/modeling/commands VITE_KC_API_WS_MODELING_URL=wss://api.dev.zoo.dev/ws/modeling/commands
VITE_KC_API_BASE_URL=https://api.dev.zoo.dev VITE_KC_API_BASE_URL=https://api.dev.zoo.dev
BASE_URL=https://api.dev.zoo.dev
VITE_KC_SITE_BASE_URL=https://dev.zoo.dev VITE_KC_SITE_BASE_URL=https://dev.zoo.dev
VITE_KC_SITE_APP_URL=https://app.dev.zoo.dev
VITE_KC_SKIP_AUTH=false VITE_KC_SKIP_AUTH=false
VITE_KC_CONNECTION_TIMEOUT_MS=5000 VITE_KC_CONNECTION_TIMEOUT_MS=5000
# ONLY add your token in .env.development.local if you want to skip auth, otherwise this token takes precedence! # ONLY add your token in .env.development.local if you want to skip auth, otherwise this token takes precedence!

View File

@ -1,7 +1,5 @@
NODE_ENV=production
VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands VITE_KC_API_WS_MODELING_URL=wss://api.zoo.dev/ws/modeling/commands
VITE_KC_API_BASE_URL=https://api.zoo.dev VITE_KC_API_BASE_URL=https://api.zoo.dev
VITE_KC_SITE_BASE_URL=https://zoo.dev VITE_KC_SITE_BASE_URL=https://zoo.dev
VITE_KC_SITE_APP_URL=https://app.zoo.dev
VITE_KC_SKIP_AUTH=false VITE_KC_SKIP_AUTH=false
VITE_KC_CONNECTION_TIMEOUT_MS=15000 VITE_KC_CONNECTION_TIMEOUT_MS=15000

View File

@ -6,36 +6,21 @@
"plugins": [ "plugins": [
"css-modules", "css-modules",
"jest", "jest",
"jsx-a11y",
"react", "react",
"react-hooks",
"suggest-no-throw", "suggest-no-throw",
"testing-library",
"@typescript-eslint" "@typescript-eslint"
], ],
"extends": [ "extends": [
"plugin:css-modules/recommended", "plugin:css-modules/recommended"
"plugin:jsx-a11y/recommended",
"plugin:react-hooks/recommended"
], ],
"rules": { "rules": {
"@typescript-eslint/no-floating-promises": "error", "@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": "error", "@typescript-eslint/no-misused-promises": "error",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-autofocus": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"no-restricted-globals": [ "no-restricted-globals": [
"error", "error",
{ {
"name": "isNaN", "name": "isNaN",
"message": "Use Number.isNaN() instead." "message": "Use Number.isNaN() instead."
},
],
"no-restricted-syntax": [
"error",
{
"selector": "CallExpression[callee.object.name='Array'][callee.property.name='isArray']",
"message": "Use isArray() in lib/utils.ts instead of Array.isArray()."
} }
], ],
"semi": [ "semi": [
@ -48,9 +33,6 @@
"overrides": [ "overrides": [
{ {
"files": ["e2e/**/*.ts"], // Update the pattern based on your file structure "files": ["e2e/**/*.ts"], // Update the pattern based on your file structure
"extends": [
"plugin:testing-library/react"
],
"rules": { "rules": {
"suggest-no-throw/suggest-no-throw": "off", "suggest-no-throw/suggest-no-throw": "off",
"testing-library/prefer-screen-queries": "off", "testing-library/prefer-screen-queries": "off",
@ -59,9 +41,6 @@
}, },
{ {
"files": ["src/**/*.test.ts"], "files": ["src/**/*.test.ts"],
"extends": [
"plugin:testing-library/react"
],
"rules": { "rules": {
"suggest-no-throw/suggest-no-throw": "off", "suggest-no-throw/suggest-no-throw": "off",
} }

13
.gitattributes vendored
View File

@ -1,13 +0,0 @@
# Set default behavior to automatically normalize line endings.
* text=auto
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
# in Windows via a file share from Linux, the scripts will work.
*.{cmd,[cC][mM][dD]} text working-tree-encoding=UTF-16LE eol=CRLF
*.{bat,[bB][aA][tT]} text working-tree-encoding=UTF-16LE eol=CRLF
*.{ics,[iI][cC][sS]} text working-tree-encoding=UTF-16LE eol=CRLF
*.{ps1,[iP][sS][1]} text working-tree-encoding=UTF-16LE eol=CRLF
# Force bash scripts to always use LF line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lfol=lf

View File

@ -21,7 +21,7 @@ if [[ ! -f "test-results/.last-run.json" ]]; then
fi fi
retry=1 retry=1
max_retrys=1 max_retrys=5
# retry failed tests, doing our own retries because using inbuilt playwright retries causes connection issues # retry failed tests, doing our own retries because using inbuilt playwright retries causes connection issues
while [[ $retry -le $max_retrys ]]; do while [[ $retry -le $max_retrys ]]; do

View File

@ -6,29 +6,23 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: 'npm' # See documentation for possible values - package-ecosystem: 'npm' # See documentation for possible values
directories: directory: '/' # Location of package manifests
- '/'
- '/packages/codemirror-lang-kcl/'
- '/packages/codemirror-lsp-client/'
schedule: schedule:
interval: weekly interval: 'weekly'
day: monday
reviewers: reviewers:
- franknoirot - franknoirot
- irev-dev - irev-dev
- package-ecosystem: 'github-actions' # See documentation for possible values - package-ecosystem: 'github-actions' # See documentation for possible values
directory: '/' # Location of package manifests directory: '/' # Location of package manifests
schedule: schedule:
interval: weekly interval: 'weekly'
day: monday
reviewers: reviewers:
- adamchalmers - adamchalmers
- jessfraz - jessfraz
- package-ecosystem: 'cargo' # See documentation for possible values - package-ecosystem: 'cargo' # See documentation for possible values
directory: '/src/wasm-lib/' # Location of package manifests directory: '/src/wasm-lib/' # Location of package manifests
schedule: schedule:
interval: weekly interval: 'weekly'
day: monday
reviewers: reviewers:
- adamchalmers - adamchalmers
- jessfraz - jessfraz
@ -36,6 +30,3 @@ updates:
serde-dependencies: serde-dependencies:
patterns: patterns:
- "serde*" - "serde*"
wasm-bindgen-deps:
patterns:
- "wasm-bindgen*"

View File

@ -27,7 +27,7 @@ jobs:
# Upload the WASM bundle as an artifact # Upload the WASM bundle as an artifact
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v3
with: with:
name: wasm-bundle name: wasm-bundle
path: src/wasm-lib/pkg path: src/wasm-lib/pkg

View File

@ -126,13 +126,9 @@ jobs:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: 'yarn' # Set this to npm, yarn or pnpm. cache: 'yarn' # Set this to npm, yarn or pnpm.
- name: yarn install - run: yarn install
# Windows is picky sometimes and fails on fetch. Step takes about ~30s
uses: nick-fields/retry@v3.0.0 - run: yarn tronb:vite
with:
timeout_minutes: 2
max_attempts: 3
command: yarn install
- name: Prepare certificate and variables (Windows only) - name: Prepare certificate and variables (Windows only)
if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }} if: ${{ (env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true') && matrix.os == 'windows-2022' }}
@ -163,8 +159,8 @@ jobs:
- name: Build the app (debug) - name: Build the app (debug)
if: ${{ env.IS_RELEASE == 'false' && env.IS_NIGHTLY == 'false' }} if: ${{ env.IS_RELEASE == 'false' && env.IS_NIGHTLY == 'false' }}
# electron-builder doesn't have a concept of release vs debug, # electron-builder doesn't have a concept of release vs debug,
# this is just not doing any codesign or release yml generation, and points to dev infra # this is just not doing any codesign or release yml generation
run: yarn tronb:package:dev run: yarn electron-builder --config
- name: Build the app (release) - name: Build the app (release)
if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_RELEASE == 'true' || env.IS_NIGHTLY == 'true' }}
@ -183,7 +179,7 @@ jobs:
with: with:
timeout_minutes: 10 timeout_minutes: 10
max_attempts: 3 max_attempts: 3
command: yarn tronb:package:prod command: yarn electron-builder --config --publish always
- name: List artifacts in out/ - name: List artifacts in out/
run: ls -R out run: ls -R out
@ -244,7 +240,7 @@ jobs:
with: with:
timeout_minutes: 10 timeout_minutes: 10
max_attempts: 3 max_attempts: 3
command: yarn tronb:package:prod command: yarn electron-builder --config --publish always
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
if: ${{ env.IS_RELEASE == 'true' }} if: ${{ env.IS_RELEASE == 'true' }}
@ -388,19 +384,19 @@ jobs:
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
if: ${{ env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_NIGHTLY == 'true' }}
uses: 'google-github-actions/auth@v2.1.8' uses: 'google-github-actions/auth@v2.1.7'
with: with:
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}' credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
- name: Set up Google Cloud SDK - name: Set up Google Cloud SDK
if: ${{ env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_NIGHTLY == 'true' }}
uses: google-github-actions/setup-gcloud@v2.1.4 uses: google-github-actions/setup-gcloud@v2.1.2
with: with:
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }} project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
- name: Upload nightly files to public bucket - name: Upload nightly files to public bucket
if: ${{ env.IS_NIGHTLY == 'true' }} if: ${{ env.IS_NIGHTLY == 'true' }}
uses: google-github-actions/upload-cloud-storage@v2.2.2 uses: google-github-actions/upload-cloud-storage@v2.2.1
with: with:
path: out path: out
glob: '*' glob: '*'

44
.github/workflows/cargo-bench.yml vendored Normal file
View File

@ -0,0 +1,44 @@
on:
push:
branches:
- main
paths:
- '**.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/rust-toolchain.toml'
- .github/workflows/cargo-bench.yml
pull_request:
paths:
- '**.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/rust-toolchain.toml'
- .github/workflows/cargo-bench.yml
workflow_dispatch:
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: cargo bench
jobs:
cargo-bench:
name: Benchmark with iai
runs-on: ubuntu-latest-8-cores
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: |
cargo install cargo-criterion
sudo apt update
sudo apt install -y valgrind
- name: Rust Cache
uses: Swatinem/rust-cache@v2.6.1
- name: Benchmark kcl library
shell: bash
run: |-
cd src/wasm-lib/kcl; cargo bench --all-features -- iai
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}

View File

@ -46,7 +46,7 @@ jobs:
shell: bash shell: bash
run: |- run: |-
cd "${{ matrix.dir }}" cd "${{ matrix.dir }}"
cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --test-threads=1 --retries=2 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log cargo llvm-cov nextest --workspace --lcov --output-path lcov.info --test-threads=1 --no-fail-fast -P ci 2>&1 | tee /tmp/github-actions.log
env: env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}} KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
RUST_MIN_STACK: 10485760000 RUST_MIN_STACK: 10485760000

View File

@ -26,21 +26,11 @@ jobs:
const issue_number = context.payload.pull_request.number; const issue_number = context.payload.pull_request.number;
const owner = context.repo.owner; const owner = context.repo.owner;
const repo = context.repo.repo; const repo = context.repo.repo;
const { data: comments } = await github.rest.issues.listComments({ // Post a comment on the PR
await github.rest.issues.createComment({
owner, owner,
repo, repo,
issue_number issue_number,
}); body: message,
});
const commentExists = comments.some(comment => comment.body === message);
if (!commentExists) {
// Post a comment on the PR
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body: message,
});
}

View File

@ -1,32 +0,0 @@
name: CodeMirror Lang KCL
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
yarn-unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn install
working-directory: packages/codemirror-lang-kcl
- run: yarn tsc
working-directory: packages/codemirror-lang-kcl
- name: run unit tests
run: yarn test
working-directory: packages/codemirror-lang-kcl

View File

@ -3,6 +3,7 @@ on:
push: push:
branches: [ main ] branches: [ main ]
pull_request: pull_request:
branches: [ main ]
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@ -45,15 +46,7 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
needs: check-rust-changes needs: check-rust-changes
steps: steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
@ -130,9 +123,9 @@ jobs:
if: steps.download-wasm.outcome == 'failure' if: steps.download-wasm.outcome == 'failure'
shell: bash shell: bash
run: yarn build:wasm run: yarn build:wasm
- name: build web - name: build electron
shell: bash shell: bash
run: yarn tronb:vite:dev run: yarn tron:package
- name: Run ubuntu/chrome snapshots - name: Run ubuntu/chrome snapshots
if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 }} if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 }}
shell: bash shell: bash
@ -160,11 +153,11 @@ jobs:
continue-on-error: true continue-on-error: true
run: rm -r test-results run: rm -r test-results
- name: check for changes - name: check for changes
if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 && github.ref != 'refs/heads/main' }} if: ${{ matrix.os == 'namespace-profile-ubuntu-8-cores' && matrix.shardIndex == 1 }}
shell: bash shell: bash
id: git-check id: git-check
run: | run: |
git add e2e/playwright/snapshot-tests.spec.ts-snapshots git add .
if git status | grep -q "Changes to be committed" if git status | grep -q "Changes to be committed"
then echo "modified=true" >> $GITHUB_OUTPUT then echo "modified=true" >> $GITHUB_OUTPUT
else echo "modified=false" >> $GITHUB_OUTPUT else echo "modified=false" >> $GITHUB_OUTPUT
@ -173,14 +166,14 @@ jobs:
if: steps.git-check.outputs.modified == 'true' if: steps.git-check.outputs.modified == 'true'
shell: bash shell: bash
run: | run: |
git add e2e/playwright/snapshot-tests.spec.ts-snapshots git add .
git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]" git config --local user.name "github-actions[bot]"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
git fetch origin git fetch origin
echo ${{ github.head_ref }} echo ${{ github.head_ref }}
git checkout ${{ github.head_ref }} git checkout ${{ github.head_ref }}
git commit -m "A snapshot a day keeps the bugs away! 📷🐛 (OS: ${{matrix.os}})" || true git commit -am "A snapshot a day keeps the bugs away! 📷🐛 (OS: ${{matrix.os}})" || true
git push git push
git push origin ${{ github.head_ref }} git push origin ${{ github.head_ref }}
# only upload artifacts if there's actually changes # only upload artifacts if there's actually changes
@ -200,11 +193,9 @@ jobs:
- name: Run playwright/electron flow (with retries) - name: Run playwright/electron flow (with retries)
id: retry id: retry
if: ${{ !cancelled() && (success() || failure()) }} if: ${{ !cancelled() && (success() || failure()) }}
uses: nick-fields/retry@v3.0.0 shell: bash
with: run: |
command: .github/ci-cd-scripts/playwright-electron.sh ${{matrix.shardIndex}} ${{matrix.shardTotal}} ${{matrix.os}} .github/ci-cd-scripts/playwright-electron.sh ${{matrix.shardIndex}} ${{matrix.shardTotal}} ${{matrix.os}}
timeout_minutes: 30
max_attempts: 25
env: env:
CI: true CI: true
FAIL_ON_CONSOLE_ERRORS: true FAIL_ON_CONSOLE_ERRORS: true

View File

@ -108,17 +108,17 @@ jobs:
run: yarn files:set-notes run: yarn files:set-notes
- name: Authenticate to Google Cloud - name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v2.1.8' uses: 'google-github-actions/auth@v2.1.7'
with: with:
credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}' credentials_json: '${{ secrets.GOOGLE_CLOUD_DL_SA }}'
- name: Set up Google Cloud SDK - name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2.1.4 uses: google-github-actions/setup-gcloud@v2.1.2
with: with:
project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }} project_id: ${{ env.GOOGLE_CLOUD_PROJECT_ID }}
- name: Upload release files to public bucket - name: Upload release files to public bucket
uses: google-github-actions/upload-cloud-storage@v2.2.2 uses: google-github-actions/upload-cloud-storage@v2.2.1
with: with:
path: out path: out
glob: '*' glob: '*'

6
.gitignore vendored
View File

@ -25,7 +25,6 @@ yarn-error.log*
.idea .idea
.vscode .vscode
.helix
src/wasm-lib/.idea src/wasm-lib/.idea
src/wasm-lib/.vscode src/wasm-lib/.vscode
@ -41,14 +40,11 @@ e2e/playwright/playwright-secrets.env
e2e/playwright/temp1.png e2e/playwright/temp1.png
e2e/playwright/temp2.png e2e/playwright/temp2.png
e2e/playwright/temp3.png e2e/playwright/temp3.png
# this will be overridden for specific directories
e2e/playwright/**/*.png
# exports from snapshot-tests.spec.ts "exports of each format should work" # exports from snapshot-tests.spec.ts "exports of each format should work"
e2e/playwright/export-snapshots/* e2e/playwright/export-snapshots/*
!e2e/playwright/export-snapshots/*.png !e2e/playwright/export-snapshots/*.png
!e2e/playwright/snapshot-tests.spec.ts-snapshots/*.png
/kcl-samples
/test-results/ /test-results/
/playwright-report/ /playwright-report/
/blob-report/ /blob-report/

View File

@ -1,2 +0,0 @@
[editor]
auto-format = true

View File

@ -1,10 +0,0 @@
[language-server.eslint]
args = ["--stdio"]
command = "vscode-eslint-language-server"
[[language]]
name = "typescript"
auto-format = true
formatter = { command = "node_modules/.bin/prettier", args = ["--parser", "typescript"] }
language-servers = [ { name = "eslint", only-features = [ "diagnostics" ] }, "typescript-language-server" ]

View File

@ -101,7 +101,7 @@ This will start the application and hot-reload on changes.
Devtools can be opened with the usual Cmd-Opt-I (Mac) or Ctrl-Shift-I (Linux and Windows). Devtools can be opened with the usual Cmd-Opt-I (Mac) or Ctrl-Shift-I (Linux and Windows).
To build with electron-builder, run `yarn tronb:package:dev` (or `yarn tronb:package:prod` to point to the .env.production variables) To build, run `yarn tron:package`.
## Checking out commits / Bisecting ## Checking out commits / Bisecting

View File

@ -1,15 +0,0 @@
---
title: "HALF_TURN"
excerpt: ""
layout: manual
---
```js
HALF_TURN: number(deg) = 180deg
```

View File

@ -24,3 +24,5 @@ once fixed in engine will just start working here with no language changes.
chamfer cases work currently. chamfer cases work currently.
- **Appearance**: Changing the appearance on a loft does not work. - **Appearance**: Changing the appearance on a loft does not work.
- **Helix**: Currently sweeping a helix does not work.

View File

@ -1,15 +0,0 @@
---
title: "QUARTER_TURN"
excerpt: ""
layout: manual
---
```js
QUARTER_TURN: number(deg) = 90deg
```

View File

@ -1,15 +0,0 @@
---
title: "THREE_QUARTER_TURN"
excerpt: ""
layout: manual
---
```js
THREE_QUARTER_TURN: number(deg) = 270deg
```

View File

@ -1,15 +0,0 @@
---
title: "ZERO"
excerpt: ""
layout: manual
---
```js
ZERO: number = 0
```

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@ assert(data: bool, message: string) -> ()
### Returns ### Returns
`()` `()`
### Examples ### Examples

View File

@ -24,7 +24,7 @@ assertEqual(left: number, right: number, epsilon: number, message: string) -> ()
### Returns ### Returns
`()` `()`
### Examples ### Examples

View File

@ -23,7 +23,7 @@ assertGreaterThan(left: number, right: number, message: string) -> ()
### Returns ### Returns
`()` `()`
### Examples ### Examples

View File

@ -23,7 +23,7 @@ assertGreaterThanOrEq(left: number, right: number, message: string) -> ()
### Returns ### Returns
`()` `()`
### Examples ### Examples

View File

@ -23,7 +23,7 @@ assertLessThan(left: number, right: number, message: string) -> ()
### Returns ### Returns
`()` `()`
### Examples ### Examples

View File

@ -23,7 +23,7 @@ assertLessThanOrEq(left: number, right: number, message: string) -> ()
### Returns ### Returns
`()` `()`
### Examples ### Examples

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ cm() -> number
### Returns ### Returns
`number` `number`
### Examples ### Examples

File diff suppressed because one or more lines are too long

View File

@ -1,15 +0,0 @@
---
title: "HALF_TURN"
excerpt: ""
layout: manual
---
```js
HALF_TURN: number(deg) = 180deg
```

File diff suppressed because one or more lines are too long

View File

@ -1,15 +0,0 @@
---
title: "QUARTER_TURN"
excerpt: ""
layout: manual
---
```js
QUARTER_TURN: number(deg) = 90deg
```

File diff suppressed because one or more lines are too long

View File

@ -1,15 +0,0 @@
---
title: "THREE_QUARTER_TURN"
excerpt: ""
layout: manual
---
```js
THREE_QUARTER_TURN: number(deg) = 270deg
```

View File

@ -1,15 +0,0 @@
---
title: "ZERO"
excerpt: ""
layout: manual
---
```js
ZERO: number = 0
```

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,15 +0,0 @@
---
title: "std::prelude::HALF_TURN"
excerpt: ""
layout: manual
---
```js
std::prelude::HALF_TURN: number(deg) = 180deg
```

View File

@ -1,15 +0,0 @@
---
title: "std::prelude::QUARTER_TURN"
excerpt: ""
layout: manual
---
```js
std::prelude::QUARTER_TURN: number(deg) = 90deg
```

View File

@ -1,15 +0,0 @@
---
title: "std::prelude::THREE_QUARTER_TURN"
excerpt: ""
layout: manual
---
```js
std::prelude::THREE_QUARTER_TURN: number(deg) = 270deg
```

View File

@ -1,15 +0,0 @@
---
title: "std::prelude::ZERO"
excerpt: ""
layout: manual
---
```js
std::prelude::ZERO: number = 0
```

48
docs/kcl/cos.md Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ ft() -> number
### Returns ### Returns
`number` `number`
### Examples ### Examples

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ inch() -> number
### Returns ### Returns
`number` `number`
### Examples ### Examples

View File

@ -9,117 +9,113 @@ layout: manual
* [Types](kcl/types) * [Types](kcl/types)
* [Modules](kcl/modules) * [Modules](kcl/modules)
* [Known Issues](kcl/KNOWN-ISSUES) * [Known Issues](kcl/KNOWN-ISSUES)
* **`std`** * [`abs`](kcl/abs)
* [`abs`](kcl/abs) * [`acos`](kcl/acos)
* [`acos`](kcl/acos) * [`angleToMatchLengthX`](kcl/angleToMatchLengthX)
* [`angleToMatchLengthX`](kcl/angleToMatchLengthX) * [`angleToMatchLengthY`](kcl/angleToMatchLengthY)
* [`angleToMatchLengthY`](kcl/angleToMatchLengthY) * [`angledLine`](kcl/angledLine)
* [`angledLine`](kcl/angledLine) * [`angledLineOfXLength`](kcl/angledLineOfXLength)
* [`angledLineOfXLength`](kcl/angledLineOfXLength) * [`angledLineOfYLength`](kcl/angledLineOfYLength)
* [`angledLineOfYLength`](kcl/angledLineOfYLength) * [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects) * [`angledLineToX`](kcl/angledLineToX)
* [`angledLineToX`](kcl/angledLineToX) * [`angledLineToY`](kcl/angledLineToY)
* [`angledLineToY`](kcl/angledLineToY) * [`appearance`](kcl/appearance)
* [`appearance`](kcl/appearance) * [`arc`](kcl/arc)
* [`arc`](kcl/arc) * [`arcTo`](kcl/arcTo)
* [`arcTo`](kcl/arcTo) * [`asin`](kcl/asin)
* [`asin`](kcl/asin) * [`assert`](kcl/assert)
* [`assert`](kcl/assert) * [`assertEqual`](kcl/assertEqual)
* [`assertEqual`](kcl/assertEqual) * [`assertGreaterThan`](kcl/assertGreaterThan)
* [`assertGreaterThan`](kcl/assertGreaterThan) * [`assertGreaterThanOrEq`](kcl/assertGreaterThanOrEq)
* [`assertGreaterThanOrEq`](kcl/assertGreaterThanOrEq) * [`assertLessThan`](kcl/assertLessThan)
* [`assertLessThan`](kcl/assertLessThan) * [`assertLessThanOrEq`](kcl/assertLessThanOrEq)
* [`assertLessThanOrEq`](kcl/assertLessThanOrEq) * [`atan`](kcl/atan)
* [`atan`](kcl/atan) * [`atan2`](kcl/atan2)
* [`atan2`](kcl/atan2) * [`bezierCurve`](kcl/bezierCurve)
* [`bezierCurve`](kcl/bezierCurve) * [`ceil`](kcl/ceil)
* [`ceil`](kcl/ceil) * [`chamfer`](kcl/chamfer)
* [`chamfer`](kcl/chamfer) * [`circle`](kcl/circle)
* [`circle`](kcl/circle) * [`circleThreePoint`](kcl/circleThreePoint)
* [`circleThreePoint`](kcl/circleThreePoint) * [`close`](kcl/close)
* [`close`](kcl/close) * [`cm`](kcl/cm)
* [`cm`](kcl/cm) * [`cos`](kcl/cos)
* [`extrude`](kcl/extrude) * [`e`](kcl/e)
* [`fillet`](kcl/fillet) * [`extrude`](kcl/extrude)
* [`floor`](kcl/floor) * [`fillet`](kcl/fillet)
* [`ft`](kcl/ft) * [`floor`](kcl/floor)
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge) * [`ft`](kcl/ft)
* [`getOppositeEdge`](kcl/getOppositeEdge) * [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge) * [`getOppositeEdge`](kcl/getOppositeEdge)
* [`helix`](kcl/helix) * [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
* [`helixRevolutions`](kcl/helixRevolutions) * [`helix`](kcl/helix)
* [`hole`](kcl/hole) * [`helixRevolutions`](kcl/helixRevolutions)
* [`hollow`](kcl/hollow) * [`hole`](kcl/hole)
* [`inch`](kcl/inch) * [`hollow`](kcl/hollow)
* [`lastSegX`](kcl/lastSegX) * [`import`](kcl/import)
* [`lastSegY`](kcl/lastSegY) * [`inch`](kcl/inch)
* [`legAngX`](kcl/legAngX) * [`int`](kcl/int)
* [`legAngY`](kcl/legAngY) * [`lastSegX`](kcl/lastSegX)
* [`legLen`](kcl/legLen) * [`lastSegY`](kcl/lastSegY)
* [`line`](kcl/line) * [`legAngX`](kcl/legAngX)
* [`ln`](kcl/ln) * [`legAngY`](kcl/legAngY)
* [`loft`](kcl/loft) * [`legLen`](kcl/legLen)
* [`log`](kcl/log) * [`line`](kcl/line)
* [`log10`](kcl/log10) * [`lineTo`](kcl/lineTo)
* [`log2`](kcl/log2) * [`ln`](kcl/ln)
* [`m`](kcl/m) * [`loft`](kcl/loft)
* [`map`](kcl/map) * [`log`](kcl/log)
* [`max`](kcl/max) * [`log10`](kcl/log10)
* [`min`](kcl/min) * [`log2`](kcl/log2)
* [`mirror2d`](kcl/mirror2d) * [`m`](kcl/m)
* [`mm`](kcl/mm) * [`map`](kcl/map)
* [`offsetPlane`](kcl/offsetPlane) * [`max`](kcl/max)
* [`patternCircular2d`](kcl/patternCircular2d) * [`min`](kcl/min)
* [`patternCircular3d`](kcl/patternCircular3d) * [`mirror2d`](kcl/mirror2d)
* [`patternLinear2d`](kcl/patternLinear2d) * [`mm`](kcl/mm)
* [`patternLinear3d`](kcl/patternLinear3d) * [`offsetPlane`](kcl/offsetPlane)
* [`patternTransform`](kcl/patternTransform) * [`patternCircular2d`](kcl/patternCircular2d)
* [`patternTransform2d`](kcl/patternTransform2d) * [`patternCircular3d`](kcl/patternCircular3d)
* [`polar`](kcl/polar) * [`patternLinear2d`](kcl/patternLinear2d)
* [`polygon`](kcl/polygon) * [`patternLinear3d`](kcl/patternLinear3d)
* [`pop`](kcl/pop) * [`patternTransform`](kcl/patternTransform)
* [`pow`](kcl/pow) * [`patternTransform2d`](kcl/patternTransform2d)
* [`profileStart`](kcl/profileStart) * [`pi`](kcl/pi)
* [`profileStartX`](kcl/profileStartX) * [`polar`](kcl/polar)
* [`profileStartY`](kcl/profileStartY) * [`polygon`](kcl/polygon)
* [`push`](kcl/push) * [`pop`](kcl/pop)
* [`reduce`](kcl/reduce) * [`pow`](kcl/pow)
* [`rem`](kcl/rem) * [`profileStart`](kcl/profileStart)
* [`revolve`](kcl/revolve) * [`profileStartX`](kcl/profileStartX)
* [`round`](kcl/round) * [`profileStartY`](kcl/profileStartY)
* [`segAng`](kcl/segAng) * [`push`](kcl/push)
* [`segEnd`](kcl/segEnd) * [`reduce`](kcl/reduce)
* [`segEndX`](kcl/segEndX) * [`rem`](kcl/rem)
* [`segEndY`](kcl/segEndY) * [`revolve`](kcl/revolve)
* [`segLen`](kcl/segLen) * [`round`](kcl/round)
* [`segStart`](kcl/segStart) * [`segAng`](kcl/segAng)
* [`segStartX`](kcl/segStartX) * [`segEnd`](kcl/segEnd)
* [`segStartY`](kcl/segStartY) * [`segEndX`](kcl/segEndX)
* [`shell`](kcl/shell) * [`segEndY`](kcl/segEndY)
* [`sqrt`](kcl/sqrt) * [`segLen`](kcl/segLen)
* [`startProfileAt`](kcl/startProfileAt) * [`segStart`](kcl/segStart)
* [`startSketchOn`](kcl/startSketchOn) * [`segStartX`](kcl/segStartX)
* [`sweep`](kcl/sweep) * [`segStartY`](kcl/segStartY)
* [`tangentToEnd`](kcl/tangentToEnd) * [`shell`](kcl/shell)
* [`tangentialArc`](kcl/tangentialArc) * [`sin`](kcl/sin)
* [`tangentialArcTo`](kcl/tangentialArcTo) * [`sqrt`](kcl/sqrt)
* [`tangentialArcToRelative`](kcl/tangentialArcToRelative) * [`startProfileAt`](kcl/startProfileAt)
* [`toDegrees`](kcl/toDegrees) * [`startSketchOn`](kcl/startSketchOn)
* [`toRadians`](kcl/toRadians) * [`sweep`](kcl/sweep)
* [`xLine`](kcl/xLine) * [`tan`](kcl/tan)
* [`xLineTo`](kcl/xLineTo) * [`tangentToEnd`](kcl/tangentToEnd)
* [`yLine`](kcl/yLine) * [`tangentialArc`](kcl/tangentialArc)
* [`yLineTo`](kcl/yLineTo) * [`tangentialArcTo`](kcl/tangentialArcTo)
* [`yd`](kcl/yd) * [`tangentialArcToRelative`](kcl/tangentialArcToRelative)
* **`std::math`** * [`tau`](kcl/tau)
* [`E`](kcl/const_std-math-E) * [`toDegrees`](kcl/toDegrees)
* [`PI`](kcl/const_std-math-PI) * [`toRadians`](kcl/toRadians)
* [`TAU`](kcl/const_std-math-TAU) * [`xLine`](kcl/xLine)
* [`cos`](kcl/std-math-cos) * [`xLineTo`](kcl/xLineTo)
* [`sin`](kcl/std-math-sin) * [`yLine`](kcl/yLine)
* [`tan`](kcl/std-math-tan) * [`yLineTo`](kcl/yLineTo)
* **`std::prelude`** * [`yd`](kcl/yd)
* [`HALF_TURN`](kcl/const_std-prelude-HALF_TURN)
* [`QUARTER_TURN`](kcl/const_std-prelude-QUARTER_TURN)
* [`THREE_QUARTER_TURN`](kcl/const_std-prelude-THREE_QUARTER_TURN)
* [`ZERO`](kcl/const_std-prelude-ZERO)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ legAngX(hypotenuse: number, leg: number) -> number
### Returns ### Returns
`number` `number`
### Examples ### Examples

View File

@ -26,7 +26,7 @@ legAngY(hypotenuse: number, leg: number) -> number
### Returns ### Returns
`number` `number`
### Examples ### Examples

View File

@ -26,7 +26,7 @@ legLen(hypotenuse: number, leg: number) -> number
### Returns ### Returns
`number` `number`
### Examples ### Examples

File diff suppressed because one or more lines are too long

44
docs/kcl/lineTo.md Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,7 @@ m() -> number
### Returns ### Returns
`number` `number`
### Examples ### Examples

View File

@ -9,7 +9,7 @@ Apply a function to every element of a list.
Given a list like `[a, b, c]`, and a function like `f`, returns `[f(a), f(b), f(c)]` Given a list like `[a, b, c]`, and a function like `f`, returns `[f(a), f(b), f(c)]`
```js ```js
map(array: [KclValue], map_fn: FunctionSource) -> [KclValue] map(array: [KclValue], map_fn: FunctionParam) -> [KclValue]
``` ```
@ -18,11 +18,11 @@ map(array: [KclValue], map_fn: FunctionSource) -> [KclValue]
| Name | Type | Description | Required | | Name | Type | Description | Required |
|----------|------|-------------|----------| |----------|------|-------------|----------|
| `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | | Yes | | `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | | Yes |
| `map_fn` | `FunctionSource` | | Yes | | `map_fn` | `FunctionParam` | | Yes |
### Returns ### Returns
[`[KclValue]`](/docs/kcl/types/KclValue) [`[KclValue]`](/docs/kcl/types/KclValue)
### Examples ### Examples

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More