Compare commits
34
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af85967e66 | ||
|
|
733953fda9 | ||
|
|
ed84370130 | ||
|
|
f492c1e524 | ||
|
|
ea5357b2ad | ||
|
|
4b565be7af | ||
|
|
143d990a69 | ||
|
|
c4df0c18bc | ||
|
|
84fdccaec5 | ||
|
|
29102d5e9c | ||
|
|
dd357fc559 | ||
|
|
0f8d23817e | ||
|
|
0ab87cf79e | ||
|
|
7c93d33c20 | ||
|
|
8eaf705f2f | ||
|
|
794da15224 | ||
|
|
5f38148a23 | ||
|
|
84f2b23f29 | ||
|
|
40a61dc5d0 | ||
|
|
eb3ab6f07c | ||
|
|
e5bb4d5db6 | ||
|
|
8900f673ed | ||
|
|
510c6d0dc2 | ||
|
|
94d73cedb9 | ||
|
|
51963f855c | ||
|
|
b897a3fa35 | ||
|
|
3a6ecca0bf | ||
|
|
0d00a20cee | ||
|
|
335e911a61 | ||
|
|
f138c65497 | ||
|
|
3600ce8d7b | ||
|
|
4c8c6ed1b6 | ||
|
|
10043d3478 | ||
|
|
d395e0c7ee |
@@ -3,7 +3,7 @@ import React from 'react'
|
||||
|
||||
import type { FontSizeTokens, SelectProps } from 'hanzogui'
|
||||
import { Adapt, Label, Select, Sheet, Theme, XStack, YStack, getFontSize } from 'hanzogui'
|
||||
import { LinearGradient } from 'hanzogui/linear-gradient'
|
||||
import { LinearGradient } from 'gui/linear-gradient'
|
||||
|
||||
export function SelectDemo() {
|
||||
return (
|
||||
|
||||
@@ -1,149 +1,10 @@
|
||||
import { mkdirSync, readdirSync, statSync } from 'node:fs'
|
||||
import { mkdirSync } from 'node:fs'
|
||||
import { existsSync, writeFileSync, readFileSync } from 'node:fs'
|
||||
import { resolve, dirname, join } from 'node:path'
|
||||
import { resolve, dirname } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
const RECIPES_COMPONENT_PREFIX = '@hanzogui/recipes/component/'
|
||||
|
||||
/**
|
||||
* Recursively collect .ts/.tsx source files under a directory, skipping
|
||||
* node_modules and build output.
|
||||
* @param {string} dir
|
||||
* @param {string[]} acc
|
||||
* @returns {string[]}
|
||||
*/
|
||||
function collectSourceFiles(dir, acc = []) {
|
||||
let entries
|
||||
try {
|
||||
entries = readdirSync(dir)
|
||||
} catch {
|
||||
return acc
|
||||
}
|
||||
for (const name of entries) {
|
||||
if (name === 'node_modules' || name === 'dist' || name === 'recipes-output') continue
|
||||
const full = join(dir, name)
|
||||
let s
|
||||
try {
|
||||
s = statSync(full)
|
||||
} catch {
|
||||
continue
|
||||
}
|
||||
if (s.isDirectory()) {
|
||||
collectSourceFiles(full, acc)
|
||||
} else if (name.endsWith('.ts') || name.endsWith('.tsx')) {
|
||||
acc.push(full)
|
||||
}
|
||||
}
|
||||
return acc
|
||||
}
|
||||
|
||||
/**
|
||||
* Scan the app for deep `@hanzogui/recipes/component/*` imports and the named
|
||||
* bindings each subpath must provide, so concrete stub modules can be generated
|
||||
* when the (optional, pro-only) recipes repo is absent.
|
||||
*
|
||||
* Three import shapes are detected:
|
||||
* 1. namespace -> import * as NS from '<subpath>' (then NS.Member usages)
|
||||
* 2. named -> import { A, B } from '<subpath>'
|
||||
* 3. re-export -> export { A } from '<subpath>'
|
||||
*
|
||||
* @param {string} appDir
|
||||
* @returns {Record<string, string[]>} subpath -> sorted unique export names
|
||||
*/
|
||||
function scanRecipesSubpaths(appDir) {
|
||||
const subpaths = {}
|
||||
for (const file of collectSourceFiles(appDir)) {
|
||||
let src
|
||||
try {
|
||||
src = readFileSync(file, 'utf-8')
|
||||
} catch {
|
||||
continue
|
||||
}
|
||||
if (!src.includes(RECIPES_COMPONENT_PREFIX)) continue
|
||||
|
||||
// namespace imports + member accesses
|
||||
for (const m of src.matchAll(/import\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]/g)) {
|
||||
const [, ns, sp] = m
|
||||
if (!sp.startsWith(RECIPES_COMPONENT_PREFIX)) continue
|
||||
subpaths[sp] ??= new Set()
|
||||
const memberRe = new RegExp('\\b' + ns + '\\.([A-Za-z_][A-Za-z0-9_]*)', 'g')
|
||||
for (const u of src.matchAll(memberRe)) subpaths[sp].add(u[1])
|
||||
}
|
||||
|
||||
// named imports and re-exports
|
||||
for (const m of src.matchAll(/(?:import|export)\s+\{([^}]+)\}\s+from\s+['"]([^'"]+)['"]/g)) {
|
||||
const [, names, sp] = m
|
||||
if (!sp.startsWith(RECIPES_COMPONENT_PREFIX)) continue
|
||||
subpaths[sp] ??= new Set()
|
||||
for (const raw of names.split(',')) {
|
||||
const name = raw.trim().split(/\s+as\s+/)[0].trim()
|
||||
if (name) subpaths[sp].add(name)
|
||||
}
|
||||
}
|
||||
}
|
||||
return Object.fromEntries(
|
||||
Object.entries(subpaths).map(([k, v]) => [k, [...v].sort()])
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate concrete stub modules for deep `@hanzogui/recipes/component/*`
|
||||
* subpaths used by the showcase tree, returning a map from subpath -> absolute
|
||||
* stub file path. Each stub exports a no-op component (carrying a `.fileName`
|
||||
* field so `Member.fileName` reads don't throw) as the default and as every
|
||||
* named binding the app imports — concrete on-disk named exports are required
|
||||
* because rolldown statically validates `export { X } from` / `import { X }`
|
||||
* and does not transform virtual `\0`-modules through commonjs interop.
|
||||
*
|
||||
* @param {Object} options
|
||||
* @param {string} options.appDir - app root (dir containing components/, vite.config.ts)
|
||||
* @param {string} options.outDir - directory to write stub modules into
|
||||
* @returns {Record<string, string>} subpath -> absolute stub path
|
||||
*/
|
||||
export function generateSubpathStubs({ appDir, outDir }) {
|
||||
const map = scanRecipesSubpaths(appDir)
|
||||
mkdirSync(outDir, { recursive: true })
|
||||
const result = {}
|
||||
for (const [subpath, names] of Object.entries(map)) {
|
||||
const flat = subpath.slice(RECIPES_COMPONENT_PREFIX.length).replace(/[^A-Za-z0-9]+/g, '_')
|
||||
const stubPath = resolve(outDir, `${flat}.tsx`)
|
||||
// Hook-shaped exports (useFoo) are called, not rendered, and their result is
|
||||
// often destructured (e.g. `const { sm } = useGroupMedia(...)`), so they must
|
||||
// return a (proxy) object rather than the null-rendering component stub.
|
||||
const namedExports = names
|
||||
.filter((n) => n !== 'default')
|
||||
.map((n) =>
|
||||
/^use[A-Z0-9]/.test(n)
|
||||
? `export const ${n} = recipesSubpathHook`
|
||||
: `export const ${n} = RecipesSubpathStub`
|
||||
)
|
||||
.join('\n')
|
||||
writeFileSync(
|
||||
stubPath,
|
||||
`// AUTO-GENERATED stub for ${subpath}
|
||||
// Recipes is optional (pro users only); the real components live in the
|
||||
// separate recipes repo. Regenerate via scripts/generate-recipes-proxy.mjs.
|
||||
function RecipesSubpathStub() {
|
||||
return null
|
||||
}
|
||||
RecipesSubpathStub.fileName = ''
|
||||
|
||||
// Hook stub: returns an object that yields undefined for any destructured key,
|
||||
// so callers like \`const { sm } = useGroupMedia(...)\` never throw.
|
||||
const recipesSubpathHook = () =>
|
||||
new Proxy({}, { get: () => undefined }) as any
|
||||
|
||||
export default RecipesSubpathStub
|
||||
${namedExports}
|
||||
`
|
||||
)
|
||||
result[subpath] = stubPath
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate recipes proxy files based on whether the recipes repo is available.
|
||||
* Can be called from vite config or run directly as a script.
|
||||
@@ -158,23 +19,11 @@ export function generateRecipesProxy(options = {}) {
|
||||
|
||||
const RECIPES_PATH = resolve(basePath, '../../../../recipes')
|
||||
const HELPERS_DIST_PATH = resolve(basePath, '../helpers/dist')
|
||||
const APP_DIR = resolve(basePath, '..')
|
||||
const hasRecipes = existsSync(RECIPES_PATH)
|
||||
|
||||
// Ensure dist exists
|
||||
mkdirSync(HELPERS_DIST_PATH, { recursive: true })
|
||||
|
||||
// When recipes is absent, generate concrete stub modules for every deep
|
||||
// `@hanzogui/recipes/component/*` subpath the app imports, so the showcase
|
||||
// tree (which is always in the build graph via RecipesComponentSection) can
|
||||
// resolve its named imports/re-exports.
|
||||
const subpathStubs = hasRecipes
|
||||
? {}
|
||||
: generateSubpathStubs({
|
||||
appDir: APP_DIR,
|
||||
outDir: resolve(HELPERS_DIST_PATH, 'recipes-subpath-stubs'),
|
||||
})
|
||||
|
||||
const proxyPath = resolve(HELPERS_DIST_PATH, 'recipes-proxy.ts')
|
||||
const existingContent = existsSync(proxyPath) ? readFileSync(proxyPath, 'utf-8') : ''
|
||||
const isStub = existingContent.includes('Stub file for when recipes is not available')
|
||||
@@ -182,7 +31,7 @@ export function generateRecipesProxy(options = {}) {
|
||||
|
||||
// Skip if already generated with correct state and has all exports
|
||||
if (existingContent && isStub === !hasRecipes && hasCurrentRouteProvider) {
|
||||
return { hasRecipes, subpathStubs }
|
||||
return { hasRecipes }
|
||||
}
|
||||
|
||||
if (!hasRecipes) {
|
||||
@@ -238,7 +87,7 @@ export * as Sections from '../../components/recipes-showcase/sections'
|
||||
}
|
||||
}
|
||||
|
||||
return { hasRecipes, subpathStubs }
|
||||
return { hasRecipes }
|
||||
}
|
||||
|
||||
// Run if called directly (postinstall script)
|
||||
|
||||
@@ -37,10 +37,8 @@ if (!existsSync(vitePluginDist) || !existsSync(staticDist)) {
|
||||
}
|
||||
}
|
||||
|
||||
// Generate recipes proxy files (creates stubs if recipes repo not found).
|
||||
// When recipes is absent, subpathStubs maps each deep
|
||||
// `@hanzogui/recipes/component/*` import to a concrete generated stub module.
|
||||
const { hasRecipes, subpathStubs } = generateRecipesProxy({
|
||||
// Generate recipes proxy files (creates stubs if recipes repo not found)
|
||||
const { hasRecipes } = generateRecipesProxy({
|
||||
basePath: pathResolve(import.meta.dirname, 'scripts'),
|
||||
silent: false,
|
||||
})
|
||||
@@ -121,19 +119,17 @@ export default {
|
||||
resolve: {
|
||||
preserveSymlinks: false,
|
||||
alias: [
|
||||
// When recipes is absent, map each deep @hanzogui/recipes/component/*
|
||||
// import to its concrete generated stub. These MUST precede the catch-all
|
||||
// '@hanzogui/recipes' alias below, otherwise that alias swallows the
|
||||
// subpath (resolving to recipes-proxy/component/...) and the build fails
|
||||
// with UNLOADABLE_DEPENDENCY. Stubs carry the exact named exports the
|
||||
// showcase tree imports/re-exports, which rolldown validates statically.
|
||||
// Regex-based alias for recipes components when not available
|
||||
...(!hasRecipes
|
||||
? Object.entries(subpathStubs)
|
||||
// longest subpath first: vite matches `id === find || id.startsWith(find + '/')`,
|
||||
// so a parent like `.../user/preferences` must not shadow its child
|
||||
// `.../user/preferences/LocationNotification`.
|
||||
.sort(([a], [b]) => b.length - a.length)
|
||||
.map(([find, replacement]) => ({ find, replacement }))
|
||||
? [
|
||||
{
|
||||
find: /^@gui\/recipes\/component\/.+$/,
|
||||
replacement: pathResolve(
|
||||
import.meta.dirname,
|
||||
'./helpers/dist/recipes-component-stub.tsx'
|
||||
),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
// Standard string-based aliases
|
||||
{
|
||||
@@ -208,6 +204,43 @@ export default {
|
||||
},
|
||||
|
||||
plugins: [
|
||||
// Plugin to stub recipes component imports when recipes repo is not available
|
||||
!hasRecipes && {
|
||||
name: 'stub-recipes-components',
|
||||
enforce: 'pre', // Run before other plugins including alias resolution
|
||||
resolveId(id: string) {
|
||||
// Intercept imports from @hanzogui/recipes/component/*
|
||||
if (id.startsWith('@hanzogui/recipes/component/')) {
|
||||
// Return a virtual module ID
|
||||
return '\0recipes-component-stub:' + id
|
||||
}
|
||||
},
|
||||
load(id: string) {
|
||||
// Handle the virtual module
|
||||
if (id.startsWith('\0recipes-component-stub:')) {
|
||||
// Return stub component code
|
||||
return `
|
||||
import { YStack, Paragraph } from 'hanzogui'
|
||||
|
||||
export default function RecipesComponentStub() {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<YStack p="$4" bc="$borderColor" br="$4">
|
||||
<Paragraph size="$2" color="$color10">
|
||||
Recipes component not available
|
||||
</Paragraph>
|
||||
</YStack>
|
||||
)
|
||||
}
|
||||
|
||||
// Export as default and named for compatibility
|
||||
export const LocationNotification = RecipesComponentStub
|
||||
`
|
||||
}
|
||||
},
|
||||
},
|
||||
guiPlugin({
|
||||
// see gui.build.ts
|
||||
disable: process.env.NODE_ENV !== 'production',
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from 'react'
|
||||
|
||||
import type { FontSizeTokens, SelectProps } from 'hanzogui'
|
||||
import { Adapt, Label, Select, Sheet, XStack, YStack, getFontSize } from 'hanzogui'
|
||||
import { LinearGradient } from 'hanzogui/linear-gradient'
|
||||
import { LinearGradient } from 'gui/linear-gradient'
|
||||
|
||||
export function SelectDemo() {
|
||||
return (
|
||||
|
||||
+2
-6
@@ -120,8 +120,6 @@
|
||||
"devDependencies": {
|
||||
"@manypkg/cli": "^0.23.0",
|
||||
"@playwright/test": "^1.49.1",
|
||||
"@tailwindcss/typography": "^0.5.20",
|
||||
"@tailwindcss/vite": "^4",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"dotenv-cli": "^7.4.2",
|
||||
"esbuild": "^0.27.2",
|
||||
@@ -136,7 +134,6 @@
|
||||
"p-map": "^7.0.3",
|
||||
"prompts": "2.1.0",
|
||||
"react-native-screens": "~4.23.0",
|
||||
"tailwindcss": "^4",
|
||||
"turbo": "^2.1.3",
|
||||
"typescript": "~5.9.2",
|
||||
"ultra-runner": "^3.10.5"
|
||||
@@ -144,7 +141,7 @@
|
||||
"overrides": {
|
||||
"@react-navigation/core": "7.9.2",
|
||||
"@react-navigation/elements": "2.8.1",
|
||||
"@react-navigation/native": "7.1.34",
|
||||
"@react-navigation/native": "7.1.9",
|
||||
"@react-navigation/native-stack": "7.6.2",
|
||||
"@react-navigation/routers": "7.4.0",
|
||||
"@swc/core": "1.14.0",
|
||||
@@ -169,8 +166,7 @@
|
||||
"@vxrn/vite-flow": "1.12.5",
|
||||
"@vxrn/vite-plugin-metro": "1.12.5",
|
||||
"@vxrn/tslib-lite": "1.12.5",
|
||||
"create-vxrn": "1.12.5",
|
||||
"@react-navigation/bottom-tabs": "7.10.1"
|
||||
"create-vxrn": "1.12.5"
|
||||
},
|
||||
"packageManager": "bun@1.3.9",
|
||||
"manypkg": {
|
||||
|
||||
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
-47
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
-31
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
@@ -1,270 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const index = require('./index-BSSKeTjn.cjs');
|
||||
|
||||
function arcInnerRadius(d) {
|
||||
return d.innerRadius;
|
||||
}
|
||||
|
||||
function arcOuterRadius(d) {
|
||||
return d.outerRadius;
|
||||
}
|
||||
|
||||
function arcStartAngle(d) {
|
||||
return d.startAngle;
|
||||
}
|
||||
|
||||
function arcEndAngle(d) {
|
||||
return d.endAngle;
|
||||
}
|
||||
|
||||
function arcPadAngle(d) {
|
||||
return d && d.padAngle; // Note: optional!
|
||||
}
|
||||
|
||||
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
||||
var x10 = x1 - x0, y10 = y1 - y0,
|
||||
x32 = x3 - x2, y32 = y3 - y2,
|
||||
t = y32 * x10 - x32 * y10;
|
||||
if (t * t < index.epsilon) return;
|
||||
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
|
||||
return [x0 + t * x10, y0 + t * y10];
|
||||
}
|
||||
|
||||
// Compute perpendicular offset line of length rc.
|
||||
// http://mathworld.wolfram.com/Circle-LineIntersection.html
|
||||
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
||||
var x01 = x0 - x1,
|
||||
y01 = y0 - y1,
|
||||
lo = (cw ? rc : -rc) / index.sqrt(x01 * x01 + y01 * y01),
|
||||
ox = lo * y01,
|
||||
oy = -lo * x01,
|
||||
x11 = x0 + ox,
|
||||
y11 = y0 + oy,
|
||||
x10 = x1 + ox,
|
||||
y10 = y1 + oy,
|
||||
x00 = (x11 + x10) / 2,
|
||||
y00 = (y11 + y10) / 2,
|
||||
dx = x10 - x11,
|
||||
dy = y10 - y11,
|
||||
d2 = dx * dx + dy * dy,
|
||||
r = r1 - rc,
|
||||
D = x11 * y10 - x10 * y11,
|
||||
d = (dy < 0 ? -1 : 1) * index.sqrt(index.max(0, r * r * d2 - D * D)),
|
||||
cx0 = (D * dy - dx * d) / d2,
|
||||
cy0 = (-D * dx - dy * d) / d2,
|
||||
cx1 = (D * dy + dx * d) / d2,
|
||||
cy1 = (-D * dx + dy * d) / d2,
|
||||
dx0 = cx0 - x00,
|
||||
dy0 = cy0 - y00,
|
||||
dx1 = cx1 - x00,
|
||||
dy1 = cy1 - y00;
|
||||
|
||||
// Pick the closer of the two intersection points.
|
||||
// TODO Is there a faster way to determine which intersection to use?
|
||||
if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
|
||||
|
||||
return {
|
||||
cx: cx0,
|
||||
cy: cy0,
|
||||
x01: -ox,
|
||||
y01: -oy,
|
||||
x11: cx0 * (r1 / r - 1),
|
||||
y11: cy0 * (r1 / r - 1)
|
||||
};
|
||||
}
|
||||
|
||||
function d3arc() {
|
||||
var innerRadius = arcInnerRadius,
|
||||
outerRadius = arcOuterRadius,
|
||||
cornerRadius = index.constant(0),
|
||||
padRadius = null,
|
||||
startAngle = arcStartAngle,
|
||||
endAngle = arcEndAngle,
|
||||
padAngle = arcPadAngle,
|
||||
context = null,
|
||||
path = index.withPath(arc);
|
||||
|
||||
function arc() {
|
||||
var buffer,
|
||||
r,
|
||||
r0 = +innerRadius.apply(this, arguments),
|
||||
r1 = +outerRadius.apply(this, arguments),
|
||||
a0 = startAngle.apply(this, arguments) - index.halfPi,
|
||||
a1 = endAngle.apply(this, arguments) - index.halfPi,
|
||||
da = index.abs(a1 - a0),
|
||||
cw = a1 > a0;
|
||||
|
||||
if (!context) context = buffer = path();
|
||||
|
||||
// Ensure that the outer radius is always larger than the inner radius.
|
||||
if (r1 < r0) r = r1, r1 = r0, r0 = r;
|
||||
|
||||
// Is it a point?
|
||||
if (!(r1 > index.epsilon)) context.moveTo(0, 0);
|
||||
|
||||
// Or is it a circle or annulus?
|
||||
else if (da > index.tau - index.epsilon) {
|
||||
context.moveTo(r1 * index.cos(a0), r1 * index.sin(a0));
|
||||
context.arc(0, 0, r1, a0, a1, !cw);
|
||||
if (r0 > index.epsilon) {
|
||||
context.moveTo(r0 * index.cos(a1), r0 * index.sin(a1));
|
||||
context.arc(0, 0, r0, a1, a0, cw);
|
||||
}
|
||||
}
|
||||
|
||||
// Or is it a circular or annular sector?
|
||||
else {
|
||||
var a01 = a0,
|
||||
a11 = a1,
|
||||
a00 = a0,
|
||||
a10 = a1,
|
||||
da0 = da,
|
||||
da1 = da,
|
||||
ap = padAngle.apply(this, arguments) / 2,
|
||||
rp = (ap > index.epsilon) && (padRadius ? +padRadius.apply(this, arguments) : index.sqrt(r0 * r0 + r1 * r1)),
|
||||
rc = index.min(index.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
|
||||
rc0 = rc,
|
||||
rc1 = rc,
|
||||
t0,
|
||||
t1;
|
||||
|
||||
// Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
|
||||
if (rp > index.epsilon) {
|
||||
var p0 = index.asin(rp / r0 * index.sin(ap)),
|
||||
p1 = index.asin(rp / r1 * index.sin(ap));
|
||||
if ((da0 -= p0 * 2) > index.epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
|
||||
else da0 = 0, a00 = a10 = (a0 + a1) / 2;
|
||||
if ((da1 -= p1 * 2) > index.epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
|
||||
else da1 = 0, a01 = a11 = (a0 + a1) / 2;
|
||||
}
|
||||
|
||||
var x01 = r1 * index.cos(a01),
|
||||
y01 = r1 * index.sin(a01),
|
||||
x10 = r0 * index.cos(a10),
|
||||
y10 = r0 * index.sin(a10);
|
||||
|
||||
// Apply rounded corners?
|
||||
if (rc > index.epsilon) {
|
||||
var x11 = r1 * index.cos(a11),
|
||||
y11 = r1 * index.sin(a11),
|
||||
x00 = r0 * index.cos(a00),
|
||||
y00 = r0 * index.sin(a00),
|
||||
oc;
|
||||
|
||||
// Restrict the corner radius according to the sector angle. If this
|
||||
// intersection fails, it’s probably because the arc is too small, so
|
||||
// disable the corner radius entirely.
|
||||
if (da < index.pi) {
|
||||
if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {
|
||||
var ax = x01 - oc[0],
|
||||
ay = y01 - oc[1],
|
||||
bx = x11 - oc[0],
|
||||
by = y11 - oc[1],
|
||||
kc = 1 / index.sin(index.acos((ax * bx + ay * by) / (index.sqrt(ax * ax + ay * ay) * index.sqrt(bx * bx + by * by))) / 2),
|
||||
lc = index.sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
|
||||
rc0 = index.min(rc, (r0 - lc) / (kc - 1));
|
||||
rc1 = index.min(rc, (r1 - lc) / (kc + 1));
|
||||
} else {
|
||||
rc0 = rc1 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Is the sector collapsed to a line?
|
||||
if (!(da1 > index.epsilon)) context.moveTo(x01, y01);
|
||||
|
||||
// Does the sector’s outer ring have rounded corners?
|
||||
else if (rc1 > index.epsilon) {
|
||||
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
|
||||
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
|
||||
|
||||
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
||||
|
||||
// Have the corners merged?
|
||||
if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, index.atan2(t0.y01, t0.x01), index.atan2(t1.y01, t1.x01), !cw);
|
||||
|
||||
// Otherwise, draw the two corners and the ring.
|
||||
else {
|
||||
context.arc(t0.cx, t0.cy, rc1, index.atan2(t0.y01, t0.x01), index.atan2(t0.y11, t0.x11), !cw);
|
||||
context.arc(0, 0, r1, index.atan2(t0.cy + t0.y11, t0.cx + t0.x11), index.atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
|
||||
context.arc(t1.cx, t1.cy, rc1, index.atan2(t1.y11, t1.x11), index.atan2(t1.y01, t1.x01), !cw);
|
||||
}
|
||||
}
|
||||
|
||||
// Or is the outer ring just a circular arc?
|
||||
else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
|
||||
|
||||
// Is there no inner ring, and it’s a circular sector?
|
||||
// Or perhaps it’s an annular sector collapsed due to padding?
|
||||
if (!(r0 > index.epsilon) || !(da0 > index.epsilon)) context.lineTo(x10, y10);
|
||||
|
||||
// Does the sector’s inner ring (or point) have rounded corners?
|
||||
else if (rc0 > index.epsilon) {
|
||||
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
|
||||
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
|
||||
|
||||
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
||||
|
||||
// Have the corners merged?
|
||||
if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, index.atan2(t0.y01, t0.x01), index.atan2(t1.y01, t1.x01), !cw);
|
||||
|
||||
// Otherwise, draw the two corners and the ring.
|
||||
else {
|
||||
context.arc(t0.cx, t0.cy, rc0, index.atan2(t0.y01, t0.x01), index.atan2(t0.y11, t0.x11), !cw);
|
||||
context.arc(0, 0, r0, index.atan2(t0.cy + t0.y11, t0.cx + t0.x11), index.atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
|
||||
context.arc(t1.cx, t1.cy, rc0, index.atan2(t1.y11, t1.x11), index.atan2(t1.y01, t1.x01), !cw);
|
||||
}
|
||||
}
|
||||
|
||||
// Or is the inner ring just a circular arc?
|
||||
else context.arc(0, 0, r0, a10, a00, cw);
|
||||
}
|
||||
|
||||
context.closePath();
|
||||
|
||||
if (buffer) return context = null, buffer + "" || null;
|
||||
}
|
||||
|
||||
arc.centroid = function() {
|
||||
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
|
||||
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - index.pi / 2;
|
||||
return [index.cos(a) * r, index.sin(a) * r];
|
||||
};
|
||||
|
||||
arc.innerRadius = function(_) {
|
||||
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : index.constant(+_), arc) : innerRadius;
|
||||
};
|
||||
|
||||
arc.outerRadius = function(_) {
|
||||
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : index.constant(+_), arc) : outerRadius;
|
||||
};
|
||||
|
||||
arc.cornerRadius = function(_) {
|
||||
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : index.constant(+_), arc) : cornerRadius;
|
||||
};
|
||||
|
||||
arc.padRadius = function(_) {
|
||||
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : index.constant(+_), arc) : padRadius;
|
||||
};
|
||||
|
||||
arc.startAngle = function(_) {
|
||||
return arguments.length ? (startAngle = typeof _ === "function" ? _ : index.constant(+_), arc) : startAngle;
|
||||
};
|
||||
|
||||
arc.endAngle = function(_) {
|
||||
return arguments.length ? (endAngle = typeof _ === "function" ? _ : index.constant(+_), arc) : endAngle;
|
||||
};
|
||||
|
||||
arc.padAngle = function(_) {
|
||||
return arguments.length ? (padAngle = typeof _ === "function" ? _ : index.constant(+_), arc) : padAngle;
|
||||
};
|
||||
|
||||
arc.context = function(_) {
|
||||
return arguments.length ? ((context = _ == null ? null : _), arc) : context;
|
||||
};
|
||||
|
||||
return arc;
|
||||
}
|
||||
|
||||
exports.d3arc = d3arc;
|
||||
@@ -1,268 +0,0 @@
|
||||
import { P as withPath, Q as pi, S as cos, T as sin, V as constant, W as halfPi, X as epsilon, Y as tau, Z as sqrt, $ as min, a0 as abs, a1 as atan2, a2 as max, a3 as asin, a4 as acos } from './index-BnaE_tRw.js';
|
||||
|
||||
function arcInnerRadius(d) {
|
||||
return d.innerRadius;
|
||||
}
|
||||
|
||||
function arcOuterRadius(d) {
|
||||
return d.outerRadius;
|
||||
}
|
||||
|
||||
function arcStartAngle(d) {
|
||||
return d.startAngle;
|
||||
}
|
||||
|
||||
function arcEndAngle(d) {
|
||||
return d.endAngle;
|
||||
}
|
||||
|
||||
function arcPadAngle(d) {
|
||||
return d && d.padAngle; // Note: optional!
|
||||
}
|
||||
|
||||
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
||||
var x10 = x1 - x0, y10 = y1 - y0,
|
||||
x32 = x3 - x2, y32 = y3 - y2,
|
||||
t = y32 * x10 - x32 * y10;
|
||||
if (t * t < epsilon) return;
|
||||
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
|
||||
return [x0 + t * x10, y0 + t * y10];
|
||||
}
|
||||
|
||||
// Compute perpendicular offset line of length rc.
|
||||
// http://mathworld.wolfram.com/Circle-LineIntersection.html
|
||||
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
||||
var x01 = x0 - x1,
|
||||
y01 = y0 - y1,
|
||||
lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),
|
||||
ox = lo * y01,
|
||||
oy = -lo * x01,
|
||||
x11 = x0 + ox,
|
||||
y11 = y0 + oy,
|
||||
x10 = x1 + ox,
|
||||
y10 = y1 + oy,
|
||||
x00 = (x11 + x10) / 2,
|
||||
y00 = (y11 + y10) / 2,
|
||||
dx = x10 - x11,
|
||||
dy = y10 - y11,
|
||||
d2 = dx * dx + dy * dy,
|
||||
r = r1 - rc,
|
||||
D = x11 * y10 - x10 * y11,
|
||||
d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),
|
||||
cx0 = (D * dy - dx * d) / d2,
|
||||
cy0 = (-D * dx - dy * d) / d2,
|
||||
cx1 = (D * dy + dx * d) / d2,
|
||||
cy1 = (-D * dx + dy * d) / d2,
|
||||
dx0 = cx0 - x00,
|
||||
dy0 = cy0 - y00,
|
||||
dx1 = cx1 - x00,
|
||||
dy1 = cy1 - y00;
|
||||
|
||||
// Pick the closer of the two intersection points.
|
||||
// TODO Is there a faster way to determine which intersection to use?
|
||||
if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
|
||||
|
||||
return {
|
||||
cx: cx0,
|
||||
cy: cy0,
|
||||
x01: -ox,
|
||||
y01: -oy,
|
||||
x11: cx0 * (r1 / r - 1),
|
||||
y11: cy0 * (r1 / r - 1)
|
||||
};
|
||||
}
|
||||
|
||||
function d3arc() {
|
||||
var innerRadius = arcInnerRadius,
|
||||
outerRadius = arcOuterRadius,
|
||||
cornerRadius = constant(0),
|
||||
padRadius = null,
|
||||
startAngle = arcStartAngle,
|
||||
endAngle = arcEndAngle,
|
||||
padAngle = arcPadAngle,
|
||||
context = null,
|
||||
path = withPath(arc);
|
||||
|
||||
function arc() {
|
||||
var buffer,
|
||||
r,
|
||||
r0 = +innerRadius.apply(this, arguments),
|
||||
r1 = +outerRadius.apply(this, arguments),
|
||||
a0 = startAngle.apply(this, arguments) - halfPi,
|
||||
a1 = endAngle.apply(this, arguments) - halfPi,
|
||||
da = abs(a1 - a0),
|
||||
cw = a1 > a0;
|
||||
|
||||
if (!context) context = buffer = path();
|
||||
|
||||
// Ensure that the outer radius is always larger than the inner radius.
|
||||
if (r1 < r0) r = r1, r1 = r0, r0 = r;
|
||||
|
||||
// Is it a point?
|
||||
if (!(r1 > epsilon)) context.moveTo(0, 0);
|
||||
|
||||
// Or is it a circle or annulus?
|
||||
else if (da > tau - epsilon) {
|
||||
context.moveTo(r1 * cos(a0), r1 * sin(a0));
|
||||
context.arc(0, 0, r1, a0, a1, !cw);
|
||||
if (r0 > epsilon) {
|
||||
context.moveTo(r0 * cos(a1), r0 * sin(a1));
|
||||
context.arc(0, 0, r0, a1, a0, cw);
|
||||
}
|
||||
}
|
||||
|
||||
// Or is it a circular or annular sector?
|
||||
else {
|
||||
var a01 = a0,
|
||||
a11 = a1,
|
||||
a00 = a0,
|
||||
a10 = a1,
|
||||
da0 = da,
|
||||
da1 = da,
|
||||
ap = padAngle.apply(this, arguments) / 2,
|
||||
rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),
|
||||
rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
|
||||
rc0 = rc,
|
||||
rc1 = rc,
|
||||
t0,
|
||||
t1;
|
||||
|
||||
// Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
|
||||
if (rp > epsilon) {
|
||||
var p0 = asin(rp / r0 * sin(ap)),
|
||||
p1 = asin(rp / r1 * sin(ap));
|
||||
if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
|
||||
else da0 = 0, a00 = a10 = (a0 + a1) / 2;
|
||||
if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
|
||||
else da1 = 0, a01 = a11 = (a0 + a1) / 2;
|
||||
}
|
||||
|
||||
var x01 = r1 * cos(a01),
|
||||
y01 = r1 * sin(a01),
|
||||
x10 = r0 * cos(a10),
|
||||
y10 = r0 * sin(a10);
|
||||
|
||||
// Apply rounded corners?
|
||||
if (rc > epsilon) {
|
||||
var x11 = r1 * cos(a11),
|
||||
y11 = r1 * sin(a11),
|
||||
x00 = r0 * cos(a00),
|
||||
y00 = r0 * sin(a00),
|
||||
oc;
|
||||
|
||||
// Restrict the corner radius according to the sector angle. If this
|
||||
// intersection fails, it’s probably because the arc is too small, so
|
||||
// disable the corner radius entirely.
|
||||
if (da < pi) {
|
||||
if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {
|
||||
var ax = x01 - oc[0],
|
||||
ay = y01 - oc[1],
|
||||
bx = x11 - oc[0],
|
||||
by = y11 - oc[1],
|
||||
kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),
|
||||
lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
|
||||
rc0 = min(rc, (r0 - lc) / (kc - 1));
|
||||
rc1 = min(rc, (r1 - lc) / (kc + 1));
|
||||
} else {
|
||||
rc0 = rc1 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Is the sector collapsed to a line?
|
||||
if (!(da1 > epsilon)) context.moveTo(x01, y01);
|
||||
|
||||
// Does the sector’s outer ring have rounded corners?
|
||||
else if (rc1 > epsilon) {
|
||||
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
|
||||
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
|
||||
|
||||
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
||||
|
||||
// Have the corners merged?
|
||||
if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
|
||||
|
||||
// Otherwise, draw the two corners and the ring.
|
||||
else {
|
||||
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
|
||||
context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
|
||||
context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
|
||||
}
|
||||
}
|
||||
|
||||
// Or is the outer ring just a circular arc?
|
||||
else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
|
||||
|
||||
// Is there no inner ring, and it’s a circular sector?
|
||||
// Or perhaps it’s an annular sector collapsed due to padding?
|
||||
if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);
|
||||
|
||||
// Does the sector’s inner ring (or point) have rounded corners?
|
||||
else if (rc0 > epsilon) {
|
||||
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
|
||||
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
|
||||
|
||||
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
||||
|
||||
// Have the corners merged?
|
||||
if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
|
||||
|
||||
// Otherwise, draw the two corners and the ring.
|
||||
else {
|
||||
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
|
||||
context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
|
||||
context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
|
||||
}
|
||||
}
|
||||
|
||||
// Or is the inner ring just a circular arc?
|
||||
else context.arc(0, 0, r0, a10, a00, cw);
|
||||
}
|
||||
|
||||
context.closePath();
|
||||
|
||||
if (buffer) return context = null, buffer + "" || null;
|
||||
}
|
||||
|
||||
arc.centroid = function() {
|
||||
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
|
||||
a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
|
||||
return [cos(a) * r, sin(a) * r];
|
||||
};
|
||||
|
||||
arc.innerRadius = function(_) {
|
||||
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius;
|
||||
};
|
||||
|
||||
arc.outerRadius = function(_) {
|
||||
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius;
|
||||
};
|
||||
|
||||
arc.cornerRadius = function(_) {
|
||||
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius;
|
||||
};
|
||||
|
||||
arc.padRadius = function(_) {
|
||||
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius;
|
||||
};
|
||||
|
||||
arc.startAngle = function(_) {
|
||||
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle;
|
||||
};
|
||||
|
||||
arc.endAngle = function(_) {
|
||||
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle;
|
||||
};
|
||||
|
||||
arc.padAngle = function(_) {
|
||||
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle;
|
||||
};
|
||||
|
||||
arc.context = function(_) {
|
||||
return arguments.length ? ((context = _ == null ? null : _), arc) : context;
|
||||
};
|
||||
|
||||
return arc;
|
||||
}
|
||||
|
||||
export { d3arc as d };
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
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
@@ -1,3 +0,0 @@
|
||||
var __viteBrowserExternal = {};
|
||||
|
||||
export { __viteBrowserExternal as default };
|
||||
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
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
@@ -1,7 +0,0 @@
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Berry\",\"name\":\"berry\",\"patterns\":[{\"include\":\"#controls\"},{\"include\":\"#strings\"},{\"include\":\"#comment-block\"},{\"include\":\"#comments\"},{\"include\":\"#keywords\"},{\"include\":\"#function\"},{\"include\":\"#member\"},{\"include\":\"#identifier\"},{\"include\":\"#number\"},{\"include\":\"#operator\"}],\"repository\":{\"comment-block\":{\"begin\":\"#-\",\"end\":\"-#\",\"name\":\"comment.berry\",\"patterns\":[{}]},\"comments\":{\"begin\":\"#\",\"end\":\"\\\\n\",\"name\":\"comment.line.berry\",\"patterns\":[{}]},\"controls\":{\"patterns\":[{\"match\":\"\\\\b(if|elif|else|for|while|do|end|break|continue|return|try|except|raise)\\\\b\",\"name\":\"keyword.control.berry\"}]},\"function\":{\"patterns\":[{\"match\":\"\\\\b([A-Z_a-z][0-9A-Z_a-z]*(?=\\\\s*\\\\())\",\"name\":\"entity.name.function.berry\"}]},\"identifier\":{\"patterns\":[{\"match\":\"\\\\b[A-Z_a-z]\\\\w+\\\\b\",\"name\":\"identifier.berry\"}]},\"keywords\":{\"patterns\":[{\"match\":\"\\\\b(var|static|def|class|true|false|nil|self|super|import|as|_class)\\\\b\",\"name\":\"keyword.berry\"}]},\"member\":{\"patterns\":[{\"captures\":{\"0\":{\"name\":\"entity.other.attribute-name.berry\"}},\"match\":\"\\\\.([A-Z_a-z][0-9A-Z_a-z]*)\"}]},\"number\":{\"patterns\":[{\"match\":\"0x\\\\h+|\\\\d+|(\\\\d+\\\\.?|\\\\.\\\\d)\\\\d*([Ee][-+]?\\\\d+)?\",\"name\":\"constant.numeric.berry\"}]},\"operator\":{\"patterns\":[{\"match\":\"[-\\\\]!%\\\\&(-+./:<=>\\\\[^|~]\",\"name\":\"keyword.operator.berry\"}]},\"strings\":{\"patterns\":[{\"begin\":\"f(?=[\\\"'])\",\"patterns\":[{\"begin\":\"\\\"\",\"end\":\"\\\"\",\"name\":\"string.quoted.other.berry\",\"patterns\":[{\"match\":\"(\\\\\\\\x\\\\h{2})|(\\\\\\\\[0-7]{3})|(\\\\\\\\\\\\\\\\)|(\\\\\\\\\\\")|(\\\\\\\\')|(\\\\\\\\a)|(\\\\\\\\b)|(\\\\\\\\f)|(\\\\\\\\n)|(\\\\\\\\r)|(\\\\\\\\t)|(\\\\\\\\v)\",\"name\":\"constant.character.escape.berry\"},{\"match\":\"\\\\{\\\\{[^}]*}}\",\"name\":\"string.quoted.other.berry\"},{\"begin\":\"\\\\{\",\"end\":\"}\",\"name\":\"keyword.other.unit.berry\",\"patterns\":[{\"include\":\"#keywords\"},{\"include\":\"#numbers\"},{\"include\":\"#identifier\"},{\"include\":\"#operator\"},{\"include\":\"#member\"},{\"include\":\"#function\"}]}]},{\"begin\":\"'\",\"end\":\"'\",\"name\":\"string.quoted.other.berry\",\"patterns\":[{\"match\":\"(\\\\\\\\x\\\\h{2})|(\\\\\\\\[0-7]{3})|(\\\\\\\\\\\\\\\\)|(\\\\\\\\\\\")|(\\\\\\\\')|(\\\\\\\\a)|(\\\\\\\\b)|(\\\\\\\\f)|(\\\\\\\\n)|(\\\\\\\\r)|(\\\\\\\\t)|(\\\\\\\\v)\",\"name\":\"constant.character.escape.berry\"},{\"match\":\"\\\\{\\\\{[^}]*}}\",\"name\":\"string.quoted.other.berry\"},{\"begin\":\"\\\\{\",\"end\":\"}\",\"name\":\"keyword.other.unit.berry\",\"patterns\":[{\"include\":\"#keywords\"},{\"include\":\"#numbers\"},{\"include\":\"#identifier\"},{\"include\":\"#operator\"},{\"include\":\"#member\"},{\"include\":\"#function\"}]}]}],\"while\":\"\\\\G|^[\\\\t ]*(?=[\\\"'])\"},{\"begin\":\"([\\\"'])\",\"end\":\"\\\\1\",\"name\":\"string.quoted.double.berry\",\"patterns\":[{\"match\":\"(\\\\\\\\x\\\\h{2})|(\\\\\\\\[0-7]{3})|(\\\\\\\\\\\\\\\\)|(\\\\\\\\\\\")|(\\\\\\\\')|(\\\\\\\\a)|(\\\\\\\\b)|(\\\\\\\\f)|(\\\\\\\\n)|(\\\\\\\\r)|(\\\\\\\\t)|(\\\\\\\\v)\",\"name\":\"constant.character.escape.berry\"}]}]}},\"scopeName\":\"source.berry\",\"aliases\":[\"be\"]}"));
|
||||
|
||||
const berry = [
|
||||
lang
|
||||
];
|
||||
|
||||
export { berry as default };
|
||||
@@ -1,11 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Berry\",\"name\":\"berry\",\"patterns\":[{\"include\":\"#controls\"},{\"include\":\"#strings\"},{\"include\":\"#comment-block\"},{\"include\":\"#comments\"},{\"include\":\"#keywords\"},{\"include\":\"#function\"},{\"include\":\"#member\"},{\"include\":\"#identifier\"},{\"include\":\"#number\"},{\"include\":\"#operator\"}],\"repository\":{\"comment-block\":{\"begin\":\"#-\",\"end\":\"-#\",\"name\":\"comment.berry\",\"patterns\":[{}]},\"comments\":{\"begin\":\"#\",\"end\":\"\\\\n\",\"name\":\"comment.line.berry\",\"patterns\":[{}]},\"controls\":{\"patterns\":[{\"match\":\"\\\\b(if|elif|else|for|while|do|end|break|continue|return|try|except|raise)\\\\b\",\"name\":\"keyword.control.berry\"}]},\"function\":{\"patterns\":[{\"match\":\"\\\\b([A-Z_a-z][0-9A-Z_a-z]*(?=\\\\s*\\\\())\",\"name\":\"entity.name.function.berry\"}]},\"identifier\":{\"patterns\":[{\"match\":\"\\\\b[A-Z_a-z]\\\\w+\\\\b\",\"name\":\"identifier.berry\"}]},\"keywords\":{\"patterns\":[{\"match\":\"\\\\b(var|static|def|class|true|false|nil|self|super|import|as|_class)\\\\b\",\"name\":\"keyword.berry\"}]},\"member\":{\"patterns\":[{\"captures\":{\"0\":{\"name\":\"entity.other.attribute-name.berry\"}},\"match\":\"\\\\.([A-Z_a-z][0-9A-Z_a-z]*)\"}]},\"number\":{\"patterns\":[{\"match\":\"0x\\\\h+|\\\\d+|(\\\\d+\\\\.?|\\\\.\\\\d)\\\\d*([Ee][-+]?\\\\d+)?\",\"name\":\"constant.numeric.berry\"}]},\"operator\":{\"patterns\":[{\"match\":\"[-\\\\]!%\\\\&(-+./:<=>\\\\[^|~]\",\"name\":\"keyword.operator.berry\"}]},\"strings\":{\"patterns\":[{\"begin\":\"f(?=[\\\"'])\",\"patterns\":[{\"begin\":\"\\\"\",\"end\":\"\\\"\",\"name\":\"string.quoted.other.berry\",\"patterns\":[{\"match\":\"(\\\\\\\\x\\\\h{2})|(\\\\\\\\[0-7]{3})|(\\\\\\\\\\\\\\\\)|(\\\\\\\\\\\")|(\\\\\\\\')|(\\\\\\\\a)|(\\\\\\\\b)|(\\\\\\\\f)|(\\\\\\\\n)|(\\\\\\\\r)|(\\\\\\\\t)|(\\\\\\\\v)\",\"name\":\"constant.character.escape.berry\"},{\"match\":\"\\\\{\\\\{[^}]*}}\",\"name\":\"string.quoted.other.berry\"},{\"begin\":\"\\\\{\",\"end\":\"}\",\"name\":\"keyword.other.unit.berry\",\"patterns\":[{\"include\":\"#keywords\"},{\"include\":\"#numbers\"},{\"include\":\"#identifier\"},{\"include\":\"#operator\"},{\"include\":\"#member\"},{\"include\":\"#function\"}]}]},{\"begin\":\"'\",\"end\":\"'\",\"name\":\"string.quoted.other.berry\",\"patterns\":[{\"match\":\"(\\\\\\\\x\\\\h{2})|(\\\\\\\\[0-7]{3})|(\\\\\\\\\\\\\\\\)|(\\\\\\\\\\\")|(\\\\\\\\')|(\\\\\\\\a)|(\\\\\\\\b)|(\\\\\\\\f)|(\\\\\\\\n)|(\\\\\\\\r)|(\\\\\\\\t)|(\\\\\\\\v)\",\"name\":\"constant.character.escape.berry\"},{\"match\":\"\\\\{\\\\{[^}]*}}\",\"name\":\"string.quoted.other.berry\"},{\"begin\":\"\\\\{\",\"end\":\"}\",\"name\":\"keyword.other.unit.berry\",\"patterns\":[{\"include\":\"#keywords\"},{\"include\":\"#numbers\"},{\"include\":\"#identifier\"},{\"include\":\"#operator\"},{\"include\":\"#member\"},{\"include\":\"#function\"}]}]}],\"while\":\"\\\\G|^[\\\\t ]*(?=[\\\"'])\"},{\"begin\":\"([\\\"'])\",\"end\":\"\\\\1\",\"name\":\"string.quoted.double.berry\",\"patterns\":[{\"match\":\"(\\\\\\\\x\\\\h{2})|(\\\\\\\\[0-7]{3})|(\\\\\\\\\\\\\\\\)|(\\\\\\\\\\\")|(\\\\\\\\')|(\\\\\\\\a)|(\\\\\\\\b)|(\\\\\\\\f)|(\\\\\\\\n)|(\\\\\\\\r)|(\\\\\\\\t)|(\\\\\\\\v)\",\"name\":\"constant.character.escape.berry\"}]}]}},\"scopeName\":\"source.berry\",\"aliases\":[\"be\"]}"));
|
||||
|
||||
const berry = [
|
||||
lang
|
||||
];
|
||||
|
||||
exports.default = berry;
|
||||
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 it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
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
@@ -1,14 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
|
||||
const python = require('./python-R5Doq6Ap.cjs');
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Cairo\",\"name\":\"cairo\",\"patterns\":[{\"begin\":\"\\\\b(if).*\\\\(\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.if\"},\"2\":{\"name\":\"entity.name.condition\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"keyword.control.end\"}},\"name\":\"meta.control.if\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"begin\":\"\\\\b(with)\\\\s+(.+)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.with\"},\"2\":{\"name\":\"entity.name.identifiers\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"keyword.control.end\"}},\"name\":\"meta.control.with\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"begin\":\"\\\\b(with_attr)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*[({]\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.with_attr\"},\"2\":{\"name\":\"entity.name.function\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"keyword.control.end\"}},\"name\":\"meta.control.with_attr\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"match\":\"\\\\belse\\\\b\",\"name\":\"keyword.control.else\"},{\"match\":\"\\\\b(call|jmp|ret|abs|rel|if)\\\\b\",\"name\":\"keyword.other.opcode\"},{\"match\":\"\\\\b([af]p)\\\\b\",\"name\":\"keyword.other.register\"},{\"match\":\"\\\\b(const|let|local|tempvar|felt|as|from|import|static_assert|return|assert|cast|alloc_locals|with|with_attr|nondet|dw|codeoffset|new|using|and)\\\\b\",\"name\":\"keyword.other.meta\"},{\"match\":\"\\\\b(SIZE(?:OF_LOCALS|))\\\\b\",\"name\":\"markup.italic\"},{\"match\":\"//[^\\\\n]*\\\\n\",\"name\":\"comment.line.sharp\"},{\"match\":\"\\\\b[A-Z_a-z][0-9A-Z_a-z]*:\\\\s*$\",\"name\":\"entity.name.function\"},{\"begin\":\"\\\\b(func)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*[({]\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.function.cairo\"},\"2\":{\"name\":\"entity.name.function\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"storage.type.function.cairo\"}},\"name\":\"meta.function.cairo\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"begin\":\"\\\\b(struct|namespace)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.function.cairo\"},\"2\":{\"name\":\"entity.name.function\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"storage.type.function.cairo\"}},\"name\":\"meta.function.cairo\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"match\":\"\\\\b[-+]?[0-9]+\\\\b\",\"name\":\"constant.numeric.decimal\"},{\"match\":\"\\\\b[-+]?0x\\\\h+\\\\b\",\"name\":\"constant.numeric.hexadecimal\"},{\"match\":\"'[^']*'\",\"name\":\"string.quoted.single\"},{\"match\":\"\\\"[^\\\"]*\\\"\",\"name\":\"string.quoted.double\"},{\"begin\":\"%\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.begin.python\"}},\"contentName\":\"source.python\",\"end\":\"%}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.end.python\"},\"1\":{\"name\":\"source.python\"}},\"name\":\"meta.embedded.block.python\",\"patterns\":[{\"include\":\"source.python\"}]}],\"scopeName\":\"source.cairo0\",\"embeddedLangs\":[\"python\"]}"));
|
||||
|
||||
const cairo = [
|
||||
...python.default,
|
||||
lang
|
||||
];
|
||||
|
||||
exports.default = cairo;
|
||||
@@ -1,10 +0,0 @@
|
||||
import python from './python-CRy0opiU.js';
|
||||
|
||||
const lang = Object.freeze(JSON.parse("{\"displayName\":\"Cairo\",\"name\":\"cairo\",\"patterns\":[{\"begin\":\"\\\\b(if).*\\\\(\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.if\"},\"2\":{\"name\":\"entity.name.condition\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"keyword.control.end\"}},\"name\":\"meta.control.if\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"begin\":\"\\\\b(with)\\\\s+(.+)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.with\"},\"2\":{\"name\":\"entity.name.identifiers\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"keyword.control.end\"}},\"name\":\"meta.control.with\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"begin\":\"\\\\b(with_attr)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*[({]\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.with_attr\"},\"2\":{\"name\":\"entity.name.function\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"keyword.control.end\"}},\"name\":\"meta.control.with_attr\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"match\":\"\\\\belse\\\\b\",\"name\":\"keyword.control.else\"},{\"match\":\"\\\\b(call|jmp|ret|abs|rel|if)\\\\b\",\"name\":\"keyword.other.opcode\"},{\"match\":\"\\\\b([af]p)\\\\b\",\"name\":\"keyword.other.register\"},{\"match\":\"\\\\b(const|let|local|tempvar|felt|as|from|import|static_assert|return|assert|cast|alloc_locals|with|with_attr|nondet|dw|codeoffset|new|using|and)\\\\b\",\"name\":\"keyword.other.meta\"},{\"match\":\"\\\\b(SIZE(?:OF_LOCALS|))\\\\b\",\"name\":\"markup.italic\"},{\"match\":\"//[^\\\\n]*\\\\n\",\"name\":\"comment.line.sharp\"},{\"match\":\"\\\\b[A-Z_a-z][0-9A-Z_a-z]*:\\\\s*$\",\"name\":\"entity.name.function\"},{\"begin\":\"\\\\b(func)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*[({]\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.function.cairo\"},\"2\":{\"name\":\"entity.name.function\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"storage.type.function.cairo\"}},\"name\":\"meta.function.cairo\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"begin\":\"\\\\b(struct|namespace)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)\\\\s*\\\\{\",\"beginCaptures\":{\"1\":{\"name\":\"storage.type.function.cairo\"},\"2\":{\"name\":\"entity.name.function\"}},\"contentName\":\"source.cairo0\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"storage.type.function.cairo\"}},\"name\":\"meta.function.cairo\",\"patterns\":[{\"include\":\"source.cairo0\"}]},{\"match\":\"\\\\b[-+]?[0-9]+\\\\b\",\"name\":\"constant.numeric.decimal\"},{\"match\":\"\\\\b[-+]?0x\\\\h+\\\\b\",\"name\":\"constant.numeric.hexadecimal\"},{\"match\":\"'[^']*'\",\"name\":\"string.quoted.single\"},{\"match\":\"\\\"[^\\\"]*\\\"\",\"name\":\"string.quoted.double\"},{\"begin\":\"%\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.begin.python\"}},\"contentName\":\"source.python\",\"end\":\"%}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.end.python\"},\"1\":{\"name\":\"source.python\"}},\"name\":\"meta.embedded.block.python\",\"patterns\":[{\"include\":\"source.python\"}]}],\"scopeName\":\"source.cairo0\",\"embeddedLangs\":[\"python\"]}"));
|
||||
|
||||
const cairo = [
|
||||
...python,
|
||||
lang
|
||||
];
|
||||
|
||||
export { cairo as default };
|
||||
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
@@ -1,9 +0,0 @@
|
||||
import { U as Utils, F as Color } from './index-BnaE_tRw.js';
|
||||
|
||||
/* IMPORT */
|
||||
/* MAIN */
|
||||
const channel = (color, channel) => {
|
||||
return Utils.lang.round(Color.parse(color)[channel]);
|
||||
};
|
||||
|
||||
export { channel as c };
|
||||
@@ -1,11 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const index = require('./index-BSSKeTjn.cjs');
|
||||
|
||||
/* IMPORT */
|
||||
/* MAIN */
|
||||
const channel = (color, channel) => {
|
||||
return index.Utils.lang.round(index.Color.parse(color)[channel]);
|
||||
};
|
||||
|
||||
exports.channel = channel;
|
||||
@@ -1,25 +0,0 @@
|
||||
import { _ as __name, e as configureSvgSize, l as log } from './index-BnaE_tRw.js';
|
||||
|
||||
// src/rendering-util/setupViewPortForSVG.ts
|
||||
var setupViewPortForSVG = /* @__PURE__ */ __name((svg, padding, cssDiagram, useMaxWidth) => {
|
||||
svg.attr("class", cssDiagram);
|
||||
const { width, height, x, y } = calculateDimensionsWithPadding(svg, padding);
|
||||
configureSvgSize(svg, height, width, useMaxWidth);
|
||||
const viewBox = createViewBox(x, y, width, height, padding);
|
||||
svg.attr("viewBox", viewBox);
|
||||
log.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);
|
||||
}, "setupViewPortForSVG");
|
||||
var calculateDimensionsWithPadding = /* @__PURE__ */ __name((svg, padding) => {
|
||||
const bounds = svg.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };
|
||||
return {
|
||||
width: bounds.width + padding * 2,
|
||||
height: bounds.height + padding * 2,
|
||||
x: bounds.x,
|
||||
y: bounds.y
|
||||
};
|
||||
}, "calculateDimensionsWithPadding");
|
||||
var createViewBox = /* @__PURE__ */ __name((x, y, width, height, padding) => {
|
||||
return `${x - padding} ${y - padding} ${width} ${height}`;
|
||||
}, "createViewBox");
|
||||
|
||||
export { setupViewPortForSVG as s };
|
||||
@@ -1,27 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const index = require('./index-BSSKeTjn.cjs');
|
||||
|
||||
// src/rendering-util/setupViewPortForSVG.ts
|
||||
var setupViewPortForSVG = /* @__PURE__ */ index.__name((svg, padding, cssDiagram, useMaxWidth) => {
|
||||
svg.attr("class", cssDiagram);
|
||||
const { width, height, x, y } = calculateDimensionsWithPadding(svg, padding);
|
||||
index.configureSvgSize(svg, height, width, useMaxWidth);
|
||||
const viewBox = createViewBox(x, y, width, height, padding);
|
||||
svg.attr("viewBox", viewBox);
|
||||
index.log.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);
|
||||
}, "setupViewPortForSVG");
|
||||
var calculateDimensionsWithPadding = /* @__PURE__ */ index.__name((svg, padding) => {
|
||||
const bounds = svg.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };
|
||||
return {
|
||||
width: bounds.width + padding * 2,
|
||||
height: bounds.height + padding * 2,
|
||||
x: bounds.x,
|
||||
y: bounds.y
|
||||
};
|
||||
}, "calculateDimensionsWithPadding");
|
||||
var createViewBox = /* @__PURE__ */ index.__name((x, y, width, height, padding) => {
|
||||
return `${x - padding} ${y - padding} ${width} ${height}`;
|
||||
}, "createViewBox");
|
||||
|
||||
exports.setupViewPortForSVG = setupViewPortForSVG;
|
||||
@@ -1,17 +0,0 @@
|
||||
import { _ as __name } from './index-BnaE_tRw.js';
|
||||
|
||||
// src/diagrams/common/populateCommonDb.ts
|
||||
function populateCommonDb(ast, db) {
|
||||
if (ast.accDescr) {
|
||||
db.setAccDescription?.(ast.accDescr);
|
||||
}
|
||||
if (ast.accTitle) {
|
||||
db.setAccTitle?.(ast.accTitle);
|
||||
}
|
||||
if (ast.title) {
|
||||
db.setDiagramTitle?.(ast.title);
|
||||
}
|
||||
}
|
||||
__name(populateCommonDb, "populateCommonDb");
|
||||
|
||||
export { populateCommonDb as p };
|
||||
@@ -1,19 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const index = require('./index-BSSKeTjn.cjs');
|
||||
|
||||
// src/diagrams/common/populateCommonDb.ts
|
||||
function populateCommonDb(ast, db) {
|
||||
if (ast.accDescr) {
|
||||
db.setAccDescription?.(ast.accDescr);
|
||||
}
|
||||
if (ast.accTitle) {
|
||||
db.setAccTitle?.(ast.accTitle);
|
||||
}
|
||||
if (ast.title) {
|
||||
db.setDiagramTitle?.(ast.title);
|
||||
}
|
||||
}
|
||||
index.__name(populateCommonDb, "populateCommonDb");
|
||||
|
||||
exports.populateCommonDb = populateCommonDb;
|
||||
@@ -1,15 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const index = require('./index-BSSKeTjn.cjs');
|
||||
|
||||
var getDiagramElement = /* @__PURE__ */ index.__name((id, securityLevel) => {
|
||||
let sandboxElement;
|
||||
if (securityLevel === "sandbox") {
|
||||
sandboxElement = index.select("#i" + id);
|
||||
}
|
||||
const root = securityLevel === "sandbox" ? index.select(sandboxElement.nodes()[0].contentDocument.body) : index.select("body");
|
||||
const svg = root.select(`[id="${id}"]`);
|
||||
return svg;
|
||||
}, "getDiagramElement");
|
||||
|
||||
exports.getDiagramElement = getDiagramElement;
|
||||
@@ -1,13 +0,0 @@
|
||||
import { _ as __name, d as select } from './index-BnaE_tRw.js';
|
||||
|
||||
var getDiagramElement = /* @__PURE__ */ __name((id, securityLevel) => {
|
||||
let sandboxElement;
|
||||
if (securityLevel === "sandbox") {
|
||||
sandboxElement = select("#i" + id);
|
||||
}
|
||||
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
|
||||
const svg = root.select(`[id="${id}"]`);
|
||||
return svg;
|
||||
}, "getDiagramElement");
|
||||
|
||||
export { getDiagramElement as g };
|
||||
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 it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user