├── .gitignore ├── .prettierrc ├── README.md ├── docs ├── bin │ ├── build │ │ ├── closurebuilder.py │ │ ├── depstree.py │ │ ├── depswriter.py │ │ ├── jscompiler.py │ │ ├── source.py │ │ └── treescan.py │ ├── calcdeps.py │ ├── labs │ │ └── code │ │ │ ├── closure.el │ │ │ ├── generate_jsdoc.py │ │ │ ├── run_el_tests.sh │ │ │ └── run_py_tests.sh │ └── logos │ │ ├── logo.svg │ │ └── logoandlabel.svg ├── closure │ ├── bin │ │ ├── build │ │ │ ├── closurebuilder.py │ │ │ ├── depstree.py │ │ │ ├── depswriter.py │ │ │ ├── jscompiler.py │ │ │ ├── source.py │ │ │ └── treescan.py │ │ ├── calcdeps.py │ │ ├── labs │ │ │ └── code │ │ │ │ ├── closure.el │ │ │ │ ├── generate_jsdoc.py │ │ │ │ ├── run_el_tests.sh │ │ │ │ └── run_py_tests.sh │ │ └── logos │ │ │ ├── logo.svg │ │ │ └── logoandlabel.svg │ └── goog │ │ ├── a11y │ │ └── aria │ │ │ ├── announcer.js │ │ │ ├── aria.js │ │ │ ├── attributes.js │ │ │ ├── datatables.js │ │ │ └── roles.js │ │ ├── array │ │ └── array.js │ │ ├── asserts │ │ ├── asserts.js │ │ └── dom.js │ │ ├── async │ │ ├── animationdelay.js │ │ ├── conditionaldelay.js │ │ ├── debouncer.js │ │ ├── delay.js │ │ ├── freelist.js │ │ ├── legacy_throttle.js │ │ ├── nexttick.js │ │ ├── promises.js │ │ ├── run.js │ │ ├── throttle.js │ │ ├── throwexception.js │ │ └── workqueue.js │ │ ├── base.js │ │ ├── bootstrap │ │ ├── nodejs.js │ │ └── webworkers.js │ │ ├── collections │ │ ├── iters.js │ │ ├── maps.js │ │ └── sets.js │ │ ├── color │ │ ├── alpha.js │ │ ├── color.js │ │ └── names.js │ │ ├── conformance_proto.txt │ │ ├── crypt │ │ ├── aes.js │ │ ├── arc4.js │ │ ├── base64.js │ │ ├── basen.js │ │ ├── blobhasher.js │ │ ├── blockcipher.js │ │ ├── cbc.js │ │ ├── crypt.js │ │ ├── ctr.js │ │ ├── hash.js │ │ ├── hash32.js │ │ ├── hashtester.js │ │ ├── hmac.js │ │ ├── md5.js │ │ ├── pbkdf2.js │ │ ├── sha1.js │ │ ├── sha2.js │ │ ├── sha224.js │ │ ├── sha256.js │ │ ├── sha2_64bit.js │ │ ├── sha384.js │ │ ├── sha512.js │ │ └── sha512_256.js │ │ ├── css │ │ ├── autocomplete.css │ │ ├── bubble.css │ │ ├── button.css │ │ ├── charpicker.css │ │ ├── checkbox.css │ │ ├── colormenubutton.css │ │ ├── colorpalette.css │ │ ├── colorpicker-simplegrid.css │ │ ├── combobox.css │ │ ├── common.css │ │ ├── css3button.css │ │ ├── css3menubutton.css │ │ ├── custombutton.css │ │ ├── datepicker.css │ │ ├── dialog.css │ │ ├── dimensionpicker.css │ │ ├── dragdropdetector.css │ │ ├── editor │ │ │ ├── bubble.css │ │ │ ├── dialog.css │ │ │ ├── equationeditor.css │ │ │ └── linkdialog.css │ │ ├── editortoolbar.css │ │ ├── filteredmenu.css │ │ ├── filterobservingmenuitem.css │ │ ├── flatbutton.css │ │ ├── flatmenubutton.css │ │ ├── hovercard.css │ │ ├── hsvapalette.css │ │ ├── hsvpalette.css │ │ ├── imagelessbutton.css │ │ ├── imagelessmenubutton.css │ │ ├── inputdatepicker.css │ │ ├── linkbutton.css │ │ ├── menu.css │ │ ├── menubar.css │ │ ├── menubutton.css │ │ ├── menuitem.css │ │ ├── menuseparator.css │ │ ├── multitestrunner.css │ │ ├── palette.css │ │ ├── popupdatepicker.css │ │ ├── roundedpanel.css │ │ ├── roundedtab.css │ │ ├── submenu.css │ │ ├── tab.css │ │ ├── tabbar.css │ │ ├── tablesorter.css │ │ ├── toolbar.css │ │ ├── tooltip.css │ │ ├── tree.css │ │ └── tristatemenuitem.css │ │ ├── cssom │ │ ├── cssom.js │ │ ├── cssom_test_import_1.css │ │ ├── cssom_test_import_2.css │ │ ├── cssom_test_link_1.css │ │ └── iframe │ │ │ ├── style.js │ │ │ └── style_test_import.css │ │ ├── date │ │ ├── date.js │ │ ├── daterange.js │ │ ├── duration.js │ │ ├── relative.js │ │ ├── relativecommontests.js │ │ └── utcdatetime.js │ │ ├── db │ │ ├── cursor.js │ │ ├── db.js │ │ ├── error.js │ │ ├── index.js │ │ ├── indexeddb.js │ │ ├── keyrange.js │ │ ├── objectstore.js │ │ └── transaction.js │ │ ├── debug │ │ ├── console.js │ │ ├── debug.js │ │ ├── debugwindow.js │ │ ├── deepfreeze.js │ │ ├── devcss │ │ │ ├── devcss.js │ │ │ └── devcssrunner.js │ │ ├── divconsole.js │ │ ├── entrypointregistry.js │ │ ├── error.js │ │ ├── errorcontext.js │ │ ├── errorhandler.js │ │ ├── errorreporter.js │ │ ├── fancywindow.js │ │ ├── formatter.js │ │ ├── relativetimeprovider.js │ │ └── tracer.js │ │ ├── delegate │ │ ├── delegateregistry.js │ │ └── delegates.js │ │ ├── deps.js │ │ ├── disposable │ │ ├── disposable.js │ │ ├── dispose.js │ │ ├── disposeall.js │ │ └── idisposable.js │ │ ├── dom │ │ ├── abstractmultirange.js │ │ ├── abstractrange.js │ │ ├── animationframe │ │ │ ├── animationframe.js │ │ │ └── polyfill.js │ │ ├── annotate.js │ │ ├── asserts.js │ │ ├── attr.js │ │ ├── browserfeature.js │ │ ├── browserrange │ │ │ ├── abstractrange.js │ │ │ ├── browserrange.js │ │ │ ├── geckorange.js │ │ │ ├── ierange.js │ │ │ ├── operarange.js │ │ │ ├── w3crange.js │ │ │ └── webkitrange.js │ │ ├── bufferedviewportsizemonitor.js │ │ ├── classes.js │ │ ├── classlist.js │ │ ├── controlrange.js │ │ ├── dataset.js │ │ ├── dom.js │ │ ├── element.js │ │ ├── fontsizemonitor.js │ │ ├── forms.js │ │ ├── fullscreen.js │ │ ├── htmlelement.js │ │ ├── iframe.js │ │ ├── inputtype.js │ │ ├── iter.js │ │ ├── multirange.js │ │ ├── nodeiterator.js │ │ ├── nodeoffset.js │ │ ├── nodetype.js │ │ ├── pattern │ │ │ ├── abstractpattern.js │ │ │ ├── allchildren.js │ │ │ ├── callback │ │ │ │ ├── callback.js │ │ │ │ ├── counter.js │ │ │ │ └── test.js │ │ │ ├── childmatches.js │ │ │ ├── endtag.js │ │ │ ├── fulltag.js │ │ │ ├── matcher.js │ │ │ ├── nodetype.js │ │ │ ├── pattern.js │ │ │ ├── repeat.js │ │ │ ├── sequence.js │ │ │ ├── starttag.js │ │ │ ├── tag.js │ │ │ └── text.js │ │ ├── range.js │ │ ├── rangeendpoint.js │ │ ├── safe.js │ │ ├── savedcaretrange.js │ │ ├── savedrange.js │ │ ├── selection.js │ │ ├── tagiterator.js │ │ ├── tagname.js │ │ ├── tags.js │ │ ├── textassert.js │ │ ├── textrange.js │ │ ├── textrangeiterator.js │ │ ├── uri.js │ │ ├── vendor.js │ │ ├── viewportsizemonitor.js │ │ └── xml.js │ │ ├── editor │ │ ├── browserfeature.js │ │ ├── clicktoeditwrapper.js │ │ ├── command.js │ │ ├── contenteditablefield.js │ │ ├── defines.js │ │ ├── field.js │ │ ├── focus.js │ │ ├── icontent.js │ │ ├── link.js │ │ ├── node.js │ │ ├── plugin.js │ │ ├── plugin_impl.js │ │ ├── plugins │ │ │ ├── abstractbubbleplugin.js │ │ │ ├── abstractdialogplugin.js │ │ │ ├── abstracttabhandler.js │ │ │ ├── basictextformatter.js │ │ │ ├── blockquote.js │ │ │ ├── emoticons.js │ │ │ ├── enterhandler.js │ │ │ ├── firststrong.js │ │ │ ├── headerformatter.js │ │ │ ├── linkbubble.js │ │ │ ├── linkdialogplugin.js │ │ │ ├── linkshortcutplugin.js │ │ │ ├── listtabhandler.js │ │ │ ├── loremipsum.js │ │ │ ├── removeformatting.js │ │ │ ├── spacestabhandler.js │ │ │ ├── tableeditor.js │ │ │ ├── tagonenterhandler.js │ │ │ ├── undoredo.js │ │ │ ├── undoredomanager.js │ │ │ └── undoredostate.js │ │ ├── range.js │ │ ├── seamlessfield.js │ │ ├── style.js │ │ ├── table.js │ │ ├── tablecell.js │ │ └── tablerow.js │ │ ├── events │ │ ├── actioneventwrapper.js │ │ ├── actionhandler.js │ │ ├── browserevent.js │ │ ├── browserfeature.js │ │ ├── event.js │ │ ├── eventhandler.js │ │ ├── eventid.js │ │ ├── eventlike.js │ │ ├── events.js │ │ ├── eventtarget.js │ │ ├── eventtargettester.js │ │ ├── eventtype.js │ │ ├── eventwrapper.js │ │ ├── filedrophandler.js │ │ ├── focushandler.js │ │ ├── imehandler.js │ │ ├── inputhandler.js │ │ ├── keycodes.js │ │ ├── keyevent.js │ │ ├── keyhandler.js │ │ ├── keynames.js │ │ ├── keys.js │ │ ├── listenable.js │ │ ├── listenablekey.js │ │ ├── listener.js │ │ ├── listenermap.js │ │ ├── mousewheelhandler.js │ │ ├── onlinehandler.js │ │ ├── pastehandler.js │ │ ├── wheelevent.js │ │ └── wheelhandler.js │ │ ├── format │ │ ├── emailaddress.js │ │ ├── format.js │ │ ├── htmlprettyprinter.js │ │ ├── internationalizedemailaddress.js │ │ └── jsonprettyprinter.js │ │ ├── fs │ │ ├── blob.js │ │ ├── entry.js │ │ ├── entryimpl.js │ │ ├── error.js │ │ ├── filereader.js │ │ ├── filesaver.js │ │ ├── filesystem.js │ │ ├── filesystemimpl.js │ │ ├── filewriter.js │ │ ├── fs.js │ │ ├── progressevent.js │ │ └── url.js │ │ ├── functions │ │ └── functions.js │ │ ├── fx │ │ ├── abstractdragdrop.js │ │ ├── anim │ │ │ └── anim.js │ │ ├── animation.js │ │ ├── animationqueue.js │ │ ├── css3 │ │ │ ├── fx.js │ │ │ └── transition.js │ │ ├── cssspriteanimation.js │ │ ├── dom.js │ │ ├── dragdrop.js │ │ ├── dragdropgroup.js │ │ ├── dragger.js │ │ ├── draglistgroup.js │ │ ├── dragscrollsupport.js │ │ ├── easing.js │ │ ├── fx.js │ │ ├── transition.js │ │ └── transitionbase.js │ │ ├── goog.js │ │ ├── graphics │ │ ├── abstractgraphics.js │ │ ├── affinetransform.js │ │ ├── canvaselement.js │ │ ├── canvasgraphics.js │ │ ├── element.js │ │ ├── ellipseelement.js │ │ ├── ext │ │ │ ├── coordinates.js │ │ │ ├── element.js │ │ │ ├── ellipse.js │ │ │ ├── ext.js │ │ │ ├── graphics.js │ │ │ ├── group.js │ │ │ ├── image.js │ │ │ ├── path.js │ │ │ ├── rectangle.js │ │ │ ├── shape.js │ │ │ └── strokeandfillelement.js │ │ ├── fill.js │ │ ├── font.js │ │ ├── graphics.js │ │ ├── groupelement.js │ │ ├── imageelement.js │ │ ├── lineargradient.js │ │ ├── path.js │ │ ├── pathelement.js │ │ ├── paths.js │ │ ├── rectelement.js │ │ ├── solidfill.js │ │ ├── stroke.js │ │ ├── strokeandfillelement.js │ │ ├── svgelement.js │ │ ├── svggraphics.js │ │ ├── textelement.js │ │ ├── vmlelement.js │ │ └── vmlgraphics.js │ │ ├── history │ │ ├── event.js │ │ ├── eventtype.js │ │ ├── history.js │ │ └── html5history.js │ │ ├── html │ │ ├── cssspecificity.js │ │ ├── legacyconversions.js │ │ ├── safehtml.js │ │ ├── safehtmlformatter.js │ │ ├── safescript.js │ │ ├── safestyle.js │ │ ├── safestylesheet.js │ │ ├── safeurl.js │ │ ├── safeurl_test_vectors.js │ │ ├── sanitizer │ │ │ ├── attributeallowlists.js │ │ │ ├── csspropertysanitizer.js │ │ │ ├── csssanitizer.js │ │ │ ├── elementweakmap.js │ │ │ ├── html_test_vectors.js │ │ │ ├── htmlsanitizer.js │ │ │ ├── noclobber.js │ │ │ ├── safedomtreeprocessor.js │ │ │ ├── tagblacklist.js │ │ │ ├── tagwhitelist.js │ │ │ └── unsafe.js │ │ ├── testing.js │ │ ├── textextractor.js │ │ ├── trustedresourceurl.js │ │ ├── trustedtypes.js │ │ ├── uncheckedconversions.js │ │ └── utils.js │ │ ├── i18n │ │ ├── bidi.js │ │ ├── bidiformatter.js │ │ ├── charlistdecompressor.js │ │ ├── charpickerdata.js │ │ ├── collation.js │ │ ├── compactnumberformatsymbols.js │ │ ├── compactnumberformatsymbolsext.js │ │ ├── currency.js │ │ ├── currencycodemap.js │ │ ├── dateintervalformat.js │ │ ├── dateintervalpatterns.js │ │ ├── dateintervalpatternsext.js │ │ ├── dateintervalsymbols.js │ │ ├── dateintervalsymbolsext.js │ │ ├── datetimeformat.js │ │ ├── datetimeparse.js │ │ ├── datetimepatterns.js │ │ ├── datetimepatternsext.js │ │ ├── datetimepatternstype.js │ │ ├── datetimesymbols.js │ │ ├── datetimesymbolsext.js │ │ ├── graphemebreak.js │ │ ├── localefeature.js │ │ ├── messageformat.js │ │ ├── mime.js │ │ ├── numberformat.js │ │ ├── numberformatsymbols.js │ │ ├── numberformatsymbolsext.js │ │ ├── ordinalrules.js │ │ ├── pluralrules.js │ │ ├── relativedatetimeformat.js │ │ ├── relativedatetimesymbols.js │ │ ├── relativedatetimesymbolsext.js │ │ ├── timezone.js │ │ ├── uchar.js │ │ ├── uchar │ │ │ ├── localnamefetcher.js │ │ │ ├── namefetcher.js │ │ │ └── remotenamefetcher.js │ │ └── ucharnames.js │ │ ├── images │ │ ├── blank.gif │ │ ├── bubble_close.jpg │ │ ├── bubble_left.gif │ │ ├── bubble_right.gif │ │ ├── button-bg.gif │ │ ├── check-outline.gif │ │ ├── check-sprite.gif │ │ ├── check.gif │ │ ├── close_box.gif │ │ ├── color-swatch-tick.gif │ │ ├── dialog_close_box.gif │ │ ├── dimension-highlighted.png │ │ ├── dimension-unhighlighted.png │ │ ├── dropdn.gif │ │ ├── dropdn_disabled.gif │ │ ├── dropdown.gif │ │ ├── gears_bluedot.gif │ │ ├── gears_online.gif │ │ ├── gears_paused.gif │ │ ├── gears_syncing.gif │ │ ├── hsv-sprite-sm.gif │ │ ├── hsv-sprite-sm.png │ │ ├── hsv-sprite.gif │ │ ├── hsv-sprite.png │ │ ├── hsva-sprite-sm.gif │ │ ├── hsva-sprite-sm.png │ │ ├── hsva-sprite.gif │ │ ├── hsva-sprite.png │ │ ├── left_anchor_bubble_bot.gif │ │ ├── left_anchor_bubble_top.gif │ │ ├── menu-arrows.gif │ │ ├── minus.png │ │ ├── no_anchor_bubble_bot.gif │ │ ├── no_anchor_bubble_top.gif │ │ ├── offlineicons.png │ │ ├── plus.png │ │ ├── ratingstars.gif │ │ ├── right_anchor_bubble_bot.gif │ │ ├── right_anchor_bubble_top.gif │ │ ├── toolbar-bg.png │ │ ├── toolbar-separator.gif │ │ ├── toolbar_icons.gif │ │ ├── tree │ │ │ ├── I.png │ │ │ ├── cleardot.gif │ │ │ ├── tree.gif │ │ │ └── tree.png │ │ └── ui_controls.jpg │ │ ├── iter │ │ ├── es6.js │ │ └── iter.js │ │ ├── json │ │ ├── hybrid.js │ │ ├── json.js │ │ ├── jsonable.js │ │ ├── nativejsonprocessor.js │ │ └── processor.js │ │ ├── labs │ │ ├── dom │ │ │ ├── pagevisibilityevent.js │ │ │ ├── pagevisibilitymonitor.js │ │ │ └── pagevisibilitystate.js │ │ ├── events │ │ │ ├── nondisposableeventtarget.js │ │ │ └── touch.js │ │ ├── format │ │ │ └── csv.js │ │ ├── i18n │ │ │ ├── listformat.js │ │ │ ├── listsymbols.js │ │ │ └── listsymbolsext.js │ │ ├── mock │ │ │ ├── mock.js │ │ │ ├── timeoutmode.js │ │ │ └── verificationmode.js │ │ ├── net │ │ │ ├── image.js │ │ │ ├── webchannel.js │ │ │ ├── webchannel │ │ │ │ ├── channel.js │ │ │ │ ├── channelrequest.js │ │ │ │ ├── connectionstate.js │ │ │ │ ├── environment.js │ │ │ │ ├── forwardchannelrequestpool.js │ │ │ │ ├── netutils.js │ │ │ │ ├── requeststats.js │ │ │ │ ├── testing │ │ │ │ │ └── fakewebchannel.js │ │ │ │ ├── webchannelbase.js │ │ │ │ ├── webchannelbasetransport.js │ │ │ │ ├── webchanneldebug.js │ │ │ │ ├── wire.js │ │ │ │ └── wirev8.js │ │ │ ├── webchanneltransport.js │ │ │ ├── webchanneltransportfactory.js │ │ │ └── xhr.js │ │ ├── pubsub │ │ │ └── broadcastpubsub.js │ │ ├── storage │ │ │ └── boundedcollectablestorage.js │ │ ├── structs │ │ │ └── multimap.js │ │ ├── style │ │ │ └── pixeldensitymonitor.js │ │ ├── testing │ │ │ ├── assertthat.js │ │ │ ├── decoratormatcher.js │ │ │ ├── dictionarymatcher.js │ │ │ ├── environment.js │ │ │ ├── json_fuzzing.js │ │ │ ├── logicmatcher.js │ │ │ ├── matcher.js │ │ │ ├── matchererror.js │ │ │ ├── matchers.js │ │ │ ├── numbermatcher.js │ │ │ ├── objectmatcher.js │ │ │ └── stringmatcher.js │ │ └── useragent │ │ │ ├── browser.js │ │ │ ├── device.js │ │ │ ├── engine.js │ │ │ ├── extra.js │ │ │ ├── platform.js │ │ │ ├── test_agents.js │ │ │ ├── util.js │ │ │ └── verifier.js │ │ ├── loader │ │ ├── abstractmodulemanager.js │ │ └── activemodulemanager.js │ │ ├── locale │ │ ├── countries.js │ │ ├── defaultlocalenameconstants.js │ │ ├── locale.js │ │ ├── nativenameconstants.js │ │ ├── scriptToLanguages.js │ │ ├── timezonedetection.js │ │ ├── timezonefingerprint.js │ │ └── timezonelist.js │ │ ├── log │ │ └── log.js │ │ ├── math │ │ ├── affinetransform.js │ │ ├── bezier.js │ │ ├── box.js │ │ ├── coordinate.js │ │ ├── coordinate3.js │ │ ├── exponentialbackoff.js │ │ ├── integer.js │ │ ├── interpolator │ │ │ ├── interpolator1.js │ │ │ ├── linear1.js │ │ │ ├── pchip1.js │ │ │ └── spline1.js │ │ ├── irect.js │ │ ├── line.js │ │ ├── long.js │ │ ├── math.js │ │ ├── matrix.js │ │ ├── path.js │ │ ├── paths.js │ │ ├── range.js │ │ ├── rangeset.js │ │ ├── rect.js │ │ ├── size.js │ │ ├── tdma.js │ │ ├── vec2.js │ │ └── vec3.js │ │ ├── memoize │ │ └── memoize.js │ │ ├── messaging │ │ ├── abstractchannel.js │ │ ├── bufferedchannel.js │ │ ├── deferredchannel.js │ │ ├── loggerclient.js │ │ ├── loggerserver.js │ │ ├── messagechannel.js │ │ ├── messaging.js │ │ ├── multichannel.js │ │ ├── portcaller.js │ │ ├── portchannel.js │ │ ├── portnetwork.js │ │ ├── portoperator.js │ │ └── respondingchannel.js │ │ ├── module │ │ ├── abstractmoduleloader.js │ │ ├── basemodule.js │ │ ├── loader.js │ │ ├── module.js │ │ ├── moduleinfo.js │ │ ├── moduleloadcallback.js │ │ ├── moduleloader.js │ │ ├── moduleloadfailuretype.js │ │ └── modulemanager.js │ │ ├── net │ │ ├── browserchannel.js │ │ ├── browserchannelexecutionhooks.js │ │ ├── browserchannelserverreachability.js │ │ ├── browserchannelstats.js │ │ ├── browsertestchannel.js │ │ ├── bulkloader.js │ │ ├── bulkloaderhelper.js │ │ ├── channeldebug.js │ │ ├── channelrequest.js │ │ ├── cookies.js │ │ ├── cookies_deprecated.js │ │ ├── corsxmlhttpfactory.js │ │ ├── crossdomainrpc.js │ │ ├── errorcode.js │ │ ├── eventtype.js │ │ ├── fetchxmlhttpfactory.js │ │ ├── filedownloader.js │ │ ├── httpstatus.js │ │ ├── httpstatusname.js │ │ ├── iframeio.js │ │ ├── iframeloadmonitor.js │ │ ├── imageloader.js │ │ ├── imageloader_testimg1.gif │ │ ├── imageloader_testimg2.gif │ │ ├── imageloader_testimg3.gif │ │ ├── ipaddress.js │ │ ├── jsloader.js │ │ ├── jsonp.js │ │ ├── mockiframeio.js │ │ ├── multiiframeloadmonitor.js │ │ ├── networkstatusmonitor.js │ │ ├── networktester.js │ │ ├── rpc │ │ │ └── httpcors.js │ │ ├── streams │ │ │ ├── base64pbstreamparser.js │ │ │ ├── base64streamdecoder.js │ │ │ ├── jsonstreamparser.js │ │ │ ├── nodereadablestream.js │ │ │ ├── pbjsonstreamparser.js │ │ │ ├── pbstreamparser.js │ │ │ ├── streamfactory.js │ │ │ ├── streamparser.js │ │ │ ├── streamparsers.js │ │ │ ├── utils.js │ │ │ ├── xhrnodereadablestream.js │ │ │ └── xhrstreamreader.js │ │ ├── tmpnetwork.js │ │ ├── websocket.js │ │ ├── wrapperxmlhttpfactory.js │ │ ├── xhrio.js │ │ ├── xhriopool.js │ │ ├── xhrlike.js │ │ ├── xhrmanager.js │ │ ├── xmlhttp.js │ │ ├── xmlhttpfactory.js │ │ └── xpc │ │ │ ├── crosspagechannel.js │ │ │ ├── crosspagechannelrole.js │ │ │ ├── directtransport.js │ │ │ ├── nativemessagingtransport.js │ │ │ ├── relay.js │ │ │ ├── transport.js │ │ │ └── xpc.js │ │ ├── object │ │ └── object.js │ │ ├── positioning │ │ ├── absoluteposition.js │ │ ├── abstractposition.js │ │ ├── anchoredposition.js │ │ ├── anchoredviewportposition.js │ │ ├── clientposition.js │ │ ├── menuanchoredposition.js │ │ ├── positioning.js │ │ ├── viewportclientposition.js │ │ └── viewportposition.js │ │ ├── promise │ │ ├── nativeresolver.js │ │ ├── promise.js │ │ ├── resolver.js │ │ └── thenable.js │ │ ├── proto │ │ ├── proto.js │ │ └── serializer.js │ │ ├── proto2 │ │ ├── descriptor.js │ │ ├── fielddescriptor.js │ │ ├── lazydeserializer.js │ │ ├── message.js │ │ ├── objectserializer.js │ │ ├── pbliteserializer.js │ │ ├── serializer.js │ │ ├── test.pb.js │ │ ├── textformatserializer.js │ │ └── util.js │ │ ├── pubsub │ │ ├── pubsub.js │ │ ├── topicid.js │ │ └── typedpubsub.js │ │ ├── reflect │ │ └── reflect.js │ │ ├── singleton │ │ └── singleton.js │ │ ├── soy │ │ ├── data.js │ │ ├── injecteddatasupplier.js │ │ ├── renderer.js │ │ ├── soy.js │ │ └── soy_testhelper.js │ │ ├── spell │ │ └── spellcheck.js │ │ ├── stats │ │ └── basicstat.js │ │ ├── storage │ │ ├── collectablestorage.js │ │ ├── collectablestoragetester.js │ │ ├── encryptedstorage.js │ │ ├── errorcode.js │ │ ├── expiringstorage.js │ │ ├── mechanism │ │ │ ├── errorcode.js │ │ │ ├── errorhandlingmechanism.js │ │ │ ├── html5localstorage.js │ │ │ ├── html5sessionstorage.js │ │ │ ├── html5webstorage.js │ │ │ ├── ieuserdata.js │ │ │ ├── iterablemechanism.js │ │ │ ├── iterablemechanismtester.js │ │ │ ├── mechanism.js │ │ │ ├── mechanismfactory.js │ │ │ ├── mechanismseparationtester.js │ │ │ ├── mechanismsharingtester.js │ │ │ ├── mechanismtestdefinition.js │ │ │ ├── mechanismtester.js │ │ │ └── prefixedmechanism.js │ │ ├── richstorage.js │ │ ├── storage.js │ │ └── storagetester.js │ │ ├── streams │ │ ├── defines.js │ │ ├── full.js │ │ ├── full_impl.js │ │ ├── full_native_impl.js │ │ ├── full_test_cases.js │ │ ├── full_types.js │ │ ├── lite.js │ │ ├── lite_impl.js │ │ ├── lite_native_impl.js │ │ ├── lite_test_cases.js │ │ └── lite_types.js │ │ ├── string │ │ ├── const.js │ │ ├── internal.js │ │ ├── linkify.js │ │ ├── newlines.js │ │ ├── parser.js │ │ ├── path.js │ │ ├── string.js │ │ ├── stringbuffer.js │ │ ├── stringformat.js │ │ ├── stringifier.js │ │ └── typedstring.js │ │ ├── structs │ │ ├── avltree.js │ │ ├── circularbuffer.js │ │ ├── collection.js │ │ ├── heap.js │ │ ├── inversionmap.js │ │ ├── linkedmap.js │ │ ├── map.js │ │ ├── node.js │ │ ├── pool.js │ │ ├── prioritypool.js │ │ ├── priorityqueue.js │ │ ├── quadtree.js │ │ ├── queue.js │ │ ├── set.js │ │ ├── simplepool.js │ │ ├── stringset.js │ │ ├── structs.js │ │ ├── treenode.js │ │ └── trie.js │ │ ├── style │ │ ├── bidi.js │ │ ├── cursor.js │ │ ├── style.js │ │ ├── style_test_rect.svg │ │ ├── stylescrollbartester.js │ │ ├── transform.js │ │ └── transition.js │ │ ├── test_module.js │ │ ├── test_module_dep.js │ │ ├── testing │ │ ├── assertionfailure.js │ │ ├── asserts.js │ │ ├── async │ │ │ └── mockcontrol.js │ │ ├── asynctestcase.js │ │ ├── benchmark.js │ │ ├── continuationtestcase.js │ │ ├── cspviolationobserver.js │ │ ├── cspviolationobserver_externs.js │ │ ├── deferredtestcase.js │ │ ├── dom.js │ │ ├── editor │ │ │ ├── dom.js │ │ │ ├── fieldmock.js │ │ │ └── testhelper.js │ │ ├── events │ │ │ ├── eventobserver.js │ │ │ ├── events.js │ │ │ ├── matchers.js │ │ │ └── onlinehandler.js │ │ ├── expectedfailures.js │ │ ├── fs │ │ │ ├── blob.js │ │ │ ├── entry.js │ │ │ ├── file.js │ │ │ ├── filereader.js │ │ │ ├── filesystem.js │ │ │ ├── filewriter.js │ │ │ ├── fs.js │ │ │ └── progressevent.js │ │ ├── functionmock.js │ │ ├── graphics.js │ │ ├── i18n │ │ │ └── asserts.js │ │ ├── jstdasyncwrapper.js │ │ ├── jstdtestcaseadapter.js │ │ ├── jsunit.js │ │ ├── jsunitexception.js │ │ ├── loosemock.js │ │ ├── messaging │ │ │ ├── mockmessagechannel.js │ │ │ ├── mockmessageevent.js │ │ │ ├── mockmessageport.js │ │ │ └── mockportnetwork.js │ │ ├── mock.js │ │ ├── mockclassfactory.js │ │ ├── mockclock.js │ │ ├── mockcontrol.js │ │ ├── mockinterface.js │ │ ├── mockmatchers.js │ │ ├── mockrandom.js │ │ ├── mockrange.js │ │ ├── mockstorage.js │ │ ├── mockuseragent.js │ │ ├── multitestrunner.js │ │ ├── net │ │ │ ├── mockiframeio.js │ │ │ ├── xhrio.js │ │ │ └── xhriopool.js │ │ ├── objectpropertystring.js │ │ ├── objects.js │ │ ├── parallel_closure_test_suite.js │ │ ├── performancetable.css │ │ ├── performancetable.js │ │ ├── performancetimer.js │ │ ├── propertyreplacer.js │ │ ├── proto2 │ │ │ └── proto2.js │ │ ├── pseudorandom.js │ │ ├── recordfunction.js │ │ ├── shardingtestcase.js │ │ ├── singleton.js │ │ ├── stacktrace.js │ │ ├── storage │ │ │ └── fakemechanism.js │ │ ├── strictmock.js │ │ ├── style │ │ │ ├── layoutasserts.js │ │ │ └── style.js │ │ ├── testcase.js │ │ ├── testqueue.js │ │ ├── testrunner.js │ │ ├── testsuite.js │ │ └── ui │ │ │ ├── rendererasserts.js │ │ │ ├── rendererharness.js │ │ │ └── style.js │ │ ├── timer │ │ └── timer.js │ │ ├── transpile.js │ │ ├── tweak │ │ ├── entries.js │ │ ├── registry.js │ │ ├── testhelpers.js │ │ ├── tweak.js │ │ └── tweakui.js │ │ ├── ui │ │ ├── abstractspellchecker.js │ │ ├── ac │ │ │ ├── ac.js │ │ │ ├── arraymatcher.js │ │ │ ├── autocomplete.js │ │ │ ├── cachingmatcher.js │ │ │ ├── inputhandler.js │ │ │ ├── remote.js │ │ │ ├── remotearraymatcher.js │ │ │ ├── renderer.js │ │ │ ├── renderoptions.js │ │ │ ├── richinputhandler.js │ │ │ ├── richremote.js │ │ │ └── richremotearraymatcher.js │ │ ├── activitymonitor.js │ │ ├── advancedtooltip.js │ │ ├── animatedzippy.js │ │ ├── attachablemenu.js │ │ ├── bidiinput.js │ │ ├── bubble.js │ │ ├── button.js │ │ ├── buttonrenderer.js │ │ ├── buttonside.js │ │ ├── charcounter.js │ │ ├── charpicker.js │ │ ├── checkbox.js │ │ ├── checkboxmenuitem.js │ │ ├── checkboxrenderer.js │ │ ├── colormenubutton.js │ │ ├── colormenubuttonrenderer.js │ │ ├── colorpalette.js │ │ ├── colorpicker.js │ │ ├── combobox.js │ │ ├── component.js │ │ ├── componentutil.js │ │ ├── container.js │ │ ├── containerrenderer.js │ │ ├── containerscroller.js │ │ ├── control.js │ │ ├── controlcontent.js │ │ ├── controlrenderer.js │ │ ├── cookieeditor.js │ │ ├── css3buttonrenderer.js │ │ ├── css3menubuttonrenderer.js │ │ ├── cssnames.js │ │ ├── custombutton.js │ │ ├── custombuttonrenderer.js │ │ ├── customcolorpalette.js │ │ ├── datepicker.js │ │ ├── datepickerrenderer.js │ │ ├── decorate.js │ │ ├── defaultdatepickerrenderer.js │ │ ├── dialog.js │ │ ├── dimensionpicker.js │ │ ├── dimensionpickerrenderer.js │ │ ├── dragdropdetector.js │ │ ├── drilldownrow.js │ │ ├── editor │ │ │ ├── abstractdialog.js │ │ │ ├── bubble.js │ │ │ ├── defaulttoolbar.js │ │ │ ├── linkdialog.js │ │ │ ├── messages.js │ │ │ ├── tabpane.js │ │ │ ├── toolbarcontroller.js │ │ │ └── toolbarfactory.js │ │ ├── emoji │ │ │ ├── emoji.js │ │ │ ├── emojipalette.js │ │ │ ├── emojipaletterenderer.js │ │ │ ├── emojipicker.js │ │ │ ├── popupemojipicker.js │ │ │ ├── progressiveemojipaletterenderer.js │ │ │ └── spriteinfo.js │ │ ├── filteredmenu.js │ │ ├── filterobservingmenuitem.js │ │ ├── filterobservingmenuitemrenderer.js │ │ ├── flatbuttonrenderer.js │ │ ├── flatmenubuttonrenderer.js │ │ ├── formpost.js │ │ ├── gauge.js │ │ ├── gaugetheme.js │ │ ├── hovercard.js │ │ ├── hsvapalette.js │ │ ├── hsvpalette.js │ │ ├── idgenerator.js │ │ ├── idletimer.js │ │ ├── iframemask.js │ │ ├── imagelessbuttonrenderer.js │ │ ├── imagelessmenubuttonrenderer.js │ │ ├── inputdatepicker.js │ │ ├── itemevent.js │ │ ├── keyboardeventdata.js │ │ ├── keyboardshortcutevent.js │ │ ├── keyboardshortcuthandler.js │ │ ├── labelinput.js │ │ ├── linkbuttonrenderer.js │ │ ├── map.js │ │ ├── media │ │ │ ├── mediamodel.js │ │ │ └── youtube.js │ │ ├── menu.js │ │ ├── menubar.js │ │ ├── menubardecorator.js │ │ ├── menubarrenderer.js │ │ ├── menubase.js │ │ ├── menubutton.js │ │ ├── menubuttonrenderer.js │ │ ├── menuheader.js │ │ ├── menuheaderrenderer.js │ │ ├── menuitem.js │ │ ├── menuitemrenderer.js │ │ ├── menurenderer.js │ │ ├── menuseparator.js │ │ ├── menuseparatorrenderer.js │ │ ├── mockactivitymonitor.js │ │ ├── modalariavisibilityhelper.js │ │ ├── modalpopup.js │ │ ├── nativebuttonrenderer.js │ │ ├── option.js │ │ ├── palette.js │ │ ├── paletterenderer.js │ │ ├── plaintextspellchecker.js │ │ ├── popup.js │ │ ├── popupbase.js │ │ ├── popupcolorpicker.js │ │ ├── popupdatepicker.js │ │ ├── popupmenu.js │ │ ├── progressbar.js │ │ ├── prompt.js │ │ ├── rangemodel.js │ │ ├── ratings.js │ │ ├── registry.js │ │ ├── richtextspellchecker.js │ │ ├── roundedpanel.js │ │ ├── roundedtabrenderer.js │ │ ├── scrollfloater.js │ │ ├── select.js │ │ ├── selectionmenubutton.js │ │ ├── selectionmodel.js │ │ ├── separator.js │ │ ├── serverchart.js │ │ ├── slider.js │ │ ├── sliderbase.js │ │ ├── splitpane.js │ │ ├── style │ │ │ └── app │ │ │ │ ├── buttonrenderer.js │ │ │ │ ├── menubuttonrenderer.js │ │ │ │ └── primaryactionbuttonrenderer.js │ │ ├── submenu.js │ │ ├── submenurenderer.js │ │ ├── synthetickeyboardevent.js │ │ ├── tab.js │ │ ├── tabbar.js │ │ ├── tabbarrenderer.js │ │ ├── tablesorter.js │ │ ├── tabpane.js │ │ ├── tabrenderer.js │ │ ├── textarea.js │ │ ├── textarearenderer.js │ │ ├── togglebutton.js │ │ ├── toolbar.js │ │ ├── toolbarbutton.js │ │ ├── toolbarbuttonrenderer.js │ │ ├── toolbarcolormenubutton.js │ │ ├── toolbarcolormenubuttonrenderer.js │ │ ├── toolbarmenubutton.js │ │ ├── toolbarmenubuttonrenderer.js │ │ ├── toolbarrenderer.js │ │ ├── toolbarselect.js │ │ ├── toolbarseparator.js │ │ ├── toolbarseparatorrenderer.js │ │ ├── toolbartogglebutton.js │ │ ├── tooltip.js │ │ ├── tree │ │ │ ├── basenode.js │ │ │ ├── treecontrol.js │ │ │ ├── treenode.js │ │ │ └── typeahead.js │ │ ├── tristatemenuitem.js │ │ ├── tristatemenuitemrenderer.js │ │ ├── twothumbslider.js │ │ └── zippy.js │ │ ├── uri │ │ ├── uri.js │ │ └── utils.js │ │ ├── url │ │ └── url.js │ │ ├── useragent │ │ ├── adobereader.js │ │ ├── iphoto.js │ │ ├── jscript.js │ │ ├── keyboard.js │ │ ├── platform.js │ │ ├── product.js │ │ ├── product_isversion.js │ │ ├── useragent.js │ │ └── useragenttestutil.js │ │ ├── vec │ │ ├── float32array.js │ │ ├── float64array.js │ │ ├── mat3.js │ │ ├── mat3d.js │ │ ├── mat3f.js │ │ ├── mat4.js │ │ ├── mat4d.js │ │ ├── mat4f.js │ │ ├── quaternion.js │ │ ├── ray.js │ │ ├── vec.js │ │ ├── vec2.js │ │ ├── vec2d.js │ │ ├── vec2f.js │ │ ├── vec3.js │ │ ├── vec3d.js │ │ ├── vec3f.js │ │ ├── vec4.js │ │ ├── vec4d.js │ │ └── vec4f.js │ │ ├── webgl │ │ └── webgl.js │ │ └── window │ │ └── window.js ├── components │ ├── AddButton.js │ ├── App.js │ ├── Body.js │ ├── Cell.js │ ├── DeleteButton.js │ ├── Header.js │ ├── Row.js │ ├── Table.js │ └── Task.js ├── demo.js ├── icon-16x16.png ├── icon-32x32.png ├── index.html └── setup.js ├── manifest.json ├── media └── image.gif ├── package.json ├── postcss.config.js ├── resources ├── icon-128x128.png ├── icon-16x16.png ├── icon-48x48.png └── icon.png ├── src ├── activator │ ├── setup.js │ └── setupDevTools.ts ├── background │ └── background.ts ├── content │ ├── content.ts │ ├── highlight.ts │ ├── hoverHook.ts │ ├── scanComponents.ts │ └── util.ts ├── devtools │ └── devtools.ts ├── lib │ └── generateID.ts ├── panel │ ├── components │ │ ├── App.tsx │ │ ├── Checkbox.tsx │ │ ├── ClosureComponent.tsx │ │ ├── ClosureComponentTree.tsx │ │ ├── ComponentDataArea.tsx │ │ ├── ComponentsPane.tsx │ │ ├── ComponentsPaneHeader.tsx │ │ ├── CopyButton.tsx │ │ ├── EventItem.tsx │ │ ├── EventsPane.tsx │ │ └── Tab.tsx │ ├── hooks │ │ ├── useRenderState.ts │ │ └── useSplitPane.ts │ ├── listener.ts │ ├── modules │ │ ├── slice.ts │ │ └── store.ts │ ├── panel.html │ ├── panel.tsx │ └── resources │ │ ├── clear_black_24dp.svg │ │ ├── content_copy_black_24dp.svg │ │ ├── done_black_24dp.svg │ │ ├── refresh_black_24dp.svg │ │ └── search_black_24dp.svg ├── port.ts └── types.ts ├── tailwind.config.js ├── tsconfig.json ├── types └── global.d.ts ├── webpack.config.js └── yarn.lock /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 140 3 | } 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Closure Tools DevTools 2 | 3 | GoogleChrome DevTools extension for [Closure Tools](https://developers.google.com/closure) applications. 4 | 5 | ![](/media/image.gif) 6 | 7 | ## Installation 8 | 9 | from [Chrome Web Store](https://chrome.google.com/webstore/detail/closure-tools-devtools/ccppdkklnjdncedigaakkicpncehojbp) 10 | 11 | 🔗 Demo page : https://mugi-uno.github.io/closure-tools-devtools/ 12 | 13 | ## Usage 14 | 15 | Add the following code to your application 16 | 17 | ```js 18 | goog.require("goog.ui.Component"); 19 | goog.require("goog.events.EventTarget"); 20 | 21 | if (window["__CLOSURE_TOOLS_DEVTOOLS__"]) { 22 | window["__CLOSURE_TOOLS_DEVTOOLS__"].setup(); 23 | } 24 | ``` 25 | 26 | If you are using Closure Compiler, you can also add `src/activator/setup.js` to dependencies and add the following code to your application. 27 | 28 | ```js 29 | goog.require("closuretoolsdevtools.setup"); 30 | 31 | if (goog.DEBUG) { 32 | closuretoolsdevtools.setup(); 33 | } 34 | ``` 35 | 36 | ## Licence 37 | 38 | MIT 39 | -------------------------------------------------------------------------------- /docs/bin/labs/code/closure.el: -------------------------------------------------------------------------------- 1 | ;; Copyright The Closure Library Authors. All Rights Reserved. 2 | ;; 3 | ;; Licensed under the Apache License, Version 2.0 (the "License"); 4 | ;; you may not use this file except in compliance with the License. 5 | ;; You may obtain a copy of the License at 6 | ;; 7 | ;; http://www.apache.org/licenses/LICENSE-2.0 8 | ;; 9 | ;; Unless required `by applicable law or agreed to in writing, software 10 | ;; distributed under the License is distributed on an "AS-IS" BASIS, 11 | ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | ;; See the License for the specific language governing permissions and 13 | ;; limitations under the License. 14 | 15 | ;; Closure JS code editing functions for emacs. 16 | 17 | ;; Author: nnaze@google.com (Nathan Naze) 18 | 19 | ;; Remember the path of this file, as we will base our paths on it. 20 | (setq closure-el-path load-file-name) 21 | 22 | (defun closure-el-directory () 23 | "Get the directory the closure.el file lives in." 24 | (file-name-directory closure-el-path)) 25 | 26 | (defun closure-generate-jsdoc-path() 27 | "The path of the generate_jsdoc.py script." 28 | (concat (closure-el-directory) "generate_jsdoc.py")) 29 | 30 | (defun closure-insert-jsdoc () 31 | "Insert JSDoc for the next function after the cursor." 32 | (interactive) 33 | (save-excursion ; Remembers cursor location 34 | (call-process-region 35 | (point) (point-max) 36 | (closure-generate-jsdoc-path) 37 | t t))) 38 | 39 | (provide 'closure) 40 | -------------------------------------------------------------------------------- /docs/bin/labs/code/run_el_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright The Closure Library Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS-IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Wraps the unit tests not using the Google framework so they may be run 18 | # on the continuous build. 19 | # 20 | # Author: nnaze@google.com (Nathan Naze) 21 | # 22 | # Wraps the unit tests not using the Google framework so they may be run 23 | # run on the continuous build. 24 | 25 | set -e 26 | 27 | source googletest.sh || exit 1 28 | 29 | CLOSURE_SRCDIR=$TEST_SRCDIR/google3/javascript/closure/labs/bin/code/ 30 | 31 | emacs --script $CLOSURE_SRCDIR/closure_test.el 32 | -------------------------------------------------------------------------------- /docs/bin/labs/code/run_py_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright The Closure Library Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS-IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Wraps the unit tests not using the Google framework so they may be run 18 | # on the continuous build. 19 | 20 | set -e 21 | 22 | source googletest.sh || exit 1 23 | 24 | CLOSURE_SRCDIR=$TEST_SRCDIR/google3/third_party/javascript/closure/labs/bin/code 25 | 26 | PYTHONPATH=$CLOSURE_SRCDIR 27 | 28 | $CLOSURE_SRCDIR/generate_jsdoc_test.py 29 | -------------------------------------------------------------------------------- /docs/bin/logos/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 19 | 20 | Closure Logo 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/bin/logos/logoandlabel.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 19 | 22 | 23 | Closure 25 | 26 | -------------------------------------------------------------------------------- /docs/closure/bin/labs/code/closure.el: -------------------------------------------------------------------------------- 1 | ;; Copyright The Closure Library Authors. All Rights Reserved. 2 | ;; 3 | ;; Licensed under the Apache License, Version 2.0 (the "License"); 4 | ;; you may not use this file except in compliance with the License. 5 | ;; You may obtain a copy of the License at 6 | ;; 7 | ;; http://www.apache.org/licenses/LICENSE-2.0 8 | ;; 9 | ;; Unless required `by applicable law or agreed to in writing, software 10 | ;; distributed under the License is distributed on an "AS-IS" BASIS, 11 | ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | ;; See the License for the specific language governing permissions and 13 | ;; limitations under the License. 14 | 15 | ;; Closure JS code editing functions for emacs. 16 | 17 | ;; Author: nnaze@google.com (Nathan Naze) 18 | 19 | ;; Remember the path of this file, as we will base our paths on it. 20 | (setq closure-el-path load-file-name) 21 | 22 | (defun closure-el-directory () 23 | "Get the directory the closure.el file lives in." 24 | (file-name-directory closure-el-path)) 25 | 26 | (defun closure-generate-jsdoc-path() 27 | "The path of the generate_jsdoc.py script." 28 | (concat (closure-el-directory) "generate_jsdoc.py")) 29 | 30 | (defun closure-insert-jsdoc () 31 | "Insert JSDoc for the next function after the cursor." 32 | (interactive) 33 | (save-excursion ; Remembers cursor location 34 | (call-process-region 35 | (point) (point-max) 36 | (closure-generate-jsdoc-path) 37 | t t))) 38 | 39 | (provide 'closure) 40 | -------------------------------------------------------------------------------- /docs/closure/bin/labs/code/run_el_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright The Closure Library Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS-IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Wraps the unit tests not using the Google framework so they may be run 18 | # on the continuous build. 19 | # 20 | # Author: nnaze@google.com (Nathan Naze) 21 | # 22 | # Wraps the unit tests not using the Google framework so they may be run 23 | # run on the continuous build. 24 | 25 | set -e 26 | 27 | source googletest.sh || exit 1 28 | 29 | CLOSURE_SRCDIR=$TEST_SRCDIR/google3/javascript/closure/labs/bin/code/ 30 | 31 | emacs --script $CLOSURE_SRCDIR/closure_test.el 32 | -------------------------------------------------------------------------------- /docs/closure/bin/labs/code/run_py_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright The Closure Library Authors 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS-IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | # Wraps the unit tests not using the Google framework so they may be run 18 | # on the continuous build. 19 | 20 | set -e 21 | 22 | source googletest.sh || exit 1 23 | 24 | CLOSURE_SRCDIR=$TEST_SRCDIR/google3/third_party/javascript/closure/labs/bin/code 25 | 26 | PYTHONPATH=$CLOSURE_SRCDIR 27 | 28 | $CLOSURE_SRCDIR/generate_jsdoc_test.py 29 | -------------------------------------------------------------------------------- /docs/closure/bin/logos/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 19 | 20 | Closure Logo 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/closure/bin/logos/logoandlabel.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 19 | 22 | 23 | Closure 25 | 26 | -------------------------------------------------------------------------------- /docs/closure/goog/async/legacy_throttle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides a deprecated alias for goog.async.Throttle 9 | * @deprecated Use goog.async.Throttle instead. 10 | */ 11 | goog.module('goog.Throttle'); 12 | goog.module.declareLegacyNamespace(); 13 | 14 | const Throttle = goog.require('goog.async.Throttle'); 15 | 16 | exports = Throttle; 17 | -------------------------------------------------------------------------------- /docs/closure/goog/async/promises.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides utility functions for promises. 9 | */ 10 | 11 | goog.module('goog.async.promises'); 12 | 13 | 14 | /** 15 | * Resolves when all promise values in the map resolve. The resolved value will 16 | * be a Map with the same keys as the input map, but with the resolved values of 17 | * the promises. Rejects with first error if any promise rejects. Like 18 | * Promise.all(), but for Maps. 19 | * 20 | * @template OUT_VALUE := 21 | * mapunion(IN_VALUE, (V) => 22 | * cond(isTemplatized(V) && sub(rawTypeOf(V), 'IThenable'), 23 | * templateTypeOf(V, 0), 24 | * cond(sub(V, 'Thenable'), 25 | * unknown(), 26 | * V))) 27 | * =: 28 | * @template KEY 29 | * @template IN_VALUE 30 | * 31 | * @param {!Map} promiseMap 32 | * @return {!Promise>} 33 | */ 34 | exports.allMapValues = (promiseMap) => { 35 | // Maps return keys and values in insertion order, so these will match each 36 | // other. 37 | const keys = Array.from(promiseMap.keys()); 38 | const values = Array.from(promiseMap.values()); 39 | return Promise.all(values).then((results) => { 40 | const resultMap = new Map(); 41 | results.forEach((result, i) => resultMap.set(keys[i], result)); 42 | return resultMap; 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /docs/closure/goog/async/throwexception.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides a function to throw an error without interrupting 9 | * the current execution context. 10 | */ 11 | 12 | goog.module('goog.async.throwException'); 13 | goog.module.declareLegacyNamespace(); 14 | 15 | /** 16 | * Throw an item without interrupting the current execution context. For 17 | * example, if processing a group of items in a loop, sometimes it is useful 18 | * to report an error while still allowing the rest of the batch to be 19 | * processed. 20 | * @param {*} exception 21 | */ 22 | function throwException(exception) { 23 | // Each throw needs to be in its own context. 24 | goog.global.setTimeout(() => { 25 | throw exception; 26 | }, 0); 27 | } 28 | exports = throwException; 29 | -------------------------------------------------------------------------------- /docs/closure/goog/crypt/blockcipher.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Interface definition of a block cipher. A block cipher is a 9 | * pair of algorithms that implement encryption and decryption of input bytes. 10 | * 11 | * @see http://en.wikipedia.org/wiki/Block_cipher 12 | */ 13 | 14 | goog.provide('goog.crypt.BlockCipher'); 15 | 16 | 17 | 18 | /** 19 | * Interface definition for a block cipher. 20 | * @interface 21 | */ 22 | goog.crypt.BlockCipher = function() {}; 23 | 24 | /** 25 | * Block size, in bytes. 26 | * @type {number} 27 | * @const 28 | * @public 29 | */ 30 | goog.crypt.BlockCipher.prototype.BLOCK_SIZE; 31 | 32 | /** 33 | * Encrypt a plaintext block. The implementation may expect (and assert) 34 | * a particular block length. 35 | * @param {!Array|!Uint8Array} input Plaintext array of input bytes. 36 | * @return {!Array} Encrypted ciphertext array of bytes. Should be the 37 | * same length as input. 38 | */ 39 | goog.crypt.BlockCipher.prototype.encrypt; 40 | 41 | 42 | /** 43 | * Decrypt a plaintext block. The implementation may expect (and assert) 44 | * a particular block length. 45 | * @param {!Array|!Uint8Array} input Ciphertext. Array of input bytes. 46 | * @return {!Array} Decrypted plaintext array of bytes. Should be the 47 | * same length as input. 48 | */ 49 | goog.crypt.BlockCipher.prototype.decrypt; 50 | -------------------------------------------------------------------------------- /docs/closure/goog/crypt/sha224.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview SHA-224 cryptographic hash. 9 | * 10 | * Usage: 11 | * var sha224 = new goog.crypt.Sha224(); 12 | * sha224.update(bytes); 13 | * var hash = sha224.digest(); 14 | */ 15 | 16 | goog.provide('goog.crypt.Sha224'); 17 | 18 | goog.require('goog.crypt.Sha2'); 19 | 20 | 21 | 22 | /** 23 | * SHA-224 cryptographic hash constructor. 24 | * 25 | * @constructor 26 | * @extends {goog.crypt.Sha2} 27 | * @final 28 | * @struct 29 | */ 30 | goog.crypt.Sha224 = function() { 31 | 'use strict'; 32 | goog.crypt.Sha224.base( 33 | this, 'constructor', 7, goog.crypt.Sha224.INIT_HASH_BLOCK_); 34 | }; 35 | goog.inherits(goog.crypt.Sha224, goog.crypt.Sha2); 36 | 37 | 38 | /** @private {!Array} */ 39 | goog.crypt.Sha224.INIT_HASH_BLOCK_ = [ 40 | 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 41 | 0x64f98fa7, 0xbefa4fa4 42 | ]; 43 | -------------------------------------------------------------------------------- /docs/closure/goog/crypt/sha256.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview SHA-256 cryptographic hash. 9 | * 10 | * Usage: 11 | * var sha256 = new goog.crypt.Sha256(); 12 | * sha256.update(bytes); 13 | * var hash = sha256.digest(); 14 | */ 15 | 16 | goog.provide('goog.crypt.Sha256'); 17 | 18 | goog.require('goog.crypt.Sha2'); 19 | 20 | 21 | 22 | /** 23 | * SHA-256 cryptographic hash constructor. 24 | * 25 | * @constructor 26 | * @extends {goog.crypt.Sha2} 27 | * @final 28 | * @struct 29 | */ 30 | goog.crypt.Sha256 = function() { 31 | 'use strict'; 32 | goog.crypt.Sha256.base( 33 | this, 'constructor', 8, goog.crypt.Sha256.INIT_HASH_BLOCK_); 34 | }; 35 | goog.inherits(goog.crypt.Sha256, goog.crypt.Sha2); 36 | 37 | 38 | /** @private {!Array} */ 39 | goog.crypt.Sha256.INIT_HASH_BLOCK_ = [ 40 | 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 41 | 0x1f83d9ab, 0x5be0cd19 42 | ]; 43 | -------------------------------------------------------------------------------- /docs/closure/goog/crypt/sha384.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview SHA-384 cryptographic hash. 9 | * 10 | * Usage: 11 | * var sha384 = new goog.crypt.Sha384(); 12 | * sha384.update(bytes); 13 | * var hash = sha384.digest(); 14 | */ 15 | 16 | goog.provide('goog.crypt.Sha384'); 17 | 18 | goog.require('goog.crypt.Sha2_64bit'); 19 | 20 | 21 | 22 | /** 23 | * Constructs a SHA-384 cryptographic hash. 24 | * 25 | * @constructor 26 | * @extends {goog.crypt.Sha2_64bit} 27 | * @final 28 | * @struct 29 | */ 30 | goog.crypt.Sha384 = function() { 31 | 'use strict'; 32 | goog.crypt.Sha384.base( 33 | this, 'constructor', 6 /* numHashBlocks */, 34 | goog.crypt.Sha384.INIT_HASH_BLOCK_); 35 | }; 36 | goog.inherits(goog.crypt.Sha384, goog.crypt.Sha2_64bit); 37 | 38 | 39 | /** @private {!Array} */ 40 | goog.crypt.Sha384.INIT_HASH_BLOCK_ = [ 41 | // Section 5.3.4 of 42 | // csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf 43 | 0xcbbb9d5d, 0xc1059ed8, // H0 44 | 0x629a292a, 0x367cd507, // H1 45 | 0x9159015a, 0x3070dd17, // H2 46 | 0x152fecd8, 0xf70e5939, // H3 47 | 0x67332667, 0xffc00b31, // H4 48 | 0x8eb44a87, 0x68581511, // H5 49 | 0xdb0c2e0d, 0x64f98fa7, // H6 50 | 0x47b5481d, 0xbefa4fa4 // H7 51 | ]; 52 | -------------------------------------------------------------------------------- /docs/closure/goog/crypt/sha512.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview SHA-512 cryptographic hash. 9 | * 10 | * Usage: 11 | * var sha512 = new goog.crypt.Sha512(); 12 | * sha512.update(bytes); 13 | * var hash = sha512.digest(); 14 | */ 15 | 16 | goog.provide('goog.crypt.Sha512'); 17 | 18 | goog.require('goog.crypt.Sha2_64bit'); 19 | 20 | 21 | 22 | /** 23 | * Constructs a SHA-512 cryptographic hash. 24 | * 25 | * @constructor 26 | * @extends {goog.crypt.Sha2_64bit} 27 | * @final 28 | * @struct 29 | */ 30 | goog.crypt.Sha512 = function() { 31 | 'use strict'; 32 | goog.crypt.Sha512.base( 33 | this, 'constructor', 8 /* numHashBlocks */, 34 | goog.crypt.Sha512.INIT_HASH_BLOCK_); 35 | }; 36 | goog.inherits(goog.crypt.Sha512, goog.crypt.Sha2_64bit); 37 | 38 | 39 | /** @private {!Array} */ 40 | goog.crypt.Sha512.INIT_HASH_BLOCK_ = [ 41 | // Section 5.3.5 of 42 | // csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf 43 | 0x6a09e667, 0xf3bcc908, // H0 44 | 0xbb67ae85, 0x84caa73b, // H1 45 | 0x3c6ef372, 0xfe94f82b, // H2 46 | 0xa54ff53a, 0x5f1d36f1, // H3 47 | 0x510e527f, 0xade682d1, // H4 48 | 0x9b05688c, 0x2b3e6c1f, // H5 49 | 0x1f83d9ab, 0xfb41bd6b, // H6 50 | 0x5be0cd19, 0x137e2179 // H7 51 | ]; 52 | -------------------------------------------------------------------------------- /docs/closure/goog/css/autocomplete.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Styles for goog.ui.ac.AutoComplete and its derivatives. 10 | * Note: these styles need some work to get them working properly at various 11 | * font sizes other than the default. 12 | */ 13 | 14 | @provide 'goog.css.ac'; 15 | 16 | /* 17 | * TODO(annams): Rename (here and in renderer.js) to specify class name as 18 | * goog-autocomplete-renderer 19 | */ 20 | .ac-renderer { 21 | font: normal 13px Arial, sans-serif; 22 | position: absolute; 23 | background: #fff; 24 | border: 1px solid #666; 25 | -moz-box-shadow: 2px 2px 2px rgba(102, 102, 102, .4); 26 | -webkit-box-shadow: 2px 2px 2px rgba(102, 102, 102, .4); 27 | width: 300px; 28 | } 29 | 30 | .ac-row { 31 | cursor: pointer; 32 | padding: .4em; 33 | } 34 | 35 | .ac-highlighted { 36 | font-weight: bold; 37 | } 38 | 39 | .ac-active { 40 | background-color: #b2b4bf; 41 | } 42 | -------------------------------------------------------------------------------- /docs/closure/goog/css/button.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Styling for buttons rendered by goog.ui.ButtonRenderer. 10 | */ 11 | 12 | @provide 'goog.css.button'; 13 | 14 | @require './custombutton'; 15 | @require './flatbutton'; 16 | 17 | .goog-button { 18 | color: #036; 19 | border-color: #036; 20 | background-color: #69c; 21 | } 22 | 23 | /* State: disabled. */ 24 | .goog-button-disabled { 25 | border-color: #333; 26 | color: #333; 27 | background-color: #999; 28 | } 29 | 30 | /* State: hover. */ 31 | .goog-button-hover { 32 | color: #369; 33 | border-color: #369; 34 | background-color: #9cf; 35 | } 36 | 37 | /* State: active. */ 38 | .goog-button-active { 39 | color: #69c; 40 | border-color: #69c; 41 | } 42 | -------------------------------------------------------------------------------- /docs/closure/goog/css/checkbox.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* Sample 3-state checkbox styles. */ 9 | 10 | @provide 'goog.css.checkbox'; 11 | 12 | .goog-checkbox { 13 | border: 1px solid #1C5180; 14 | display: -moz-inline-box; 15 | display: inline-block; 16 | font-size: 1px; /* Fixes the height in IE6 */ 17 | height: 11px; 18 | margin: 0 4px 0 1px; 19 | vertical-align: text-bottom; 20 | width: 11px; 21 | } 22 | 23 | .goog-checkbox-checked { 24 | background: #fff url(//ssl.gstatic.com/closure/check-sprite.gif) no-repeat 2px center; 25 | } 26 | 27 | .goog-checkbox-undetermined { 28 | background: #bbb url(//ssl.gstatic.com/closure/check-sprite.gif) no-repeat 2px center; 29 | } 30 | 31 | .goog-checkbox-unchecked { 32 | background: #fff; 33 | } 34 | 35 | .goog-checkbox-disabled { 36 | border: 1px solid lightgray; 37 | background-position: -7px; 38 | } 39 | -------------------------------------------------------------------------------- /docs/closure/goog/css/colormenubutton.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styling for buttons created by goog.ui.ColorMenuButtonRenderer. 10 | */ 11 | 12 | @provide 'goog.css.colormenubutton'; 13 | 14 | @require './colorpalette'; 15 | @require './common'; 16 | @require './menubutton'; 17 | 18 | /* Color indicator. */ 19 | .goog-color-menu-button-indicator { 20 | border-bottom: 4px solid #f0f0f0; 21 | } 22 | 23 | /* Thinner padding for color picker buttons, to leave room for the indicator. */ 24 | .goog-color-menu-button .goog-menu-button-inner-box, 25 | .goog-toolbar-color-menu-button .goog-toolbar-menu-button-inner-box { 26 | padding-top: 2px !important; 27 | padding-bottom: 2px !important; 28 | } 29 | -------------------------------------------------------------------------------- /docs/closure/goog/css/colorpalette.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styling for color palettes. 10 | */ 11 | 12 | @provide 'goog.css.colorpalette'; 13 | 14 | @require './palette'; 15 | 16 | .goog-palette-cell .goog-palette-colorswatch { 17 | border: none; 18 | font-size: x-small; 19 | height: 18px; 20 | position: relative; 21 | width: 18px; 22 | } 23 | 24 | .goog-palette-cell-hover .goog-palette-colorswatch { 25 | border: 1px solid #fff; 26 | height: 16px; 27 | width: 16px; 28 | } 29 | 30 | .goog-palette-cell-selected .goog-palette-colorswatch { 31 | /* Client apps may override the URL at which they serve the sprite. */ 32 | background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -368px 0; 33 | border: 1px solid #333; 34 | color: #fff; 35 | font-weight: bold; 36 | height: 16px; 37 | width: 16px; 38 | } 39 | 40 | .goog-palette-customcolor { 41 | background-color: #fafafa; 42 | border: 1px solid #eee; 43 | color: #666; 44 | font-size: x-small; 45 | height: 15px; 46 | position: relative; 47 | width: 15px; 48 | } 49 | 50 | .goog-palette-cell-hover .goog-palette-customcolor { 51 | background-color: #fee; 52 | border: 1px solid #f66; 53 | color: #f66; 54 | } 55 | -------------------------------------------------------------------------------- /docs/closure/goog/css/colorpicker-simplegrid.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* Author: pupius@google.com (Daniel Pupius) */ 9 | 10 | /* 11 | Styles to make the colorpicker look like the old gmail color picker 12 | NOTE: without CSS scoping this will override styles defined in palette.css 13 | */ 14 | .goog-palette { 15 | outline: none; 16 | cursor: default; 17 | } 18 | 19 | .goog-palette-table { 20 | border: 1px solid #666; 21 | border-collapse: collapse; 22 | } 23 | 24 | .goog-palette-cell { 25 | height: 13px; 26 | width: 15px; 27 | margin: 0; 28 | border: 0; 29 | text-align: center; 30 | vertical-align: middle; 31 | border-right: 1px solid #666; 32 | font-size: 1px; 33 | } 34 | 35 | .goog-palette-colorswatch { 36 | position: relative; 37 | height: 13px; 38 | width: 15px; 39 | border: 1px solid #666; 40 | } 41 | 42 | .goog-palette-cell-hover .goog-palette-colorswatch { 43 | border: 1px solid #FFF; 44 | } 45 | 46 | .goog-palette-cell-selected .goog-palette-colorswatch { 47 | border: 1px solid #000; 48 | color: #fff; 49 | } 50 | -------------------------------------------------------------------------------- /docs/closure/goog/css/combobox.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Styles for goog.ui.ComboBox and its derivatives. 10 | */ 11 | 12 | 13 | @require './menu'; 14 | @require './menuitem'; 15 | @require './menuseparator'; 16 | 17 | .goog-combobox { 18 | background: #ddd url(//ssl.gstatic.com/closure/button-bg.gif) repeat-x scroll left top; 19 | border: 1px solid #b5b6b5; 20 | font: normal small arial, sans-serif; 21 | } 22 | 23 | .goog-combobox input { 24 | background-color: #fff; 25 | border: 0; 26 | border-right: 1px solid #b5b6b5; 27 | color: #000; 28 | font: normal small arial, sans-serif; 29 | margin: 0; 30 | padding: 0 0 0 2px; 31 | vertical-align: bottom; /* override demo.css */ 32 | width: 200px; 33 | } 34 | 35 | .goog-combobox input.label-input-label { 36 | background-color: #fff; 37 | color: #aaa; 38 | } 39 | 40 | .goog-combobox .goog-menu { 41 | margin-top: -1px; 42 | width: 219px; /* input width + button width + 3 * 1px border */ 43 | z-index: 1000; 44 | } 45 | 46 | .goog-combobox-button { 47 | cursor: pointer; 48 | display: inline-block; 49 | font-size: 10px; 50 | text-align: center; 51 | width: 16px; 52 | } 53 | 54 | /* IE6 only hack */ 55 | * html .goog-combobox-button { 56 | padding: 0 3px; 57 | } 58 | -------------------------------------------------------------------------------- /docs/closure/goog/css/common.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Cross-browser implementation of the "display: inline-block" CSS property. 10 | * See http://www.w3.org/TR/CSS21/visuren.html#propdef-display for details. 11 | * Tested on IE 6 & 7, FF 1.5 & 2.0, Safari 2 & 3, Webkit, and Opera 9. 12 | */ 13 | 14 | @provide 'goog.css.common'; 15 | 16 | /* 17 | * Default rule; only Safari, Webkit, and Opera handle it without hacks. 18 | */ 19 | .goog-inline-block { 20 | position: relative; 21 | display: -moz-inline-box; /* Ignored by FF3 and later. */ 22 | display: inline-block; 23 | } 24 | 25 | /* 26 | * Pre-IE7 IE hack. On IE, "display: inline-block" only gives the element 27 | * layout, but doesn't give it inline behavior. Subsequently setting display 28 | * to inline does the trick. 29 | */ 30 | * html .goog-inline-block { 31 | display: inline; 32 | } 33 | 34 | /* 35 | * IE7-only hack. On IE, "display: inline-block" only gives the element 36 | * layout, but doesn't give it inline behavior. Subsequently setting display 37 | * to inline does the trick. 38 | */ 39 | *:first-child+html .goog-inline-block { 40 | display: inline; 41 | } 42 | -------------------------------------------------------------------------------- /docs/closure/goog/css/css3menubutton.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styling for buttons created by goog.ui.Css3MenuButtonRenderer. 10 | */ 11 | 12 | @provide 'goog.css.css3menubutton'; 13 | 14 | /* Dropdown arrow style. */ 15 | .goog-css3-button-dropdown { 16 | height: 16px; 17 | width: 7px; 18 | /* Client apps may override the URL at which they serve the sprite. */ 19 | background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -388px 0; 20 | vertical-align: top; 21 | margin-left: 3px; 22 | } 23 | -------------------------------------------------------------------------------- /docs/closure/goog/css/dimensionpicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Styling for dimension pickers rendered by goog.ui.DimensionPickerRenderer. 10 | */ 11 | 12 | @provide 'goog.css.dimensionpicker'; 13 | 14 | .goog-dimension-picker { 15 | font-size: 18px; 16 | padding: 4px; 17 | } 18 | 19 | .goog-dimension-picker div { 20 | position: relative; 21 | } 22 | 23 | .goog-dimension-picker div.goog-dimension-picker-highlighted { 24 | /* Client apps must provide the URL at which they serve the image. */ 25 | /* background: url(dimension-highlighted.png); */ 26 | left: 0; 27 | overflow: hidden; 28 | position: absolute; 29 | top: 0; 30 | } 31 | 32 | .goog-dimension-picker-unhighlighted { 33 | /* Client apps must provide the URL at which they serve the image. */ 34 | /* background: url(dimension-unhighlighted.png); */ 35 | } 36 | 37 | .goog-dimension-picker-status { 38 | font-size: 10pt; 39 | text-align: center; 40 | } 41 | 42 | .goog-dimension-picker div.goog-dimension-picker-mousecatcher { 43 | left: 0; 44 | position: absolute !important; 45 | top: 0; 46 | } 47 | -------------------------------------------------------------------------------- /docs/closure/goog/css/dragdropdetector.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Styling for the drag drop detector. 10 | * 11 | * Author: robbyw@google.com (Robby Walker) 12 | * Author: wcrosby@google.com (Wayne Crosby) 13 | */ 14 | 15 | @provide 'goog.css.dragdropdetector'; 16 | 17 | .goog-dragdrop-w3c-editable-iframe { 18 | position: absolute; 19 | width: 100%; 20 | height: 10px; 21 | top: -150px; 22 | left: 0; 23 | z-index: 10000; 24 | padding: 0; 25 | overflow: hidden; 26 | opacity: 0; 27 | -moz-opacity: 0; 28 | } 29 | 30 | .goog-dragdrop-ie-editable-iframe { 31 | width: 100%; 32 | height: 5000px; 33 | } 34 | 35 | .goog-dragdrop-ie-input { 36 | width: 100%; 37 | height: 5000px; 38 | } 39 | 40 | .goog-dragdrop-ie-div { 41 | position: absolute; 42 | top: -5000px; 43 | left: 0; 44 | width: 100%; 45 | height: 5000px; 46 | z-index: 10000; 47 | background-color: white; 48 | filter: alpha(opacity=0); 49 | overflow: hidden; 50 | } 51 | -------------------------------------------------------------------------------- /docs/closure/goog/css/editor/dialog.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Styles for Editor dialogs and their sub-components. 10 | */ 11 | 12 | @provide 'goog.css.editor.dialog'; 13 | 14 | @require '../dialog'; 15 | @require '../tab'; 16 | @require '../tabbar'; 17 | 18 | .tr-dialog { 19 | width: 475px; 20 | } 21 | 22 | .tr-dialog .goog-tab-content { 23 | margin: 0; 24 | border: 1px solid #6b90da; 25 | padding: 4px 8px; 26 | background: #fff; 27 | overflow: auto; 28 | } 29 | 30 | .tr-tabpane { 31 | font-size: 10pt; 32 | padding: 1.3ex 0; 33 | } 34 | 35 | .tr-tabpane-caption { 36 | font-size: 10pt; 37 | margin-bottom: 0.7ex; 38 | background-color: #fffaf5; 39 | line-height: 1.3em; 40 | } 41 | 42 | .tr-tabpane .goog-tab-content { 43 | border: none; 44 | padding: 5px 7px 1px; 45 | } 46 | 47 | .tr-tabpane .goog-tab { 48 | background-color: #fff; 49 | border: none; 50 | width: 136px; 51 | line-height: 1.3em; 52 | margin-bottom: 0.7ex; 53 | } 54 | 55 | .tr-tabpane .goog-tab { 56 | text-decoration: underline; 57 | color: blue; 58 | cursor: pointer; 59 | } 60 | 61 | .tr-tabpane .goog-tab-selected { 62 | font-weight: bold; 63 | text-decoration: none; 64 | color: black; 65 | } 66 | 67 | .tr-tabpane .goog-tab input { 68 | margin: -2px 5px 0 0; 69 | } 70 | -------------------------------------------------------------------------------- /docs/closure/goog/css/editor/linkdialog.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /** 9 | * Styles for the Editor's Edit Link dialog. 10 | * 11 | */ 12 | 13 | @provide 'goog.css.editor.linkdialog'; 14 | 15 | @require './dialog'; 16 | @require '../linkbutton'; 17 | 18 | 19 | .tr-link-dialog-explanation-text { 20 | font-size: 83%; 21 | margin-top: 15px; 22 | } 23 | 24 | .tr-link-dialog-target-input { 25 | width: 100%; 26 | /* Input boxes for URLs and email address should always be LTR. */ 27 | direction: ltr; 28 | box-sizing: border-box; 29 | } 30 | 31 | .tr-link-dialog-email-warning { 32 | text-align: center; 33 | color: #c00; 34 | font-weight: bold; 35 | } 36 | 37 | .tr_pseudo-link { 38 | color: #00c; 39 | text-decoration: underline; 40 | cursor: pointer; 41 | } 42 | -------------------------------------------------------------------------------- /docs/closure/goog/css/filteredmenu.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* goog.ui.FilteredMenu */ 9 | 10 | @provide 'goog.css.filteredmenu'; 11 | 12 | .goog-menu-filter { 13 | margin: 2px; 14 | border: 1px solid silver; 15 | background: white; 16 | overflow: hidden; 17 | } 18 | 19 | .goog-menu-filter div { 20 | color: gray; 21 | pointer-events: none; 22 | position: absolute; 23 | padding: 1px; 24 | } 25 | 26 | .goog-menu-filter input { 27 | margin: 0; 28 | border: 0; 29 | background: transparent; 30 | width: 100%; 31 | } 32 | -------------------------------------------------------------------------------- /docs/closure/goog/css/filterobservingmenuitem.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* goog.ui.FilterObservingMenuItem */ 9 | 10 | @provide 'goog.css.filterobservingmenuitem'; 11 | 12 | .goog-filterobsmenuitem { 13 | padding: 2px 5px; 14 | margin: 0; 15 | list-style: none; 16 | } 17 | 18 | .goog-filterobsmenuitem-highlight { 19 | background-color: #4279A5; 20 | color: #FFF; 21 | } 22 | 23 | .goog-filterobsmenuitem-disabled { 24 | color: #999; 25 | } 26 | -------------------------------------------------------------------------------- /docs/closure/goog/css/hovercard.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | @provide 'goog.css.hovercard'; 9 | 10 | .goog-hovercard div { 11 | border: solid 5px #69748C; 12 | width: 300px; 13 | height: 115px; 14 | background-color: white; 15 | font-family: arial, sans-serif; 16 | } 17 | 18 | .goog-hovercard .goog-shadow { 19 | border: transparent; 20 | background-color: black; 21 | filter: alpha(Opacity=1); 22 | opacity: 0.01; 23 | -moz-opacity: 0.01; 24 | } 25 | 26 | .goog-hovercard table { 27 | border-collapse: collapse; 28 | border-spacing: 0px; 29 | } 30 | 31 | .goog-hovercard-icons td { 32 | border-bottom: 1px solid #ccc; 33 | padding: 0px; 34 | margin: 0px; 35 | text-align: center; 36 | height: 19px; 37 | width: 100px; 38 | font-size: 90%; 39 | } 40 | 41 | .goog-hovercard-icons td + td { 42 | border-left: 1px solid #ccc; 43 | } 44 | 45 | .goog-hovercard-content { 46 | border-collapse: collapse; 47 | } 48 | 49 | .goog-hovercard-content td { 50 | padding-left: 15px; 51 | } 52 | -------------------------------------------------------------------------------- /docs/closure/goog/css/imagelessmenubutton.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styling for buttons created by goog.ui.ImagelessMenuButtonRenderer. 10 | */ 11 | 12 | @provide 'goog.css.imagelessmenubutton'; 13 | 14 | /* Dropdown arrow style. */ 15 | .goog-imageless-button-dropdown { 16 | height: 16px; 17 | width: 7px; 18 | /* Client apps may override the URL at which they serve the sprite. */ 19 | background: url(//ssl.gstatic.com/editor/editortoolbar.png) no-repeat -388px 0; 20 | vertical-align: top; 21 | margin-right: 2px; 22 | } 23 | -------------------------------------------------------------------------------- /docs/closure/goog/css/inputdatepicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* goog.ui.InputDatePicker */ 9 | 10 | @provide 'goog.css.inputdatepicker'; 11 | 12 | @require './popupdatepicker'; 13 | 14 | @import url(popupdatepicker.css); 15 | -------------------------------------------------------------------------------- /docs/closure/goog/css/linkbutton.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Styling for link buttons created by goog.ui.LinkButtonRenderer. 10 | */ 11 | 12 | @provide 'goog.css.linkbutton'; 13 | 14 | @require './common'; 15 | 16 | .goog-link-button { 17 | position: relative; 18 | color: #00f; 19 | text-decoration: underline; 20 | cursor: pointer; 21 | } 22 | 23 | /* State: disabled. */ 24 | .goog-link-button-disabled { 25 | color: #888; 26 | text-decoration: none; 27 | cursor: default; 28 | } 29 | -------------------------------------------------------------------------------- /docs/closure/goog/css/menu.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styling for menus created by goog.ui.MenuRenderer. 10 | */ 11 | 12 | @provide 'goog.css.menu'; 13 | 14 | .goog-menu { 15 | background: #fff; 16 | border-color: #ccc #666 #666 #ccc; 17 | border-style: solid; 18 | border-width: 1px; 19 | cursor: default; 20 | font: normal 13px Arial, sans-serif; 21 | margin: 0; 22 | outline: none; 23 | padding: 4px 0; 24 | position: absolute; 25 | z-index: 20000; /* Arbitrary, but some apps depend on it... */ 26 | } 27 | -------------------------------------------------------------------------------- /docs/closure/goog/css/menubar.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * styling for goog.ui.menuBar and child buttons. 10 | */ 11 | 12 | @provide 'goog.css.menubar'; 13 | 14 | .goog-menubar { 15 | cursor: default; 16 | outline: none; 17 | position: relative; 18 | white-space: nowrap; 19 | background: #fff; 20 | } 21 | 22 | .goog-menubar .goog-menu-button { 23 | padding: 1px 1px; 24 | margin: 0px 0px; 25 | outline: none; 26 | border: none; 27 | background: #fff; 28 | /* @alternate */ border: 1px solid #fff; 29 | } 30 | 31 | .goog-menubar .goog-menu-button-dropdown { 32 | display: none; 33 | } 34 | 35 | .goog-menubar .goog-menu-button-outer-box { 36 | border: none; 37 | } 38 | 39 | .goog-menubar .goog-menu-button-inner-box { 40 | border: none; 41 | } 42 | 43 | .goog-menubar .goog-menu-button-hover { 44 | background: #eee; 45 | border: 1px solid #eee; 46 | } 47 | 48 | .goog-menubar .goog-menu-button-open { 49 | background: #fff; 50 | border-left: 1px solid #ccc; 51 | border-right: 1px solid #ccc; 52 | } 53 | 54 | .goog-menubar .goog-menu-button-disabled { 55 | color: #ccc; 56 | } 57 | -------------------------------------------------------------------------------- /docs/closure/goog/css/menuseparator.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styling for menus created by goog.ui.MenuSeparatorRenderer. 10 | */ 11 | 12 | @provide 'goog.css.menuseparator'; 13 | 14 | .goog-menuseparator { 15 | border-top: 1px solid #ccc; 16 | margin: 4px 0; 17 | padding: 0; 18 | } 19 | -------------------------------------------------------------------------------- /docs/closure/goog/css/palette.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styling for palettes created by goog.ui.PaletteRenderer. 10 | */ 11 | 12 | @provide 'goog.css.palette'; 13 | 14 | .goog-palette { 15 | cursor: default; 16 | outline: none; 17 | } 18 | 19 | .goog-palette-table { 20 | border: 1px solid #666; 21 | border-collapse: collapse; 22 | margin: 5px; 23 | } 24 | 25 | .goog-palette-cell { 26 | border: 0; 27 | border-right: 1px solid #666; 28 | cursor: pointer; 29 | height: 18px; 30 | margin: 0; 31 | text-align: center; 32 | vertical-align: middle; 33 | width: 18px; 34 | } 35 | -------------------------------------------------------------------------------- /docs/closure/goog/css/popupdatepicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styling for a goog.ui.PopupDatePicker. 10 | */ 11 | 12 | @provide 'goog.css.popupdatepicker'; 13 | 14 | @require './datepicker'; 15 | 16 | .goog-date-picker { 17 | position: absolute; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /docs/closure/goog/css/roundedpanel.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styles for RoundedPanel. 10 | */ 11 | 12 | @provide 'goog.css.roundedpanel'; 13 | 14 | .goog-roundedpanel { 15 | position: relative; 16 | z-index: 0; 17 | } 18 | 19 | .goog-roundedpanel-background { 20 | position: absolute; 21 | left: 0; 22 | top: 0; 23 | width: 100%; 24 | height: 100%; 25 | z-index: -1; 26 | } 27 | 28 | .goog-roundedpanel-content { 29 | } 30 | -------------------------------------------------------------------------------- /docs/closure/goog/css/submenu.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Standard styling for menus created by goog.ui.SubMenuRenderer. 10 | */ 11 | 12 | @provide 'goog.css.submenu'; 13 | 14 | /* State: resting. */ 15 | /* @noflip */ 16 | .goog-submenu-arrow { 17 | color: #000; 18 | left: auto; 19 | padding-right: 6px; 20 | position: absolute; 21 | right: 0; 22 | text-align: right; 23 | } 24 | 25 | /* BiDi override. */ 26 | /* @noflip */ 27 | .goog-menuitem-rtl .goog-submenu-arrow { 28 | text-align: left; 29 | left: 0; 30 | right: auto; 31 | padding-left: 6px; 32 | } 33 | 34 | /* State: disabled. */ 35 | .goog-menuitem-disabled .goog-submenu-arrow { 36 | color: #ccc; 37 | } 38 | -------------------------------------------------------------------------------- /docs/closure/goog/css/tabbar.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* 9 | * Styles used by goog.ui.TabBarRenderer. 10 | */ 11 | 12 | @provide 'goog.css.tabbar'; 13 | 14 | .goog-tab-bar { 15 | margin: 0; 16 | border: 0; 17 | padding: 0; 18 | list-style: none; 19 | cursor: default; 20 | outline: none; 21 | background: #ebeff9; 22 | } 23 | 24 | .goog-tab-bar-clear { 25 | clear: both; 26 | height: 0; 27 | overflow: hidden; 28 | } 29 | 30 | .goog-tab-bar-start { 31 | float: left; 32 | } 33 | 34 | .goog-tab-bar-end { 35 | float: right; 36 | } 37 | 38 | 39 | /* 40 | * IE6-only hacks to fix the gap between the floated tabs and the content. 41 | * IE7 and later will ignore these. 42 | */ 43 | /* @if user.agent ie6 */ 44 | * html .goog-tab-bar-start { 45 | margin-right: -3px; 46 | } 47 | 48 | * html .goog-tab-bar-end { 49 | margin-left: -3px; 50 | } 51 | /* @endif */ 52 | -------------------------------------------------------------------------------- /docs/closure/goog/css/tablesorter.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2008 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* Styles for goog.ui.TableSorter. */ 9 | 10 | @provide 'goog.css.tablesorter'; 11 | 12 | .goog-tablesorter-header { 13 | cursor: pointer 14 | } 15 | -------------------------------------------------------------------------------- /docs/closure/goog/css/tooltip.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | @provide 'goog.css.tooltip'; 9 | 10 | .goog-tooltip { 11 | background: #ffe; 12 | border: 1px solid #999; 13 | border-width: 1px 2px 2px 1px; 14 | padding: 6px; 15 | z-index: 30000; 16 | } 17 | -------------------------------------------------------------------------------- /docs/closure/goog/css/tristatemenuitem.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007 The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* goog.ui.TriStateMenuItem */ 9 | 10 | @provide 'goog.css.tristatemenuitem'; 11 | 12 | .goog-tristatemenuitem { 13 | padding: 2px 5px; 14 | margin: 0; 15 | list-style: none; 16 | } 17 | 18 | .goog-tristatemenuitem-highlight { 19 | background-color: #4279A5; 20 | color: #FFF; 21 | } 22 | 23 | .goog-tristatemenuitem-disabled { 24 | color: #999; 25 | } 26 | 27 | .goog-tristatemenuitem-checkbox { 28 | float: left; 29 | width: 10px; 30 | height: 1.1em; 31 | } 32 | 33 | .goog-tristatemenuitem-partially-checked { 34 | background-image: url(//ssl.gstatic.com/closure/check-outline.gif); 35 | background-position: 4px 50%; 36 | background-repeat: no-repeat; 37 | } 38 | 39 | .goog-tristatemenuitem-fully-checked { 40 | background-image: url(//ssl.gstatic.com/closure/check.gif); 41 | background-position: 4px 50%; 42 | background-repeat: no-repeat; 43 | } 44 | -------------------------------------------------------------------------------- /docs/closure/goog/cssom/cssom_test_import_1.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | @import "cssom_test_import_2.css"; 9 | .css-import-1 { 10 | display: block; 11 | } 12 | -------------------------------------------------------------------------------- /docs/closure/goog/cssom/cssom_test_import_2.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | .css-import-2 { 9 | display: block; 10 | } 11 | -------------------------------------------------------------------------------- /docs/closure/goog/cssom/cssom_test_link_1.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | .css-link-1 { 9 | display: block; 10 | } 11 | -------------------------------------------------------------------------------- /docs/closure/goog/cssom/iframe/style_test_import.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | div div strong { 9 | font-style: italic; 10 | } 11 | -------------------------------------------------------------------------------- /docs/closure/goog/debug/devcss/devcssrunner.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Development CSS Compiler runtime execution. 9 | */ 10 | 11 | goog.provide('goog.debug.devCssRunner'); 12 | 13 | goog.require('goog.debug.DevCss'); 14 | 15 | (function() { 16 | 'use strict'; 17 | const devCssInstance = new goog.debug.DevCss(); 18 | devCssInstance.activateBrowserSpecificCssRules(); 19 | })(); 20 | -------------------------------------------------------------------------------- /docs/closure/goog/debug/errorcontext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides methods dealing with context on error objects. 9 | */ 10 | 11 | goog.provide('goog.debug.errorcontext'); 12 | 13 | 14 | /** 15 | * Adds key-value context to the error. 16 | * @param {!Error} err The error to add context to. 17 | * @param {string} contextKey Key for the context to be added. 18 | * @param {string} contextValue Value for the context to be added. 19 | */ 20 | goog.debug.errorcontext.addErrorContext = function( 21 | err, contextKey, contextValue) { 22 | 'use strict'; 23 | if (!err[goog.debug.errorcontext.CONTEXT_KEY_]) { 24 | err[goog.debug.errorcontext.CONTEXT_KEY_] = {}; 25 | } 26 | err[goog.debug.errorcontext.CONTEXT_KEY_][contextKey] = contextValue; 27 | }; 28 | 29 | 30 | /** 31 | * @param {!Error} err The error to get context from. 32 | * @return {!Object} The context of the provided error. 33 | */ 34 | goog.debug.errorcontext.getErrorContext = function(err) { 35 | 'use strict'; 36 | return err[goog.debug.errorcontext.CONTEXT_KEY_] || {}; 37 | }; 38 | 39 | 40 | // TODO(user): convert this to a Symbol once goog.debug.ErrorReporter is 41 | // able to use ES6. 42 | /** @private @const {string} */ 43 | goog.debug.errorcontext.CONTEXT_KEY_ = '__closure__error__context__984382'; 44 | -------------------------------------------------------------------------------- /docs/closure/goog/disposable/dispose.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview The dispose method is used to clean up references and 9 | * resources. 10 | */ 11 | 12 | goog.module('goog.dispose'); 13 | goog.module.declareLegacyNamespace(); 14 | 15 | /** 16 | * Calls `dispose` on the argument if it supports it. If obj is not an 17 | * object with a dispose() method, this is a no-op. 18 | * @param {*} obj The object to dispose of. 19 | */ 20 | function dispose(obj) { 21 | if (obj && typeof obj.dispose == 'function') { 22 | obj.dispose(); 23 | } 24 | } 25 | exports = dispose; 26 | -------------------------------------------------------------------------------- /docs/closure/goog/disposable/disposeall.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview The disposeAll method is used to clean up references and 9 | * resources. 10 | */ 11 | 12 | goog.module('goog.disposeAll'); 13 | goog.module.declareLegacyNamespace(); 14 | 15 | const dispose = goog.require('goog.dispose'); 16 | 17 | /** 18 | * Calls `dispose` on each member of the list that supports it. (If the 19 | * member is an ArrayLike, then `goog.disposeAll()` will be called 20 | * recursively on each of its members.) If the member is not an object with a 21 | * `dispose()` method, then it is ignored. 22 | * @param {...*} var_args The list. 23 | */ 24 | function disposeAll(var_args) { 25 | for (let i = 0, len = arguments.length; i < len; ++i) { 26 | const disposable = arguments[i]; 27 | if (goog.isArrayLike(disposable)) { 28 | disposeAll.apply(null, disposable); 29 | } else { 30 | dispose(disposable); 31 | } 32 | } 33 | } 34 | exports = disposeAll; 35 | -------------------------------------------------------------------------------- /docs/closure/goog/disposable/idisposable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Definition of the disposable interface. A disposable object 9 | * has a dispose method to to clean up references and resources. 10 | */ 11 | 12 | 13 | goog.provide('goog.disposable.IDisposable'); 14 | 15 | 16 | 17 | /** 18 | * Interface for a disposable object. If a instance requires cleanup, it should 19 | * implement this interface (it may subclass goog.Disposable). 20 | * 21 | * Examples of cleanup that can be done in `dispose` method: 22 | * 1. Remove event listeners. 23 | * 2. Cancel timers (setTimeout, setInterval, goog.Timer). 24 | * 3. Call `dispose` on other disposable objects hold by current object. 25 | * 4. Close connections (e.g. WebSockets). 26 | * 27 | * Note that it's not required to delete properties (e.g. DOM nodes) or set them 28 | * to null as garbage collector will collect them assuming that references to 29 | * current object will be lost after it is disposed. 30 | * 31 | * See also http://go/mdn/JavaScript/Memory_Management. 32 | * 33 | * @record 34 | */ 35 | goog.disposable.IDisposable = function() {}; 36 | 37 | 38 | /** 39 | * Disposes of the object and its resources. 40 | * @return {void} Nothing. 41 | */ 42 | goog.disposable.IDisposable.prototype.dispose = goog.abstractMethod; 43 | 44 | 45 | /** 46 | * @return {boolean} Whether the object has been disposed of. 47 | */ 48 | goog.disposable.IDisposable.prototype.isDisposed = goog.abstractMethod; 49 | -------------------------------------------------------------------------------- /docs/closure/goog/dom/htmlelement.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | goog.provide('goog.dom.HtmlElement'); 8 | 9 | 10 | 11 | /** 12 | * This subclass of HTMLElement is used when only a HTMLElement is possible and 13 | * not any of its subclasses. Normally, a type can refer to an instance of 14 | * itself or an instance of any subtype. More concretely, if HTMLElement is used 15 | * then the compiler must assume that it might still be e.g. HTMLScriptElement. 16 | * With this, the type check knows that it couldn't be any special element. 17 | * 18 | * @constructor 19 | * @extends {HTMLElement} 20 | */ 21 | goog.dom.HtmlElement = function() {}; 22 | -------------------------------------------------------------------------------- /docs/closure/goog/dom/nodetype.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Definition of goog.dom.NodeType. 9 | */ 10 | 11 | goog.provide('goog.dom.NodeType'); 12 | 13 | 14 | /** 15 | * Constants for the nodeType attribute in the Node interface. 16 | * 17 | * These constants match those specified in the Node interface. These are 18 | * usually present on the Node object in recent browsers, but not in older 19 | * browsers (specifically, early IEs) and thus are given here. 20 | * 21 | * In some browsers (early IEs), these are not defined on the Node object, 22 | * so they are provided here. 23 | * 24 | * See http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247 25 | * @enum {number} 26 | */ 27 | goog.dom.NodeType = { 28 | ELEMENT: 1, 29 | ATTRIBUTE: 2, 30 | TEXT: 3, 31 | CDATA_SECTION: 4, 32 | ENTITY_REFERENCE: 5, 33 | ENTITY: 6, 34 | PROCESSING_INSTRUCTION: 7, 35 | COMMENT: 8, 36 | DOCUMENT: 9, 37 | DOCUMENT_TYPE: 10, 38 | DOCUMENT_FRAGMENT: 11, 39 | NOTATION: 12 40 | }; 41 | -------------------------------------------------------------------------------- /docs/closure/goog/dom/pattern/abstractpattern.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview DOM pattern base class. 9 | */ 10 | 11 | goog.provide('goog.dom.pattern.AbstractPattern'); 12 | 13 | goog.require('goog.dom.TagWalkType'); 14 | goog.require('goog.dom.pattern.MatchType'); 15 | 16 | 17 | 18 | /** 19 | * Base pattern class for DOM matching. 20 | * 21 | * @constructor 22 | */ 23 | goog.dom.pattern.AbstractPattern = function() { 24 | 'use strict'; 25 | /** 26 | * The first node matched by this pattern. 27 | * @type {?Node} 28 | */ 29 | this.matchedNode = null; 30 | }; 31 | 32 | 33 | /** 34 | * Reset any internal state this pattern keeps. 35 | */ 36 | goog.dom.pattern.AbstractPattern.prototype.reset = function() { 37 | // The base implementation does nothing. 38 | }; 39 | 40 | 41 | /** 42 | * Test whether this pattern matches the given token. 43 | * 44 | * @param {Node} token Token to match against. 45 | * @param {goog.dom.TagWalkType} type The type of token. 46 | * @return {goog.dom.pattern.MatchType} `MATCH` if the pattern matches. 47 | */ 48 | goog.dom.pattern.AbstractPattern.prototype.matchToken = function(token, type) { 49 | 'use strict'; 50 | return goog.dom.pattern.MatchType.NO_MATCH; 51 | }; 52 | -------------------------------------------------------------------------------- /docs/closure/goog/dom/pattern/callback/counter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Callback object that counts matches. 9 | */ 10 | 11 | goog.provide('goog.dom.pattern.callback.Counter'); 12 | 13 | 14 | 15 | /** 16 | * Callback class for counting matches. 17 | * @constructor 18 | * @final 19 | */ 20 | goog.dom.pattern.callback.Counter = function() { 21 | 'use strict'; 22 | /** 23 | * The count of objects matched so far. 24 | * 25 | * @type {number} 26 | */ 27 | this.count = 0; 28 | 29 | /** 30 | * The callback function. Suitable as a callback for 31 | * {@link goog.dom.pattern.Matcher}. 32 | * @private {?Function} 33 | */ 34 | this.callback_ = null; 35 | }; 36 | 37 | 38 | /** 39 | * Get a bound callback function that is suitable as a callback for 40 | * {@link goog.dom.pattern.Matcher}. 41 | * 42 | * @return {!Function} A callback function. 43 | */ 44 | goog.dom.pattern.callback.Counter.prototype.getCallback = function() { 45 | 'use strict'; 46 | if (!this.callback_) { 47 | this.callback_ = goog.bind(function() { 48 | 'use strict'; 49 | this.count++; 50 | return false; 51 | }, this); 52 | } 53 | return this.callback_; 54 | }; 55 | 56 | 57 | /** 58 | * Reset the counter. 59 | */ 60 | goog.dom.pattern.callback.Counter.prototype.reset = function() { 61 | 'use strict'; 62 | this.count = 0; 63 | }; 64 | -------------------------------------------------------------------------------- /docs/closure/goog/dom/pattern/endtag.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview DOM pattern to match the end of a tag. 9 | */ 10 | 11 | goog.provide('goog.dom.pattern.EndTag'); 12 | 13 | goog.require('goog.dom.TagWalkType'); 14 | goog.require('goog.dom.pattern.Tag'); 15 | 16 | 17 | 18 | /** 19 | * Pattern object that matches a closing tag. 20 | * 21 | * @param {string|RegExp} tag Name of the tag. Also will accept a regular 22 | * expression to match against the tag name. 23 | * @param {Object=} opt_attrs Optional map of attribute names to desired values. 24 | * This pattern will only match when all attributes are present and match 25 | * the string or regular expression value provided here. 26 | * @param {Object=} opt_styles Optional map of CSS style names to desired 27 | * values. This pattern will only match when all styles are present and 28 | * match the string or regular expression value provided here. 29 | * @param {Function=} opt_test Optional function that takes the element as a 30 | * parameter and returns true if this pattern should match it. 31 | * @constructor 32 | * @extends {goog.dom.pattern.Tag} 33 | * @final 34 | */ 35 | goog.dom.pattern.EndTag = function(tag, opt_attrs, opt_styles, opt_test) { 36 | 'use strict'; 37 | goog.dom.pattern.Tag.call( 38 | this, tag, goog.dom.TagWalkType.END_TAG, opt_attrs, opt_styles, opt_test); 39 | }; 40 | goog.inherits(goog.dom.pattern.EndTag, goog.dom.pattern.Tag); 41 | -------------------------------------------------------------------------------- /docs/closure/goog/dom/pattern/starttag.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview DOM pattern to match the start of a tag. 9 | */ 10 | 11 | goog.provide('goog.dom.pattern.StartTag'); 12 | 13 | goog.require('goog.dom.TagWalkType'); 14 | goog.require('goog.dom.pattern.Tag'); 15 | 16 | 17 | 18 | /** 19 | * Pattern object that matches an opening tag. 20 | * 21 | * @param {string|RegExp} tag Name of the tag. Also will accept a regular 22 | * expression to match against the tag name. 23 | * @param {Object=} opt_attrs Optional map of attribute names to desired values. 24 | * This pattern will only match when all attributes are present and match 25 | * the string or regular expression value provided here. 26 | * @param {Object=} opt_styles Optional map of CSS style names to desired 27 | * values. This pattern will only match when all styles are present and 28 | * match the string or regular expression value provided here. 29 | * @param {Function=} opt_test Optional function that takes the element as a 30 | * parameter and returns true if this pattern should match it. 31 | * @constructor 32 | * @extends {goog.dom.pattern.Tag} 33 | */ 34 | goog.dom.pattern.StartTag = function(tag, opt_attrs, opt_styles, opt_test) { 35 | 'use strict'; 36 | goog.dom.pattern.Tag.call( 37 | this, tag, goog.dom.TagWalkType.START_TAG, opt_attrs, opt_styles, 38 | opt_test); 39 | }; 40 | goog.inherits(goog.dom.pattern.StartTag, goog.dom.pattern.Tag); 41 | -------------------------------------------------------------------------------- /docs/closure/goog/dom/rangeendpoint.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Simple struct for endpoints of a range. 9 | */ 10 | 11 | 12 | goog.provide('goog.dom.RangeEndpoint'); 13 | 14 | 15 | /** 16 | * Constants for selection endpoints. 17 | * @enum {number} 18 | */ 19 | goog.dom.RangeEndpoint = { 20 | START: 1, 21 | END: 0 22 | }; 23 | -------------------------------------------------------------------------------- /docs/closure/goog/dom/tags.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Utilities for HTML element tag names. 9 | */ 10 | goog.provide('goog.dom.tags'); 11 | 12 | goog.require('goog.object'); 13 | 14 | 15 | /** 16 | * The void elements specified by 17 | * http://www.w3.org/TR/html-markup/syntax.html#void-elements. 18 | * @const @private {!Object} 19 | */ 20 | goog.dom.tags.VOID_TAGS_ = goog.object.createSet( 21 | 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 22 | 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'); 23 | 24 | 25 | /** 26 | * Checks whether the tag is void (with no contents allowed and no legal end 27 | * tag), for example 'br'. 28 | * @param {string} tagName The tag name in lower case. 29 | * @return {boolean} 30 | */ 31 | goog.dom.tags.isVoidTag = function(tagName) { 32 | 'use strict'; 33 | return goog.dom.tags.VOID_TAGS_[tagName] === true; 34 | }; 35 | -------------------------------------------------------------------------------- /docs/closure/goog/dom/textassert.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * Utilities intended for refactoring legacy code; allows classifying strings 9 | * into plain text that does not contain HTML and HTML. Please do NOT use in new 10 | * code. 11 | */ 12 | 13 | goog.provide('goog.dom.textAssert'); 14 | 15 | goog.require('goog.asserts'); 16 | goog.require('goog.dom'); 17 | goog.require('goog.dom.TagName'); 18 | 19 | /** 20 | * Assert that the string is plain text that does not have HTML, i.e. not 21 | * affected by HTML escaping. Otherwise, this raises an error if assertions are 22 | * enabled. It does NOT sanitize nor make any change to the input string. It 23 | * should only be used when the assertion failure is benign, such as printing 24 | * spurious tags. DO NOT count on this to remove unsafe HTML. It is only meant 25 | * for legacy refactoring. Please do NOT use in new code. 26 | * @param {string} text 27 | * @return {string} 28 | */ 29 | goog.dom.textAssert.assertHtmlFree = function(text) { 30 | 'use strict'; 31 | if (goog.asserts.ENABLE_ASSERTS) { 32 | var elmt = goog.dom.createElement(goog.dom.TagName.BODY); 33 | elmt.textContent = text; 34 | goog.asserts.assert( 35 | elmt.innerHTML == elmt.textContent, 36 | 'String has HTML original: %s, escaped: %s', text, elmt.innerHTML); 37 | } 38 | return text; 39 | }; 40 | -------------------------------------------------------------------------------- /docs/closure/goog/editor/defines.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Text editor constants for compile time feature selection. 9 | */ 10 | 11 | goog.provide('goog.editor.defines'); 12 | 13 | 14 | /** 15 | * @define {boolean} Use contentEditable in FF. 16 | * There are a number of known bugs when the only content in your field is 17 | * inline (e.g. just text, no block elements): 18 | * -indent is a noop and then DOMSubtreeModified events stop firing until 19 | * the structure of the DOM is changed (e.g. make something bold). 20 | * -inserting lists inserts just a NBSP, no list! 21 | * Once those two are fixed, we should have one client guinea pig it and put 22 | * it through a QA run. If we can file the bugs with Mozilla, there's a chance 23 | * they'll fix them for a dot release of Firefox 3. 24 | */ 25 | goog.editor.defines.USE_CONTENTEDITABLE_IN_FIREFOX_3 = 26 | goog.define('goog.editor.defines.USE_CONTENTEDITABLE_IN_FIREFOX_3', false); 27 | -------------------------------------------------------------------------------- /docs/closure/goog/editor/focus.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Utilties to handle focusing related to rich text editing. 9 | */ 10 | 11 | goog.provide('goog.editor.focus'); 12 | 13 | goog.require('goog.dom.selection'); 14 | 15 | 16 | /** 17 | * Change focus to the given input field and set cursor to end of current text. 18 | * @param {Element} inputElem Input DOM element. 19 | * @suppress {strictMissingProperties} Part of the go/strict_warnings_migration 20 | */ 21 | goog.editor.focus.focusInputField = function(inputElem) { 22 | 'use strict'; 23 | inputElem.focus(); 24 | goog.dom.selection.setCursorPosition(inputElem, inputElem.value.length); 25 | }; 26 | -------------------------------------------------------------------------------- /docs/closure/goog/editor/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Aliases `goog.editor.PluginImpl`. 9 | * 10 | * This is done to create a target for `goog.editor.PluginImpl` that also pulls 11 | * in `goog.editor.Field` without creating a cycle. Doing so allows downstream 12 | * targets to depend only on `goog.editor.Plugin` without js_library complaining 13 | * about unfullfilled forward declarations. 14 | */ 15 | 16 | goog.provide('goog.editor.Plugin'); 17 | 18 | /** @suppress {extraRequire} This is the whole point. */ 19 | goog.require('goog.editor.Field'); 20 | goog.require('goog.editor.PluginImpl'); 21 | 22 | /** 23 | * @constructor 24 | * @extends {goog.editor.PluginImpl} 25 | */ 26 | goog.editor.Plugin = goog.editor.PluginImpl; 27 | -------------------------------------------------------------------------------- /docs/closure/goog/editor/plugins/linkshortcutplugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Adds a keyboard shortcut for the link command. 9 | */ 10 | 11 | goog.provide('goog.editor.plugins.LinkShortcutPlugin'); 12 | 13 | goog.require('goog.editor.Command'); 14 | goog.require('goog.editor.Link'); 15 | goog.require('goog.editor.Plugin'); 16 | 17 | 18 | 19 | /** 20 | * Plugin to add a keyboard shortcut for the link command 21 | * @constructor 22 | * @extends {goog.editor.Plugin} 23 | * @final 24 | */ 25 | goog.editor.plugins.LinkShortcutPlugin = function() { 26 | 'use strict'; 27 | goog.editor.plugins.LinkShortcutPlugin.base(this, 'constructor'); 28 | }; 29 | goog.inherits(goog.editor.plugins.LinkShortcutPlugin, goog.editor.Plugin); 30 | 31 | 32 | /** @override */ 33 | goog.editor.plugins.LinkShortcutPlugin.prototype.getTrogClassId = function() { 34 | 'use strict'; 35 | return 'LinkShortcutPlugin'; 36 | }; 37 | 38 | 39 | /** 40 | * @override 41 | */ 42 | goog.editor.plugins.LinkShortcutPlugin.prototype.handleKeyboardShortcut = 43 | function(e, key, isModifierPressed) { 44 | 'use strict'; 45 | if (isModifierPressed && key == 'k' && !e.shiftKey) { 46 | var link = /** @type {goog.editor.Link?} */ ( 47 | this.getFieldObject().execCommand(goog.editor.Command.LINK)); 48 | if (link) { 49 | link.finishLinkCreation(this.getFieldObject()); 50 | } 51 | return true; 52 | } 53 | 54 | return false; 55 | }; 56 | -------------------------------------------------------------------------------- /docs/closure/goog/editor/tablerow.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Table editing support. 9 | * This file provides one of the supporting classes for goog.editor.Table, the 10 | * goog.editor.TableRow. 11 | */ 12 | 13 | goog.module('goog.editor.TableRow'); 14 | goog.module.declareLegacyNamespace(); 15 | 16 | /** 17 | * Class representing a logical table row: a tr element and any cells 18 | * that appear in that row. 19 | * @param {!Element} trElement This rows's underlying TR element. 20 | * @param {number} rowIndex This row's index in its parent table. 21 | * @constructor 22 | * @final 23 | */ 24 | const TableRow = function(trElement, rowIndex) { 25 | this.index = rowIndex; 26 | this.element = trElement; 27 | this.columns = []; 28 | }; 29 | 30 | exports = TableRow; 31 | -------------------------------------------------------------------------------- /docs/closure/goog/events/eventid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | goog.provide('goog.events.EventId'); 8 | 9 | 10 | 11 | /** 12 | * A templated class that is used when registering for events. Typical usage: 13 | * 14 | * /** @type {goog.events.EventId} *\ 15 | * var myEventId = new goog.events.EventId( 16 | * goog.events.getUniqueId(('someEvent')); 17 | * 18 | * // No need to cast or declare here since the compiler knows the 19 | * // correct type of 'evt' (MyEventObj). 20 | * something.listen(myEventId, function(evt) {}); 21 | * 22 | * @param {string} eventId 23 | * @template T 24 | * @constructor 25 | * @struct 26 | * @final 27 | */ 28 | goog.events.EventId = function(eventId) { 29 | 'use strict'; 30 | /** @const */ this.id = eventId; 31 | }; 32 | 33 | 34 | /** 35 | * @override 36 | * @return {string} 37 | */ 38 | goog.events.EventId.prototype.toString = function() { 39 | 'use strict'; 40 | return this.id; 41 | }; 42 | -------------------------------------------------------------------------------- /docs/closure/goog/events/eventlike.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview A typedef for event like objects that are dispatchable via the 9 | * goog.events.dispatchEvent function. 10 | */ 11 | goog.provide('goog.events.EventLike'); 12 | 13 | goog.requireType('goog.events.Event'); 14 | goog.requireType('goog.events.EventId'); 15 | 16 | /** 17 | * A typedef for event like objects that are dispatchable via the 18 | * goog.events.dispatchEvent function. strings are treated as the type for a 19 | * goog.events.Event. Objects are treated as an extension of a new 20 | * goog.events.Event with the type property of the object being used as the type 21 | * of the Event. 22 | * @typedef {string|Object|goog.events.Event|goog.events.EventId} 23 | */ 24 | goog.events.EventLike; 25 | -------------------------------------------------------------------------------- /docs/closure/goog/events/keys.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Constant declarations for common key values. 9 | */ 10 | 11 | goog.provide('goog.events.Keys'); 12 | 13 | 14 | /** 15 | * Key values for common characters. 16 | * 17 | * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key 18 | * @enum {string} 19 | */ 20 | goog.events.Keys = { 21 | ALT: 'Meta', 22 | ALTGRAPH: 'AltGraph', 23 | BACKSPACE: 'Backspace', 24 | CTRL: 'Control', 25 | DELETE: 'Delete', 26 | DOWN: 'ArrowDown', 27 | END: 'End', 28 | ENTER: 'Enter', 29 | ESCAPE: 'Escape', 30 | HOME: 'Home', 31 | INSERT: 'Insert', 32 | LEFT: 'ArrowLeft', 33 | PAGE_DOWN: 'PageDown', 34 | PAGE_UP: 'PageUp', 35 | RIGHT: 'ArrowRight', 36 | SHIFT: 'Shift', 37 | SPACE: ' ', 38 | TAB: 'Tab', 39 | UP: 'ArrowUp', 40 | }; 41 | -------------------------------------------------------------------------------- /docs/closure/goog/fs/filesystem.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview A wrapper for the HTML5 FileSystem object. 9 | */ 10 | 11 | goog.provide('goog.fs.FileSystem'); 12 | 13 | goog.requireType('goog.fs.DirectoryEntry'); 14 | 15 | 16 | 17 | /** 18 | * A local filesystem. 19 | * 20 | * @interface 21 | */ 22 | goog.fs.FileSystem = function() {}; 23 | 24 | 25 | /** 26 | * @return {string} The name of the filesystem. 27 | */ 28 | goog.fs.FileSystem.prototype.getName = function() {}; 29 | 30 | 31 | /** 32 | * @return {!goog.fs.DirectoryEntry} The root directory of the filesystem. 33 | */ 34 | goog.fs.FileSystem.prototype.getRoot = function() {}; 35 | -------------------------------------------------------------------------------- /docs/closure/goog/fs/filesystemimpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Concrete implementation of the goog.fs.FileSystem interface 9 | * using an HTML FileSystem object. 10 | */ 11 | goog.provide('goog.fs.FileSystemImpl'); 12 | 13 | goog.require('goog.fs.DirectoryEntryImpl'); 14 | goog.require('goog.fs.FileSystem'); 15 | 16 | 17 | 18 | /** 19 | * A local filesystem. 20 | * 21 | * This shouldn't be instantiated directly. Instead, it should be accessed via 22 | * {@link goog.fs.getTemporary} or {@link goog.fs.getPersistent}. 23 | * 24 | * @param {!FileSystem} fs The underlying FileSystem object. 25 | * @constructor 26 | * @implements {goog.fs.FileSystem} 27 | * @final 28 | */ 29 | goog.fs.FileSystemImpl = function(fs) { 30 | 'use strict'; 31 | /** 32 | * The underlying FileSystem object. 33 | * 34 | * @type {!FileSystem} 35 | * @private 36 | */ 37 | this.fs_ = fs; 38 | }; 39 | 40 | 41 | /** @override */ 42 | goog.fs.FileSystemImpl.prototype.getName = function() { 43 | 'use strict'; 44 | return this.fs_.name; 45 | }; 46 | 47 | 48 | /** @override */ 49 | goog.fs.FileSystemImpl.prototype.getRoot = function() { 50 | 'use strict'; 51 | return new goog.fs.DirectoryEntryImpl(this, this.fs_.root); 52 | }; 53 | 54 | 55 | /** 56 | * @return {!FileSystem} The underlying FileSystem object. 57 | */ 58 | goog.fs.FileSystemImpl.prototype.getBrowserFileSystem = function() { 59 | 'use strict'; 60 | return this.fs_; 61 | }; 62 | -------------------------------------------------------------------------------- /docs/closure/goog/fx/dragdrop.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Single Element Drag and Drop. 9 | * 10 | * Drag and drop implementation for sources/targets consisting of a single 11 | * element. 12 | * 13 | * @see ../demos/dragdrop.html 14 | */ 15 | 16 | goog.provide('goog.fx.DragDrop'); 17 | 18 | goog.require('goog.fx.AbstractDragDrop'); 19 | goog.require('goog.fx.DragDropItem'); 20 | 21 | 22 | 23 | /** 24 | * Drag/drop implementation for creating drag sources/drop targets consisting of 25 | * a single HTML Element. 26 | * 27 | * @param {Element|string} element Dom Node, or string representation of node 28 | * id, to be used as drag source/drop target. 29 | * @param {Object=} opt_data Data associated with the source/target. 30 | * @throws Error If no element argument is provided or if the type is invalid 31 | * @extends {goog.fx.AbstractDragDrop} 32 | * @constructor 33 | * @struct 34 | */ 35 | goog.fx.DragDrop = function(element, opt_data) { 36 | 'use strict'; 37 | goog.fx.AbstractDragDrop.call(this); 38 | 39 | var item = new goog.fx.DragDropItem(element, opt_data); 40 | item.setParent(this); 41 | this.items_.push(item); 42 | }; 43 | goog.inherits(goog.fx.DragDrop, goog.fx.AbstractDragDrop); 44 | -------------------------------------------------------------------------------- /docs/closure/goog/fx/fx.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Legacy stub for the goog.fx namespace. Requires the moved 9 | * namespaces. Animation and easing have been moved to animation.js and 10 | * easing.js. Users of this stub should move off so we may remove it in the 11 | * future. 12 | * 13 | * @suppress {extraRequire} All the requires in this file are "extra" 14 | * because this file is not actually using them. 15 | */ 16 | 17 | goog.provide('goog.fx'); 18 | 19 | goog.require('goog.asserts'); 20 | goog.require('goog.fx.Animation'); 21 | goog.require('goog.fx.Animation.EventType'); 22 | goog.require('goog.fx.Animation.State'); 23 | goog.require('goog.fx.AnimationEvent'); 24 | goog.require('goog.fx.Transition.EventType'); 25 | goog.require('goog.fx.easing'); 26 | -------------------------------------------------------------------------------- /docs/closure/goog/graphics/ext/ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | 8 | /** 9 | * @fileoverview Extended graphics namespace. 10 | * @suppress {extraRequire} All the requires in this file are "extra" 11 | * because this file is not actually using them. 12 | */ 13 | 14 | 15 | goog.provide('goog.graphics.ext'); 16 | 17 | goog.require('goog.graphics.ext.Ellipse'); 18 | goog.require('goog.graphics.ext.Graphics'); 19 | goog.require('goog.graphics.ext.Group'); 20 | goog.require('goog.graphics.ext.Image'); 21 | goog.require('goog.graphics.ext.Rectangle'); 22 | goog.require('goog.graphics.ext.Shape'); 23 | goog.require('goog.graphics.ext.coordinates'); 24 | -------------------------------------------------------------------------------- /docs/closure/goog/graphics/ext/rectangle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | 8 | /** 9 | * @fileoverview A thick wrapper around rectangles. 10 | */ 11 | 12 | 13 | goog.provide('goog.graphics.ext.Rectangle'); 14 | 15 | goog.require('goog.graphics.ext.StrokeAndFillElement'); 16 | goog.requireType('goog.graphics.ext.Group'); 17 | 18 | 19 | 20 | /** 21 | * Wrapper for a graphics rectangle element. 22 | * @param {goog.graphics.ext.Group} group Parent for this element. 23 | * @constructor 24 | * @extends {goog.graphics.ext.StrokeAndFillElement} 25 | * @final 26 | */ 27 | goog.graphics.ext.Rectangle = function(group) { 28 | 'use strict'; 29 | // Initialize with some stock values. 30 | const wrapper = group.getGraphicsImplementation().drawRect( 31 | 0, 0, 1, 1, null, null, group.getWrapper()); 32 | goog.graphics.ext.StrokeAndFillElement.call(this, group, wrapper); 33 | }; 34 | goog.inherits( 35 | goog.graphics.ext.Rectangle, goog.graphics.ext.StrokeAndFillElement); 36 | 37 | 38 | /** 39 | * Redraw the rectangle. Called when the coordinate system is changed. 40 | * @protected 41 | * @override 42 | */ 43 | goog.graphics.ext.Rectangle.prototype.redraw = function() { 44 | 'use strict'; 45 | goog.graphics.ext.Rectangle.superClass_.redraw.call(this); 46 | 47 | // Our position is already handled by transform_. 48 | this.getWrapper().setSize(this.getWidth(), this.getHeight()); 49 | }; 50 | -------------------------------------------------------------------------------- /docs/closure/goog/graphics/fill.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | 8 | /** 9 | * @fileoverview Represents a fill goog.graphics. 10 | */ 11 | 12 | 13 | goog.provide('goog.graphics.Fill'); 14 | 15 | 16 | 17 | /** 18 | * Creates a fill object 19 | * @constructor 20 | * @deprecated goog.graphics is deprecated. It existed to abstract over browser 21 | * differences before the canvas tag was widely supported. See 22 | * http://en.wikipedia.org/wiki/Canvas_element for details. 23 | */ 24 | goog.graphics.Fill = function() {}; 25 | 26 | 27 | /** 28 | * @return {string} The start color of a gradient fill. 29 | */ 30 | goog.graphics.Fill.prototype.getColor1 = goog.abstractMethod; 31 | 32 | 33 | /** 34 | * @return {string} The end color of a gradient fill. 35 | */ 36 | goog.graphics.Fill.prototype.getColor2 = goog.abstractMethod; 37 | -------------------------------------------------------------------------------- /docs/closure/goog/graphics/font.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | 8 | /** 9 | * @fileoverview Represents a font to be used with a Renderer. 10 | * @see ../demos/graphics/basicelements.html 11 | */ 12 | 13 | 14 | goog.provide('goog.graphics.Font'); 15 | 16 | 17 | 18 | /** 19 | * This class represents a font to be used with a renderer. 20 | * @param {number} size The font size. 21 | * @param {string} family The font family. 22 | * @constructor 23 | * @deprecated goog.graphics is deprecated. It existed to abstract over browser 24 | * differences before the canvas tag was widely supported. See 25 | * http://en.wikipedia.org/wiki/Canvas_element for details. 26 | * @final 27 | */ 28 | goog.graphics.Font = function(size, family) { 29 | 'use strict'; 30 | /** 31 | * Font size. 32 | * @type {number} 33 | */ 34 | this.size = size; 35 | // TODO(arv): Is this in pixels or drawing units based on the coord size? 36 | 37 | /** 38 | * The name of the font family to use, can be a comma separated string. 39 | * @type {string} 40 | */ 41 | this.family = family; 42 | }; 43 | 44 | 45 | /** 46 | * Indication if text should be bolded 47 | * @type {boolean} 48 | */ 49 | goog.graphics.Font.prototype.bold = false; 50 | 51 | 52 | /** 53 | * Indication if text should be in italics 54 | * @type {boolean} 55 | */ 56 | goog.graphics.Font.prototype.italic = false; 57 | -------------------------------------------------------------------------------- /docs/closure/goog/history/event.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview The event object dispatched when the history changes. 9 | */ 10 | 11 | 12 | goog.provide('goog.history.Event'); 13 | 14 | goog.require('goog.events.Event'); 15 | goog.require('goog.history.EventType'); 16 | 17 | 18 | 19 | /** 20 | * Event object dispatched after the history state has changed. 21 | * @param {string} token The string identifying the new history state. 22 | * @param {boolean} isNavigation True if the event was triggered by a browser 23 | * action, such as forward or back, clicking on a link, editing the URL, or 24 | * calling {@code window.history.(go|back|forward)}. 25 | * False if the token has been changed by a `setToken` or 26 | * `replaceToken` call. 27 | * @constructor 28 | * @extends {goog.events.Event} 29 | * @final 30 | */ 31 | goog.history.Event = function(token, isNavigation) { 32 | 'use strict'; 33 | goog.events.Event.call(this, goog.history.EventType.NAVIGATE); 34 | 35 | /** 36 | * The current history state. 37 | * @type {string} 38 | */ 39 | this.token = token; 40 | 41 | /** 42 | * Whether the event was triggered by browser navigation. 43 | * @type {boolean} 44 | */ 45 | this.isNavigation = isNavigation; 46 | }; 47 | goog.inherits(goog.history.Event, goog.events.Event); 48 | -------------------------------------------------------------------------------- /docs/closure/goog/history/eventtype.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Event types for goog.history. 9 | */ 10 | 11 | 12 | goog.provide('goog.history.EventType'); 13 | 14 | 15 | /** 16 | * Event types for goog.history. 17 | * @enum {string} 18 | */ 19 | goog.history.EventType = { 20 | NAVIGATE: 'navigate' 21 | }; 22 | -------------------------------------------------------------------------------- /docs/closure/goog/html/trustedtypes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Policy to convert strings to Trusted Types. See 9 | * https://github.com/WICG/trusted-types for details. 10 | */ 11 | 12 | goog.provide('goog.html.trustedtypes'); 13 | 14 | 15 | /** 16 | * Cached result of goog.createTrustedTypesPolicy. 17 | * @type {?TrustedTypePolicy|undefined} 18 | * @private 19 | */ 20 | goog.html.trustedtypes.cachedPolicy_; 21 | 22 | 23 | /** 24 | * Creates a (singleton) Trusted Type Policy for Safe HTML Types. 25 | * @return {?TrustedTypePolicy} 26 | * @package 27 | */ 28 | goog.html.trustedtypes.getPolicyPrivateDoNotAccessOrElse = function() { 29 | 'use strict'; 30 | if (!goog.TRUSTED_TYPES_POLICY_NAME) { 31 | // Binary not configured for Trusted Types. 32 | return null; 33 | } 34 | 35 | if (goog.html.trustedtypes.cachedPolicy_ === undefined) { 36 | goog.html.trustedtypes.cachedPolicy_ = 37 | goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME + '#html'); 38 | } 39 | 40 | return goog.html.trustedtypes.cachedPolicy_; 41 | }; 42 | -------------------------------------------------------------------------------- /docs/closure/goog/i18n/datetimepatternstype.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Date/Time patterns data type. 9 | */ 10 | 11 | goog.module('goog.i18n.DateTimePatternsType'); 12 | 13 | /** 14 | * The type definition for date/time patterns. 15 | * @record 16 | */ 17 | class DateTimePatternsType { 18 | constructor() { 19 | /** @type {string} */ 20 | this.YEAR_FULL; 21 | 22 | /** @type {string} */ 23 | this.YEAR_FULL_WITH_ERA; 24 | 25 | /** @type {string} */ 26 | this.YEAR_MONTH_ABBR; 27 | 28 | /** @type {string} */ 29 | this.YEAR_MONTH_FULL; 30 | 31 | /** @type {string} */ 32 | this.YEAR_MONTH_SHORT; 33 | 34 | /** @type {string} */ 35 | this.MONTH_DAY_ABBR; 36 | 37 | /** @type {string} */ 38 | this.MONTH_DAY_FULL; 39 | 40 | /** @type {string} */ 41 | this.MONTH_DAY_SHORT; 42 | 43 | /** @type {string} */ 44 | this.MONTH_DAY_MEDIUM; 45 | 46 | /** @type {string} */ 47 | this.MONTH_DAY_YEAR_MEDIUM; 48 | 49 | /** @type {string} */ 50 | this.WEEKDAY_MONTH_DAY_MEDIUM; 51 | 52 | /** @type {string} */ 53 | this.WEEKDAY_MONTH_DAY_YEAR_MEDIUM; 54 | 55 | /** @type {string} */ 56 | this.DAY_ABBR; 57 | 58 | /** @type {string} */ 59 | this.MONTH_DAY_TIME_ZONE_SHORT; 60 | } 61 | } 62 | 63 | exports = DateTimePatternsType; 64 | -------------------------------------------------------------------------------- /docs/closure/goog/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/blank.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/bubble_close.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/bubble_close.jpg -------------------------------------------------------------------------------- /docs/closure/goog/images/bubble_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/bubble_left.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/bubble_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/bubble_right.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/button-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/button-bg.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/check-outline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/check-outline.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/check-sprite.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/check-sprite.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/check.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/check.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/close_box.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/close_box.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/color-swatch-tick.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/color-swatch-tick.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/dialog_close_box.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/dialog_close_box.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/dimension-highlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/dimension-highlighted.png -------------------------------------------------------------------------------- /docs/closure/goog/images/dimension-unhighlighted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/dimension-unhighlighted.png -------------------------------------------------------------------------------- /docs/closure/goog/images/dropdn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/dropdn.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/dropdn_disabled.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/dropdn_disabled.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/dropdown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/dropdown.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/gears_bluedot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/gears_bluedot.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/gears_online.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/gears_online.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/gears_paused.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/gears_paused.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/gears_syncing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/gears_syncing.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/hsv-sprite-sm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/hsv-sprite-sm.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/hsv-sprite-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/hsv-sprite-sm.png -------------------------------------------------------------------------------- /docs/closure/goog/images/hsv-sprite.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/hsv-sprite.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/hsv-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/hsv-sprite.png -------------------------------------------------------------------------------- /docs/closure/goog/images/hsva-sprite-sm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/hsva-sprite-sm.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/hsva-sprite-sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/hsva-sprite-sm.png -------------------------------------------------------------------------------- /docs/closure/goog/images/hsva-sprite.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/hsva-sprite.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/hsva-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/hsva-sprite.png -------------------------------------------------------------------------------- /docs/closure/goog/images/left_anchor_bubble_bot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/left_anchor_bubble_bot.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/left_anchor_bubble_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/left_anchor_bubble_top.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/menu-arrows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/menu-arrows.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/minus.png -------------------------------------------------------------------------------- /docs/closure/goog/images/no_anchor_bubble_bot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/no_anchor_bubble_bot.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/no_anchor_bubble_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/no_anchor_bubble_top.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/offlineicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/offlineicons.png -------------------------------------------------------------------------------- /docs/closure/goog/images/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/plus.png -------------------------------------------------------------------------------- /docs/closure/goog/images/ratingstars.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/ratingstars.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/right_anchor_bubble_bot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/right_anchor_bubble_bot.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/right_anchor_bubble_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/right_anchor_bubble_top.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/toolbar-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/toolbar-bg.png -------------------------------------------------------------------------------- /docs/closure/goog/images/toolbar-separator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/toolbar-separator.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/toolbar_icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/toolbar_icons.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/tree/I.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/tree/I.png -------------------------------------------------------------------------------- /docs/closure/goog/images/tree/cleardot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/tree/cleardot.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/tree/tree.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/tree/tree.gif -------------------------------------------------------------------------------- /docs/closure/goog/images/tree/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/tree/tree.png -------------------------------------------------------------------------------- /docs/closure/goog/images/ui_controls.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/images/ui_controls.jpg -------------------------------------------------------------------------------- /docs/closure/goog/json/jsonable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | 8 | /** 9 | * @fileoverview Typedef for JavaScript types that can be JSON serialized. 10 | */ 11 | 12 | goog.module('goog.json.Jsonable'); 13 | 14 | /** 15 | * @typedef {boolean|number|string} 16 | */ 17 | let Primitive; 18 | 19 | /** 20 | * @typedef {!Primitive|!Array|!Object} 21 | */ 22 | let NestedType; 23 | 24 | /** 25 | * Types that can be JSON serialized. We only check one level deep for Objects 26 | * and Arrays so it's not checked at compile time whether nested types are 27 | * correct, and it would be possible for a user to pass in an invalid JSON 28 | * object. Which would be a bummer. 29 | * NOTE: If the compiler were to support recursive typedefs, this would be 30 | * {boolean|number|string|!Object|!Array}. 31 | * Recursive type checking is supported by @record but not @typedef. 32 | * @typedef {?Primitive|!Object|!Array} 33 | */ 34 | let Jsonable; 35 | 36 | exports = Jsonable; 37 | -------------------------------------------------------------------------------- /docs/closure/goog/json/processor.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | 8 | /** 9 | * @fileoverview Defines an interface for JSON parsing and serialization. 10 | */ 11 | 12 | goog.provide('goog.json.Processor'); 13 | 14 | goog.require('goog.string.Parser'); 15 | goog.require('goog.string.Stringifier'); 16 | 17 | 18 | 19 | /** 20 | * An interface for JSON parsing and serialization. 21 | * @interface 22 | * @extends {goog.string.Parser} 23 | * @extends {goog.string.Stringifier} 24 | */ 25 | goog.json.Processor = function() {}; 26 | -------------------------------------------------------------------------------- /docs/closure/goog/labs/dom/pagevisibilityevent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Event type for PageVisibilityMonitor. 9 | * @see http://www.w3.org/TR/page-visibility/ 10 | */ 11 | 12 | goog.module('goog.labs.dom.PageVisibilityEvent'); 13 | goog.module.declareLegacyNamespace(); 14 | 15 | const Event = goog.require('goog.events.Event'); 16 | const EventType = goog.require('goog.events.EventType'); 17 | const PageVisibilityState = goog.require('goog.labs.dom.PageVisibilityState'); 18 | 19 | /** 20 | * A page visibility change event. 21 | * @final 22 | */ 23 | exports = class PageVisibilityEvent extends Event { 24 | /** 25 | * Constructs a new PageVisibilityEvent. 26 | * @param {boolean} hidden Whether the page is hidden. 27 | * @param {!PageVisibilityState} visibilityState A more detailed visibility 28 | * state. 29 | */ 30 | constructor(hidden, visibilityState) { 31 | super(EventType.VISIBILITYCHANGE); 32 | 33 | /** 34 | * Whether the page is hidden. 35 | * @type {boolean} 36 | */ 37 | this.hidden = hidden; 38 | 39 | /** 40 | * A more detailed visibility state. 41 | * @type {!PageVisibilityState} 42 | */ 43 | this.visibilityState = visibilityState; 44 | } 45 | }; 46 | -------------------------------------------------------------------------------- /docs/closure/goog/labs/dom/pagevisibilitystate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Page visibility states for PageVisiblityMonitor. 9 | */ 10 | 11 | goog.module('goog.labs.dom.PageVisibilityState'); 12 | goog.module.declareLegacyNamespace(); 13 | 14 | /** 15 | * The different visibility states. 16 | * @enum {string} 17 | */ 18 | exports = { 19 | HIDDEN: 'hidden', 20 | VISIBLE: 'visible', 21 | PRERENDER: 'prerender', 22 | UNLOADED: 'unloaded' 23 | }; 24 | -------------------------------------------------------------------------------- /docs/closure/goog/labs/mock/timeoutmode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides an interface that defines how users can extend the 9 | * `goog.labs.mock` mocking framework with a TimeoutMode. This is used 10 | * with waitAndVerify to specify a max timeout. 11 | * 12 | * In addition it exports a factory method that allows users to easily obtain 13 | * a TimeoutMode instance. 14 | */ 15 | 16 | goog.provide('goog.labs.mock.timeout'); 17 | goog.provide('goog.labs.mock.timeout.TimeoutMode'); 18 | 19 | /** 20 | * Used to specify max timeout on waitAndVerify 21 | * @const 22 | */ 23 | goog.labs.mock.timeout.TimeoutMode = class TimeoutMode { 24 | /** 25 | * @param {number} duration 26 | */ 27 | constructor(duration) { 28 | /** 29 | * @type {number} duration 30 | * @public 31 | */ 32 | this.duration = duration; 33 | } 34 | }; 35 | 36 | /** 37 | * @param {number} duration 38 | * @return {!goog.labs.mock.timeout.TimeoutMode} 39 | */ 40 | goog.labs.mock.timeout.timeout = function(duration) { 41 | 'use strict'; 42 | return new goog.labs.mock.timeout.TimeoutMode(duration); 43 | }; 44 | -------------------------------------------------------------------------------- /docs/closure/goog/labs/net/webchannel/connectionstate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview This class manages the network connectivity state. 9 | * 10 | */ 11 | 12 | 13 | goog.provide('goog.labs.net.webChannel.ConnectionState'); 14 | 15 | 16 | 17 | /** 18 | * The connectivity state of the channel. 19 | * 20 | * To be used for the new buffering-proxy detection algorithm. 21 | * 22 | * @constructor 23 | * @struct 24 | */ 25 | goog.labs.net.webChannel.ConnectionState = function() { 26 | 'use strict'; 27 | /** 28 | * Handshake result. 29 | * @type {?Array} 30 | */ 31 | this.handshakeResult = null; 32 | 33 | /** 34 | * The result of checking if there is a buffering proxy in the network. 35 | * True means the connection is buffered, False means unbuffered, 36 | * null means that the result is not available. 37 | * @type {?boolean} 38 | */ 39 | this.bufferingProxyResult = null; 40 | }; 41 | -------------------------------------------------------------------------------- /docs/closure/goog/labs/net/webchanneltransportfactory.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Default factory for WebChannelTransport to 9 | * avoid exposing concrete classes to clients. 10 | */ 11 | 12 | goog.provide('goog.net.createWebChannelTransport'); 13 | 14 | goog.require('goog.labs.net.webChannel.WebChannelBaseTransport'); 15 | goog.requireType('goog.net.WebChannelTransport'); 16 | 17 | 18 | /** 19 | * Create a new WebChannelTransport instance using the default implementation. 20 | * Throws an error message if no default transport available in the current 21 | * environment. 22 | * 23 | * @return {!goog.net.WebChannelTransport} the newly created transport instance. 24 | */ 25 | goog.net.createWebChannelTransport = function() { 26 | 'use strict'; 27 | return new goog.labs.net.webChannel.WebChannelBaseTransport(); 28 | }; 29 | -------------------------------------------------------------------------------- /docs/closure/goog/labs/testing/assertthat.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides main functionality of assertThat. assertThat calls the 9 | * matcher's matches method to test if a matcher matches assertThat's arguments. 10 | */ 11 | 12 | goog.module('goog.labs.testing.assertThat'); 13 | goog.module.declareLegacyNamespace(); 14 | 15 | const Matcher = goog.requireType('goog.labs.testing.Matcher'); 16 | const MatcherError = goog.require('goog.labs.testing.MatcherError'); 17 | 18 | /** 19 | * Asserts that the actual value evaluated by the matcher is true. 20 | * 21 | * @param {*} actual The object to assert by the matcher. 22 | * @param {!Matcher} matcher A matcher to verify values. 23 | * @param {string=} opt_reason Description of what is asserted. 24 | */ 25 | function assertThat(actual, matcher, opt_reason) { 26 | if (!matcher.matches(actual)) { 27 | // Prefix the error description with a reason from the assert 28 | const prefix = opt_reason ? opt_reason + ': ' : ''; 29 | const desc = prefix + matcher.describe(actual); 30 | 31 | // some sort of failure here 32 | throw new MatcherError(desc); 33 | } 34 | } 35 | 36 | exports = assertThat; 37 | -------------------------------------------------------------------------------- /docs/closure/goog/labs/testing/matchererror.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides main functionality of assertThat. assertThat calls the 9 | * matcher's matches method to test if a matcher matches assertThat's arguments. 10 | */ 11 | 12 | goog.module('goog.labs.testing.MatcherError'); 13 | goog.module.declareLegacyNamespace(); 14 | 15 | const DebugError = goog.require('goog.debug.Error'); 16 | 17 | /** 18 | * Error thrown when a Matcher fails to match the input value. 19 | * @param {string=} message The error message. 20 | * @constructor 21 | * @extends {DebugError} 22 | * @final 23 | */ 24 | function MatcherError(message) { 25 | MatcherError.base(this, 'constructor', message); 26 | } 27 | goog.inherits(MatcherError, DebugError); 28 | 29 | exports = MatcherError; 30 | -------------------------------------------------------------------------------- /docs/closure/goog/labs/useragent/extra.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides extra checks for user agent that are not reflected in 9 | * the standard user agent checks. This includes runtime heuristics to determine 10 | * the true environment on browsers that present a different user agent to 11 | * appear to be running in a different environment. 12 | */ 13 | 14 | goog.module('goog.labs.userAgent.extra'); 15 | 16 | const platform = goog.require('goog.labs.userAgent.platform'); 17 | 18 | /** 19 | * Checks whether the browser appears to be a desktop-class running on a mobile 20 | * device. Starting with iPadOS 13 this is the default for non-mini iPads 21 | * running at >=2/3 of the screen. The user agent is otherwise indistinguishable 22 | * from Mac Safari. The user can also force desktop on other devices. This logic 23 | * previously also checked for Safari, however other iOS browsers have since 24 | * adopted the same behavior. 25 | * 26 | * @return {boolean} Whether the runtime heuristics thinks this is Desktop 27 | * Safari on a non-desktop device. 28 | */ 29 | function isSafariDesktopOnMobile() { 30 | return platform.isMacintosh() && goog.global.navigator.maxTouchPoints > 0; 31 | } 32 | 33 | exports = {isSafariDesktopOnMobile}; 34 | -------------------------------------------------------------------------------- /docs/closure/goog/math/irect.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview A record declaration to allow ClientRect and other rectangle 9 | * like objects to be used with goog.math.Rect. 10 | */ 11 | 12 | goog.provide('goog.math.IRect'); 13 | 14 | 15 | /** 16 | * Record for representing rectangular regions, allows compatibility between 17 | * things like ClientRect and goog.math.Rect. 18 | * 19 | * @record 20 | */ 21 | goog.math.IRect = function() {}; 22 | 23 | 24 | /** @type {number} */ 25 | goog.math.IRect.prototype.left; 26 | 27 | 28 | /** @type {number} */ 29 | goog.math.IRect.prototype.top; 30 | 31 | 32 | /** @type {number} */ 33 | goog.math.IRect.prototype.width; 34 | 35 | 36 | /** @type {number} */ 37 | goog.math.IRect.prototype.height; 38 | -------------------------------------------------------------------------------- /docs/closure/goog/messaging/messaging.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Functions for manipulating message channels. 9 | */ 10 | 11 | goog.provide('goog.messaging'); 12 | 13 | goog.requireType('goog.messaging.MessageChannel'); 14 | 15 | 16 | /** 17 | * Creates a bidirectional pipe between two message channels. 18 | * 19 | * @param {goog.messaging.MessageChannel} channel1 The first channel. 20 | * @param {goog.messaging.MessageChannel} channel2 The second channel. 21 | */ 22 | goog.messaging.pipe = function(channel1, channel2) { 23 | 'use strict'; 24 | channel1.registerDefaultService(goog.bind(channel2.send, channel2)); 25 | channel2.registerDefaultService(goog.bind(channel1.send, channel1)); 26 | }; 27 | -------------------------------------------------------------------------------- /docs/closure/goog/module/basemodule.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Defines the base class for a module. This is used to allow the 9 | * code to be modularized, giving the benefits of lazy loading and loading on 10 | * demand. 11 | */ 12 | 13 | goog.provide('goog.module.BaseModule'); 14 | 15 | goog.require('goog.Disposable'); 16 | /** @suppress {extraRequire} */ 17 | goog.require('goog.module'); 18 | 19 | 20 | 21 | /** 22 | * A basic module object that represents a module of JavaScript code that can 23 | * be dynamically loaded. 24 | * 25 | * @constructor 26 | * @extends {goog.Disposable} 27 | */ 28 | goog.module.BaseModule = function() { 29 | 'use strict'; 30 | goog.Disposable.call(this); 31 | }; 32 | goog.inherits(goog.module.BaseModule, goog.Disposable); 33 | 34 | 35 | /** 36 | * Performs any load-time initialization that the module requires. 37 | * @param {Object} context The module context. 38 | */ 39 | goog.module.BaseModule.prototype.initialize = function(context) {}; 40 | -------------------------------------------------------------------------------- /docs/closure/goog/module/module.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * 9 | * @fileoverview This class supports the dynamic loading of compiled 10 | * javascript modules at runtime, as described in the designdoc. 11 | * 12 | * 13 | */ 14 | 15 | goog.provide('goog.module'); 16 | 17 | // TODO(johnlenz): Here we explicitly initialize the namespace to avoid 18 | // problems with the goog.module method in base.js. We should rename this 19 | // entire package to goog.loader and then we can delete this file. 20 | // 21 | // However, note that it is tricky to do that without breaking the world. 22 | /** 23 | * @suppress {duplicate} 24 | * @type {function(string):void} 25 | */ 26 | goog.module = goog.module || {}; 27 | -------------------------------------------------------------------------------- /docs/closure/goog/net/browserchannelserverreachability.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Definition of events for Server Reachability. 9 | */ 10 | 11 | goog.module('goog.net.browserchannelinternal.ServerReachability'); 12 | goog.module.declareLegacyNamespace(); 13 | 14 | /** 15 | * Types of events which reveal information about the reachability of the 16 | * server. 17 | * @enum {number} 18 | */ 19 | const ServerReachability = { 20 | REQUEST_MADE: 1, 21 | REQUEST_SUCCEEDED: 2, 22 | REQUEST_FAILED: 3, 23 | BACK_CHANNEL_ACTIVITY: 4, 24 | }; 25 | exports = ServerReachability; 26 | -------------------------------------------------------------------------------- /docs/closure/goog/net/cookies_deprecated.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview A static instance of goog.net.Cookies that uses the default 9 | * window document. 10 | * @deprecated use `goog.net.Cookies.getInstance()` instead. 11 | */ 12 | 13 | goog.provide('goog.net.cookies'); 14 | 15 | goog.require('goog.net.Cookies'); 16 | 17 | // TODO(closure-team): This should be a singleton getter instead of a static 18 | // instance. 19 | /** 20 | * A static default instance. 21 | * @const {!goog.net.Cookies} 22 | */ 23 | goog.net.cookies = goog.net.Cookies.getInstance(); 24 | -------------------------------------------------------------------------------- /docs/closure/goog/net/eventtype.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Common events for the network classes. 9 | */ 10 | 11 | 12 | goog.provide('goog.net.EventType'); 13 | 14 | 15 | /** 16 | * Event names for network events 17 | * @enum {string} 18 | */ 19 | goog.net.EventType = { 20 | COMPLETE: 'complete', 21 | SUCCESS: 'success', 22 | ERROR: 'error', 23 | ABORT: 'abort', 24 | READY: 'ready', 25 | READY_STATE_CHANGE: 'readystatechange', 26 | TIMEOUT: 'timeout', 27 | INCREMENTAL_DATA: 'incrementaldata', 28 | PROGRESS: 'progress', 29 | // DOWNLOAD_PROGRESS and UPLOAD_PROGRESS are special events dispatched by 30 | // goog.net.XhrIo to allow binding listeners specific to each type of 31 | // progress. 32 | DOWNLOAD_PROGRESS: 'downloadprogress', 33 | UPLOAD_PROGRESS: 'uploadprogress', 34 | }; 35 | -------------------------------------------------------------------------------- /docs/closure/goog/net/imageloader_testimg1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/net/imageloader_testimg1.gif -------------------------------------------------------------------------------- /docs/closure/goog/net/imageloader_testimg2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/net/imageloader_testimg2.gif -------------------------------------------------------------------------------- /docs/closure/goog/net/imageloader_testimg3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/closure/goog/net/imageloader_testimg3.gif -------------------------------------------------------------------------------- /docs/closure/goog/net/networkstatusmonitor.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Base class for objects monitoring and exposing runtime 9 | * network status information. 10 | */ 11 | 12 | goog.provide('goog.net.NetworkStatusMonitor'); 13 | 14 | goog.require('goog.events.Listenable'); 15 | 16 | 17 | 18 | /** 19 | * Base class for network status information providers. 20 | * @interface 21 | * @extends {goog.events.Listenable} 22 | */ 23 | goog.net.NetworkStatusMonitor = function() {}; 24 | 25 | 26 | /** 27 | * Enum for the events dispatched by the OnlineHandler. 28 | * @enum {string} 29 | */ 30 | goog.net.NetworkStatusMonitor.EventType = { 31 | ONLINE: 'online', 32 | OFFLINE: 'offline', 33 | }; 34 | 35 | 36 | /** 37 | * @return {boolean} Whether the system is online or otherwise. 38 | */ 39 | goog.net.NetworkStatusMonitor.prototype.isOnline; 40 | -------------------------------------------------------------------------------- /docs/closure/goog/net/streams/utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | goog.module('goog.net.streams.utils'); 8 | 9 | 10 | /** 11 | * Returns whether a character is whitespace in the context of parsing JSON 12 | * stream. 13 | * 14 | * TODO(user): 0xa0 for IE? 15 | * 16 | * @param {string} c The char to check 17 | * @return {boolean} true if a char is a whitespace 18 | */ 19 | exports.isJsonWhitespace = function(c) { 20 | return c == '\r' || c == '\n' || c == ' ' || c == '\t'; 21 | }; 22 | -------------------------------------------------------------------------------- /docs/closure/goog/net/xpc/crosspagechannelrole.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides the enum for the role of the CrossPageChannel. 9 | */ 10 | 11 | goog.provide('goog.net.xpc.CrossPageChannelRole'); 12 | 13 | 14 | /** 15 | * The role of the peer. 16 | * @enum {number} 17 | */ 18 | goog.net.xpc.CrossPageChannelRole = { 19 | OUTER: 0, 20 | INNER: 1, 21 | }; 22 | -------------------------------------------------------------------------------- /docs/closure/goog/positioning/abstractposition.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Abstract base class for positioning implementations. 9 | */ 10 | 11 | goog.provide('goog.positioning.AbstractPosition'); 12 | 13 | goog.requireType('goog.math.Box'); 14 | goog.requireType('goog.math.Size'); 15 | goog.requireType('goog.positioning.Corner'); 16 | 17 | 18 | 19 | /** 20 | * Abstract position object. Encapsulates position and overflow handling. 21 | * 22 | * @constructor 23 | */ 24 | goog.positioning.AbstractPosition = function() {}; 25 | 26 | 27 | /** 28 | * Repositions the element. Abstract method, should be overloaded. 29 | * 30 | * @param {Element} movableElement Element to position. 31 | * @param {goog.positioning.Corner} corner Corner of the movable element that 32 | * should be positioned adjacent to the anchored element. 33 | * @param {goog.math.Box=} opt_margin A margin specified in pixels. 34 | * @param {goog.math.Size=} opt_preferredSize PreferredSize of the 35 | * movableElement. 36 | */ 37 | goog.positioning.AbstractPosition.prototype.reposition = function( 38 | movableElement, corner, opt_margin, opt_preferredSize) {}; 39 | -------------------------------------------------------------------------------- /docs/closure/goog/promise/nativeresolver.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | goog.module('goog.promise.NativeResolver'); 8 | 9 | /** 10 | * Creates a new JavaScript native Promise and captures its resolve and reject 11 | * callbacks. The promise, resolve, and reject are available as properties 12 | * @final 13 | * @template T 14 | */ 15 | class NativeResolver { 16 | constructor() { 17 | /** @type {function((T|!IThenable|!Thenable)=)} */ 18 | this.resolve; 19 | /** @type {function(*=)} */ 20 | this.reject; 21 | 22 | /** @type {!Promise} */ 23 | this.promise = new Promise((resolve, reject) => { 24 | this.resolve = resolve; 25 | this.reject = reject; 26 | }); 27 | } 28 | } 29 | 30 | exports = NativeResolver; 31 | -------------------------------------------------------------------------------- /docs/closure/goog/promise/resolver.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | goog.provide('goog.promise.Resolver'); 8 | 9 | goog.requireType('goog.Promise'); 10 | 11 | 12 | 13 | /** 14 | * Resolver interface for promises. The resolver is a convenience interface that 15 | * bundles the promise and its associated resolve and reject functions together, 16 | * for cases where the resolver needs to be persisted internally. 17 | * 18 | * @interface 19 | * @template TYPE 20 | */ 21 | goog.promise.Resolver = function() {}; 22 | 23 | 24 | /** 25 | * The promise that created this resolver. 26 | * @type {!goog.Promise} 27 | */ 28 | goog.promise.Resolver.prototype.promise; 29 | 30 | 31 | /** 32 | * Resolves this resolver with the specified value. 33 | * @type {function((TYPE|goog.Promise|Thenable)=)} 34 | */ 35 | goog.promise.Resolver.prototype.resolve; 36 | 37 | 38 | /** 39 | * Rejects this resolver with the specified reason. 40 | * @type {function(*=): void} 41 | */ 42 | goog.promise.Resolver.prototype.reject; 43 | -------------------------------------------------------------------------------- /docs/closure/goog/proto/proto.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Protocol buffer serializer. 9 | */ 10 | 11 | goog.provide('goog.proto'); 12 | 13 | 14 | goog.require('goog.proto.Serializer'); 15 | 16 | 17 | /** 18 | * Instance of the serializer object. 19 | * @type {goog.proto.Serializer} 20 | * @private 21 | */ 22 | goog.proto.serializer_ = null; 23 | 24 | 25 | /** 26 | * Serializes an object or a value to a protocol buffer string. 27 | * @param {Object} object The object to serialize. 28 | * @return {string} The serialized protocol buffer string. 29 | */ 30 | goog.proto.serialize = function(object) { 31 | 'use strict'; 32 | if (!goog.proto.serializer_) { 33 | goog.proto.serializer_ = new goog.proto.Serializer; 34 | } 35 | return goog.proto.serializer_.serialize(object); 36 | }; 37 | -------------------------------------------------------------------------------- /docs/closure/goog/proto2/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Utility methods for Protocol Buffer 2 implementation. 9 | */ 10 | 11 | goog.provide('goog.proto2.Util'); 12 | 13 | goog.require('goog.asserts'); 14 | 15 | 16 | /** 17 | * @define {boolean} Defines a PBCHECK constant that can be turned off by 18 | * clients of PB2. This for is clients that do not want assertion/checking 19 | * running even in non-COMPILED builds. 20 | */ 21 | goog.proto2.Util.PBCHECK = goog.define('goog.proto2.Util.PBCHECK', !COMPILED); 22 | 23 | 24 | /** 25 | * Asserts that the given condition is true, if and only if the PBCHECK 26 | * flag is on. 27 | * 28 | * @param {*} condition The condition to check. 29 | * @param {string=} opt_message Error message in case of failure. 30 | * @throws {Error} Assertion failed, the condition evaluates to false. 31 | */ 32 | goog.proto2.Util.assert = function(condition, opt_message) { 33 | 'use strict'; 34 | if (goog.proto2.Util.PBCHECK) { 35 | goog.asserts.assert(condition, opt_message); 36 | } 37 | }; 38 | 39 | 40 | /** 41 | * Returns true if debug assertions (checks) are on. 42 | * 43 | * @return {boolean} The value of the PBCHECK constant. 44 | */ 45 | goog.proto2.Util.conductChecks = function() { 46 | 'use strict'; 47 | return goog.proto2.Util.PBCHECK; 48 | }; 49 | -------------------------------------------------------------------------------- /docs/closure/goog/pubsub/topicid.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | goog.provide('goog.pubsub.TopicId'); 8 | 9 | 10 | 11 | /** 12 | * A templated class that is used to register `goog.pubsub.PubSub` 13 | * subscribers. 14 | * 15 | * Typical usage for a publisher: 16 | * 17 | * /** @type {!goog.pubsub.TopicId} 18 | * zorg.TopicId.STATE_CHANGE = new goog.pubsub.TopicId( 19 | * goog.events.getUniqueId('state-change')); 20 | * 21 | * // Compiler enforces that these types are correct. 22 | * pubSub.publish(zorg.TopicId.STATE_CHANGE, zorg.State.STARTED); 23 | * 24 | * 25 | * Typical usage for a subscriber: 26 | * 27 | * // Compiler enforces the callback parameter type. 28 | * pubSub.subscribe(zorg.TopicId.STATE_CHANGE, function(state) { 29 | * if (state == zorg.State.STARTED) { 30 | * // Handle STARTED state. 31 | * } 32 | * }); 33 | * 34 | * 35 | * @param {string} topicId 36 | * @template PAYLOAD 37 | * @constructor 38 | * @final 39 | * @struct 40 | */ 41 | goog.pubsub.TopicId = function(topicId) { 42 | 'use strict'; 43 | /** 44 | * @const 45 | * @private 46 | */ 47 | this.topicId_ = topicId; 48 | }; 49 | 50 | 51 | /** @override */ 52 | goog.pubsub.TopicId.prototype.toString = function() { 53 | 'use strict'; 54 | return this.topicId_; 55 | }; 56 | -------------------------------------------------------------------------------- /docs/closure/goog/soy/injecteddatasupplier.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides an interface {@link goog.soy.InjectedDataSupplier} 9 | * that users should implement to provide the injected data for a specific 10 | * application via goog.soy.renderer. The injected data format is a JavaScript 11 | * object: 12 | * 13 | *
14 |  * {'dataKey': 'value', 'otherDataKey': 'otherValue'}
15 |  * 
16 | * 17 | * The injected data can then be referred to in any soy templates as 18 | * part of a magic "ij" parameter. For example, `$ij.dataKey` 19 | * will evaluate to 'value' with the above injected data. 20 | */ 21 | 22 | goog.module('goog.soy.InjectedDataSupplier'); 23 | goog.module.declareLegacyNamespace(); 24 | 25 | /** 26 | * An interface for a supplier that provides Soy injected data. 27 | * @interface 28 | */ 29 | exports = class InjectedDataSupplier { 30 | /** 31 | * Gets the injected data. Implementation may assume that 32 | * `goog.soy.Renderer` will treat the returned data as 33 | * immutable. The renderer will call this every time one of its 34 | * `render*` methods is called. 35 | * @return {?} A key-value pair representing the injected data. 36 | */ 37 | getData() {} 38 | }; 39 | -------------------------------------------------------------------------------- /docs/closure/goog/storage/errorcode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Defines errors to be thrown by the storage. 9 | */ 10 | 11 | goog.provide('goog.storage.ErrorCode'); 12 | 13 | 14 | /** 15 | * Errors thrown by the storage. 16 | * @enum {string} 17 | */ 18 | goog.storage.ErrorCode = { 19 | INVALID_VALUE: 'Storage: Invalid value was encountered', 20 | DECRYPTION_ERROR: 'Storage: The value could not be decrypted' 21 | }; 22 | -------------------------------------------------------------------------------- /docs/closure/goog/storage/mechanism/errorcode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Defines error codes to be thrown by storage mechanisms. 9 | */ 10 | 11 | goog.provide('goog.storage.mechanism.ErrorCode'); 12 | 13 | 14 | /** 15 | * Errors thrown by storage mechanisms. 16 | * @enum {string} 17 | */ 18 | goog.storage.mechanism.ErrorCode = { 19 | INVALID_VALUE: 'Storage mechanism: Invalid value was encountered', 20 | QUOTA_EXCEEDED: 'Storage mechanism: Quota exceeded', 21 | STORAGE_DISABLED: 'Storage mechanism: Storage disabled' 22 | }; 23 | -------------------------------------------------------------------------------- /docs/closure/goog/storage/mechanism/html5localstorage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides data persistence using HTML5 local storage 9 | * mechanism. Local storage must be available under window.localStorage, 10 | * see: http://www.w3.org/TR/webstorage/#the-localstorage-attribute. 11 | */ 12 | 13 | goog.provide('goog.storage.mechanism.HTML5LocalStorage'); 14 | 15 | goog.require('goog.storage.mechanism.HTML5WebStorage'); 16 | 17 | 18 | 19 | /** 20 | * Provides a storage mechanism that uses HTML5 local storage. 21 | * 22 | * @constructor 23 | * @struct 24 | * @extends {goog.storage.mechanism.HTML5WebStorage} 25 | */ 26 | goog.storage.mechanism.HTML5LocalStorage = function() { 27 | 'use strict'; 28 | var storage = null; 29 | 30 | try { 31 | // May throw an exception in cases where the local storage object 32 | // is visible but access to it is disabled. 33 | storage = window.localStorage || null; 34 | } catch (e) { 35 | } 36 | goog.storage.mechanism.HTML5LocalStorage.base(this, 'constructor', storage); 37 | }; 38 | goog.inherits( 39 | goog.storage.mechanism.HTML5LocalStorage, 40 | goog.storage.mechanism.HTML5WebStorage); 41 | -------------------------------------------------------------------------------- /docs/closure/goog/storage/mechanism/html5sessionstorage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides data persistence using HTML5 session storage 9 | * mechanism. Session storage must be available under window.sessionStorage, 10 | * see: http://www.w3.org/TR/webstorage/#the-sessionstorage-attribute. 11 | */ 12 | 13 | goog.provide('goog.storage.mechanism.HTML5SessionStorage'); 14 | 15 | goog.require('goog.storage.mechanism.HTML5WebStorage'); 16 | 17 | 18 | 19 | /** 20 | * Provides a storage mechanism that uses HTML5 session storage. 21 | * 22 | * @constructor 23 | * @struct 24 | * @extends {goog.storage.mechanism.HTML5WebStorage} 25 | */ 26 | goog.storage.mechanism.HTML5SessionStorage = function() { 27 | 'use strict'; 28 | var storage = null; 29 | 30 | try { 31 | // May throw an exception in cases where the session storage object is 32 | // visible but access to it is disabled. For example, accessing the file 33 | // in local mode in Firefox throws 'Operation is not supported' exception. 34 | storage = window.sessionStorage || null; 35 | } catch (e) { 36 | } 37 | goog.storage.mechanism.HTML5SessionStorage.base(this, 'constructor', storage); 38 | }; 39 | goog.inherits( 40 | goog.storage.mechanism.HTML5SessionStorage, 41 | goog.storage.mechanism.HTML5WebStorage); 42 | -------------------------------------------------------------------------------- /docs/closure/goog/storage/mechanism/mechanism.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Abstract interface for storing and retrieving data using 9 | * some persistence mechanism. 10 | */ 11 | 12 | goog.provide('goog.storage.mechanism.Mechanism'); 13 | 14 | 15 | 16 | /** 17 | * Basic interface for all storage mechanisms. 18 | * 19 | * @constructor 20 | * @struct 21 | * @abstract 22 | */ 23 | goog.storage.mechanism.Mechanism = function() {}; 24 | 25 | 26 | /** 27 | * Set a value for a key. 28 | * 29 | * @param {string} key The key to set. 30 | * @param {string} value The string to save. 31 | * @abstract 32 | */ 33 | goog.storage.mechanism.Mechanism.prototype.set = function(key, value) {}; 34 | 35 | 36 | /** 37 | * Get the value stored under a key. 38 | * 39 | * @param {string} key The key to get. 40 | * @return {?string} The corresponding value, null if not found. 41 | * @abstract 42 | */ 43 | goog.storage.mechanism.Mechanism.prototype.get = function(key) {}; 44 | 45 | 46 | /** 47 | * Remove a key and its value. 48 | * 49 | * @param {string} key The key to remove. 50 | * @abstract 51 | */ 52 | goog.storage.mechanism.Mechanism.prototype.remove = function(key) {}; 53 | -------------------------------------------------------------------------------- /docs/closure/goog/storage/mechanism/mechanismtestdefinition.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | 8 | /** 9 | * @fileoverview This shim namespace defines the shared 10 | * mechanism variables used in mechanismSeparationTester 11 | * and mechanismSelectionTester. This exists to allow test compilation 12 | * to work correctly for these legacy tests. 13 | */ 14 | 15 | goog.provide('goog.storage.mechanism.mechanismTestDefinition'); 16 | goog.setTestOnly('goog.storage.mechanism.mechanismTestDefinition'); 17 | 18 | var mechanism; 19 | var mechanism_shared; 20 | var mechanism_separate; 21 | var minimumQuota; 22 | -------------------------------------------------------------------------------- /docs/closure/goog/streams/defines.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Defines used by streams. 9 | */ 10 | goog.module('goog.streams.defines'); 11 | 12 | /** 13 | * 'false', 'true', or 'detect'. Detect does runtime feature detection. 14 | * @define {string} 15 | */ 16 | const USE_NATIVE_IMPLEMENTATION = 17 | goog.define('goog.streams.USE_NATIVE_IMPLEMENTATION', 'false'); 18 | 19 | exports = { 20 | USE_NATIVE_IMPLEMENTATION, 21 | }; 22 | -------------------------------------------------------------------------------- /docs/closure/goog/streams/lite.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview A lite polyfill of the ReadableStream native API with a subset 9 | * of methods supported. 10 | */ 11 | goog.module('goog.streams.lite'); 12 | 13 | const liteImpl = goog.require('goog.streams.liteImpl'); 14 | const liteNativeImpl = goog.require('goog.streams.liteNativeImpl'); 15 | const {ReadableStream, ReadableStreamDefaultController, ReadableStreamDefaultReader, ReadableStreamUnderlyingSource} = goog.require('goog.streams.liteTypes'); 16 | const {USE_NATIVE_IMPLEMENTATION} = goog.require('goog.streams.defines'); 17 | 18 | /** 19 | * Creates and returns a new ReadableStream. 20 | * 21 | * The underlying source should only have a start() method, and no other 22 | * properties. 23 | * @param {!ReadableStreamUnderlyingSource} underlyingSource 24 | * @return {!ReadableStream} 25 | * @suppress {strictMissingProperties} 26 | * @template T 27 | */ 28 | function newReadableStream(underlyingSource) { 29 | if (USE_NATIVE_IMPLEMENTATION === 'true' || 30 | (USE_NATIVE_IMPLEMENTATION === 'detect' && goog.global.ReadableStream)) { 31 | return liteNativeImpl.newReadableStream(underlyingSource); 32 | } else { 33 | return liteImpl.newReadableStream(underlyingSource); 34 | } 35 | } 36 | 37 | exports = { 38 | ReadableStream, 39 | ReadableStreamDefaultController, 40 | ReadableStreamDefaultReader, 41 | ReadableStreamUnderlyingSource, 42 | newReadableStream, 43 | }; 44 | -------------------------------------------------------------------------------- /docs/closure/goog/string/parser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | 8 | /** 9 | * @fileoverview Defines an interface for parsing strings into objects. 10 | */ 11 | 12 | goog.provide('goog.string.Parser'); 13 | 14 | 15 | 16 | /** 17 | * An interface for parsing strings into objects. 18 | * @interface 19 | */ 20 | goog.string.Parser = function() {}; 21 | 22 | 23 | /** 24 | * Parses a string into an object and returns the result. 25 | * Agnostic to the format of string and object. 26 | * 27 | * @param {string} s The string to parse. 28 | * @return {*} The object generated from the string. 29 | */ 30 | goog.string.Parser.prototype.parse; 31 | -------------------------------------------------------------------------------- /docs/closure/goog/string/stringifier.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | 8 | /** 9 | * @fileoverview Defines an interface for serializing objects into strings. 10 | */ 11 | 12 | goog.provide('goog.string.Stringifier'); 13 | 14 | 15 | 16 | /** 17 | * An interface for serializing objects into strings. 18 | * @interface 19 | */ 20 | goog.string.Stringifier = function() {}; 21 | 22 | 23 | /** 24 | * Serializes an object or a value to a string. 25 | * Agnostic to the particular format of object and string. 26 | * 27 | * @param {*} object The object to stringify. 28 | * @return {string} A string representation of the input. 29 | */ 30 | goog.string.Stringifier.prototype.stringify; 31 | -------------------------------------------------------------------------------- /docs/closure/goog/string/typedstring.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | goog.provide('goog.string.TypedString'); 8 | 9 | 10 | 11 | /** 12 | * Wrapper for strings that conform to a data type or language. 13 | * 14 | * Implementations of this interface are wrappers for strings, and typically 15 | * associate a type contract with the wrapped string. Concrete implementations 16 | * of this interface may choose to implement additional run-time type checking, 17 | * see for example `goog.html.SafeHtml`. If available, client code that 18 | * needs to ensure type membership of an object should use the type's function 19 | * to assert type membership, such as `goog.html.SafeHtml.unwrap`. 20 | * @interface 21 | */ 22 | goog.string.TypedString = function() {}; 23 | 24 | 25 | /** 26 | * Interface marker of the TypedString interface. 27 | * 28 | * This property can be used to determine at runtime whether or not an object 29 | * implements this interface. All implementations of this interface set this 30 | * property to `true`. 31 | * @type {boolean} 32 | */ 33 | goog.string.TypedString.prototype.implementsGoogStringTypedString; 34 | 35 | 36 | /** 37 | * Retrieves this wrapped string's value. 38 | * @return {string} The wrapped string's value. 39 | */ 40 | goog.string.TypedString.prototype.getTypedStringValue; 41 | -------------------------------------------------------------------------------- /docs/closure/goog/structs/collection.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Defines the collection interface. 9 | */ 10 | 11 | goog.provide('goog.structs.Collection'); 12 | 13 | 14 | 15 | /** 16 | * An interface for a collection of values. 17 | * @interface 18 | * @template T 19 | */ 20 | goog.structs.Collection = function() {}; 21 | 22 | 23 | /** 24 | * @param {T} value Value to add to the collection. 25 | */ 26 | goog.structs.Collection.prototype.add; 27 | 28 | 29 | /** 30 | * @param {T} value Value to remove from the collection. 31 | */ 32 | goog.structs.Collection.prototype.remove; 33 | 34 | 35 | /** 36 | * @param {T} value Value to find in the collection. 37 | * @return {boolean} Whether the collection contains the specified value. 38 | */ 39 | goog.structs.Collection.prototype.contains; 40 | 41 | 42 | /** 43 | * @return {number} The number of values stored in the collection. 44 | */ 45 | goog.structs.Collection.prototype.getCount; 46 | -------------------------------------------------------------------------------- /docs/closure/goog/structs/node.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Generic immutable node object to be used in collections. 9 | */ 10 | 11 | 12 | goog.provide('goog.structs.Node'); 13 | 14 | 15 | 16 | /** 17 | * A generic immutable node. This can be used in various collections that 18 | * require a node object for its item (such as a heap). 19 | * @param {K} key Key. 20 | * @param {V} value Value. 21 | * @constructor 22 | * @template K, V 23 | */ 24 | goog.structs.Node = function(key, value) { 25 | 'use strict'; 26 | /** 27 | * The key. 28 | * @private {K} 29 | */ 30 | this.key_ = key; 31 | 32 | /** 33 | * The value. 34 | * @private {V} 35 | */ 36 | this.value_ = value; 37 | }; 38 | 39 | 40 | /** 41 | * Gets the key. 42 | * @return {K} The key. 43 | */ 44 | goog.structs.Node.prototype.getKey = function() { 45 | 'use strict'; 46 | return this.key_; 47 | }; 48 | 49 | 50 | /** 51 | * Gets the value. 52 | * @return {V} The value. 53 | */ 54 | goog.structs.Node.prototype.getValue = function() { 55 | 'use strict'; 56 | return this.value_; 57 | }; 58 | 59 | 60 | /** 61 | * Clones a node and returns a new node. 62 | * @return {!goog.structs.Node} A new goog.structs.Node with the same 63 | * key value pair. 64 | */ 65 | goog.structs.Node.prototype.clone = function() { 66 | 'use strict'; 67 | return new goog.structs.Node(this.key_, this.value_); 68 | }; 69 | -------------------------------------------------------------------------------- /docs/closure/goog/style/style_test_rect.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/closure/goog/test_module.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Closure Library Authors. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS-IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /** 16 | * @fileoverview A test file for testing goog.module. 17 | * @suppress {unusedLocalVariables} 18 | */ 19 | 20 | goog.module('goog.test_module'); 21 | goog.module.declareLegacyNamespace(); 22 | goog.setTestOnly('goog.test_module'); 23 | 24 | 25 | /** @suppress {extraRequire} */ 26 | var testModuleDep = goog.require('goog.test_module_dep'); 27 | 28 | // Verify that when this module loads the script tag in the next 29 | // line doesn't cause the script tag it is loaded in to be closed 30 | // prematurely. 31 | var aScriptTagShouldntBreakAnything = 'world'; 32 | 33 | 34 | 35 | /** @unrestricted */ 36 | class test { 37 | constructor() {} 38 | } 39 | 40 | // Verify that when this module loads the script tag is not modified by 41 | // escaping code in base.js. 42 | test.CLOSING_SCRIPT_TAG = ''; 43 | 44 | exports = test; 45 | -------------------------------------------------------------------------------- /docs/closure/goog/test_module_dep.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Closure Library Authors. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS-IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | /** 16 | * @fileoverview A test file for testing goog.module. 17 | */ 18 | 19 | goog.module('goog.test_module_dep'); 20 | goog.setTestOnly('goog.test_module'); 21 | 22 | /** @type {number} */ 23 | exports.someValue = 1; 24 | 25 | /** @type {function()} */ 26 | exports.someFunction = function() {}; 27 | -------------------------------------------------------------------------------- /docs/closure/goog/testing/events/matchers.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Mock matchers for event related arguments. 9 | */ 10 | 11 | goog.setTestOnly('goog.testing.events.EventMatcher'); 12 | goog.provide('goog.testing.events.EventMatcher'); 13 | 14 | goog.require('goog.events.Event'); 15 | goog.require('goog.testing.mockmatchers.ArgumentMatcher'); 16 | 17 | 18 | 19 | /** 20 | * A matcher that verifies that an argument is a `goog.events.Event` of a 21 | * particular type. 22 | * @param {string} type The single type the event argument must be of. 23 | * @constructor 24 | * @extends {goog.testing.mockmatchers.ArgumentMatcher} 25 | * @final 26 | */ 27 | goog.testing.events.EventMatcher = function(type) { 28 | 'use strict'; 29 | goog.testing.mockmatchers.ArgumentMatcher.call(this, function(obj) { 30 | 'use strict'; 31 | return obj instanceof goog.events.Event && obj.type == type; 32 | }, 'isEventOfType(' + type + ')'); 33 | }; 34 | goog.inherits( 35 | goog.testing.events.EventMatcher, 36 | goog.testing.mockmatchers.ArgumentMatcher); 37 | -------------------------------------------------------------------------------- /docs/closure/goog/testing/fs/file.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Mock file object. 9 | */ 10 | 11 | goog.setTestOnly('goog.testing.fs.File'); 12 | goog.provide('goog.testing.fs.File'); 13 | 14 | goog.require('goog.testing.fs.Blob'); 15 | 16 | 17 | 18 | /** 19 | * A mock file object. 20 | * 21 | * @param {string} name The name of the file. 22 | * @param {Date=} opt_lastModified The last modified date for this file. May be 23 | * null if file modification dates are not supported. 24 | * @param {string=} opt_data The string data encapsulated by the blob. 25 | * @param {string=} opt_type The mime type of the blob. 26 | * @constructor 27 | * @extends {goog.testing.fs.Blob} 28 | * @final 29 | */ 30 | goog.testing.fs.File = function(name, opt_lastModified, opt_data, opt_type) { 31 | 'use strict'; 32 | goog.testing.fs.File.base(this, 'constructor', opt_data, opt_type); 33 | 34 | /** 35 | * @see http://www.w3.org/TR/FileAPI/#dfn-name 36 | * @type {string} 37 | */ 38 | this.name = name; 39 | 40 | /** 41 | * @see http://www.w3.org/TR/FileAPI/#dfn-lastModifiedDate 42 | * @type {Date} 43 | */ 44 | this.lastModifiedDate = opt_lastModified || null; 45 | }; 46 | goog.inherits(goog.testing.fs.File, goog.testing.fs.Blob); 47 | -------------------------------------------------------------------------------- /docs/closure/goog/testing/fs/filesystem.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Mock filesystem object. 9 | */ 10 | 11 | goog.setTestOnly('goog.testing.fs.FileSystem'); 12 | goog.provide('goog.testing.fs.FileSystem'); 13 | 14 | goog.require('goog.fs.FileSystem'); 15 | goog.require('goog.testing.fs.DirectoryEntry'); 16 | 17 | 18 | 19 | /** 20 | * A mock filesystem object. 21 | * 22 | * @param {string=} opt_name The name of the filesystem. 23 | * @constructor 24 | * @implements {goog.fs.FileSystem} 25 | * @final 26 | */ 27 | goog.testing.fs.FileSystem = function(opt_name) { 28 | 'use strict'; 29 | /** 30 | * The name of the filesystem. 31 | * @type {string} 32 | * @private 33 | */ 34 | this.name_ = opt_name || 'goog.testing.fs.FileSystem'; 35 | 36 | /** 37 | * The root entry of the filesystem. 38 | * @type {!goog.testing.fs.DirectoryEntry} 39 | * @private 40 | */ 41 | this.root_ = new goog.testing.fs.DirectoryEntry(this, null, '', {}); 42 | }; 43 | 44 | 45 | /** @override */ 46 | goog.testing.fs.FileSystem.prototype.getName = function() { 47 | 'use strict'; 48 | return this.name_; 49 | }; 50 | 51 | 52 | /** 53 | * @override 54 | * @return {!goog.testing.fs.DirectoryEntry} 55 | */ 56 | goog.testing.fs.FileSystem.prototype.getRoot = function() { 57 | 'use strict'; 58 | return this.root_; 59 | }; 60 | -------------------------------------------------------------------------------- /docs/closure/goog/testing/mockinterface.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview An interface that all mocks should share. 9 | */ 10 | 11 | goog.setTestOnly('goog.testing.MockInterface'); 12 | goog.provide('goog.testing.MockInterface'); 13 | 14 | goog.require('goog.Promise'); 15 | 16 | 17 | 18 | /** @interface */ 19 | goog.testing.MockInterface = function() {}; 20 | 21 | 22 | /** 23 | * Write down all the expected functions that have been called on the 24 | * mock so far. From here on out, future function calls will be 25 | * compared against this list. 26 | */ 27 | goog.testing.MockInterface.prototype.$replay = function() {}; 28 | 29 | 30 | /** 31 | * Reset the mock. 32 | */ 33 | goog.testing.MockInterface.prototype.$reset = function() {}; 34 | 35 | 36 | /** 37 | * Waits for the Mock to gather expectations and then performs verify. 38 | * @return {!goog.Promise} 39 | */ 40 | goog.testing.MockInterface.prototype.$waitAndVerify = function() {}; 41 | 42 | 43 | /** 44 | * Assert that the expected function calls match the actual calls. 45 | */ 46 | goog.testing.MockInterface.prototype.$verify = function() {}; 47 | -------------------------------------------------------------------------------- /docs/closure/goog/testing/performancetable.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright The Closure Library Authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by the Apache License, Version 2.0. 5 | * See the COPYING file for details. 6 | */ 7 | 8 | /* Author: attila@google.com (Attila Bodis) */ 9 | /* Author: nicksantos@google.com (Nick Santos) */ 10 | 11 | table.test-results { 12 | font: 12px "Courier New", Courier, monospace; 13 | } 14 | 15 | table.test-results thead th { 16 | padding: 2px; 17 | color: #fff; 18 | background-color: #369; 19 | text-align: center; 20 | } 21 | 22 | table.test-results tbody td { 23 | padding: 2px; 24 | color: #333; 25 | background-color: #ffc; 26 | text-align: right; 27 | } 28 | 29 | table.test-results tbody td.test-description { 30 | text-align: left; 31 | } 32 | 33 | table.test-results tbody td.test-average { 34 | color: #000; 35 | font-weight: bold; 36 | } 37 | 38 | table.test-results tbody tr.test-suspicious td.test-standard-deviation { 39 | color: #800; 40 | } 41 | 42 | table.test-results tbody td.test-error { 43 | color: #800; 44 | font-weight: bold; 45 | text-align: center; 46 | } 47 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/buttonside.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Enum for button side constants. In its own file so as to not 9 | * cause a circular dependency with {@link goog.ui.ButtonRenderer}. 10 | */ 11 | 12 | goog.provide('goog.ui.ButtonSide'); 13 | 14 | 15 | /** 16 | * Constants for button sides, see {@link goog.ui.Button.prototype.setCollapsed} 17 | * for details. 18 | * @enum {number} 19 | */ 20 | goog.ui.ButtonSide = { 21 | /** Neither side. */ 22 | NONE: 0, 23 | /** Left for LTR, right for RTL. */ 24 | START: 1, 25 | /** Right for LTR, left for RTL. */ 26 | END: 2, 27 | /** Both sides. */ 28 | BOTH: 3 29 | }; 30 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/componentutil.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Static utility methods for UI components. 9 | */ 10 | 11 | goog.provide('goog.ui.ComponentUtil'); 12 | 13 | goog.require('goog.events.MouseAsMouseEventType'); 14 | goog.require('goog.events.MouseEvents'); 15 | goog.require('goog.events.PointerAsMouseEventType'); 16 | 17 | 18 | 19 | /** 20 | * @param {!goog.ui.Component} component 21 | * @return {!goog.events.MouseEvents} The browser events that should be listened 22 | * to for the given mouse events. 23 | */ 24 | goog.ui.ComponentUtil.getMouseEventType = function(component) { 25 | 'use strict'; 26 | return component.pointerEventsEnabled() ? 27 | goog.events.PointerAsMouseEventType : 28 | goog.events.MouseAsMouseEventType; 29 | }; 30 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/controlcontent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Type declaration for control content. 9 | */ 10 | goog.provide('goog.ui.ControlContent'); 11 | 12 | 13 | /** 14 | * Type declaration for text caption or DOM structure to be used as the content 15 | * of {@link goog.ui.Control}s. 16 | * @typedef {string|Node|Array|NodeList} 17 | */ 18 | goog.ui.ControlContent; 19 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/cssnames.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Common CSS class name constants. 9 | */ 10 | 11 | goog.provide('goog.ui.INLINE_BLOCK_CLASSNAME'); 12 | 13 | 14 | /** 15 | * CSS class name for applying the "display: inline-block" property in a 16 | * cross-browser way. 17 | * @type {string} 18 | */ 19 | goog.ui.INLINE_BLOCK_CLASSNAME = goog.getCssName('goog-inline-block'); 20 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/decorate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Provides a function that decorates an element based on its CSS 9 | * class name. 10 | */ 11 | 12 | goog.provide('goog.ui.decorate'); 13 | 14 | goog.require('goog.ui.registry'); 15 | goog.requireType('goog.ui.Component'); 16 | 17 | 18 | /** 19 | * Decorates the element with a suitable {@link goog.ui.Component} instance, if 20 | * a matching decorator is found. 21 | * @param {Element} element Element to decorate. 22 | * @return {goog.ui.Component?} New component instance, decorating the element. 23 | */ 24 | goog.ui.decorate = function(element) { 25 | 'use strict'; 26 | var decorator = goog.ui.registry.getDecorator(element); 27 | if (decorator) { 28 | decorator.decorate(element); 29 | } 30 | return decorator; 31 | }; 32 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/itemevent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Definition of the goog.ui.ItemEvent class. 9 | */ 10 | 11 | goog.provide('goog.ui.ItemEvent'); 12 | 13 | 14 | goog.require('goog.events.Event'); 15 | 16 | 17 | 18 | /** 19 | * Generic ui event class for events that take a single item like a menu click 20 | * event. 21 | * 22 | * @constructor 23 | * @extends {goog.events.Event} 24 | * @param {string} type Event Type. 25 | * @param {Object} target Reference to the object that is the target 26 | * of this event. 27 | * @param {Object} item The item that was clicked. 28 | * @final 29 | */ 30 | goog.ui.ItemEvent = function(type, target, item) { 31 | 'use strict'; 32 | goog.events.Event.call(this, type, target); 33 | 34 | /** 35 | * Item for the event. The type of this object is specific to the type 36 | * of event. For a menu, it would be the menu item that was clicked. For a 37 | * listbox selection, it would be the listitem that was selected. 38 | * 39 | * @type {Object} 40 | */ 41 | this.item = item; 42 | }; 43 | goog.inherits(goog.ui.ItemEvent, goog.events.Event); 44 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/keyboardshortcutevent.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview The event type emitted by the KeyboardShortcutHandler. 9 | */ 10 | goog.provide('goog.ui.KeyboardShortcutEvent'); 11 | 12 | goog.require('goog.events.Event'); 13 | goog.require('goog.events.EventTarget'); 14 | 15 | /** 16 | * Object representing a keyboard shortcut event. 17 | * @param {string} type Event type. 18 | * @param {string} identifier Task identifier for the triggered shortcut. 19 | * @param {Node|goog.events.EventTarget} target Target the original key press 20 | * event originated from. 21 | * @extends {goog.events.Event} 22 | * @constructor 23 | * @final 24 | */ 25 | goog.ui.KeyboardShortcutEvent = function(type, identifier, target) { 26 | 'use strict'; 27 | goog.events.Event.call(this, type, target); 28 | 29 | /** 30 | * Task identifier for the triggered shortcut 31 | * @type {string} 32 | */ 33 | this.identifier = identifier; 34 | }; 35 | goog.inherits(goog.ui.KeyboardShortcutEvent, goog.events.Event); 36 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/menubar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview A base menu bar factory. Can be bound to an existing 9 | * HTML structure or can generate its own DOM. 10 | * 11 | * To decorate, the menu bar should be bound to an element containing children 12 | * with the classname 'goog-menu-button'. See menubar.html for example. 13 | * 14 | * @see ../demos/menubar.html 15 | */ 16 | 17 | goog.provide('goog.ui.menuBar'); 18 | 19 | goog.require('goog.ui.Container'); 20 | goog.require('goog.ui.MenuBarRenderer'); 21 | goog.requireType('goog.dom.DomHelper'); 22 | goog.requireType('goog.ui.ContainerRenderer'); 23 | 24 | 25 | /** 26 | * The menuBar factory creates a new menu bar. 27 | * @param {goog.ui.ContainerRenderer=} opt_renderer Renderer used to render or 28 | * decorate the menu bar; defaults to {@link goog.ui.MenuBarRenderer}. 29 | * @param {goog.dom.DomHelper=} opt_domHelper DOM helper, used for document 30 | * interaction. 31 | * @return {!goog.ui.Container} The created menu bar. 32 | */ 33 | goog.ui.menuBar.create = function(opt_renderer, opt_domHelper) { 34 | 'use strict'; 35 | return new goog.ui.Container( 36 | null, opt_renderer ? opt_renderer : goog.ui.MenuBarRenderer.getInstance(), 37 | opt_domHelper); 38 | }; 39 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/menubardecorator.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Definition of MenuBarRenderer decorator, a static call into 9 | * the goog.ui.registry. 10 | * 11 | * @see ../demos/menubar.html 12 | */ 13 | 14 | goog.provide('goog.ui.menuBarDecorator'); 15 | 16 | goog.require('goog.ui.MenuBarRenderer'); 17 | goog.require('goog.ui.menuBar'); 18 | goog.require('goog.ui.registry'); 19 | 20 | 21 | /** 22 | * Register a decorator factory function. 'goog-menubar' defaults to 23 | * goog.ui.MenuBarRenderer. 24 | */ 25 | goog.ui.registry.setDecoratorByClassName( 26 | goog.ui.MenuBarRenderer.CSS_CLASS, goog.ui.menuBar.create); 27 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/menuheaderrenderer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Renderer for {@link goog.ui.MenuHeader}s. 9 | */ 10 | 11 | goog.provide('goog.ui.MenuHeaderRenderer'); 12 | 13 | goog.require('goog.ui.ControlRenderer'); 14 | 15 | 16 | 17 | /** 18 | * Renderer for menu headers. 19 | * @constructor 20 | * @extends {goog.ui.ControlRenderer} 21 | */ 22 | goog.ui.MenuHeaderRenderer = function() { 23 | 'use strict'; 24 | goog.ui.ControlRenderer.call(this); 25 | }; 26 | goog.inherits(goog.ui.MenuHeaderRenderer, goog.ui.ControlRenderer); 27 | goog.addSingletonGetter(goog.ui.MenuHeaderRenderer); 28 | 29 | 30 | /** 31 | * Default CSS class to be applied to the root element of components rendered 32 | * by this renderer. 33 | * @type {string} 34 | */ 35 | goog.ui.MenuHeaderRenderer.CSS_CLASS = goog.getCssName('goog-menuheader'); 36 | 37 | 38 | /** 39 | * Returns the CSS class to be applied to the root element of components 40 | * rendered using this renderer. 41 | * @return {string} Renderer-specific CSS class. 42 | * @override 43 | */ 44 | goog.ui.MenuHeaderRenderer.prototype.getCssClass = function() { 45 | 'use strict'; 46 | return goog.ui.MenuHeaderRenderer.CSS_CLASS; 47 | }; 48 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/menuseparator.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview A class for representing menu separators. 9 | * @see goog.ui.Menu 10 | */ 11 | 12 | goog.provide('goog.ui.MenuSeparator'); 13 | 14 | goog.require('goog.ui.MenuSeparatorRenderer'); 15 | goog.require('goog.ui.Separator'); 16 | goog.require('goog.ui.registry'); 17 | goog.requireType('goog.dom.DomHelper'); 18 | 19 | 20 | 21 | /** 22 | * Class representing a menu separator. A menu separator extends {@link 23 | * goog.ui.Separator} by always setting its renderer to {@link 24 | * goog.ui.MenuSeparatorRenderer}. 25 | * @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper used for 26 | * document interactions. 27 | * @constructor 28 | * @extends {goog.ui.Separator} 29 | */ 30 | goog.ui.MenuSeparator = function(opt_domHelper) { 31 | 'use strict'; 32 | goog.ui.Separator.call( 33 | this, goog.ui.MenuSeparatorRenderer.getInstance(), opt_domHelper); 34 | }; 35 | goog.inherits(goog.ui.MenuSeparator, goog.ui.Separator); 36 | 37 | 38 | // Register a decorator factory function for goog.ui.MenuSeparators. 39 | goog.ui.registry.setDecoratorByClassName( 40 | goog.ui.MenuSeparatorRenderer.CSS_CLASS, function() { 41 | 'use strict'; 42 | // Separator defaults to using MenuSeparatorRenderer. 43 | return new goog.ui.Separator(); 44 | }); 45 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/toolbarbuttonrenderer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Renderer for toolbar buttons. 9 | */ 10 | 11 | goog.provide('goog.ui.ToolbarButtonRenderer'); 12 | 13 | goog.require('goog.ui.CustomButtonRenderer'); 14 | 15 | 16 | 17 | /** 18 | * Toolbar-specific renderer for {@link goog.ui.Button}s, based on {@link 19 | * goog.ui.CustomButtonRenderer}. 20 | * @constructor 21 | * @extends {goog.ui.CustomButtonRenderer} 22 | */ 23 | goog.ui.ToolbarButtonRenderer = function() { 24 | 'use strict'; 25 | goog.ui.CustomButtonRenderer.call(this); 26 | }; 27 | goog.inherits(goog.ui.ToolbarButtonRenderer, goog.ui.CustomButtonRenderer); 28 | goog.addSingletonGetter(goog.ui.ToolbarButtonRenderer); 29 | 30 | 31 | /** 32 | * Default CSS class to be applied to the root element of buttons rendered 33 | * by this renderer. 34 | * @type {string} 35 | */ 36 | goog.ui.ToolbarButtonRenderer.CSS_CLASS = 37 | goog.getCssName('goog-toolbar-button'); 38 | 39 | 40 | /** 41 | * Returns the CSS class to be applied to the root element of buttons rendered 42 | * using this renderer. 43 | * @return {string} Renderer-specific CSS class. 44 | * @override 45 | */ 46 | goog.ui.ToolbarButtonRenderer.prototype.getCssClass = function() { 47 | 'use strict'; 48 | return goog.ui.ToolbarButtonRenderer.CSS_CLASS; 49 | }; 50 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/toolbarmenubuttonrenderer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview A toolbar menu button renderer. 9 | */ 10 | 11 | goog.provide('goog.ui.ToolbarMenuButtonRenderer'); 12 | 13 | goog.require('goog.ui.MenuButtonRenderer'); 14 | 15 | 16 | 17 | /** 18 | * Toolbar-specific renderer for {@link goog.ui.MenuButton}s, based on {@link 19 | * goog.ui.MenuButtonRenderer}. 20 | * @constructor 21 | * @extends {goog.ui.MenuButtonRenderer} 22 | */ 23 | goog.ui.ToolbarMenuButtonRenderer = function() { 24 | 'use strict'; 25 | goog.ui.MenuButtonRenderer.call(this); 26 | }; 27 | goog.inherits(goog.ui.ToolbarMenuButtonRenderer, goog.ui.MenuButtonRenderer); 28 | goog.addSingletonGetter(goog.ui.ToolbarMenuButtonRenderer); 29 | 30 | 31 | /** 32 | * Default CSS class to be applied to the root element of menu buttons rendered 33 | * by this renderer. 34 | * @type {string} 35 | */ 36 | goog.ui.ToolbarMenuButtonRenderer.CSS_CLASS = 37 | goog.getCssName('goog-toolbar-menu-button'); 38 | 39 | 40 | /** 41 | * Returns the CSS class to be applied to the root element of menu buttons 42 | * rendered using this renderer. 43 | * @return {string} Renderer-specific CSS class. 44 | * @override 45 | */ 46 | goog.ui.ToolbarMenuButtonRenderer.prototype.getCssClass = function() { 47 | 'use strict'; 48 | return goog.ui.ToolbarMenuButtonRenderer.CSS_CLASS; 49 | }; 50 | -------------------------------------------------------------------------------- /docs/closure/goog/ui/toolbarseparator.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview A toolbar separator control. 9 | */ 10 | 11 | goog.provide('goog.ui.ToolbarSeparator'); 12 | 13 | goog.require('goog.ui.Separator'); 14 | goog.require('goog.ui.ToolbarSeparatorRenderer'); 15 | goog.require('goog.ui.registry'); 16 | goog.requireType('goog.dom.DomHelper'); 17 | 18 | 19 | 20 | /** 21 | * A separator control for a toolbar. 22 | * 23 | * @param {goog.ui.ToolbarSeparatorRenderer=} opt_renderer Renderer to render or 24 | * decorate the separator; defaults to 25 | * {@link goog.ui.ToolbarSeparatorRenderer}. 26 | * @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper, used for 27 | * document interaction. 28 | * @constructor 29 | * @extends {goog.ui.Separator} 30 | * @final 31 | */ 32 | goog.ui.ToolbarSeparator = function(opt_renderer, opt_domHelper) { 33 | 'use strict'; 34 | goog.ui.Separator.call( 35 | this, opt_renderer || goog.ui.ToolbarSeparatorRenderer.getInstance(), 36 | opt_domHelper); 37 | }; 38 | goog.inherits(goog.ui.ToolbarSeparator, goog.ui.Separator); 39 | 40 | 41 | // Registers a decorator factory function for toolbar separators. 42 | goog.ui.registry.setDecoratorByClassName( 43 | goog.ui.ToolbarSeparatorRenderer.CSS_CLASS, function() { 44 | 'use strict'; 45 | return new goog.ui.ToolbarSeparator(); 46 | }); 47 | -------------------------------------------------------------------------------- /docs/closure/goog/useragent/keyboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright The Closure Library Authors. 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | /** 8 | * @fileoverview Constants for determining keyboard support. 9 | */ 10 | 11 | goog.provide('goog.userAgent.keyboard'); 12 | 13 | goog.require('goog.labs.userAgent.platform'); 14 | 15 | 16 | /** 17 | * @define {boolean} Whether the user agent is running with in an environment 18 | * that should use Mac-based keyboard shortcuts (Meta instead of Ctrl, etc.). 19 | */ 20 | goog.userAgent.keyboard.ASSUME_MAC_KEYBOARD = 21 | goog.define('goog.userAgent.keyboard.ASSUME_MAC_KEYBOARD', false); 22 | 23 | 24 | /** 25 | * Determines whether Mac-based keyboard shortcuts should be used. 26 | * @return {boolean} 27 | * @private 28 | */ 29 | goog.userAgent.keyboard.determineMacKeyboard_ = function() { 30 | 'use strict'; 31 | return goog.labs.userAgent.platform.isMacintosh() || 32 | goog.labs.userAgent.platform.isIos(); 33 | }; 34 | 35 | 36 | /** 37 | * Whether the user agent is running in an environment that uses Mac-based 38 | * keyboard shortcuts. 39 | * @type {boolean} 40 | */ 41 | goog.userAgent.keyboard.MAC_KEYBOARD = 42 | goog.userAgent.keyboard.ASSUME_MAC_KEYBOARD || 43 | goog.userAgent.keyboard.determineMacKeyboard_(); 44 | -------------------------------------------------------------------------------- /docs/components/AddButton.js: -------------------------------------------------------------------------------- 1 | goog.provide("demo.components.AddButton"); 2 | goog.require("goog.ui.Component"); 3 | 4 | demo.components.AddButton = function () { 5 | goog.ui.Component.call(this); 6 | }; 7 | 8 | goog.inherits(demo.components.AddButton, goog.ui.Component); 9 | 10 | demo.components.AddButton.prototype.createDom = function () { 11 | const button = this.getDomHelper().createDom(goog.dom.TagName.BUTTON); 12 | button.innerText = "Add new task"; 13 | this.setElementInternal(button); 14 | }; 15 | 16 | demo.components.AddButton.prototype.enterDocument = function () { 17 | demo.components.Cell.base(this, "enterDocument"); 18 | this.getHandler().listen(this.getElement(), goog.events.EventType.CLICK, () => { 19 | this.dispatchEvent({ type: "AddTask" }); 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /docs/components/App.js: -------------------------------------------------------------------------------- 1 | goog.provide("demo.components.App"); 2 | goog.require("demo.components.Header"); 3 | goog.require("demo.components.Body"); 4 | goog.require("goog.ui.Component"); 5 | 6 | demo.components.App = function () { 7 | goog.ui.Component.call(this); 8 | this.header = new demo.components.Header(); 9 | this.body = new demo.components.Body(); 10 | this.addChild(this.body); 11 | this.addChild(this.header); 12 | }; 13 | 14 | goog.inherits(demo.components.App, goog.ui.Component); 15 | 16 | demo.components.App.prototype.createDom = function () { 17 | const element = this.getDomHelper().createDom(goog.dom.TagName.DIV); 18 | const headerElement = this.getDomHelper().createDom(goog.dom.TagName.DIV); 19 | const bodyElement = this.getDomHelper().createDom(goog.dom.TagName.DIV); 20 | 21 | element.appendChild(headerElement); 22 | element.appendChild(bodyElement); 23 | 24 | this.header.render(headerElement); 25 | this.body.render(bodyElement); 26 | 27 | this.setElementInternal(element); 28 | }; 29 | -------------------------------------------------------------------------------- /docs/components/Body.js: -------------------------------------------------------------------------------- 1 | goog.provide("demo.components.Body"); 2 | goog.require("demo.components.Table"); 3 | goog.require("demo.components.AddButton"); 4 | goog.require("goog.ui.Component"); 5 | 6 | demo.components.Body = function () { 7 | goog.ui.Component.call(this); 8 | 9 | this.table = new demo.components.Table(); 10 | this.addButton = new demo.components.AddButton(); 11 | 12 | this.addChild(this.table); 13 | this.addChild(this.addButton); 14 | }; 15 | 16 | goog.inherits(demo.components.Body, goog.ui.Component); 17 | 18 | demo.components.Body.prototype.createDom = function () { 19 | const element = this.getDomHelper().createDom(goog.dom.TagName.DIV); 20 | 21 | element.innerText = "Task List"; 22 | 23 | this.table.render(element); 24 | this.addButton.render(element); 25 | 26 | this.setElementInternal(element); 27 | }; 28 | 29 | demo.components.Body.prototype.enterDocument = function () { 30 | demo.components.Body.base(this, "enterDocument"); 31 | this.listen("AddTask", () => { 32 | this.table.addRow(); 33 | }); 34 | 35 | this.listen("RemoveRow", (msg) => { 36 | this.table.removeRow(msg.payload.index); 37 | }); 38 | }; 39 | -------------------------------------------------------------------------------- /docs/components/Cell.js: -------------------------------------------------------------------------------- 1 | goog.provide("demo.components.Cell"); 2 | goog.require("goog.ui.Component"); 3 | 4 | demo.components.Cell = function ({ innerElement, childComponent }) { 5 | goog.ui.Component.call(this); 6 | 7 | this.innerElement = innerElement; 8 | this.childComponent = childComponent; 9 | }; 10 | 11 | goog.inherits(demo.components.Cell, goog.ui.Component); 12 | 13 | demo.components.Cell.prototype.createDom = function () { 14 | const cell = this.getDomHelper().createDom(goog.dom.TagName.TD); 15 | 16 | cell.setAttribute( 17 | "style", 18 | ` 19 | padding: 8px; 20 | ` 21 | ); 22 | 23 | if (this.innerElement) { 24 | cell.appendChild(this.innerElement); 25 | } 26 | if (this.childComponent) { 27 | this.addChild(this.childComponent); 28 | this.childComponent.render(cell); 29 | } 30 | 31 | this.setElementInternal(cell); 32 | }; 33 | -------------------------------------------------------------------------------- /docs/components/DeleteButton.js: -------------------------------------------------------------------------------- 1 | goog.provide("demo.components.DeleteButton"); 2 | goog.require("goog.ui.Component"); 3 | 4 | demo.components.DeleteButton = function () { 5 | goog.ui.Component.call(this); 6 | }; 7 | 8 | goog.inherits(demo.components.DeleteButton, goog.ui.Component); 9 | 10 | demo.components.DeleteButton.prototype.createDom = function () { 11 | const button = this.getDomHelper().createDom(goog.dom.TagName.BUTTON); 12 | button.innerText = "Delete"; 13 | this.setElementInternal(button); 14 | }; 15 | 16 | demo.components.DeleteButton.prototype.enterDocument = function () { 17 | demo.components.Cell.base(this, "enterDocument"); 18 | this.getHandler().listen(this.getElement(), goog.events.EventType.CLICK, () => { 19 | this.dispatchEvent({ type: "DeleteClicked" }); 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /docs/components/Header.js: -------------------------------------------------------------------------------- 1 | goog.provide("demo.components.Header"); 2 | goog.require("goog.ui.Component"); 3 | 4 | demo.components.Header = function () { 5 | goog.ui.Component.call(this); 6 | }; 7 | 8 | goog.inherits(demo.components.Header, goog.ui.Component); 9 | 10 | demo.components.Header.prototype.createDom = function () { 11 | const element = this.getDomHelper().createDom(goog.dom.TagName.HEADER); 12 | const h2 = this.getDomHelper().createDom(goog.dom.TagName.H2); 13 | 14 | h2.innerText = "Closure Tools DevTools Demo"; 15 | element.setAttribute( 16 | "style", 17 | ` 18 | border-bottom: 1px solid gray; 19 | margin-bottom: 16px; 20 | ` 21 | ); 22 | 23 | element.appendChild(h2); 24 | 25 | this.setElementInternal(element); 26 | }; 27 | -------------------------------------------------------------------------------- /docs/components/Table.js: -------------------------------------------------------------------------------- 1 | goog.provide("demo.components.Table"); 2 | goog.require("demo.components.Row"); 3 | goog.require("goog.ui.Component"); 4 | 5 | demo.components.Table = function () { 6 | goog.ui.Component.call(this); 7 | 8 | this.rows = []; 9 | }; 10 | 11 | goog.inherits(demo.components.Table, goog.ui.Component); 12 | 13 | demo.components.Table.prototype.createDom = function () { 14 | const element = this.getDomHelper().createDom(goog.dom.TagName.TABLE); 15 | 16 | element.setAttribute( 17 | "style", 18 | ` 19 | margin-top: 16px; 20 | margin-bottom: 16px; 21 | border-collapse: collapse; 22 | ` 23 | ); 24 | 25 | this.setElementInternal(element); 26 | 27 | for (let i = 0; i < 2; i++) { 28 | this.addRow(); 29 | } 30 | }; 31 | 32 | demo.components.Table.prototype.addRow = function () { 33 | const row = new demo.components.Row(this.rows.length); 34 | this.addChild(row); 35 | row.render(this.getElement()); 36 | this.rows.push(row); 37 | }; 38 | 39 | demo.components.Table.prototype.removeRow = function (index) { 40 | this.rows[index].dispose(); 41 | this.rows.splice(index, 1); 42 | 43 | this.refreshIndex(); 44 | }; 45 | 46 | demo.components.Table.prototype.refreshIndex = function () { 47 | // refresh index 48 | this.rows.forEach((row, index) => { 49 | row.updateIndex(index); 50 | }); 51 | }; 52 | -------------------------------------------------------------------------------- /docs/components/Task.js: -------------------------------------------------------------------------------- 1 | goog.provide("demo.components.Task"); 2 | goog.require("goog.ui.Component"); 3 | 4 | demo.components.Task = function () { 5 | goog.ui.Component.call(this); 6 | }; 7 | 8 | goog.inherits(demo.components.Task, goog.ui.Component); 9 | 10 | demo.components.Task.prototype.createDom = function () { 11 | const task = this.getDomHelper().createDom(goog.dom.TagName.INPUT); 12 | 13 | task.setAttribute("type", "input"); 14 | task.setAttribute("size", "30"); 15 | 16 | this.setElementInternal(task); 17 | }; 18 | -------------------------------------------------------------------------------- /docs/demo.js: -------------------------------------------------------------------------------- 1 | goog.require("demo.components.App"); 2 | 3 | goog.require("closuretoolsdevtools.setup"); 4 | closuretoolsdevtools.setup(); 5 | 6 | document.addEventListener("DOMContentLoaded", () => { 7 | const app = new demo.components.App(); 8 | app.render(document.getElementById("app")); 9 | }); 10 | -------------------------------------------------------------------------------- /docs/icon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/icon-16x16.png -------------------------------------------------------------------------------- /docs/icon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/docs/icon-32x32.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Closure Tools DevTools Demo 22 | 23 | 24 | 30 |
31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/setup.js: -------------------------------------------------------------------------------- 1 | goog.provide("closuretoolsdevtools.setup"); 2 | goog.require("goog.ui.Component"); 3 | goog.require("goog.events.EventTarget"); 4 | 5 | closuretoolsdevtools.setup = function () { 6 | if (!window["__CLOSURE_TOOLS_DEVTOOLS__"]) { 7 | return; 8 | } 9 | window["__CLOSURE_TOOLS_DEVTOOLS__"].setup(); 10 | }; 11 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Closure Tools DevTools", 3 | "description": "DevTools for Google Closure Tools", 4 | "version": "2.0", 5 | "manifest_version": 3, 6 | "icons": { 7 | "16": "icon-16x16.png", 8 | "48": "icon-48x48.png", 9 | "128": "icon-128x128.png" 10 | }, 11 | "devtools_page": "devtools.html", 12 | "permissions": [], 13 | "background": { 14 | "service_worker": "background.js" 15 | }, 16 | "content_scripts": [ 17 | { 18 | "matches": [""], 19 | "js": ["content.js"], 20 | "run_at": "document_start" 21 | } 22 | ], 23 | "web_accessible_resources": [ 24 | { 25 | "resources": ["setupDevTools.js"], 26 | "matches": [""] 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /media/image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/media/image.gif -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "closure-tools-devtool", 3 | "version": "2.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "watch": "run-p -l 'build:js:dev -- --watch' 'build:css -- --watch'", 8 | "build:js:dev": "webpack --mode=development", 9 | "build:js:prod": "webpack --mode=production", 10 | "build:css": "tailwindcss -o ./dist/style.css", 11 | "build:prod": "run-s clean build:js:prod build:css && cd dist && zip -r extension.zip ./* && mv -f ./extension.zip ..", 12 | "clean": "rimraf dist", 13 | "test": "echo \"Error: no test specified\" && exit 1" 14 | }, 15 | "keywords": [], 16 | "author": "", 17 | "license": "MIT", 18 | "devDependencies": { 19 | "@types/chrome": "^0.0.195", 20 | "@types/react": "^18.0.17", 21 | "@types/react-dom": "^18.0.6", 22 | "autoprefixer": "^10.2.6", 23 | "copy-webpack-plugin": "^11.0.0", 24 | "google-closure-library": "^20220803.0.0", 25 | "html-webpack-plugin": "^5.3.1", 26 | "npm-run-all": "^4.1.5", 27 | "postcss": "^8.3.5", 28 | "rimraf": "^3.0.2", 29 | "tailwindcss": "^3.1.8", 30 | "ts-loader": "^9.2.3", 31 | "typescript": "^4.3.4", 32 | "url-loader": "^4.1.1", 33 | "webpack": "^5.40.0", 34 | "webpack-cli": "^4.7.2" 35 | }, 36 | "dependencies": { 37 | "@reduxjs/toolkit": "^1.6.0", 38 | "classnames": "^2.3.1", 39 | "json-stringify-safe": "^5.0.1", 40 | "react": "^18.2.0", 41 | "react-dom": "^18.2.0", 42 | "react-json-view": "^1.21.3", 43 | "react-redux": "^8.0.2" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /resources/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/resources/icon-128x128.png -------------------------------------------------------------------------------- /resources/icon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/resources/icon-16x16.png -------------------------------------------------------------------------------- /resources/icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/resources/icon-48x48.png -------------------------------------------------------------------------------- /resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mugi-uno/closure-tools-devtools/5e97c5317a7b994a32d2eb2e06d14c627b2f582b/resources/icon.png -------------------------------------------------------------------------------- /src/activator/setup.js: -------------------------------------------------------------------------------- 1 | goog.provide("closuretoolsdevtools.setup"); 2 | goog.require("goog.ui.Component"); 3 | goog.require("goog.events.EventTarget"); 4 | 5 | closuretoolsdevtools.setup = function () { 6 | if (!window["__CLOSURE_TOOLS_DEVTOOLS__"]) { 7 | return; 8 | } 9 | window["__CLOSURE_TOOLS_DEVTOOLS__"].setup(); 10 | }; 11 | -------------------------------------------------------------------------------- /src/content/hoverHook.ts: -------------------------------------------------------------------------------- 1 | import { findClosestModule, getModuleAttributes } from "./util"; 2 | import { postMessage } from "../port"; 3 | import { highlight, unhighlight } from "./highlight"; 4 | 5 | let currentHoveredElement: Element | null; 6 | 7 | const hook = (event: MouseEvent) => { 8 | if (!event.target) return; 9 | 10 | const element = event.target as Element; 11 | const closureElement = findClosestModule(element); 12 | if (!closureElement) return; 13 | 14 | unhighlight(); 15 | highlight(closureElement); 16 | currentHoveredElement = closureElement; 17 | }; 18 | 19 | export const enableHoverHook = () => { 20 | document.addEventListener("mouseover", hook); 21 | document.addEventListener( 22 | "click", 23 | (event) => { 24 | event.preventDefault(); 25 | event.stopPropagation(); 26 | 27 | if (currentHoveredElement) { 28 | postMessage({ 29 | type: "SELECTED_ACTIVE_ELEMENT", 30 | payload: getModuleAttributes(currentHoveredElement), 31 | }); 32 | } 33 | }, 34 | { once: true, capture: true } 35 | ); 36 | }; 37 | 38 | export const disableHoverHook = () => { 39 | document.removeEventListener("mouseover", hook); 40 | unhighlight(); 41 | currentHoveredElement = null; 42 | }; 43 | -------------------------------------------------------------------------------- /src/content/scanComponents.ts: -------------------------------------------------------------------------------- 1 | import { findAllModules, findClosestModule, getModuleAttributes } from "./util"; 2 | import { postMessage } from "../port"; 3 | import { ClosureComponentType } from "../types"; 4 | 5 | export const scan = (rootElement: Element): ClosureComponentType[] => { 6 | return findAllModules(rootElement) 7 | .filter((el) => { 8 | if (!el.parentElement) return true; 9 | 10 | const closest = findClosestModule(el.parentElement); 11 | if (!closest) return true; 12 | 13 | return findClosestModule(el.parentElement) === rootElement; 14 | }) 15 | .map((moduleElement) => ({ 16 | ...getModuleAttributes(moduleElement), 17 | childComponents: scan(moduleElement), 18 | })); 19 | }; 20 | 21 | export const scanComponents = () => { 22 | if (!document.body) return; 23 | 24 | const components = scan(document.body); 25 | postMessage({ 26 | type: "SCANNED_COMPONENTS", 27 | payload: { components }, 28 | }); 29 | }; 30 | -------------------------------------------------------------------------------- /src/content/util.ts: -------------------------------------------------------------------------------- 1 | import { ID_ATRRIBUTE_NAME, MODULE_NAME_ATTRIBUTE_NAME } from "./../types"; 2 | 3 | const MODULE_SELECTOR = `[${MODULE_NAME_ATTRIBUTE_NAME}]`; 4 | 5 | export const findAllModules = (element: Element) => [...element.querySelectorAll(MODULE_SELECTOR)]; 6 | 7 | export const findClosestModule = (element: Element) => element.closest(MODULE_SELECTOR); 8 | 9 | export const findByModuleId = (id: string) => document.querySelector(`[${ID_ATRRIBUTE_NAME}=${id}]`); 10 | 11 | export const getModuleName = (element: Element) => element.getAttribute(MODULE_NAME_ATTRIBUTE_NAME); 12 | 13 | export const getModuleId = (element: Element) => element.getAttribute(ID_ATRRIBUTE_NAME); 14 | 15 | export const getModuleAttributes = (element: Element) => ({ 16 | name: getModuleName(element)!, 17 | id: getModuleId(element)!, 18 | }); 19 | -------------------------------------------------------------------------------- /src/devtools/devtools.ts: -------------------------------------------------------------------------------- 1 | chrome.devtools.panels.create("Closure", "", "panel.html", () => {}); 2 | -------------------------------------------------------------------------------- /src/lib/generateID.ts: -------------------------------------------------------------------------------- 1 | export const generateID = (() => { 2 | let id = 1; 3 | return () => `id${id++}`; 4 | })(); 5 | -------------------------------------------------------------------------------- /src/panel/components/App.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { ComponentsPane } from "./ComponentsPane"; 3 | import { EventsPane } from "./EventsPane"; 4 | import { Tab } from "./Tab"; 5 | 6 | type Pane = "Components" | "Events"; 7 | 8 | export const App: React.FC<{}> = () => { 9 | const [activePane, setActivePane] = useState("Components"); 10 | 11 | return ( 12 | <> 13 |
14 | setActivePane("Components")}> 15 | Components 16 | 17 | setActivePane("Events")}> 18 | Events 19 | 20 |
21 |
22 | 23 | 24 |
25 | 26 | ); 27 | }; 28 | -------------------------------------------------------------------------------- /src/panel/components/Checkbox.tsx: -------------------------------------------------------------------------------- 1 | import classNames from "classnames"; 2 | import React from "react"; 3 | 4 | type Props = { 5 | checked: boolean; 6 | onChange: React.ChangeEventHandler; 7 | label: string; 8 | className?: string; 9 | }; 10 | 11 | export const Checkbox: React.VFC = (props) => { 12 | return ( 13 | 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /src/panel/components/ClosureComponentTree.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { ClosureComponentType } from "../../types"; 3 | import { ClosureComponent } from "./ClosureComponent"; 4 | 5 | type Props = { 6 | components: ClosureComponentType[]; 7 | depth: number; 8 | }; 9 | 10 | export const ClosureComponentTree: React.FC = (props) => { 11 | return ( 12 |
13 | {props.components.map((component) => ( 14 | 15 | ))} 16 |
17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /src/panel/components/ComponentDataArea.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactJson from "react-json-view"; 3 | import { useSelector } from "../modules/store"; 4 | 5 | export const ComponentDataArea: React.FC = () => { 6 | const selectedElement = useSelector((state) => state.panel.selectedElement?.data as any); 7 | 8 | return ( 9 |
10 | {selectedElement && } 11 |
12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /src/panel/components/ComponentsPane.tsx: -------------------------------------------------------------------------------- 1 | import classNames from "classnames"; 2 | import React from "react"; 3 | import { useSplitPane } from "../hooks/useSplitPane"; 4 | import { useSelector } from "../modules/store"; 5 | import { ClosureComponentTree } from "./ClosureComponentTree"; 6 | import { ComponentDataArea } from "./ComponentDataArea"; 7 | import { ComponentsPaneHeader } from "./ComponentsPaneHeader"; 8 | 9 | export const ComponentsPane: React.FC<{ show: boolean }> = (props) => { 10 | const components = useSelector((state) => state.panel.components); 11 | const { splitPaneHandlers, adjustBarHandlers, leftSize } = useSplitPane(); 12 | 13 | return ( 14 |
15 |
16 | 17 |
18 | 19 |
20 |
21 |
22 |
23 |
24 |
25 | 26 |
27 |
28 | ); 29 | }; 30 | -------------------------------------------------------------------------------- /src/panel/components/CopyButton.tsx: -------------------------------------------------------------------------------- 1 | import classNames from "classnames"; 2 | import React, { MouseEventHandler, useState } from "react"; 3 | import copySVG from "../resources/content_copy_black_24dp.svg"; 4 | import doneSVG from "../resources/done_black_24dp.svg"; 5 | 6 | type Props = { 7 | text: string; 8 | className?: string; 9 | }; 10 | 11 | export const CopyButton: React.VFC = (props) => { 12 | const [copied, setCopied] = useState(false); 13 | 14 | const onClick: MouseEventHandler = (event) => { 15 | event.stopPropagation(); 16 | const textarea = document.createElement("textarea"); 17 | textarea.setAttribute("style", "position:absolute;left:-100%"); 18 | document.body.appendChild(textarea); 19 | textarea.value = props.text; 20 | textarea.select(); 21 | document.execCommand("copy"); 22 | document.body.removeChild(textarea); 23 | setCopied(true); 24 | 25 | setTimeout(() => { 26 | setCopied(false); 27 | }, 1000); 28 | }; 29 | 30 | return ( 31 | 34 | ); 35 | }; 36 | -------------------------------------------------------------------------------- /src/panel/components/EventItem.tsx: -------------------------------------------------------------------------------- 1 | import classNames from "classnames"; 2 | import React from "react"; 3 | import { EventDispatchEventObject } from "../../types"; 4 | import { useRenderState } from "../hooks/useRenderState"; 5 | 6 | const getDateString = (timestamp: number) => { 7 | const date = new Date(timestamp); 8 | const hours = `${date.getHours()}`.padStart(2, "0"); 9 | const minutes = `${date.getMinutes()}`.padStart(2, "0"); 10 | const seconds = `${date.getSeconds()}`.padStart(2, "0"); 11 | const milliseconds = `${date.getMilliseconds()}`.padEnd(3, "0"); 12 | return `${hours}:${minutes}:${seconds}.${milliseconds}`; 13 | }; 14 | 15 | export const EventItem: React.FC<{ event: EventDispatchEventObject }> = ({ event }) => { 16 | const { renderStateClassObject } = useRenderState(); 17 | 18 | return ( 19 |
20 |
21 |
22 | {event.moduleName} 23 | {event.eventName} 24 |
25 | {getDateString(event.timestamp)} 26 |
27 |
{event.eventDetail}
28 |
29 | ); 30 | }; 31 | -------------------------------------------------------------------------------- /src/panel/components/Tab.tsx: -------------------------------------------------------------------------------- 1 | import classNames from "classnames"; 2 | import React, { ReactNode } from "react"; 3 | 4 | type Props = { 5 | active: boolean; 6 | className?: string; 7 | children: ReactNode; 8 | onClick: () => void; 9 | }; 10 | 11 | export const Tab: React.FC = (props) => { 12 | return ( 13 | 26 | ); 27 | }; 28 | -------------------------------------------------------------------------------- /src/panel/hooks/useRenderState.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react"; 2 | 3 | export const useRenderState = () => { 4 | const [isRendering, setIsRendering] = useState(true); 5 | const [isRendered, setIsRendered] = useState(false); 6 | 7 | useEffect(() => { 8 | setTimeout(() => { 9 | setIsRendering(false); 10 | }, 1); 11 | }, []); 12 | 13 | useEffect(() => { 14 | if (!isRendering) { 15 | setTimeout(() => { 16 | setIsRendered(true); 17 | }, 1000); 18 | } 19 | }, [isRendering]); 20 | 21 | const renderStateClassObject = { 22 | "bg-red-100": isRendering, 23 | "duration-100": isRendered, 24 | "duration-1000": !isRendered, 25 | }; 26 | 27 | return { renderStateClassObject }; 28 | }; 29 | -------------------------------------------------------------------------------- /src/panel/hooks/useSplitPane.ts: -------------------------------------------------------------------------------- 1 | import { MouseEventHandler, TouchEventHandler, useEffect, useState } from "react"; 2 | 3 | export const useSplitPane = () => { 4 | const [leftSize, setLeftSize] = useState(500); 5 | const [positionX, setPositionX] = useState(null); 6 | 7 | const resizeStart = (x: number) => { 8 | setPositionX(x); 9 | }; 10 | 11 | const resize = (x: number) => { 12 | if (positionX === null) return; 13 | setLeftSize(leftSize + (x - positionX)); 14 | setPositionX(x); 15 | }; 16 | 17 | const resizeEnd = () => { 18 | setPositionX(null); 19 | }; 20 | 21 | const splitPaneHandlers: { 22 | onMouseMove: MouseEventHandler; 23 | onTouchMove: TouchEventHandler; 24 | onMouseUp: MouseEventHandler; 25 | onMouseLeave: MouseEventHandler; 26 | } = { 27 | onMouseMove(event) { 28 | resize(event.clientX); 29 | }, 30 | onTouchMove(event) { 31 | resize(event.touches[0].clientX); 32 | }, 33 | onMouseUp(_) { 34 | resizeEnd(); 35 | }, 36 | onMouseLeave(_) { 37 | resizeEnd(); 38 | }, 39 | }; 40 | 41 | const adjustBarHandlers: { 42 | onMouseDown: MouseEventHandler; 43 | onTouchStart: TouchEventHandler; 44 | } = { 45 | onMouseDown(event) { 46 | resizeStart(event.clientX); 47 | }, 48 | onTouchStart(event) { 49 | resizeStart(event.touches[0].clientX); 50 | }, 51 | }; 52 | 53 | return { splitPaneHandlers, adjustBarHandlers, leftSize }; 54 | }; 55 | -------------------------------------------------------------------------------- /src/panel/listener.ts: -------------------------------------------------------------------------------- 1 | import { MatchMessage, ContentMessages } from "./../port"; 2 | import { actions } from "./modules/slice"; 3 | import { AppDispatch } from "./modules/store"; 4 | 5 | export const listener = (dispatch: AppDispatch, port: chrome.runtime.Port) => { 6 | const handlerMap: { 7 | [key in ContentMessages["type"]]?: (msg: MatchMessage) => void; 8 | } = { 9 | SELECTED_ACTIVE_ELEMENT: (msg) => { 10 | dispatch(actions.selectElement(msg.payload)); 11 | }, 12 | GET_COMPONENT_DATA: (msg) => { 13 | dispatch(actions.detectComponentData({ id: msg.payload.id, data: msg.payload.dataJsonString })); 14 | }, 15 | SCANNED_COMPONENTS: (msg) => { 16 | dispatch(actions.detectedComponents(msg.payload.components)); 17 | }, 18 | EVENT_DISPATCHED: (msg) => { 19 | dispatch(actions.eventDispached(msg.payload.event)); 20 | }, 21 | }; 22 | 23 | port.onMessage.addListener((msg: ContentMessages) => { 24 | const handler = handlerMap[msg.type]; 25 | if (handler) { 26 | handler(msg as any); 27 | } 28 | return false; 29 | }); 30 | }; 31 | -------------------------------------------------------------------------------- /src/panel/modules/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore, getDefaultMiddleware } from "@reduxjs/toolkit"; 2 | import { TypedUseSelectorHook, useDispatch as useDispatchOrg, useSelector as useSelectorOrg } from "react-redux"; 3 | import { reducer } from "./slice"; 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | panel: reducer, 8 | }, 9 | middleware: getDefaultMiddleware(), 10 | }); 11 | 12 | export type RootState = ReturnType; 13 | 14 | export type AppDispatch = typeof store.dispatch; 15 | export const useDispatch = () => useDispatchOrg(); 16 | export const useSelector: TypedUseSelectorHook = useSelectorOrg; 17 | -------------------------------------------------------------------------------- /src/panel/panel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Panel 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/panel/panel.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import { Provider } from "react-redux"; 4 | import { connect, currentPort, PANEL_PORT_NAME, postMessage } from "../port"; 5 | import { App } from "./components/App"; 6 | import { listener } from "./listener"; 7 | import { actions } from "./modules/slice"; 8 | import { store } from "./modules/store"; 9 | 10 | const connectApp = () => { 11 | connect(PANEL_PORT_NAME + chrome.devtools.inspectedWindow.tabId); 12 | listener(store.dispatch, currentPort()!); 13 | store.dispatch(actions.reset()); 14 | postMessage({ type: "SCAN_COMPONENTS" }); 15 | }; 16 | 17 | connectApp(); 18 | chrome.devtools.network.onNavigated.addListener(connectApp); 19 | 20 | ReactDOM.render( 21 | 22 | 23 | , 24 | document.getElementById("app") 25 | ); 26 | -------------------------------------------------------------------------------- /src/panel/resources/clear_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/panel/resources/content_copy_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/panel/resources/done_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/panel/resources/refresh_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/panel/resources/search_black_24dp.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/port.ts: -------------------------------------------------------------------------------- 1 | import { ClosureComponentType, EventDispatchEventObject } from "./types"; 2 | 3 | export const CONTENT_PORT_NAME = "content"; 4 | export const PANEL_PORT_NAME = "panel"; 5 | 6 | let port: chrome.runtime.Port | null = null; 7 | 8 | export const connect = (name: string) => { 9 | port?.disconnect(); 10 | port = chrome.runtime.connect({ name }); 11 | return port; 12 | }; 13 | 14 | export const disconnect = () => { 15 | port?.disconnect(); 16 | port = null; 17 | }; 18 | 19 | export const currentPort = () => port; 20 | 21 | // Messages from Panel 22 | export type PanelMessages = 23 | | { type: "ENABLE_HIGHLIGHT" } 24 | | { type: "DISABLE_HIGHLIGHT" } 25 | | { type: "HIGHLIGHT_ELEMENT"; payload: { id: string } } 26 | | { type: "UNHIGHLIGHT_ELEMENT" } 27 | | { type: "GET_COMPONENT_DATA"; payload: { id: string } } 28 | | { type: "SCAN_COMPONENTS" }; 29 | 30 | // Messages from Content 31 | export type ContentMessages = 32 | | { type: "SELECTED_ACTIVE_ELEMENT"; payload: { id: string; name: string } } 33 | | { type: "GET_COMPONENT_DATA"; payload: { id: string; dataJsonString: string } } 34 | | { type: "SCANNED_COMPONENTS"; payload: { components: ClosureComponentType[] } } 35 | | { type: "EVENT_DISPATCHED"; payload: { event: EventDispatchEventObject } }; 36 | 37 | export type Messages = PanelMessages | ContentMessages; 38 | export type MatchMessage = M extends { type: K } ? M : never; 39 | 40 | export const postMessage = (msg: Messages) => { 41 | currentPort()?.postMessage(msg); 42 | }; 43 | -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- 1 | export type ClosureComponentType = { 2 | id: string; 3 | name: string; 4 | childComponents: ClosureComponentType[]; 5 | }; 6 | 7 | export type EventDispatchEventObject = { moduleName: string; eventName: string; eventDetail: string; timestamp: number }; 8 | export const EventDispatchedEventName = "closure-tools-devtools-dispatched-event"; 9 | 10 | export type GetComponentDataRequestEventObject = { id: string }; 11 | export const GetComponentDataRequestEventName = "closure-tools-devtools-get-component-data-request-event"; 12 | export type GetComponentDataResponseEventObject = { id: string; data: string }; 13 | export const GetComponentDataResponseEventName = "closure-tools-devtools-get-component-data-response-event"; 14 | 15 | export const MODULE_NAME_ATTRIBUTE_NAME = "data-closure-tools-devtools-component-name"; 16 | export const ID_ATRRIBUTE_NAME = "data-closure-tools-devtools-id"; 17 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | mode: "jit", 3 | purge: ["./src/panel/**/*.{js,jsx,ts,tsx}"], 4 | darkMode: false, // or 'media' or 'class' 5 | theme: { 6 | extend: {}, 7 | }, 8 | variants: { 9 | extend: {}, 10 | }, 11 | plugins: [], 12 | }; 13 | -------------------------------------------------------------------------------- /types/global.d.ts: -------------------------------------------------------------------------------- 1 | declare const goog = any; 2 | declare const closuretoolsdevtools = any; 3 | declare interface Window { 4 | __CLOSURE_TOOLS_DEVTOOLS__: { 5 | setup: () => void; 6 | }; 7 | } 8 | 9 | declare module "*.svg"; 10 | --------------------------------------------------------------------------------