Metadata-Version: 2.4
Name: goodmap_nothingshere
Version: 0.2.0
Summary: goodmap plugin that shows popup if no point is visible in a view
License: MIT
License-File: LICENSE
Author: krzysztof.kolodzinski@problematy.pl
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: goodmap (>=2.0.0a8,<3.0.0)
Description-Content-Type: text/markdown

# goodmap-nothingshere

goodmap plugin that shows popup if no point is visible in a view

## Installation

```sh
pip install goodmap_nothingshere
```

## Activation

Add the plugin to the `plugins` list in your Platzky database configuration.
The `name` must match the entry-point key declared in `pyproject.toml`:

```json
{
    "plugins": [
        {
            "name": "nothingshere",
            "config": {}
        }
    ]
}
```

## Configuration

Everything under `config` is passed straight to the frontend component, so the popup is
tuned from the database without rebuilding the plugin. All keys are optional:

| Key | Type | Default | Meaning |
| --- | --- | --- | --- |
| `messages` | `{ <lang>: string }` | built-in English text | Popup text per language code, picked with the site's active language and falling back to `en`. May contain HTML (e.g. a link). |
| `closeLabels` | `{ <lang>: string }` | `{ "en": "Close", "pl": "Zamknij" }` | Accessible name of the close button, per language. |
| `dismissMinutes` | number | `15` | How long the popup stays hidden after the user closes it. A page reload also brings it back. |

```json
{
    "name": "nothingshere",
    "config": {
        "messages": {
            "en": "No points here yet. <a href=\"/add\">Add one?</a>",
            "pl": "Brak punktów tym miejscu."
        },
        "dismissMinutes": 30
    }
}
```

## Development

This is a goodmap frontend plugin: the backend class subclasses a goodmap capability
base, and the frontend ships a React component per capability via Webpack Module
Federation. A plugin declares its capabilities by subclassing one or more of:

- `goodmap.plugin.MapOverlayPluginBase` — component mounted once over the map
  (exposed as `./MapOverlay`); this plugin's capability
- `goodmap.plugin.MarkerFieldPluginBase` — component rendering/wrapping a marker-popup
  field (exposed as `./MarkerField`)

goodmap derives each capability's Module Federation module from the base class name,
so the webpack `exposes` keys must match, and the webpack container `name` must equal
the entry-point key (`nothingshere`). See goodmap's `examples/plugins/silly-gif` for
the reference layout.

