@aini_ai_cody/icons 0.0.1 → 0.0.3
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/README.md +0 -4
- package/dist/cody-icons.json +5 -0
- package/dist/cody-icons.svg +1 -0
- package/dist/codyicon.css +713 -0
- package/dist/codyicon.csv +531 -0
- package/dist/codyicon.html +10904 -0
- package/dist/codyicon.svg +1 -0
- package/dist/codyicon.ttf +0 -0
- package/dist/codyiconsLibrary.ts +635 -0
- package/{src/template → dist}/mapping.json +4 -1
- package/{src/template → dist}/metadata.json +27 -1
- package/package.json +26 -2
- package/.devcontainer/Dockerfile +0 -17
- package/.devcontainer/devcontainer.json +0 -18
- package/.fantasticonrc.js +0 -43
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -31
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/icon-request.md +0 -20
- package/.github/workflows/build.yml +0 -32
- package/.github/workflows/codeql-analysis.yml +0 -71
- package/.github/workflows/gh-pages.yml +0 -61
- package/.github/workflows/release.yml +0 -65
- package/.husky/pre-commit +0 -1
- package/.vscode/settings.json +0 -6
- package/.vscode/tasks.json +0 -19
- package/_iconCloud/categories.csv +0 -517
- package/_iconCloud/categories.transforms.json +0 -92
- package/_iconCloud/categories.variables.json +0 -48
- package/_iconCloud/descriptions.csv +0 -517
- package/_iconCloud/descriptions.transforms.json +0 -83
- package/_iconCloud/descriptions.variables.json +0 -47
- package/_iconCloud/keywords.csv +0 -517
- package/_iconCloud/keywords.transforms.json +0 -92
- package/_iconCloud/keywords.variables.json +0 -48
- package/_iconCloud/manifest.json +0 -57
- package/_iconCloud/manifest.transforms.json +0 -368
- package/_iconCloud/manifest.variables.json +0 -149
- package/_iconCloud/metaphors.csv +0 -517
- package/_iconCloud/metaphors.transforms.json +0 -92
- package/_iconCloud/metaphors.variables.json +0 -48
- package/build/pipeline.yml +0 -36
- package/command.txt +0 -0
- package/publish.sh +0 -133
- package/scripts/check-metadata.js +0 -149
- package/scripts/embed-metadata.js +0 -45
- package/scripts/export-to-csv.js +0 -60
- package/scripts/export-to-ts.js +0 -63
- package/scripts/merge-cody.js +0 -92
- package/scripts/reset.js +0 -10
- package/scripts/svg-sprite.js +0 -189
- package/scripts/version-bump.js +0 -166
- package/src/icons/account.svg +0 -1
- package/src/icons/activate-breakpoints.svg +0 -1
- package/src/icons/add-small.svg +0 -1
- package/src/icons/add.svg +0 -1
- package/src/icons/agent.svg +0 -1
- package/src/icons/archive.svg +0 -1
- package/src/icons/arrow-both.svg +0 -1
- package/src/icons/arrow-circle-down.svg +0 -1
- package/src/icons/arrow-circle-left.svg +0 -1
- package/src/icons/arrow-circle-right.svg +0 -1
- package/src/icons/arrow-circle-up.svg +0 -1
- package/src/icons/arrow-down.svg +0 -1
- package/src/icons/arrow-left.svg +0 -1
- package/src/icons/arrow-right.svg +0 -1
- package/src/icons/arrow-small-down.svg +0 -1
- package/src/icons/arrow-small-left.svg +0 -1
- package/src/icons/arrow-small-right.svg +0 -1
- package/src/icons/arrow-small-up.svg +0 -1
- package/src/icons/arrow-swap.svg +0 -1
- package/src/icons/arrow-up.svg +0 -1
- package/src/icons/attach.svg +0 -1
- package/src/icons/azure-devops.svg +0 -1
- package/src/icons/azure.svg +0 -1
- package/src/icons/beaker-stop.svg +0 -1
- package/src/icons/beaker.svg +0 -1
- package/src/icons/bell-dot.svg +0 -1
- package/src/icons/bell-slash-dot.svg +0 -1
- package/src/icons/bell-slash.svg +0 -1
- package/src/icons/bell.svg +0 -1
- package/src/icons/blank.svg +0 -1
- package/src/icons/bold.svg +0 -1
- package/src/icons/book.svg +0 -1
- package/src/icons/bookmark.svg +0 -1
- package/src/icons/bracket-dot.svg +0 -1
- package/src/icons/bracket-error.svg +0 -1
- package/src/icons/briefcase.svg +0 -1
- package/src/icons/broadcast.svg +0 -1
- package/src/icons/browser.svg +0 -1
- package/src/icons/bug.svg +0 -1
- package/src/icons/build.svg +0 -1
- package/src/icons/calendar.svg +0 -1
- package/src/icons/call-incoming.svg +0 -1
- package/src/icons/call-outgoing.svg +0 -1
- package/src/icons/case-sensitive.svg +0 -1
- package/src/icons/chat-sparkle-error.svg +0 -1
- package/src/icons/chat-sparkle-warning.svg +0 -1
- package/src/icons/chat-sparkle.svg +0 -1
- package/src/icons/check-all.svg +0 -1
- package/src/icons/check.svg +0 -1
- package/src/icons/checklist.svg +0 -1
- package/src/icons/chevron-down.svg +0 -1
- package/src/icons/chevron-left.svg +0 -1
- package/src/icons/chevron-right.svg +0 -1
- package/src/icons/chevron-up.svg +0 -1
- package/src/icons/chip.svg +0 -1
- package/src/icons/chrome-close.svg +0 -1
- package/src/icons/chrome-maximize.svg +0 -1
- package/src/icons/chrome-minimize.svg +0 -1
- package/src/icons/chrome-restore.svg +0 -1
- package/src/icons/circle-filled.svg +0 -1
- package/src/icons/circle-large-filled.svg +0 -1
- package/src/icons/circle-large.svg +0 -1
- package/src/icons/circle-slash.svg +0 -1
- package/src/icons/circle-small-filled.svg +0 -1
- package/src/icons/circle-small.svg +0 -1
- package/src/icons/circle.svg +0 -1
- package/src/icons/circuit-board.svg +0 -1
- package/src/icons/clear-all.svg +0 -1
- package/src/icons/clippy.svg +0 -1
- package/src/icons/clockface.svg +0 -1
- package/src/icons/close-all.svg +0 -1
- package/src/icons/close.svg +0 -1
- package/src/icons/cloud-download.svg +0 -1
- package/src/icons/cloud-small.svg +0 -1
- package/src/icons/cloud-upload.svg +0 -1
- package/src/icons/cloud.svg +0 -1
- package/src/icons/code-oss.svg +0 -1
- package/src/icons/code-review.svg +0 -1
- package/src/icons/code.svg +0 -1
- package/src/icons/cody-sample.svg +0 -1
- package/src/icons/coffee.svg +0 -1
- package/src/icons/collapse-all.svg +0 -1
- package/src/icons/collection-small.svg +0 -1
- package/src/icons/collection.svg +0 -1
- package/src/icons/color-mode.svg +0 -1
- package/src/icons/combine.svg +0 -1
- package/src/icons/comment-discussion-quote.svg +0 -1
- package/src/icons/comment-discussion-sparkle.svg +0 -1
- package/src/icons/comment-discussion.svg +0 -1
- package/src/icons/comment-draft.svg +0 -1
- package/src/icons/comment-unresolved.svg +0 -1
- package/src/icons/comment.svg +0 -1
- package/src/icons/compass-active.svg +0 -1
- package/src/icons/compass-dot.svg +0 -1
- package/src/icons/compass.svg +0 -1
- package/src/icons/copilot-blocked.svg +0 -1
- package/src/icons/copilot-error.svg +0 -1
- package/src/icons/copilot-in-progress.svg +0 -1
- package/src/icons/copilot-large.svg +0 -1
- package/src/icons/copilot-not-connected.svg +0 -1
- package/src/icons/copilot-snooze.svg +0 -1
- package/src/icons/copilot-success.svg +0 -1
- package/src/icons/copilot-unavailable.svg +0 -1
- package/src/icons/copilot-warning-large.svg +0 -1
- package/src/icons/copilot-warning.svg +0 -1
- package/src/icons/copilot.svg +0 -1
- package/src/icons/copy.svg +0 -1
- package/src/icons/coverage.svg +0 -1
- package/src/icons/credit-card.svg +0 -1
- package/src/icons/cursor.svg +0 -1
- package/src/icons/dash.svg +0 -1
- package/src/icons/dashboard.svg +0 -1
- package/src/icons/database.svg +0 -1
- package/src/icons/debug-all.svg +0 -1
- package/src/icons/debug-alt-small.svg +0 -1
- package/src/icons/debug-alt.svg +0 -1
- package/src/icons/debug-breakpoint-conditional-unverified.svg +0 -1
- package/src/icons/debug-breakpoint-conditional.svg +0 -1
- package/src/icons/debug-breakpoint-data-unverified.svg +0 -1
- package/src/icons/debug-breakpoint-data.svg +0 -1
- package/src/icons/debug-breakpoint-function-unverified.svg +0 -1
- package/src/icons/debug-breakpoint-function.svg +0 -1
- package/src/icons/debug-breakpoint-log-unverified.svg +0 -1
- package/src/icons/debug-breakpoint-log.svg +0 -1
- package/src/icons/debug-breakpoint-unsupported.svg +0 -1
- package/src/icons/debug-connected.svg +0 -1
- package/src/icons/debug-console.svg +0 -1
- package/src/icons/debug-continue-small.svg +0 -1
- package/src/icons/debug-continue.svg +0 -1
- package/src/icons/debug-coverage.svg +0 -1
- package/src/icons/debug-disconnect.svg +0 -1
- package/src/icons/debug-line-by-line.svg +0 -1
- package/src/icons/debug-pause.svg +0 -1
- package/src/icons/debug-rerun.svg +0 -1
- package/src/icons/debug-restart-frame.svg +0 -1
- package/src/icons/debug-restart.svg +0 -1
- package/src/icons/debug-reverse-continue.svg +0 -1
- package/src/icons/debug-stackframe-active.svg +0 -1
- package/src/icons/debug-stackframe.svg +0 -1
- package/src/icons/debug-start.svg +0 -1
- package/src/icons/debug-step-back.svg +0 -1
- package/src/icons/debug-step-into.svg +0 -1
- package/src/icons/debug-step-out.svg +0 -1
- package/src/icons/debug-step-over.svg +0 -1
- package/src/icons/debug-stop.svg +0 -1
- package/src/icons/debug.svg +0 -1
- package/src/icons/desktop-download.svg +0 -1
- package/src/icons/device-camera-video.svg +0 -1
- package/src/icons/device-camera.svg +0 -1
- package/src/icons/device-mobile.svg +0 -1
- package/src/icons/diff-added.svg +0 -1
- package/src/icons/diff-ignored.svg +0 -1
- package/src/icons/diff-modified.svg +0 -1
- package/src/icons/diff-multiple.svg +0 -1
- package/src/icons/diff-removed.svg +0 -1
- package/src/icons/diff-renamed.svg +0 -1
- package/src/icons/diff-single.svg +0 -1
- package/src/icons/diff.svg +0 -1
- package/src/icons/discard.svg +0 -1
- package/src/icons/download.svg +0 -1
- package/src/icons/edit-code.svg +0 -1
- package/src/icons/edit-session.svg +0 -1
- package/src/icons/edit-sparkle.svg +0 -1
- package/src/icons/edit.svg +0 -1
- package/src/icons/editor-layout.svg +0 -1
- package/src/icons/ellipsis.svg +0 -1
- package/src/icons/empty-window.svg +0 -1
- package/src/icons/eraser.svg +0 -1
- package/src/icons/error-small.svg +0 -1
- package/src/icons/error.svg +0 -1
- package/src/icons/exclude.svg +0 -1
- package/src/icons/expand-all.svg +0 -1
- package/src/icons/export.svg +0 -1
- package/src/icons/extensions-large.svg +0 -1
- package/src/icons/extensions.svg +0 -1
- package/src/icons/eye-closed.svg +0 -1
- package/src/icons/eye.svg +0 -1
- package/src/icons/feedback.svg +0 -1
- package/src/icons/file-binary.svg +0 -1
- package/src/icons/file-code.svg +0 -1
- package/src/icons/file-media.svg +0 -1
- package/src/icons/file-pdf.svg +0 -1
- package/src/icons/file-submodule.svg +0 -1
- package/src/icons/file-symlink-directory.svg +0 -1
- package/src/icons/file-symlink-file.svg +0 -1
- package/src/icons/file-text.svg +0 -1
- package/src/icons/file-zip.svg +0 -1
- package/src/icons/file.svg +0 -1
- package/src/icons/files.svg +0 -1
- package/src/icons/filter-filled.svg +0 -1
- package/src/icons/filter.svg +0 -1
- package/src/icons/flag.svg +0 -1
- package/src/icons/flame.svg +0 -1
- package/src/icons/fold-down.svg +0 -1
- package/src/icons/fold-up.svg +0 -1
- package/src/icons/fold.svg +0 -1
- package/src/icons/folder-active.svg +0 -1
- package/src/icons/folder-library.svg +0 -1
- package/src/icons/folder-opened.svg +0 -1
- package/src/icons/folder.svg +0 -1
- package/src/icons/forward.svg +0 -1
- package/src/icons/game.svg +0 -1
- package/src/icons/gear.svg +0 -1
- package/src/icons/gift.svg +0 -1
- package/src/icons/gist-secret.svg +0 -1
- package/src/icons/gist.svg +0 -1
- package/src/icons/git-branch-changes.svg +0 -1
- package/src/icons/git-branch-conflicts.svg +0 -1
- package/src/icons/git-branch-staged-changes.svg +0 -1
- package/src/icons/git-branch.svg +0 -1
- package/src/icons/git-commit.svg +0 -1
- package/src/icons/git-compare.svg +0 -1
- package/src/icons/git-fetch.svg +0 -1
- package/src/icons/git-merge.svg +0 -1
- package/src/icons/git-pull-request-closed.svg +0 -1
- package/src/icons/git-pull-request-create.svg +0 -1
- package/src/icons/git-pull-request-done.svg +0 -1
- package/src/icons/git-pull-request-draft.svg +0 -1
- package/src/icons/git-pull-request-go-to-changes.svg +0 -1
- package/src/icons/git-pull-request-new-changes.svg +0 -1
- package/src/icons/git-pull-request.svg +0 -1
- package/src/icons/git-stash-apply.svg +0 -1
- package/src/icons/git-stash-pop.svg +0 -1
- package/src/icons/git-stash.svg +0 -1
- package/src/icons/github-action.svg +0 -1
- package/src/icons/github-alt.svg +0 -1
- package/src/icons/github-inverted.svg +0 -1
- package/src/icons/github-project.svg +0 -1
- package/src/icons/github.svg +0 -1
- package/src/icons/globe.svg +0 -1
- package/src/icons/go-to-editing-session.svg +0 -1
- package/src/icons/go-to-file.svg +0 -1
- package/src/icons/go-to-search.svg +0 -1
- package/src/icons/grabber.svg +0 -1
- package/src/icons/graph-left.svg +0 -1
- package/src/icons/graph-line.svg +0 -1
- package/src/icons/graph-scatter.svg +0 -1
- package/src/icons/graph.svg +0 -1
- package/src/icons/gripper.svg +0 -1
- package/src/icons/group-by-ref-type.svg +0 -1
- package/src/icons/heart-filled.svg +0 -1
- package/src/icons/heart.svg +0 -1
- package/src/icons/history.svg +0 -1
- package/src/icons/home.svg +0 -1
- package/src/icons/horizontal-rule.svg +0 -1
- package/src/icons/hubot.svg +0 -1
- package/src/icons/inbox.svg +0 -1
- package/src/icons/indent.svg +0 -1
- package/src/icons/index-zero.svg +0 -1
- package/src/icons/info.svg +0 -1
- package/src/icons/insert.svg +0 -1
- package/src/icons/inspect.svg +0 -1
- package/src/icons/issue-draft.svg +0 -1
- package/src/icons/issue-reopened.svg +0 -1
- package/src/icons/issues.svg +0 -1
- package/src/icons/italic.svg +0 -1
- package/src/icons/jersey.svg +0 -1
- package/src/icons/json.svg +0 -1
- package/src/icons/kebab-vertical.svg +0 -1
- package/src/icons/key.svg +0 -1
- package/src/icons/keyboard-tab-above.svg +0 -1
- package/src/icons/keyboard-tab-below.svg +0 -1
- package/src/icons/keyboard-tab.svg +0 -1
- package/src/icons/law.svg +0 -1
- package/src/icons/layers-active.svg +0 -1
- package/src/icons/layers-dot.svg +0 -1
- package/src/icons/layers.svg +0 -1
- package/src/icons/layout-activitybar-left.svg +0 -1
- package/src/icons/layout-activitybar-right.svg +0 -1
- package/src/icons/layout-centered.svg +0 -1
- package/src/icons/layout-menubar.svg +0 -1
- package/src/icons/layout-panel-center.svg +0 -1
- package/src/icons/layout-panel-dock.svg +0 -1
- package/src/icons/layout-panel-justify.svg +0 -1
- package/src/icons/layout-panel-left.svg +0 -1
- package/src/icons/layout-panel-off.svg +0 -1
- package/src/icons/layout-panel-right.svg +0 -1
- package/src/icons/layout-panel.svg +0 -1
- package/src/icons/layout-sidebar-left-dock.svg +0 -1
- package/src/icons/layout-sidebar-left-off.svg +0 -1
- package/src/icons/layout-sidebar-left.svg +0 -1
- package/src/icons/layout-sidebar-right-dock.svg +0 -1
- package/src/icons/layout-sidebar-right-off.svg +0 -1
- package/src/icons/layout-sidebar-right.svg +0 -1
- package/src/icons/layout-statusbar.svg +0 -1
- package/src/icons/layout.svg +0 -1
- package/src/icons/library.svg +0 -1
- package/src/icons/lightbulb-autofix.svg +0 -1
- package/src/icons/lightbulb-empty.svg +0 -1
- package/src/icons/lightbulb-sparkle.svg +0 -1
- package/src/icons/lightbulb.svg +0 -1
- package/src/icons/link-external.svg +0 -1
- package/src/icons/link.svg +0 -1
- package/src/icons/list-filter.svg +0 -1
- package/src/icons/list-flat.svg +0 -1
- package/src/icons/list-ordered.svg +0 -1
- package/src/icons/list-selection.svg +0 -1
- package/src/icons/list-tree.svg +0 -1
- package/src/icons/list-unordered.svg +0 -1
- package/src/icons/live-share.svg +0 -1
- package/src/icons/loading.svg +0 -1
- package/src/icons/location.svg +0 -1
- package/src/icons/lock-small.svg +0 -1
- package/src/icons/lock.svg +0 -1
- package/src/icons/magnet.svg +0 -1
- package/src/icons/mail-read.svg +0 -1
- package/src/icons/mail.svg +0 -1
- package/src/icons/map-filled.svg +0 -1
- package/src/icons/map-vertical-filled.svg +0 -1
- package/src/icons/map-vertical.svg +0 -1
- package/src/icons/map.svg +0 -1
- package/src/icons/markdown.svg +0 -1
- package/src/icons/mcp.svg +0 -1
- package/src/icons/megaphone.svg +0 -1
- package/src/icons/mention.svg +0 -1
- package/src/icons/menu.svg +0 -1
- package/src/icons/merge-into.svg +0 -1
- package/src/icons/merge.svg +0 -1
- package/src/icons/mic-filled.svg +0 -1
- package/src/icons/mic.svg +0 -1
- package/src/icons/milestone.svg +0 -1
- package/src/icons/mirror.svg +0 -1
- package/src/icons/mortar-board.svg +0 -1
- package/src/icons/move.svg +0 -1
- package/src/icons/multiple-windows.svg +0 -1
- package/src/icons/music.svg +0 -1
- package/src/icons/mute.svg +0 -1
- package/src/icons/new-collection.svg +0 -1
- package/src/icons/new-file.svg +0 -1
- package/src/icons/new-folder.svg +0 -1
- package/src/icons/newline.svg +0 -1
- package/src/icons/no-newline.svg +0 -1
- package/src/icons/note.svg +0 -1
- package/src/icons/notebook-template.svg +0 -1
- package/src/icons/notebook.svg +0 -1
- package/src/icons/octoface.svg +0 -1
- package/src/icons/open-in-product.svg +0 -1
- package/src/icons/open-preview.svg +0 -1
- package/src/icons/organization.svg +0 -1
- package/src/icons/output.svg +0 -1
- package/src/icons/package.svg +0 -1
- package/src/icons/paintcan.svg +0 -1
- package/src/icons/pass-filled.svg +0 -1
- package/src/icons/pass.svg +0 -1
- package/src/icons/percentage.svg +0 -1
- package/src/icons/person-add.svg +0 -1
- package/src/icons/person.svg +0 -1
- package/src/icons/piano.svg +0 -1
- package/src/icons/pie-chart.svg +0 -1
- package/src/icons/pin.svg +0 -1
- package/src/icons/pinned-dirty.svg +0 -1
- package/src/icons/pinned.svg +0 -1
- package/src/icons/play-circle.svg +0 -1
- package/src/icons/play.svg +0 -1
- package/src/icons/plug.svg +0 -1
- package/src/icons/preserve-case.svg +0 -1
- package/src/icons/preview.svg +0 -1
- package/src/icons/primitive-square.svg +0 -1
- package/src/icons/project.svg +0 -1
- package/src/icons/pulse.svg +0 -1
- package/src/icons/python.svg +0 -1
- package/src/icons/question.svg +0 -1
- package/src/icons/quote.svg +0 -1
- package/src/icons/quotes.svg +0 -1
- package/src/icons/radio-tower.svg +0 -1
- package/src/icons/reactions.svg +0 -1
- package/src/icons/record-keys.svg +0 -1
- package/src/icons/record-small.svg +0 -1
- package/src/icons/record.svg +0 -1
- package/src/icons/redo.svg +0 -1
- package/src/icons/references.svg +0 -1
- package/src/icons/refresh.svg +0 -1
- package/src/icons/regex.svg +0 -1
- package/src/icons/remote-explorer.svg +0 -1
- package/src/icons/remote.svg +0 -1
- package/src/icons/remove-small.svg +0 -1
- package/src/icons/remove.svg +0 -1
- package/src/icons/rename.svg +0 -1
- package/src/icons/replace-all.svg +0 -1
- package/src/icons/replace.svg +0 -1
- package/src/icons/reply.svg +0 -1
- package/src/icons/repo-clone.svg +0 -1
- package/src/icons/repo-fetch.svg +0 -1
- package/src/icons/repo-force-push.svg +0 -1
- package/src/icons/repo-forked.svg +0 -1
- package/src/icons/repo-pinned.svg +0 -1
- package/src/icons/repo-pull.svg +0 -1
- package/src/icons/repo-push.svg +0 -1
- package/src/icons/repo-selected.svg +0 -1
- package/src/icons/repo.svg +0 -1
- package/src/icons/report.svg +0 -1
- package/src/icons/request-changes.svg +0 -1
- package/src/icons/robot.svg +0 -1
- package/src/icons/rocket.svg +0 -1
- package/src/icons/root-folder-opened.svg +0 -1
- package/src/icons/root-folder.svg +0 -1
- package/src/icons/rss.svg +0 -1
- package/src/icons/ruby.svg +0 -1
- package/src/icons/run-above.svg +0 -1
- package/src/icons/run-all-coverage.svg +0 -1
- package/src/icons/run-all.svg +0 -1
- package/src/icons/run-below.svg +0 -1
- package/src/icons/run-coverage.svg +0 -1
- package/src/icons/run-errors.svg +0 -1
- package/src/icons/run-with-deps.svg +0 -1
- package/src/icons/save-all.svg +0 -1
- package/src/icons/save-as.svg +0 -1
- package/src/icons/save.svg +0 -1
- package/src/icons/screen-full.svg +0 -1
- package/src/icons/screen-normal.svg +0 -1
- package/src/icons/search-fuzzy.svg +0 -1
- package/src/icons/search-large.svg +0 -1
- package/src/icons/search-sparkle.svg +0 -1
- package/src/icons/search-stop.svg +0 -1
- package/src/icons/search.svg +0 -1
- package/src/icons/send-to-remote-agent.svg +0 -1
- package/src/icons/send.svg +0 -1
- package/src/icons/server-environment.svg +0 -1
- package/src/icons/server-process.svg +0 -1
- package/src/icons/server.svg +0 -1
- package/src/icons/session-in-progress.svg +0 -1
- package/src/icons/settings-gear.svg +0 -1
- package/src/icons/settings.svg +0 -1
- package/src/icons/share.svg +0 -1
- package/src/icons/shield.svg +0 -1
- package/src/icons/sign-in.svg +0 -1
- package/src/icons/sign-out.svg +0 -1
- package/src/icons/skip.svg +0 -1
- package/src/icons/smiley.svg +0 -1
- package/src/icons/snake.svg +0 -1
- package/src/icons/sort-precedence.svg +0 -1
- package/src/icons/source-control.svg +0 -1
- package/src/icons/sparkle-filled.svg +0 -1
- package/src/icons/sparkle.svg +0 -1
- package/src/icons/split-horizontal.svg +0 -1
- package/src/icons/split-vertical.svg +0 -1
- package/src/icons/squirrel.svg +0 -1
- package/src/icons/star-empty.svg +0 -1
- package/src/icons/star-full.svg +0 -1
- package/src/icons/star-half.svg +0 -1
- package/src/icons/stop-circle.svg +0 -1
- package/src/icons/strikethrough.svg +0 -1
- package/src/icons/surround-with.svg +0 -1
- package/src/icons/symbol-array.svg +0 -1
- package/src/icons/symbol-boolean.svg +0 -1
- package/src/icons/symbol-class.svg +0 -1
- package/src/icons/symbol-color.svg +0 -1
- package/src/icons/symbol-constant.svg +0 -1
- package/src/icons/symbol-enum-member.svg +0 -1
- package/src/icons/symbol-enum.svg +0 -1
- package/src/icons/symbol-event.svg +0 -1
- package/src/icons/symbol-field.svg +0 -1
- package/src/icons/symbol-file.svg +0 -1
- package/src/icons/symbol-interface.svg +0 -1
- package/src/icons/symbol-key.svg +0 -1
- package/src/icons/symbol-keyword.svg +0 -1
- package/src/icons/symbol-method-arrow.svg +0 -1
- package/src/icons/symbol-method.svg +0 -1
- package/src/icons/symbol-misc.svg +0 -1
- package/src/icons/symbol-namespace.svg +0 -1
- package/src/icons/symbol-numeric.svg +0 -1
- package/src/icons/symbol-operator.svg +0 -1
- package/src/icons/symbol-parameter.svg +0 -1
- package/src/icons/symbol-property.svg +0 -1
- package/src/icons/symbol-ruler.svg +0 -1
- package/src/icons/symbol-snippet.svg +0 -1
- package/src/icons/symbol-string.svg +0 -1
- package/src/icons/symbol-structure.svg +0 -1
- package/src/icons/symbol-variable.svg +0 -1
- package/src/icons/sync-ignored.svg +0 -1
- package/src/icons/sync.svg +0 -1
- package/src/icons/table.svg +0 -1
- package/src/icons/tag.svg +0 -1
- package/src/icons/target.svg +0 -1
- package/src/icons/tasklist.svg +0 -1
- package/src/icons/telescope.svg +0 -1
- package/src/icons/terminal-bash.svg +0 -1
- package/src/icons/terminal-cmd.svg +0 -1
- package/src/icons/terminal-debian.svg +0 -1
- package/src/icons/terminal-git-bash.svg +0 -1
- package/src/icons/terminal-linux.svg +0 -1
- package/src/icons/terminal-powershell.svg +0 -1
- package/src/icons/terminal-tmux.svg +0 -1
- package/src/icons/terminal-ubuntu.svg +0 -1
- package/src/icons/terminal.svg +0 -1
- package/src/icons/text-size.svg +0 -1
- package/src/icons/thinking.svg +0 -1
- package/src/icons/three-bars.svg +0 -1
- package/src/icons/thumbsdown-filled.svg +0 -1
- package/src/icons/thumbsdown.svg +0 -1
- package/src/icons/thumbsup-filled.svg +0 -1
- package/src/icons/thumbsup.svg +0 -1
- package/src/icons/tools.svg +0 -1
- package/src/icons/trash.svg +0 -1
- package/src/icons/triangle-down.svg +0 -1
- package/src/icons/triangle-left.svg +0 -1
- package/src/icons/triangle-right.svg +0 -1
- package/src/icons/triangle-up.svg +0 -1
- package/src/icons/twitter.svg +0 -1
- package/src/icons/type-hierarchy-sub.svg +0 -1
- package/src/icons/type-hierarchy-super.svg +0 -1
- package/src/icons/type-hierarchy.svg +0 -1
- package/src/icons/unarchive.svg +0 -1
- package/src/icons/unfold.svg +0 -1
- package/src/icons/ungroup-by-ref-type.svg +0 -1
- package/src/icons/unlock.svg +0 -1
- package/src/icons/unmute.svg +0 -1
- package/src/icons/unverified.svg +0 -1
- package/src/icons/variable-group.svg +0 -1
- package/src/icons/verified-filled.svg +0 -1
- package/src/icons/verified.svg +0 -1
- package/src/icons/versions.svg +0 -1
- package/src/icons/vm-active.svg +0 -1
- package/src/icons/vm-connect.svg +0 -1
- package/src/icons/vm-outline.svg +0 -1
- package/src/icons/vm-pending.svg +0 -1
- package/src/icons/vm-running.svg +0 -1
- package/src/icons/vm-small.svg +0 -1
- package/src/icons/vm.svg +0 -1
- package/src/icons/vr.svg +0 -1
- package/src/icons/vscode-insiders.svg +0 -1
- package/src/icons/vscode.svg +0 -1
- package/src/icons/wand.svg +0 -1
- package/src/icons/warning.svg +0 -1
- package/src/icons/watch.svg +0 -1
- package/src/icons/whitespace.svg +0 -1
- package/src/icons/whole-word.svg +0 -1
- package/src/icons/window-active.svg +0 -1
- package/src/icons/window.svg +0 -1
- package/src/icons/word-wrap.svg +0 -1
- package/src/icons/workspace-trusted.svg +0 -1
- package/src/icons/workspace-unknown.svg +0 -1
- package/src/icons/workspace-untrusted.svg +0 -1
- package/src/icons/worktree-small.svg +0 -1
- package/src/icons/worktree.svg +0 -1
- package/src/icons/zoom-in.svg +0 -1
- package/src/icons/zoom-out.svg +0 -1
- package/src/template/cody.json +0 -28
- package/src/template/cody_mapping.json +0 -5
- package/src/template/preview.hbs +0 -833
- package/src/template/styles.hbs +0 -57
- package/svgo.config.js +0 -21
- /package/{src → dist}/cody_icons/cody-new.svg +0 -0
- /package/{src → dist}/cody_icons/cody-sample.svg +0 -0
- /package/{src → dist}/cody_icons/cody-test.svg +0 -0
package/publish.sh
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
usage() {
|
|
5
|
-
cat <<'USAGE'
|
|
6
|
-
Usage:
|
|
7
|
-
./publish.sh [--dry-run] [--publish] [--tag <tag>] [--access <public|restricted>] [--registry <url>] [--otp <code>]
|
|
8
|
-
|
|
9
|
-
Defaults:
|
|
10
|
-
--dry-run Runs all checks and performs `npm publish --dry-run`.
|
|
11
|
-
|
|
12
|
-
Options:
|
|
13
|
-
--publish Actually publish to npm (dangerous). Without this flag, no real publish occurs.
|
|
14
|
-
--tag <tag> npm dist-tag (default: latest)
|
|
15
|
-
--access <mode> npm access (default: public for scoped packages)
|
|
16
|
-
--registry <url> npm registry (optional)
|
|
17
|
-
--otp <code> npm OTP (2FA), optional
|
|
18
|
-
|
|
19
|
-
Environment:
|
|
20
|
-
NPM_TOKEN If set, will be used for npm auth via a temporary npmrc (recommended for CI). Do NOT hardcode tokens in this script.
|
|
21
|
-
USAGE
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
DRY_RUN=1
|
|
25
|
-
TAG="latest"
|
|
26
|
-
ACCESS="public"
|
|
27
|
-
REGISTRY=""
|
|
28
|
-
OTP=""
|
|
29
|
-
|
|
30
|
-
while [[ $# -gt 0 ]]; do
|
|
31
|
-
case "$1" in
|
|
32
|
-
-h|--help)
|
|
33
|
-
usage
|
|
34
|
-
exit 0
|
|
35
|
-
;;
|
|
36
|
-
--dry-run)
|
|
37
|
-
DRY_RUN=1
|
|
38
|
-
shift
|
|
39
|
-
;;
|
|
40
|
-
--publish)
|
|
41
|
-
DRY_RUN=0
|
|
42
|
-
shift
|
|
43
|
-
;;
|
|
44
|
-
--tag)
|
|
45
|
-
TAG="${2:-}"
|
|
46
|
-
shift 2
|
|
47
|
-
;;
|
|
48
|
-
--access)
|
|
49
|
-
ACCESS="${2:-}"
|
|
50
|
-
shift 2
|
|
51
|
-
;;
|
|
52
|
-
--registry)
|
|
53
|
-
REGISTRY="${2:-}"
|
|
54
|
-
shift 2
|
|
55
|
-
;;
|
|
56
|
-
--otp)
|
|
57
|
-
OTP="${2:-}"
|
|
58
|
-
shift 2
|
|
59
|
-
;;
|
|
60
|
-
*)
|
|
61
|
-
echo "Unknown argument: $1" >&2
|
|
62
|
-
usage
|
|
63
|
-
exit 2
|
|
64
|
-
;;
|
|
65
|
-
esac
|
|
66
|
-
done
|
|
67
|
-
|
|
68
|
-
if [[ -z "$TAG" ]]; then
|
|
69
|
-
echo "--tag requires a value" >&2
|
|
70
|
-
exit 2
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
if [[ "$ACCESS" != "public" && "$ACCESS" != "restricted" ]]; then
|
|
74
|
-
echo "--access must be 'public' or 'restricted'" >&2
|
|
75
|
-
exit 2
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
if command -v git >/dev/null 2>&1; then
|
|
79
|
-
if [[ -n "$(git status --porcelain)" ]]; then
|
|
80
|
-
echo "Git working tree is not clean. Commit/stash changes before publishing." >&2
|
|
81
|
-
git status --porcelain >&2
|
|
82
|
-
exit 1
|
|
83
|
-
fi
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
TMP_NPMRC=""
|
|
87
|
-
cleanup() {
|
|
88
|
-
if [[ -n "${TMP_NPMRC}" && -f "${TMP_NPMRC}" ]]; then
|
|
89
|
-
rm -f "${TMP_NPMRC}"
|
|
90
|
-
fi
|
|
91
|
-
}
|
|
92
|
-
trap cleanup EXIT
|
|
93
|
-
|
|
94
|
-
if [[ -n "${NPM_TOKEN:-}" ]]; then
|
|
95
|
-
TMP_NPMRC="$(mktemp -t cody-icons-npmrc.XXXXXX)"
|
|
96
|
-
{
|
|
97
|
-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
|
|
98
|
-
echo "always-auth=true"
|
|
99
|
-
} > "${TMP_NPMRC}"
|
|
100
|
-
export NPM_CONFIG_USERCONFIG="${TMP_NPMRC}"
|
|
101
|
-
fi
|
|
102
|
-
|
|
103
|
-
echo "Verifying npm auth..."
|
|
104
|
-
if ! npm whoami >/dev/null 2>&1; then
|
|
105
|
-
echo "Not logged in to npm. Run 'npm login' or set NPM_TOKEN, then retry." >&2
|
|
106
|
-
exit 1
|
|
107
|
-
fi
|
|
108
|
-
|
|
109
|
-
echo "Running build..."
|
|
110
|
-
pnpm run build
|
|
111
|
-
|
|
112
|
-
echo "Running metadata checks..."
|
|
113
|
-
pnpm run check-metadata
|
|
114
|
-
|
|
115
|
-
PUBLISH_ARGS=("--tag" "$TAG" "--access" "$ACCESS")
|
|
116
|
-
|
|
117
|
-
if [[ -n "$REGISTRY" ]]; then
|
|
118
|
-
PUBLISH_ARGS+=("--registry" "$REGISTRY")
|
|
119
|
-
fi
|
|
120
|
-
|
|
121
|
-
if [[ -n "$OTP" ]]; then
|
|
122
|
-
PUBLISH_ARGS+=("--otp" "$OTP")
|
|
123
|
-
fi
|
|
124
|
-
|
|
125
|
-
if [[ "$DRY_RUN" -eq 1 ]]; then
|
|
126
|
-
echo "Dry-run publish (no changes will be published)..."
|
|
127
|
-
npm publish --dry-run "${PUBLISH_ARGS[@]}"
|
|
128
|
-
echo "Done (dry-run)."
|
|
129
|
-
else
|
|
130
|
-
echo "Publishing to npm..."
|
|
131
|
-
npm publish "${PUBLISH_ARGS[@]}"
|
|
132
|
-
echo "Done (published)."
|
|
133
|
-
fi
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This script checks which icons are missing metadata and reports them.
|
|
5
|
-
* It helps maintain the metadata.json file by identifying gaps.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const fs = require('fs');
|
|
9
|
-
const path = require('path');
|
|
10
|
-
|
|
11
|
-
// Load the mapping file to get all icon names
|
|
12
|
-
const mappingPath = path.join(__dirname, '..', 'src', 'template', 'mapping.json');
|
|
13
|
-
const codyMappingPath = path.join(__dirname, '..', 'src', 'template', 'cody_mapping.json');
|
|
14
|
-
const metadataPath = path.join(__dirname, '..', 'src', 'template', 'metadata.json');
|
|
15
|
-
const codyMetadataPath = path.join(__dirname, '..', 'src', 'template', 'cody.json');
|
|
16
|
-
|
|
17
|
-
if (!fs.existsSync(mappingPath)) {
|
|
18
|
-
console.error('Error: mapping.json not found at', mappingPath);
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (!fs.existsSync(metadataPath)) {
|
|
23
|
-
console.error('Error: metadata.json not found at', metadataPath);
|
|
24
|
-
process.exit(1);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const mapping = JSON.parse(fs.readFileSync(mappingPath, 'utf8'));
|
|
28
|
-
const codyMapping = fs.existsSync(codyMappingPath)
|
|
29
|
-
? JSON.parse(fs.readFileSync(codyMappingPath, 'utf8'))
|
|
30
|
-
: {};
|
|
31
|
-
|
|
32
|
-
const metadata = JSON.parse(fs.readFileSync(metadataPath, 'utf8'));
|
|
33
|
-
const codyMetadata = fs.existsSync(codyMetadataPath)
|
|
34
|
-
? JSON.parse(fs.readFileSync(codyMetadataPath, 'utf8'))
|
|
35
|
-
: {};
|
|
36
|
-
|
|
37
|
-
const mergedMapping = { ...mapping, ...codyMapping };
|
|
38
|
-
const mergedMetadata = { ...metadata, ...codyMetadata };
|
|
39
|
-
|
|
40
|
-
// Collect all unique icon names from mapping
|
|
41
|
-
const allIconNames = new Set();
|
|
42
|
-
Object.values(mergedMapping).forEach(aliases => {
|
|
43
|
-
// For each code point, add the first alias (primary name)
|
|
44
|
-
if (aliases && aliases.length > 0) {
|
|
45
|
-
allIconNames.add(aliases[0]);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// Also include SVG-only Cody icons that are not part of the font mapping.
|
|
50
|
-
// These live under src/cody_icons and are rendered via the Cody SVG sprite.
|
|
51
|
-
const codyIconsDir = path.join(__dirname, '..', 'src', 'cody_icons');
|
|
52
|
-
if (fs.existsSync(codyIconsDir)) {
|
|
53
|
-
fs.readdirSync(codyIconsDir)
|
|
54
|
-
.filter(name => name.toLowerCase().endsWith('.svg'))
|
|
55
|
-
.forEach(fileName => {
|
|
56
|
-
allIconNames.add(path.basename(fileName, '.svg'));
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Find icons without metadata
|
|
61
|
-
const missingMetadata = [];
|
|
62
|
-
allIconNames.forEach(iconName => {
|
|
63
|
-
if (!mergedMetadata[iconName]) {
|
|
64
|
-
missingMetadata.push(iconName);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// Find metadata for icons that don't exist
|
|
69
|
-
const orphanedMetadata = [];
|
|
70
|
-
Object.keys(mergedMetadata).forEach(iconName => {
|
|
71
|
-
if (!allIconNames.has(iconName)) {
|
|
72
|
-
orphanedMetadata.push(iconName);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
// Report results
|
|
77
|
-
console.log('='.repeat(60));
|
|
78
|
-
console.log('Icon Metadata Coverage Report');
|
|
79
|
-
console.log('='.repeat(60));
|
|
80
|
-
console.log();
|
|
81
|
-
|
|
82
|
-
console.log(`Total icons: ${allIconNames.size}`);
|
|
83
|
-
console.log(`Icons with metadata: ${allIconNames.size - missingMetadata.length}`);
|
|
84
|
-
console.log(`Coverage: ${Math.round(((allIconNames.size - missingMetadata.length) / allIconNames.size) * 100)}%`);
|
|
85
|
-
console.log();
|
|
86
|
-
|
|
87
|
-
if (missingMetadata.length > 0) {
|
|
88
|
-
console.log(`Icons missing metadata (${missingMetadata.length}):`);
|
|
89
|
-
console.log('-'.repeat(60));
|
|
90
|
-
missingMetadata.sort().forEach(name => {
|
|
91
|
-
console.log(` - ${name}`);
|
|
92
|
-
});
|
|
93
|
-
console.log();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (orphanedMetadata.length > 0) {
|
|
97
|
-
console.log(`Metadata entries for non-existent icons (${orphanedMetadata.length}):`);
|
|
98
|
-
console.log('-'.repeat(60));
|
|
99
|
-
orphanedMetadata.sort().forEach(name => {
|
|
100
|
-
console.log(` - ${name}`);
|
|
101
|
-
});
|
|
102
|
-
console.log();
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (missingMetadata.length === 0 && orphanedMetadata.length === 0) {
|
|
106
|
-
console.log('✓ All icons have metadata and no orphaned entries found!');
|
|
107
|
-
console.log();
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// Validate existing metadata structure
|
|
111
|
-
const invalidEntries = [];
|
|
112
|
-
Object.entries(mergedMetadata).forEach(([name, meta]) => {
|
|
113
|
-
const issues = [];
|
|
114
|
-
|
|
115
|
-
if (!meta.tags || !Array.isArray(meta.tags)) {
|
|
116
|
-
issues.push('missing or invalid tags array');
|
|
117
|
-
} else if (meta.tags.length === 0) {
|
|
118
|
-
issues.push('empty tags array');
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (!meta.category || typeof meta.category !== 'string') {
|
|
122
|
-
issues.push('missing or invalid category');
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (!meta.description || typeof meta.description !== 'string') {
|
|
126
|
-
issues.push('missing or invalid description');
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
if (issues.length > 0) {
|
|
130
|
-
invalidEntries.push({ name, issues });
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
if (invalidEntries.length > 0) {
|
|
135
|
-
console.log(`Metadata entries with validation issues (${invalidEntries.length}):`);
|
|
136
|
-
console.log('-'.repeat(60));
|
|
137
|
-
invalidEntries.forEach(({ name, issues }) => {
|
|
138
|
-
console.log(` - ${name}:`);
|
|
139
|
-
issues.forEach(issue => {
|
|
140
|
-
console.log(` * ${issue}`);
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
console.log();
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Exit with error if there are missing entries
|
|
147
|
-
if (missingMetadata.length > 0 || orphanedMetadata.length > 0 || invalidEntries.length > 0) {
|
|
148
|
-
process.exit(1);
|
|
149
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const metadataPath = path.join(__dirname, '../dist/metadata.json');
|
|
5
|
-
const codySpritePath = path.join(__dirname, '../dist/cody-icons.svg');
|
|
6
|
-
const htmlPath = path.join(__dirname, '../dist/codyicon.html');
|
|
7
|
-
|
|
8
|
-
if (!fs.existsSync(htmlPath)) {
|
|
9
|
-
console.error('HTML file not found:', htmlPath);
|
|
10
|
-
process.exit(1);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const metadata = fs.readFileSync(metadataPath, 'utf8');
|
|
14
|
-
const codySprite = fs.existsSync(codySpritePath)
|
|
15
|
-
? fs
|
|
16
|
-
.readFileSync(codySpritePath, 'utf8')
|
|
17
|
-
.replace(/^\s*<\?xml[^>]*\?>\s*/i, '')
|
|
18
|
-
.replace(/^\s*<!doctype[^>]*>\s*/i, '')
|
|
19
|
-
.replace(/^\s*<svg[^>]*>/i, '')
|
|
20
|
-
.replace(/<\/svg>\s*$/i, '')
|
|
21
|
-
: '';
|
|
22
|
-
let html = fs.readFileSync(htmlPath, 'utf8');
|
|
23
|
-
|
|
24
|
-
const placeholder = '{} // METADATA_PLACEHOLDER';
|
|
25
|
-
const replacement = `${metadata} // METADATA_PLACEHOLDER`;
|
|
26
|
-
|
|
27
|
-
if (html.includes('// METADATA_PLACEHOLDER')) {
|
|
28
|
-
// Use regex to replace the initialization
|
|
29
|
-
html = html.replace(/let metadata = .* \/\/ METADATA_PLACEHOLDER/, `let metadata = ${metadata}; // METADATA_PLACEHOLDER`);
|
|
30
|
-
|
|
31
|
-
if (codySprite) {
|
|
32
|
-
const spriteContainerRegex = /<svg id="cody-svg-sprite"[^>]*>[\s\S]*?<\/svg>/;
|
|
33
|
-
if (spriteContainerRegex.test(html)) {
|
|
34
|
-
html = html.replace(
|
|
35
|
-
spriteContainerRegex,
|
|
36
|
-
`<svg id="cody-svg-sprite" aria-hidden="true" style="position:absolute;width:0;height:0;overflow:hidden">${codySprite}</svg>`
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
fs.writeFileSync(htmlPath, html);
|
|
42
|
-
console.log('Metadata embedded into HTML.');
|
|
43
|
-
} else {
|
|
44
|
-
console.warn('Metadata placeholder not found in HTML.');
|
|
45
|
-
}
|
package/scripts/export-to-csv.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// https://github.com/bitinn/character-map
|
|
2
|
-
|
|
3
|
-
var opentype = require("opentype.js");
|
|
4
|
-
|
|
5
|
-
const args = process.argv.slice(2);
|
|
6
|
-
|
|
7
|
-
function getArgValue(flag) {
|
|
8
|
-
const index = args.indexOf(flag);
|
|
9
|
-
if (index === -1) return undefined;
|
|
10
|
-
const value = args[index + 1];
|
|
11
|
-
if (!value || value.startsWith("-")) return undefined;
|
|
12
|
-
return value;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const fontPath = getArgValue("-f");
|
|
16
|
-
|
|
17
|
-
if (!fontPath || typeof fontPath !== "string") {
|
|
18
|
-
console.log(
|
|
19
|
-
"use -f to specify your font path, TrueType and OpenType supported"
|
|
20
|
-
);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
opentype.load(fontPath, function (err, font) {
|
|
25
|
-
if (err) {
|
|
26
|
-
console.log(err);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var glyphs = font.glyphs.glyphs;
|
|
31
|
-
if (!glyphs || glyphs.length === 0) {
|
|
32
|
-
console.log("no glyphs found in this font");
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
var table = "short_name,character,unicode";
|
|
37
|
-
for (glyphIndex in glyphs) {
|
|
38
|
-
var glyph = glyphs[glyphIndex];
|
|
39
|
-
var name = glyph.name;
|
|
40
|
-
var unicode = glyph.unicodes.map(formatUnicode).join(", ");
|
|
41
|
-
unicode = unicode.split(",")[0];
|
|
42
|
-
// var character = String.fromCharCode(glyph.unicode);
|
|
43
|
-
var character = String.fromCharCode(parseInt(glyph.unicodes.map(formatUnicode)[0], 16));
|
|
44
|
-
if (unicode) {
|
|
45
|
-
table += "\n" + name + "," + character + "," + unicode;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
console.log(table);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
function formatUnicode(unicode) {
|
|
54
|
-
unicode = unicode.toString(16);
|
|
55
|
-
if (unicode.length > 4) {
|
|
56
|
-
return ("000000" + unicode.toUpperCase()).substr(-6);
|
|
57
|
-
} else {
|
|
58
|
-
return ("0000" + unicode.toUpperCase()).substr(-4);
|
|
59
|
-
}
|
|
60
|
-
}
|
package/scripts/export-to-ts.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const args = process.argv.slice(2);
|
|
3
|
-
|
|
4
|
-
function getArgValue(flag) {
|
|
5
|
-
const index = args.indexOf(flag);
|
|
6
|
-
if (index === -1) return undefined;
|
|
7
|
-
const value = args[index + 1];
|
|
8
|
-
if (!value || value.startsWith('-')) return undefined;
|
|
9
|
-
return value;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const mappingPath = getArgValue('-f');
|
|
13
|
-
|
|
14
|
-
if (!mappingPath || typeof mappingPath !== "string") {
|
|
15
|
-
console.log("use -f to specify your mapping.json path");
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
fs.readFile(mappingPath, 'utf8', (err, data) => {
|
|
21
|
-
if (err) {
|
|
22
|
-
console.error('Error reading file:', err);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
const mapping = JSON.parse(data);
|
|
28
|
-
|
|
29
|
-
console.log("/*---------------------------------------------------------------------------------------------");
|
|
30
|
-
console.log(" * Copyright (c) Cody. All rights reserved.");
|
|
31
|
-
console.log(" * Licensed under the MIT License. See License.txt in the project root for license information.");
|
|
32
|
-
console.log(" *--------------------------------------------------------------------------------------------*/");
|
|
33
|
-
console.log("");
|
|
34
|
-
console.log("// This file is automatically generated by scripts/export-to-ts.js");
|
|
35
|
-
console.log("// Please don't edit it, as your changes will be overwritten.");
|
|
36
|
-
console.log("export const codyiconsLibrary = {");
|
|
37
|
-
|
|
38
|
-
// New format: mapping is { "code": ["alias1", "alias2", ...] }
|
|
39
|
-
Object.entries(mapping).forEach(([code, aliases]) => {
|
|
40
|
-
const codeValue = parseInt(code);
|
|
41
|
-
const hexValue = decimalToHex(codeValue);
|
|
42
|
-
|
|
43
|
-
// Register each alias with the same code
|
|
44
|
-
aliases.forEach((name) => {
|
|
45
|
-
console.log(`\t${toCamelCase(name)}: ${hexValue},`);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
console.log("} as const;");
|
|
50
|
-
|
|
51
|
-
} catch (error) {
|
|
52
|
-
console.error('Error parsing JSON:', error);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
function toCamelCase(name) {
|
|
58
|
-
return name.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function decimalToHex(decimal) {
|
|
62
|
-
return '0x' + decimal.toString(16);
|
|
63
|
-
}
|
package/scripts/merge-cody.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const root = path.resolve(__dirname, '..');
|
|
5
|
-
const templateDir = path.join(root, 'src', 'template');
|
|
6
|
-
const distDir = path.join(root, 'dist');
|
|
7
|
-
|
|
8
|
-
const baseMappingPath = path.join(templateDir, 'mapping.json');
|
|
9
|
-
const codyMappingPath = path.join(templateDir, 'cody_mapping.json');
|
|
10
|
-
const baseMetadataPath = path.join(templateDir, 'metadata.json');
|
|
11
|
-
const codyMetadataPath = path.join(templateDir, 'cody.json');
|
|
12
|
-
|
|
13
|
-
function readJson(filePath, fallback) {
|
|
14
|
-
if (!fs.existsSync(filePath)) return fallback;
|
|
15
|
-
const raw = fs.readFileSync(filePath, 'utf8');
|
|
16
|
-
if (!raw.trim()) return fallback;
|
|
17
|
-
return JSON.parse(raw);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function ensureDir(dir) {
|
|
21
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function mergeMapping(baseMapping, codyMapping) {
|
|
25
|
-
const result = { ...baseMapping };
|
|
26
|
-
|
|
27
|
-
// Track aliases already in use to prevent accidental duplicates
|
|
28
|
-
const usedAliases = new Set();
|
|
29
|
-
for (const aliases of Object.values(baseMapping)) {
|
|
30
|
-
for (const name of aliases) usedAliases.add(name);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
for (const [code, aliases] of Object.entries(codyMapping || {})) {
|
|
34
|
-
if (!Array.isArray(aliases) || aliases.length === 0) {
|
|
35
|
-
throw new Error(`Invalid cody_mapping.json entry for code ${code}: expected non-empty array`);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (result[code]) {
|
|
39
|
-
throw new Error(`Codepoint collision at ${code}. Please choose a new numeric key in cody_mapping.json.`);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
for (const name of aliases) {
|
|
43
|
-
if (typeof name !== 'string' || !name.trim()) {
|
|
44
|
-
throw new Error(`Invalid alias in cody_mapping.json at ${code}: expected non-empty string`);
|
|
45
|
-
}
|
|
46
|
-
if (usedAliases.has(name)) {
|
|
47
|
-
throw new Error(`Alias collision for '${name}'. It already exists in base mapping.json.`);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
result[code] = aliases;
|
|
52
|
-
for (const name of aliases) usedAliases.add(name);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return result;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function mergeMetadata(baseMetadata, codyMetadata) {
|
|
59
|
-
const result = { ...baseMetadata };
|
|
60
|
-
|
|
61
|
-
for (const [name, meta] of Object.entries(codyMetadata || {})) {
|
|
62
|
-
if (result[name]) {
|
|
63
|
-
throw new Error(`Metadata key collision for '${name}'. It already exists in base metadata.json.`);
|
|
64
|
-
}
|
|
65
|
-
result[name] = meta;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return result;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function main() {
|
|
72
|
-
ensureDir(distDir);
|
|
73
|
-
|
|
74
|
-
const baseMapping = readJson(baseMappingPath, {});
|
|
75
|
-
const codyMapping = readJson(codyMappingPath, {});
|
|
76
|
-
const mergedMapping = mergeMapping(baseMapping, codyMapping);
|
|
77
|
-
|
|
78
|
-
const baseMetadata = readJson(baseMetadataPath, {});
|
|
79
|
-
const codyMetadata = readJson(codyMetadataPath, {});
|
|
80
|
-
const mergedMetadata = mergeMetadata(baseMetadata, codyMetadata);
|
|
81
|
-
|
|
82
|
-
fs.writeFileSync(path.join(distDir, 'mapping.json'), JSON.stringify(mergedMapping, null, 2) + '\n');
|
|
83
|
-
fs.writeFileSync(path.join(distDir, 'metadata.json'), JSON.stringify(mergedMetadata, null, 2) + '\n');
|
|
84
|
-
|
|
85
|
-
// List of Cody-specific icons (used for colored SVG sprite rendering)
|
|
86
|
-
const codyIconNames = Object.keys(codyMetadata || {}).sort();
|
|
87
|
-
fs.writeFileSync(path.join(distDir, 'cody-icons.json'), JSON.stringify(codyIconNames, null, 2) + '\n');
|
|
88
|
-
|
|
89
|
-
console.log('Merged mapping.json and metadata.json into dist/.');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
main();
|
package/scripts/reset.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const fs = require("fs");
|
|
2
|
-
|
|
3
|
-
const outputDirectory = "dist";
|
|
4
|
-
|
|
5
|
-
// clear dist folder
|
|
6
|
-
fs.rmSync(outputDirectory, { recursive: true, force: true });
|
|
7
|
-
console.log(`deleted "${outputDirectory}" folder`);
|
|
8
|
-
|
|
9
|
-
// re-create dist folder
|
|
10
|
-
fs.mkdirSync(outputDirectory, { recursive: true });
|