A Meteor package to gather our UI styling utilities while keeping it as light as possible, so that any package can safely use this one without pulling too many unused garbage.
This Meteor package is installable with the usual command:
meteor add pwix:ui-utils
meteor npm install ellipsize lodash --saveNothing to do: the stylesheets are automatically made available to the client.
The exported UIUtils global object provides following items:
Returns a Promise which will eventually resolve when the selector be DOM-ready.
opts is an optional options object with following keys:
-
timeout, defaulting to 1000 ms -
root, the root of the search, defaulting todocument.body -
signal, anAbortControllersignal, defaulting to nullUsage of the signal is, for example:
const controller = new AbortController();
try {
const el = await waitFor( '.my-selector', {
timeout: 5000,
signal: controller.signal
});
} catch( e ){
console.error( e );
}
// and later
controller.abort();The package provides a stylesheet to be imported in your application's main.less as:
@import '{pwix:ui-utils}/exports/stylesheets.less';None at the moment.
Starting with v 0.1.0, and in accordance with advices from the Meteor Guide, we no more hardcode NPM dependencies in the Npm.depends clause of the package.js.
Instead we check npm versions of installed packages at runtime, on server startup, in development environment.
Dependencies as of v 1.8.0:
'ellipsize': '^0.5.1',
'lodash': '^4.17.0'None at the moment.
None at the moment.
In case of support or error, please report your issue request to our Issues tracker.
P. Wieser
- Last updated on 2026, Jun. 30th