* feat: Add methods for toggling and inspecting the readonly state of a workspace.
* refactor: Use the new readonly setters/getters in place of checking the injection options.
* fix: Fix bug that allowed dragging blocks from a flyout onto a readonly workspace.
* feat: Toggle a `blocklyReadOnly` class when readonly status is changed.
* chore: Placate the linter.
* chore: Placate the compiler.
This largely reduces the dependence on direct value testing and instead
updates clean-up tests to verify logic based on relative positioning.
This guards against potential system-specific flakes that can occur when
there are subtle calculation differences on different systems.
* chore: rename .eslintrc.js to eslint.config.js
* chore: Rename eslint.config.js to eslint.config.mjs.
* refactor: Migrate ESLint config to new flat format.
* chore: Remove old per-directory and global ignore ESLint config files.
* fix: Allowlist JSDoc tag aliases.
* fix: Don't require @license in tests/*.
* fix: Add NodeJS globals to several files that run under Node.
* chore: Remove now-unneeded ESLint directives in core.
* chore: Remove invalid/unneeded ESLint directives.
* fix: Fix invalid use of `await` outside of an `async` function.
* fix: Improve screenshot error message.
* fix: Update ESLint config file to not warn on existing violations.
* chore: Remove suppressions of rules that weren't triggering.
* chore: Fix package-lock.json.
* refactor!: Rename blocklyTreeIconClosed to blocklyToolboxCategoryIconClosed.
* refactor!: Rename blocklyTreeLabel to blocklyToolboxCategoryLabel
* refactor!: Rename blocklyToolboxDiv to blocklyToolbox.
* refactor: remove unreferenced CSS classes.
* refactor!: Remove the blocklyArrowTop and blocklyArrowBottom classes.
* feat: Add a blocklyTextInputField class to text fields.
* docs(events): JSDoc improvments
* fix(filter): Introduce enqueueEvent; don't reorder in filter
Remove the broken BlockChange event reordering code from filter.
Instead, do necessary event reordering (correctly, this time)
in a new enqueueEvent function used by fireInternal.
* chore(events): Deprecate forward parameter of filter
Since we don't filter in undo any more, and filtering in reverse
order causes problems, prepare to remove this opportunity for
error.
* fix(events): Only merge adjacent events
Simplify filter by having it consider only adjacent events in the
queue for merging.
Previously any events in the queue could potentially be merged if
they were of suitable (typically identical) .type, even if other
events had occurred between them (with the sole exception of
BlockMove events, which would only be merged with adjacent
events). This could potentially result in replay failures during
undo/redo/mirroring, though it is unknown whether any such
problems occurred in practice.
* refactor(events): Tweaks
- Use for…of loop where appropriate.
- Make filter reason-merging code more concise.
- Use arrow functions when calling Array.prototype.filter.
* chore(events): Fix typos for PR #8539.
* fix: Detect if deleting shadow block affects selection highlight
* Use contains instead of descendsFrom for html consistency.
* Added tests.
* Removing and manually inlining new contains function.
At a high-level, this change ensures that cleaning up a workspace
doesn't move blocks in a way that overlaps with immovable blocks. It
also adds missing testing coverage for both Rect (used for bounding box
calculations during workspace cleanup) and WorkspaceSvg (for verifying
the updated clean up functionality).
This also renames the clean up function to be 'tidyUp' since that better
suits what's happening (as opposed to other clean-up routines which are
actually deinitializing objects).
* refactor(events): Use "export ... from" where applicable
* refactor(events): Introduce EventType enum
Introduce an enum for the event .type values. We can't actually
use it as the type of the .type property on Abstract events,
because we want to allow developers to add their own custom
event types inheriting from this type, but at least this way we
can be reasonably sure that all of our own event subclasses have
distinct .type values—plus consistent use of enum syntax
(EventType.TYPE_NAME) is probably good for readability overall.
Put it in a separate module from the rest of events/utils.ts
because it would be helpful if event utils could use
event instanceof SomeEventType
for type narrowing but but at the moment most events are in
modules that depend on events/utils.ts for their .type
constant, and although circular ESM dependencies should work
in principle there are various restrictions and this
particular circularity causes issues at the moment.
A few of the event classes also depend on utils.ts for fire()
or other functions, which will be harder to deal with, but at
least this commit is win in terms of reducing the complexity
of our dependencies, making most of the Abstract event subclass
module dependent on type.ts, which has no imports, rather than
on utils.ts which has multiple imports.
* chore(deps): Add pretter-plugin-organize-imports
* chore: Remove insignificant blank lines in import sections
Since prettier-plugin-organize-imports sorts imports within
sections separated by blank lines, but preserves the section
divisions, remove any blank lines that are not dividing imports
into meaningful sections.
Do not remove blank lines separating side-effect-only imports
from main imports.
* chore: Remove unneded eslint-disable directives
* chore: Organise imports
* fix: removed the whole Drag category from the blocks
* fix: added comment according to reviewer
* fix: added comment according to reviewer
* fix: added comment according to reviewer
* Remove redundant blocklyNonSelectable class and integrate non-selectability into existing classes
* Removed .gitpod file
* fix: remove redundant blocklyNonSelectable class and integrate non-selectability into existing classes https://github.com/google/blockly/issues/8328
* fix: remove redundant blocklyNonSelectable class and integrate non-selectability into existing classes #8328
* fix: remove redundant blocklyNonSelectable class and integrate non-selectability into existing classes #8328
* fix: remove redundant blocklyNonSelectable class and integrate non-selectability into existing classes #8328
* fix: remove redundant blocklyNonSelectable class and integrate non-selectability into existing classes #8328
* fix: remove redundant blocklyNonSelectable class and integrate non-selectability into existing classes
* refactor: use IVariableMap in place of VariableMap.
* refactor!: move variable deletion prompting out of VariableMap.
* chore: Remove unused imports.
* chore(deps): bump @hyperjump/json-schema from 1.6.7 to 1.9.3
Bumps [@hyperjump/json-schema](https://github.com/hyperjump-io/json-schema) from 1.6.7 to 1.9.3.
- [Commits](https://github.com/hyperjump-io/json-schema/compare/v1.6.7...v1.9.3)
---
updated-dependencies:
- dependency-name: "@hyperjump/json-schema"
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* chore(deps): Add dev dependency on @hyperjump/browser
@hyperjump/json-schema (v1.7.0 and later) depends upon
@hyperjump/browser, but fails to declare it as a dependency,
only listing it as a peer dependency, so said package must be
installed separately.
* fix(tests): Use BASIC output as DETAILED is no longer supported
See issue hyperjump-io/json-chema#68 for additional info.
* feat(tests): Add more informational output in case of test failure
Since the BASIC output of the schema verifier is (slightly) less
helpful than the old DETAILED output, add an additional output
containing the first invalid path, e.g.:
#/9.3.0/0/exports/textToDom/newModule
in the results object returned by validate, since this is the
most useful part of that info.
Also use console.error and console.info instead of console.log
where appropriate.
* chore(tests): Format
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
* fix!: #8345 rename css class
This commit renames the blocklyTreeRow CSS class to blocklyToolboxCategory
* Update category.ts
* fix: css class conflicts
Rename original blocklyToolboxCategory to blocklyToolboxCategoryContainer