repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/auth.js | src/auth.js | import { trackEvent } from './analytics';
import firebase from 'firebase/app';
import { log } from './utils';
export const auth = {
logout() {
firebase.auth().signOut();
},
login(providerName) {
var provider;
if (providerName === 'facebook') {
provider = new firebase.auth.FacebookAuthProvider()... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/deferred.js | src/deferred.js | export function deferred() {
var d = {};
var promise = new Promise(function (resolve, reject) {
d.resolve = resolve;
d.reject = reject;
});
// Add the native promise as a key on deferred object.
d.promise = promise;
// Also move all props/methods of native promise on the deferred obj.
return Obje... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/test-pages.js | src/test-pages.js | /**
* Test script for verifying the pages implementation
*
* This script can be run in the browser console to test the pages functionality
*/
// Test function to verify pages implementation
function testPagesImplementation() {
console.log('=== Testing Pages Implementation ===');
// 1. Test migration of exi... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/db.js | src/db.js | import './firebaseInit';
import firebase from 'firebase/app';
import 'firebase/firestore';
import { deferred } from './deferred';
import { trackEvent } from './analytics';
import { log } from './utils';
(() => {
const FAUX_DELAY = 1;
var db;
var dbPromise;
var local = {
get: (obj, cb) => {
const re... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/firebaseInit.js | src/firebaseInit.js | import firebase from 'firebase/app';
import config from './services/configuration';
firebase.initializeApp(config.firebase);
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/itemService.js | src/itemService.js | import { deferred } from './deferred';
import { log } from './utils';
import firebase from 'firebase/app';
import { generateRandomId } from './utils';
export let itemService;
if (window.zenumlDesktop) {
itemService = window.itemService;
} else {
itemService = {
async getItem(id, shareToken = null) {
if ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/WriteFile.js | src/WriteFile.js | import { trackEvent } from './analytics';
import { log } from './utils';
export function writeFileAsync(name, blob) {
console.log('writing file', name);
return new Promise((resolve) => {
writeFile(name, blob, () => {
resolve();
});
});
}
export function writeFile(name, blob, cb) {
var fileWritten... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/libraryList.js | src/libraryList.js | export const jsLibs = [
{
url: 'https://code.jquery.com/jquery-3.2.1.min.js',
label: 'jQuery',
type: 'js',
},
{
url: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js',
label: 'Bootstrap 3',
type: 'js',
},
{
url: 'https://stackpath.bootstrapcdn.com/bootstrap/4.1.... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/computes.js | src/computes.js | import { deferred } from './deferred';
import { addInfiniteLoopProtection } from './utils';
// import userService from './services/user_service';
// import featureToggle from './services/feature_toggle';
import { CssModes, HtmlModes, JsModes } from './codeModes';
import esprima from 'esprima';
/* computeHtml, computeC... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/utils.js | src/utils.js | import { trackEvent } from './analytics';
import { computeHtml, computeCss, computeJs } from './computes';
import { JsModes } from './codeModes';
import { deferred } from './deferred';
import zenumlUrl from '@zenuml/core/dist/zenuml?url';
import esprima from 'esprima';
// window.Store = Store;
// window.SeqDiagram = ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/services/planService.js | src/services/planService.js | import config from './configuration';
//TODO(refactor): It is necessary to integrate more plan-related logic into this module.
const getProductByPlanType = (planType) => {
const productMap = {
'basic-monthly': config.paddleProductBasicMonthly,
'plus-monthly': config.paddleProductPlusMonthly,
'basic-year... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/services/configuration.js | src/services/configuration.js | const configByDomain = {
'app.zenuml.com': {
firebase: {
apiKey: 'AIzaSyCBEg3VpY6UjXNnDzvXieSYx13Q63Rs-a0',
authDomain: 'app.zenuml.com',
databaseURL: 'https://web-sequence-local.firebaseio.com/',
projectId: 'web-sequence-local',
storageBucket: 'web-sequence-local.appspot.com',
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/services/mixpanel.js | src/services/mixpanel.js | async function track(event) {
return await fetch('/track', {
method: 'POST',
body: JSON.stringify(
Object.assign({}, event, { userId: window.user && window.user.uid }),
),
headers: { 'Content-Type': 'application/json' },
});
}
export default { track };
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/services/syncService.js | src/services/syncService.js | import firebase from 'firebase/app';
async function syncDiagram(currentItem) {
// Remove skip for local development to test Firebase emulator
// if (location.host === 'localhost:3000') {
// console.log('Skipping sync-diagram call in local environment');
// return;
// }
const { id, title, js } = curren... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/services/user_service.js | src/services/user_service.js | const user = () => window.user;
const subscription = () => user() && user().subscription;
export default {
user: user,
subscription: subscription,
isSubscribed: function () {
//console.debug('subscription', subscription());
return (
subscription() &&
(subscription().status === 'active' ||
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/services/browserService.js | src/services/browserService.js | const currentBrowserTab = {
setTitle: (title) => {
window.document.title = title || 'ZenUML | Untitled';
},
getTitle: () => window.document.title,
};
export { currentBrowserTab };
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/services/folderService.js | src/services/folderService.js | import { deferred } from '../deferred';
import { log, generateRandomId } from '../utils';
import firebase from 'firebase/app';
import 'firebase/firestore';
export const folderService = {
async getUserRef() {
const remoteDb = await window.db.getDb();
return remoteDb.collection('users').doc(window.user.uid);
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/services/code_service.js | src/services/code_service.js | import ensure from '../common/ensure';
import until from '../common/until';
const isEmpty = (str) => !str || str.trim() === '';
const isComment = (line) => line && line.trim().startsWith('//');
const NEW_PARTICIPANT = 'NewParticipant';
export default {
addCode: (code, newCode) => {
ensure(() => !isEmpty(code), ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/services/feature_toggle.js | src/services/feature_toggle.js | import config from './configuration';
export default {
isPaymentEnabled: config.features.payment,
};
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/extension/eventPage.js | src/extension/eventPage.js | function openApp() {
chrome.tabs.create({
url: chrome.runtime.getURL('index.html'),
selected: true,
});
}
chrome.action.onClicked.addListener(function () {
openApp();
});
// Listen for tabs getting created.
chrome.tabs.onCreated.addListener(function (tab) {
// If a new tab is opened (without any URL),... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/extension/script.js | src/extension/script.js | window.addEventListener('load', function (event) {
window.app = new window.zenuml.default('#mounting-point');
});
window.addEventListener(
'message',
(e) => {
const code = e.data && e.data.code;
const cursor = e.data && e.data.cursor;
if (code && app) {
app.render(code, {
enableMultiThe... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/extension/options.js | src/extension/options.js | // Restores preferences from chrome.storage.
function restoreOptions() {
chrome.storage.sync.get(
{
preserveLastCode: true,
replaceNewTab: false,
},
function (items) {
document.forms.optionsForm.preserveLastCode.checked =
items.preserveLastCode;
document.forms.optionsForm.r... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/tests/CodeService.test.js | src/tests/CodeService.test.js | import codeService from '../services/code_service';
describe('Test cases for code service', () => {
test('Add code to the end - something something', () => {
const result = codeService.addCode('A', 'B');
expect(result).toBe('A\nB');
});
test('Add code to the end - empty empty', () => {
expect(() => {... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/tests/footer.test.js | src/tests/footer.test.js | import Footer from '../components/Footer';
// Needs to be kept here
import { h } from 'preact';
import { configure, mount } from 'enzyme';
import Adapter from 'enzyme-adapter-preact-pure';
configure({ adapter: new Adapter() });
describe('Initial Test of the Footer', () => {
test('Footer renders 1 link with an ID of ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/tests/__mocks__/browserMocks.js | src/tests/__mocks__/browserMocks.js | // Mock Browser API's which are not supported by JSDOM, e.g. ServiceWorker, LocalStorage
/**
* An example how to mock localStorage is given below 👇
*/
/*
// Mocks localStorage
const localStorageMock = (function() {
let store = {};
return {
getItem: (key) => store[key] || null,
setItem: (key, value) => store... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/tests/__mocks__/fileMocks.js | src/tests/__mocks__/fileMocks.js | // This fixed an error related to the CSS and loading gif breaking my Jest test
// See https://facebook.github.io/jest/docs/en/webpack.html#handling-static-assets
module.exports = 'test-file-stub';
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/SavedItemPane.jsx | src/components/SavedItemPane.jsx | import { h, Component } from 'preact';
import { log } from '../utils';
import { trackEvent } from '../analytics';
import { ItemTile } from './ItemTile';
import { folderService } from '../services/folderService';
import { FolderRow } from './FolderRow';
import { alertsService } from '../notifications';
import { itemServ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Tooltip.jsx | src/components/Tooltip.jsx | import React, { Component } from 'react';
class Tooltip extends Component {
state = {
isTooltipVisible: false,
};
handleMouseOver = () => {
this.setState({ isTooltipVisible: true });
};
handleMouseOut = () => {
this.setState({ isTooltipVisible: false });
};
render() {
return (
<d... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Notifications.jsx | src/components/Notifications.jsx | import { h } from 'preact';
import { Button } from './common';
function NotificationItem({ type, children }) {
var strongTag;
if (type === 'bug') {
strongTag = <strong>🔧 Bugfix</strong>;
} else if (type === 'a11y') {
strongTag = <strong>♿️ Accessibility</strong>;
} else if (type === 'ui') {
strong... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/demo.js | src/components/demo.js | // Basic functionality:
// Comments
// Starter
// Call a method
// Self-method
// Nested method
// Assignment
export default `// This is a sample to document ZenUML
// This sample is not intendet to be realistic, but instead show the features of ZenUML
// Comments at the beginning are not shown in the diagram
// Cha... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/SharePanel.jsx | src/components/SharePanel.jsx | import { Component } from 'preact';
import PropTypes from 'prop-types';
import { PreviewCard } from './PreviewCard';
import { syncDiagram, getShareLink } from '../services/syncService';
import { Popover } from './PopOver';
import { Button } from './common';
export class SharePanel extends Component {
constructor(pro... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Icons.jsx | src/components/Icons.jsx | export function Icons() {
return (
<svg
version="1.1"
xmlns="http://www.w3.org/2000/svg"
style={{ display: 'none' }}
>
<symbol id="logo" viewBox="-145 -2 372 175">
<g
stroke="none"
strokeWidth={1}
fill="none"
fillRule="evenodd"
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | true |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/UserCodeMirror.jsx | src/components/UserCodeMirror.jsx | import { h, Component } from 'preact';
import CodeMirror from '../CodeMirror';
import 'codemirror/addon/edit/matchbrackets.js';
import 'codemirror/addon/edit/matchtags.js';
import 'codemirror/addon/edit/closebrackets.js';
import 'codemirror/addon/edit/closetag.js';
import 'codemirror/addon/comment/comment.js';
import ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/MainHeader.jsx | src/components/MainHeader.jsx | import { h } from 'preact';
import { useCallback, useState } from 'preact/hooks';
import { Button } from './common';
import { ProductVersionLabel } from '../zenuml/components/MainHeader/ProductVersionLabel/ProductVersionLabel';
import featureToggle from '../services/feature_toggle';
import { Popover } from './PopOver';... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/HelpModal.jsx | src/components/HelpModal.jsx | import Modal from './Modal';
const commitHash = __COMMITHASH__; //eslint-disable-line
export function HelpModal(props) {
return (
<Modal show={props.show} closeHandler={props.closeHandler}>
<h1>
<div class="web-maker-with-tag">ZenUML Sequence</div>
<small style="font-size:14px;"> v2.0.0 ({... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/CheatSheetModal.jsx | src/components/CheatSheetModal.jsx | import * as Dialog from '@radix-ui/react-dialog';
import { h } from 'preact';
const CheatSheetModal = ({ open, onClose }) => {
return (
<Dialog.Root open={open} onOpenChange={onClose}>
<Dialog.Portal>
<Dialog.Overlay className="bg-black/50 backdrop-blur-sm data-[state=open]:animate-overlayShow fixe... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/common.jsx | src/components/common.jsx | import { h, Component } from 'preact';
import { trackEvent } from '../analytics';
class Clickable extends Component {
handleClick(e) {
const el = e.currentTarget;
trackEvent(
el.getAttribute('data-event-category'),
el.getAttribute('data-event-action'),
);
this.props.onClick(e);
}
rend... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/DeletePageModal.jsx | src/components/DeletePageModal.jsx | import * as Dialog from '@radix-ui/react-dialog';
export default function DeletePageModal({ open, onClose, onConfirm }) {
return (
<Dialog.Root open={open} onOpenChange={onClose}>
<Dialog.Portal>
<Dialog.Overlay className="bg-black/50 backdrop-blur-sm data-[state=open]:animate-overlayShow fixed ins... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/PreviewCard.jsx | src/components/PreviewCard.jsx | import PropTypes from 'prop-types';
export function PreviewCard({ title, author, description, imageBase64 }) {
return (
<div className="preview-card">
<div className="preview-card__content">
<div className="preview-card__title">
<img src="https://zenuml.cn/favicon.ico" />
<span ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/LibraryPanel.jsx | src/components/LibraryPanel.jsx | import { h, Component } from 'preact';
import { log } from '../utils';
import { trackEvent } from '../analytics';
import { ItemTile } from './ItemTile';
import { folderService } from '../services/folderService';
import { FolderRow } from './FolderRow';
import { alertsService } from '../notifications';
import { itemServ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/app.jsx | src/components/app.jsx | /* global htmlCodeEl, cssCodeEl, jsCodeEl, runBtn
*/
import { h, Component } from 'preact';
import { MainHeader } from './MainHeader.jsx';
import ContentWrap from './ContentWrap.jsx';
import LeftSidebar from './LeftSidebar.jsx';
import Modal from './Modal.jsx';
import { computeHtml, computeCss, computeJs } from '../... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | true |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/LeftSidebar.jsx | src/components/LeftSidebar.jsx | import { h, Component } from 'preact';
import LibraryPanel from './LibraryPanel.jsx';
export default class LeftSidebar extends Component {
render() {
const {
isLibraryPanelOpen,
isEditorPanelOpen,
activeLeftPanel,
onToggleLibraryPanel,
onToggleEditorPanel,
onSwitchPanel,
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/EmbedHeader.jsx | src/components/EmbedHeader.jsx | export default function EmbedHeader(props) {
return (
<div className="embed-header">
<div className="embed-header__left">
<div className="header-logo">
<img src="assets/zenuml-icon.png" alt="zenuml logo" />
</div>
<div className="tit">{this.props.title || 'Untitled'}</div>
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/OnboardingModal.jsx | src/components/OnboardingModal.jsx | import Modal from './Modal.jsx';
export function OnboardingModal(props) {
return (
<Modal show={props.show} closeHandler={props.closeHandler}>
<div class="tac">
<h1 style="margin-top:20px">Welcome to ZenUML Sequence</h1>
</div>
<div class="onboard-step">
<img src="./animation/10... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/PageTabs.jsx | src/components/PageTabs.jsx | import { Component } from 'preact';
import DeletePageModal from './DeletePageModal';
/**
* PageTabs component displays tabs for each page and handles tab switching
*/
export class PageTabs extends Component {
state = {
isCloseModalOpen: false,
pageToClose: null,
};
/**
* Wrapper for the onAddPage c... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/ContentWrap.jsx | src/components/ContentWrap.jsx | import { h, Component } from 'preact';
import { saveAs } from 'file-saver';
import UserCodeMirror from './UserCodeMirror.jsx';
import Toolbox from './Toolbox.jsx';
import Tabs from './Tabs.jsx';
import PageTabs from './PageTabs.jsx';
import { computeCss, computeHtml, computeJs } from '../computes';
import { CssModes, H... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | true |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/SettingsModal.jsx | src/components/SettingsModal.jsx | import { editorThemes } from '../editorThemes';
import * as Dialog from '@radix-ui/react-dialog';
import { clsx } from 'clsx';
import * as Select from '@radix-ui/react-select';
import * as RadioGroup from '@radix-ui/react-radio-group';
function CheckboxSetting({
title,
label,
onChange,
pref,
name,
showWhen... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/SupportDeveloperModal.jsx | src/components/SupportDeveloperModal.jsx | import { h } from 'preact';
import Modal from './Modal';
export function SupportDeveloperModal({ show, closeHandler }) {
return (
<Modal extraClasses="pledge-modal" show={show} closeHandler={closeHandler}>
<div class="tac">
<h1>Welcome!</h1>
<div class="flex" style="margin-top: 100px;">
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/CreateNewModal.jsx | src/components/CreateNewModal.jsx | import { h } from 'preact';
import { ItemTile } from './ItemTile';
import templates from '../templateList';
import * as Dialog from '@radix-ui/react-dialog';
export default function CreateNewModal({
open,
onClose,
onBlankTemplateSelect,
onTemplateSelect,
}) {
return (
<Dialog.Root open={open} onOpenChang... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/EditorPanel.jsx | src/components/EditorPanel.jsx | import { h, Component } from 'preact';
import UserCodeMirror from './UserCodeMirror.jsx';
import Toolbox from './Toolbox.jsx';
import Tabs from './Tabs.jsx';
import { modes } from '../codeModes';
/**
* EditorPanel - Code editor panel for the left sidebar
* Contains ZenUML and CSS tabs with their respective editors
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/CssSettingsModal.jsx | src/components/CssSettingsModal.jsx | import { h, Component } from 'preact';
import Modal from './Modal';
import CodeMirrorBox from './CodeMirrorBox';
export default class CssSettingsModal extends Component {
componentDidUpdate() {
if (this.props.show) {
setTimeout(() => {
if (this.props.settings) {
this.cm.setValue(this.prop... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/ItemTile.jsx | src/components/ItemTile.jsx | import { getHumanDate } from '../utils';
export function ItemTile({
item,
onClick,
onForkBtnClick,
onRemoveBtnClick,
onMoveBtnClick,
focusable,
compact,
}) {
// Compact mode for left sidebar - matches mockup style
if (compact) {
return (
<a
role={focusable ? 'button' : null}
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Footer.jsx | src/components/Footer.jsx | import { Component } from 'preact';
class JS13K extends Component {
constructor(props) {
super(props);
const compoDate = new Date('August 13 2018 11:00 GMT');
var now = new Date();
var daysLeft;
if (+compoDate > +now) {
daysLeft = Math.floor((compoDate - now) / 1000 / 3600 / 24);
}
}
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Console.jsx | src/components/Console.jsx | import { h } from 'preact';
import CodeMirrorBox from './CodeMirrorBox';
export function Console({
isConsoleOpen,
onConsoleHeaderDblClick,
onClearConsoleBtnClick,
toggleConsole,
onEvalInputKeyup,
onReady,
}) {
return (
<div
id="consoleEl"
class={`console hide ${isConsoleOpen ? '' : 'is-mi... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Tabs.jsx | src/components/Tabs.jsx | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Tab from './Tab';
class Tabs extends Component {
static propTypes = {
children: PropTypes.instanceOf(Array).isRequired,
};
constructor(props) {
super(props);
this.onInit();
}
onInit = () => {
this.state = {... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Js13KModal.jsx | src/components/Js13KModal.jsx | import Modal from './Modal';
export function Js13KModal({ show, closeHandler }) {
return (
<Modal show={show} closeHandler={closeHandler} small>
NA
</Modal>
);
}
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Modal.jsx | src/components/Modal.jsx | import { Component, createPortal } from 'preact/compat';
export default class Modal extends Component {
componentDidMount() {
window.addEventListener('keydown', this.onKeyDownHandler.bind(this));
}
componentWillUnmount() {
window.removeEventListener('keydown', this.onKeyDownHandler.bind(this));
if (t... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/AskToImportModal.jsx | src/components/AskToImportModal.jsx | import * as Dialog from '@radix-ui/react-dialog';
export function AskToImportModal({
open,
onClose,
oldSavedCreationsCount,
dontAskBtnClickHandler,
importBtnClickHandler,
}) {
return (
<Dialog.Root open={open} onOpenChange={onClose}>
<Dialog.Portal>
<Dialog.Overlay className="bg-black/50 ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/PopOver.jsx | src/components/PopOver.jsx | import { Component, createRef } from 'preact';
import PropTypes from 'prop-types';
export class Popover extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: false,
};
this.popoverRef = createRef();
}
componentDidMount() {
document.addEventListener(
'cl... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/SplitPane.jsx | src/components/SplitPane.jsx | import { h, Component } from 'preact';
import Split from 'split.js';
export class SplitPane extends Component {
// shouldComponentUpdate(nextProps, nextState) {
// return (
// nextProps.direction !== this.props.direction ||
// nextProps.sizes.join('') !== this.props.sizes.join('')
// );
// }
compone... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/LoginModal.jsx | src/components/LoginModal.jsx | import { auth } from '../auth';
import * as Dialog from '@radix-ui/react-dialog';
import { useEffect } from 'preact/hooks';
import mixpanel from '../services/mixpanel';
export default function LoginModal({ open, onClose }) {
const login = (e) => {
const provider = e.target.dataset.authProvider;
mixpanel.trac... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Profile.jsx | src/components/Profile.jsx | import { h } from 'preact';
const DEFAULT_PROFILE_IMG =
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='#ccc' d='M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/CodeMirrorBox.jsx | src/components/CodeMirrorBox.jsx | import { h, Component } from 'preact';
import CodeMirror from '../CodeMirror';
import 'codemirror/mode/javascript/javascript.js';
export default class CodeMirrorBox extends Component {
componentDidMount() {
this.initEditor();
}
shouldComponentUpdate() {
return false;
}
initEditor() {
this.cm = ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Alerts.jsx | src/components/Alerts.jsx | import { h, Component } from 'preact';
export class Alerts extends Component {
shouldComponentUpdate(nextProps, nextState) {
return false;
}
render() {
return <div class="alerts-container" id="js-alerts-container" />;
}
}
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Toolbox.jsx | src/components/Toolbox.jsx | import React, { Component } from 'react';
class Toolbox extends Component {
insertCode(param) {
this.props.clickSvg(param);
}
render() {
return (
<div className="hidden md:flex gap-6 px-10 py-2 bg-black-400 flex-shrink-0 overflow-hidden">
<button id="newParticipantBtn" className="hover:bg-... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/KeyboardShortcutsModal.jsx | src/components/KeyboardShortcutsModal.jsx | import * as Dialog from '@radix-ui/react-dialog';
import { h } from 'preact';
const KeyboardShortcutsModal = ({ open, onClose }) => {
return (
<Dialog.Root open={open} onOpenChange={onClose}>
<Dialog.Portal>
<Dialog.Overlay className="bg-black/50 backdrop-blur-sm data-[state=open]:animate-overlaySh... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/FolderRow.jsx | src/components/FolderRow.jsx | import { h } from 'preact';
export const FolderRow = ({ folder, isOpen, onToggle, onRename, onDelete, itemCount }) => {
return (
<div class="flex items-center justify-between p-2 rounded-md hover:bg-white/10 text-white/80 group cursor-pointer">
<div class="flex items-center gap-2 flex-grow overflow-hidden"... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/Tab.jsx | src/components/Tab.jsx | import React, { Component } from 'react';
import PropTypes from 'prop-types';
class Tab extends Component {
static propTypes = {
activeTab: PropTypes.string.isRequired,
label: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
};
onClick = () => {
const { label, onClick } = this.pr... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/subscription/SubscriptionItem.jsx | src/components/subscription/SubscriptionItem.jsx | import { SubscriptionAction } from './SubscriptionAction';
import { ContactUsLink } from './ContactUsLink';
import featureToggle from '../../services/feature_toggle';
import { h } from 'preact';
export function SubscriptionItem(props) {
return (
<div
class={`${props.isMostSelect && 'bg-blue-500 bg-opacity-... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/subscription/CancellationLink.jsx | src/components/subscription/CancellationLink.jsx | import mixpanel from '../../services/mixpanel';
const CancellationLink = (props) => {
const handleClick = () => {
mixpanel.track({ event: 'cancelSubscription', category: 'ui' });
};
return (
<a
href={props.cancelUrl}
onClick={handleClick}
target="_blank"
className="no-underline m... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/subscription/PricingModal.jsx | src/components/subscription/PricingModal.jsx | import { SubscriptionItem } from './SubscriptionItem';
import * as Dialog from '@radix-ui/react-dialog';
import { h } from 'preact';
import { useState } from 'preact/hooks';
import userService from '../../services/user_service';
export function PricingModal({
open,
onClose,
loginHandler,
onSubscriptionChange,
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/subscription/ContactUsLink.jsx | src/components/subscription/ContactUsLink.jsx | const ContactUsLink = (props) => {
return (
<a
className="mt-2 block w-full bg-blue-500 border border-transparent rounded-md py-2 text-sm text-center hover:no-underline"
href="https://zenuml.com/docs/about/contact-us"
target="_blank"
>
{props.upgradeBtnName}
</a>
);
};
export { ... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/subscription/SubscriptionAction.jsx | src/components/subscription/SubscriptionAction.jsx | import userService from '../../services/user_service';
import { UpgradeLink } from './UpgradeLink';
import { CancellationLink } from './CancellationLink';
import { DisabledUpgradeLink } from './DisabledUpgradeLink';
const SubscriptionAction = (props) => {
const user = userService.user();
if (!user) {
return n... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/subscription/UpgradeLink.jsx | src/components/subscription/UpgradeLink.jsx | import planService from '../../services/planService';
import userService from '../../services/user_service';
const UpgradeLink = (props) => {
const checkout = (e) => {
e.preventDefault();
props.preActionCallback();
Paddle.Checkout.open({
product: planService.getProductByPlanType(props.planType),
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/components/subscription/DisabledUpgradeLink.jsx | src/components/subscription/DisabledUpgradeLink.jsx | const DisabledUpgradeLink = (props) => {
return (
<a
className="no-underline mt-2 block w-full bg-gray-200 text-gray-800 border border-transparent rounded-md py-2 text-sm text-center pointer-events-none cursor-not-allowed hover:no-underline"
href="#"
>
{props.upgradeBtnName}
</a>
);
};... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/common/until.js | src/common/until.js | export default function until(arr, fn) {
const l = arr.length;
let i = 0;
while (i < l && !fn(arr[i])) {
i++;
}
return arr.slice(0, i);
}
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/common/ensure.js | src/common/ensure.js | export default function ensure(condition, message) {
if (typeof condition === 'function') {
if (!condition()) {
throw new Error(message);
}
} else {
throw new Error('`condition` must be a function.');
}
}
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/common/ensure.test.js | src/common/ensure.test.js | import ensure from '../common/ensure';
describe('ensure', () => {
test('Ensure with function - no violation', () => {
ensure(() => true, 'All good.');
});
test('Ensure with function - with violation', () => {
expect(() => {
ensure(() => false, 'Something wrong.');
}).toThrow('Something wrong.')... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/common/until.test.js | src/common/until.test.js | import until from '../common/until';
describe('until', () => {
test('Collect until something happens', () => {
const res = until([1, 2, 3, 1, 2, 3], (i) => i > 2);
expect(res.length).toBe(2);
expect(res[0]).toBe(1);
expect(res[1]).toBe(2);
});
});
| javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/zenuml/components/MainHeader/ProductVersionLabel/ProductVersionLabelBasic.js | src/zenuml/components/MainHeader/ProductVersionLabel/ProductVersionLabelBasic.js | import { ProductVersionLabelAbstract } from './ProductVersionLabelAbstract';
const ProductVersionLabelBasic = ({ tooltip, clickHandler }) => {
const style = {
'background-color': 'transparent',
};
return (
<ProductVersionLabelAbstract
className="basic"
tooltip={tooltip}
clickHandler={cl... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/zenuml/components/MainHeader/ProductVersionLabel/ProductVersionLabelProfessional.js | src/zenuml/components/MainHeader/ProductVersionLabel/ProductVersionLabelProfessional.js | import { ProductVersionLabelAbstract } from './ProductVersionLabelAbstract';
const ProductVersionLabelProfessional = ({ clickHandler }) => {
const style = {
'background-color': '#d3a447',
color: 'white',
};
return (
<ProductVersionLabelAbstract
className="pro"
clickHandler={clickHandler}... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/zenuml/components/MainHeader/ProductVersionLabel/ProductVersionLabel.js | src/zenuml/components/MainHeader/ProductVersionLabel/ProductVersionLabel.js | import userService from '../../../../services/user_service';
import { ProductVersionLabelBasic } from './ProductVersionLabelBasic';
export function ProductVersionLabel(props) {
const isAnonymous = !props.user;
const tooltip = isAnonymous
? 'Please login to upgrade to Pro'
: 'Get more out of ZenUML — Go Pro... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/zenuml/components/MainHeader/ProductVersionLabel/ProductVersionLabelAbstract.js | src/zenuml/components/MainHeader/ProductVersionLabel/ProductVersionLabelAbstract.js | const ProductVersionLabelAbstract = ({
className,
tooltip,
style,
clickHandler,
}) => {
const classNames =
'h-10 flex items-center gap-1.5 px-4 bg-black-600 rounded-lg font-semibold hover:opacity-80 duration-200' +
' ' +
className;
return (
<button className={classNames} aria-label={tooltip}... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/config/paddleInit.js | src/config/paddleInit.js | // Wait for DOM and scripts to be ready before initializing Paddle
function initializePaddle() {
if (typeof window.Paddle !== 'undefined' && window.Paddle) {
Paddle.Setup({ vendor: 39343 }); //eslint-disable-line
} else {
// Retry after a short delay if Paddle is not yet available
setTimeout(initializeP... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/src/javascript/firebase/subscription.js | src/javascript/firebase/subscription.js | async function retrieveSubscription(firestore, userId) {
const docRef = firestore
.collection('user_subscriptions')
.doc('user-' + userId);
return await docRef
.get()
.then(function (doc) {
let subscription;
if (doc.exists) {
// console.log('Document data:', doc.data());
... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/docs/docsify.min.js | docs/docsify.min.js | !(function () {
'use strict';
function e(e) {
var t = Object.create(null);
return function (n) {
return t[n] || (t[n] = e(n));
};
}
function t(e) {
return 'string' == typeof e || 'number' == typeof e;
}
function n() {}
function r(e) {
return 'function' == typeof e;
}
function... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | true |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/functions/alert_parser.js | functions/alert_parser.js | const alertParsers = {
subscription_created: (req) => ({
cancel_url: req.body.cancel_url || '',
checkout_id: req.body.checkout_id,
currency: req.body.currency,
email: req.body.email,
event_time: req.body.event_time,
marketing_consent: req.body.marketing_consent,
next_bill_date: req.body.ne... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/functions/index.js | functions/index.js | const functions = require('firebase-functions');
const admin = require('firebase-admin');
const { FieldValue } = require('firebase-admin/firestore');
const Mixpanel = require('mixpanel');
// Initialize with staging project when running in emulator
if (process.env.FUNCTIONS_EMULATOR === 'true') {
admin.initializeApp(... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
ZenUml/web-sequence | https://github.com/ZenUml/web-sequence/blob/6886ee5373bacbcfc3a0709dbc2bea4f40ab663f/functions/webhook.js | functions/webhook.js | const crypto = require('crypto');
const Serialize = require('php-serialize');
function ksort(obj) {
let keys = Object.keys(obj).sort();
let sortedObj = {};
for (var i in keys) {
sortedObj[keys[i]] = obj[keys[i]];
}
return sortedObj;
}
function validateWebhook(jsonObj, pubKey) {
const mySig = Buffer.... | javascript | MIT | 6886ee5373bacbcfc3a0709dbc2bea4f40ab663f | 2026-01-05T03:44:57.156719Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/index.js | index.js | 'use strict'
const httpErrors = require('http-errors')
const Router = require('router')
const SwaggerParser = require('swagger-parser')
const ui = require('./lib/ui')
const makeValidator = require('./lib/validate')
const { get: getSchema, set: setSchema } = require('./lib/layer-schema')
const minimumViableDocument = re... | javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/test/_regexRoutes.js | test/_regexRoutes.js | 'use strict'
const { suite, test } = require('mocha')
const assert = require('assert')
const supertest = require('supertest')
const express = require('express')
const openapi = require('..')
module.exports = function () {
suite('regex routes', function () {
test('serve routes with a * wildcard', function (done) ... | javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/test/_moreRoutes.js | test/_moreRoutes.js | const router = require('express').Router({ mergeParams: true })
const openapi = require('..')
const oapi = openapi()
router.use(oapi)
router.get(
'/',
oapi.validPath({
summary: 'Get a user.',
parameters: [
{
in: 'path',
imageId: 'id',
schema: {
type: 'integer'
... | javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/test/_validate.js | test/_validate.js | 'use strict'
const { suite, test } = require('mocha')
const assert = require('assert')
const supertest = require('supertest')
const express = require('express')
const openapi = require('..')
module.exports = function () {
suite('validate', function () {
test('validate incoming requests', async function () {
... | javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/test/index.js | test/index.js | 'use strict'
const { suite, test } = require('mocha')
const assert = require('assert')
const util = require('util')
const supertest = require('supertest')
const SwaggerParser = require('swagger-parser')
const openapi = require('../')
const { name } = require('../package.json')
const YAML = require('yaml')
// We suppor... | javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/test/_routes.js | test/_routes.js | 'use strict'
const { suite, test } = require('mocha')
const assert = require('assert')
const supertest = require('supertest')
const express = require('express')
const SwaggerParser = require('swagger-parser')
const openapi = require('..')
const _moreRoutes = require('./_moreRoutes')
module.exports = function () {
su... | javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/lib/minimum-doc.js | lib/minimum-doc.js | 'use strict'
module.exports = {
openapi: '3.0.0',
info: {
title: 'Express App',
version: '1.0.0'
},
paths: {}
}
| javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/lib/layer-schema.js | lib/layer-schema.js | 'use strict'
const schemas = new Map()
module.exports = {
set: (handler, schema) => {
schemas.set(handler, schema)
},
get: (handler) => {
return schemas.get(handler)
}
}
| javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/lib/generate-doc.js | lib/generate-doc.js | 'use strict'
const pathToRegexp = require('path-to-regexp')
const minimumViableDocument = require('./minimum-doc')
const { get: getSchema, set: setSchema } = require('./layer-schema')
module.exports = function generateDocument (baseDocument, router, basePath) {
// Merge document with select minimum defaults
const ... | javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/lib/ui.js | lib/ui.js | 'use strict'
const path = require('path')
const serve = require('serve-static')
module.exports.serveSwaggerUI = function serveSwaggerUI (documentUrl, opts = {}) {
const { plugins, ...options } = opts
return [serve(path.resolve(require.resolve('swagger-ui-dist'), '..'), { index: false }),
function returnUiInit... | javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
wesleytodd/express-openapi | https://github.com/wesleytodd/express-openapi/blob/b56f6ee4d38d74095417968ae996c17a22e2cd92/lib/validate.js | lib/validate.js | 'use strict'
const Ajv = require('ajv')
const addFormats = require('ajv-formats')
const addKeywords = require('ajv-keywords')
const httpErrors = require('http-errors')
const BASE_REQ_SCHEMA = {
type: 'object',
required: ['headers', 'params', 'query'],
properties: {
headers: {
type: 'object',
requ... | javascript | ISC | b56f6ee4d38d74095417968ae996c17a22e2cd92 | 2026-01-05T03:45:21.112632Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.