Skip to content

chore(playground): expose all public composables in repl (f400bc6)#290

Merged
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-f400bc6
Jul 20, 2026
Merged

chore(playground): expose all public composables in repl (f400bc6)#290
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-f400bc6

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Syncs upstream nuxt/ui commit f400bc6chore(playground): expose all public composables in repl.

What

In the REPL playground, replace the hand-maintained composable list with one derived from publicComposables (the auto-import source of truth), generating both the import and the window.<name> = <name> assignments dynamically — so REPL code can call every auto-imported composable without an explicit import.

b24ui port

  • playgrounds/repl/src/App.vue — import publicComposables from ../../../src/imports (b24ui's own auto-import registry), const composables = Object.values(publicComposables).flat(), and rewrite importCode to import b24Ui, { ${composables.join(', ')} } from '@bitrix24/b24ui-builtin' plus dynamic window.X = X assignments (kept b24ui's b24Ui default import + @bitrix24/b24ui-builtin source).
  • Behavior delta: the exposed list now matches b24ui's real auto-import surface. The previously-hardcoded useColorMode is dropped (it isn't in publicComposables — a commented @todo), and the many composables missing from the old hand list (defineLocale, useContentSearch, useFileUpload, useFormField, useKbd, useResizable, useScrollShadow, useScrollspy, useTour, useLocale, …) are now exposed.

Tests

Playground/repl only — not part of the ci gate. Verified with pnpm repl:build (builds clean). Normal suite unchanged: 5557 passed / 6 skipped.

Verify (CI=true)

dev:prepare · lint · typecheck · test · build (+ repl:build) — all green.

Ledger: cursor advanced to f400bc6; previous entry f8c0850 reconciled to PR #289.

🤖 Generated with Claude Code


Generated by Claude Code

Syncs upstream nuxt/ui commit f400bc6. In the REPL playground, replace the
hardcoded composable list with one derived from publicComposables (the
auto-import source of truth) and generate the window assignments dynamically,
so REPL code can call every auto-imported composable without a hand list.

- playgrounds/repl/src/App.vue: import publicComposables from ../../../src/imports,
  const composables = Object.values(publicComposables).flat(), and rewrite
  importCode to `import b24Ui, { ${composables.join(', ')} } from
  '@bitrix24/b24ui-builtin'` + dynamic `window.X = X` assignments.

The new list matches b24ui's real auto-import surface (drops the previously
hardcoded useColorMode, which isn't in publicComposables; adds the many that
were missing). Playground/repl only, not in the ci gate — verified via
pnpm repl:build. Suite: 5557 passed / 6 skipped.

Ledger: cursor -> f400bc6; previous entry f8c0850 reconciled to PR #289.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
@IgorShevchik
IgorShevchik merged commit cabc07a into main Jul 20, 2026
1 check passed
@IgorShevchik
IgorShevchik deleted the sync/nuxt-f400bc6 branch July 20, 2026 06:04
IgorShevchik added a commit that referenced this pull request Jul 20, 2026
…a172ef) (#291)

Syncs upstream nuxt/ui commit 2a172ef (#6741) — security fix.

The search-highlight helper detected already-escaped HTML entities and skipped
re-escaping, letting an attacker bypass escaping by injecting a stray entity —
an XSS in CommandPalette result highlighting.

- src/runtime/utils/search.ts: remove isAlreadyEscaped()/sanitize() and replace
  the three sanitize() calls in highlight()'s generateHighlightedText with
  escapeHTML(). sanitizeSnippet() already used escapeHTML directly (untouched).
- test/utils/search.spec.ts: import highlight and add the four upstream XSS
  regression tests (injected tag in unmatched tail, entity-bypass regression,
  special chars around a highlight, no-match undefined case).

highlight output for normal input is unchanged -> no snapshot churn.
Suite: 5565 passed / 6 skipped.

Ledger: cursor -> 2a172ef; previous entry f400bc6 reconciled to PR #290.


Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb

Co-authored-by: Shevchik Igor <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants