## Classes
Pulsar global for dealing with packages, themes, menus, and the window.
An instance of this class is always available as the atom
global.
This file will manage the updating of autocomplete-css
completions.json
.
We will mainly utilize @webref/css
.listAll() function that returns a full CSS
list of all properties seperated by their spec shortname. An example
of this format is defined below for ease of future modifications.
Some important notes about the data contained here:
- Often times the value
within the property
will be in the following format:
<valueGroupName>
or even <valueGroupName> | value | value2
or just value | value2
It will be important to build a parser that can handle this format.
The <valueGroupName>
then can be realized via that specs values
where
values[x].name
will match the <valueGroupName>
. Another important note about
handling values here is that oftentimes values[x].values[]
won't actually
contain all possible values. And instead this must be handled by checking
values[x].value
which is another string of <valueGroupName> | value
.
So this should be handled by the same parser.
- Additionally an important note is that nowhere in this data do we get any kind
of description about the data that could lend a hand in being documentation.
So the documentation must be gathered seperatly. Likely the best way to collect
our documentation data is via mdn/content
.
Within content/files/en-us/web/css
is a directory of folders titled
by the name of properties.
The last important thing to note here:
MDN doesn't have docs on everything. And that's a good thing. But it means
many of our items don't have any kind of description. For this situation
we have `manual-property-desc.json` which is a list of manually updated
descriptions for properties where there are none. This was a last resort
intended to provide the highest quality of completions possible.
Overtime many items on this list will likely be able to be removed just as
new ones are added. After running the update script you'll see a warning
saying how many properties are without completions that would then need to
be added to the JSON file.
"spec-shortname": { "spec": { "title": "", "url": "" }, "properties": [ { "name": "", "value": "", "initial": "", "appliesTo": "", "percentages": "", "computedValue": "", "canonicalOrder": "", "animationType": "", "media": "", "styleDeclaration": [ "", "", "" ] } ], "atrules": [ { "name": "", "descriptors": [ { "name": "", "for": "", "value": "", "type": "" } ] } ], "selectors": [], "values": [ { "name": "", "type": "", "prose": "Optional description", "value": "", "values": [ { "name": "", "prose": "Optional Description", "type": "", "value": "" } ] } ], "warnings": [] }
This file will manage the updating of autocomplete-html
completions.json
We will partially utilize @webref/elements
.listAll()
function that returns
a full list of HTML Elements along with a defined interface
.
To use this interface
in any meaningful way, we will utilize the dataset
of Attributes that apply to each interface
from Chromiums DevTools resource
https://github.com/ChromeDevTools/devtools-frontend
.
Finally from here we will utilize https://github.com/mdn/content
to parse
the Markdown docs of MDN's website to retreive descriptions for each element.
Now for a summary of our completions.json
file we aim to generate.
There are two top level elements, tags
and attributes
, both objects.
Within tags
we expect the following:
"tags": {
"a": {
"attributes": [ "href", "hreflang", "media", "rel", "target", "type" ],
"description": "....."
}
};
When an entry contains no attributes
there is no empty array, the element
simply doesn't exist.
The attributes
object contains keys of different elements that themselves
are objects that can contain several valid keys.
cssStyle: Exclusively used for class
attribute
boolean: Attributes that only accept true
or false
flag: For attributes that don't require or accept values. eg autoplay
cssId: Exclusively used for the id
attribute
color: Exclusively used for the bgcolor
attribute
style: Exclusively used for the style
attribute
rel
where only so many valid options exist. Although with our data sources mentioned above, we are able to collect nearly
all the data needed. Except the type
that is defined within our
completions.json
as well as the attribOption
within our completions.
Studying these closer reveals that all attributes listing with our completions.json
do not appear elsewhere, and are nearly all global attributes.
In this case since there is no sane way to collect this data, we will leave this
list as a manually maintained section of our completions.json
.
This does mean that curated-attributes.json
is a static document that
will require manual updating in the future. Or most ideally, will find a way
to automatically generate the needed data.
This file aims to run some short simple tests against update.js
. Focusing
mainly on the Regex used within sanitizeDescription()
Clipboard
](#Clipboard)
* [.deserializers](#AtomEnvironment+deserializers) : DeserializerManager
* [.views](#AtomEnvironment+views) : ViewRegistry
* [.notifications](#AtomEnvironment+notifications) : NotificationManager
* [.config](#AtomEnvironment+config) : Config
* [.keymaps](#AtomEnvironment+keymaps) : KeymapManager
* [.tooltips](#AtomEnvironment+tooltips) : TooltipManager
* [.commands](#AtomEnvironment+commands) : CommandRegistry
* [.grammars](#AtomEnvironment+grammars) : GrammarRegistry
* [.styles](#AtomEnvironment+styles) : StyleManager
* [.packages](#AtomEnvironment+packages) : PackageManager
* [.themes](#AtomEnvironment+themes) : ThemeManager
* [.menu](#AtomEnvironment+menu) : MenuManager
* [.contextMenu](#AtomEnvironment+contextMenu) : ContextMenuManager
* [.project](#AtomEnvironment+project) : Project
* [.textEditors](#AtomEnvironment+textEditors) : TextEditorRegistry
* [.workspace](#AtomEnvironment+workspace) : Workspace
* [.history](#AtomEnvironment+history) : HistoryManager
* _Messaging the User_
* [.beep()](#AtomEnvironment+beep)
* _static_
* _Event Subscription_
* [.onDidBeep(callback)](#AtomEnvironment.onDidBeep) ⇒ Disposable
### atomEnvironment.clipboard : [Clipboard
](#Clipboard)
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.deserializers : DeserializerManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.views : ViewRegistry
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.notifications : NotificationManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.config : Config
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.keymaps : KeymapManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.tooltips : TooltipManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.commands : CommandRegistry
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.grammars : GrammarRegistry
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.styles : StyleManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.packages : PackageManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.themes : ThemeManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.menu : MenuManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.contextMenu : ContextMenuManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.project : Project
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.textEditors : TextEditorRegistry
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.workspace : Workspace
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.history : HistoryManager
**Kind**: instance property of [AtomEnvironment
](#AtomEnvironment)
### atomEnvironment.beep()
Visually and audibly trigger a beep.
**Kind**: instance method of [AtomEnvironment
](#AtomEnvironment)
**Category**: Messaging the User
**Emits**: event:beep
### AtomEnvironment.onDidBeep(callback) ⇒ Disposable
Invoke the given callback whenever [::beep](::beep) is called.
**Kind**: static method of [AtomEnvironment
](#AtomEnvironment)
**Returns**: Disposable
- on which `.dispose()` can be called to unsubscribe.
**Category**: Event Subscription
| Param | Type | Description |
| --- | --- | --- |
| callback | function
| Function to be called whenever [::beep](::beep) is called. |
## Clipboard
**Kind**: global class
### new Clipboard()
Represents the clipboard used for copying and pasting in Pulsar.
An instance of this class is always available as the `atom.clipboard` global.
**Example**
```js
// returns 'hello'
atom.clipboard.write('hello');
console.log(atom.clipboard.read());
```
## etch
**Kind**: global constant
**Jsx**: etch.dom
## css
This file will manage the updating of `autocomplete-css` `completions.json`.
We will mainly utilize `@webref/css`.listAll() function that returns a full CSS
list of all properties seperated by their spec shortname. An example
of this format is defined below for ease of future modifications.
Some important notes about the data contained here:
- Often times the `value` within the `property` will be in the following format:
`